From 957f912ad6039a5c58d2056df53e5a8401433036 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Thu, 27 Jan 2022 22:03:31 +0100 Subject: [PATCH] clean up --- src/mo_def/compUnit.ml | 43 +----------------------------------------- 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/src/mo_def/compUnit.ml b/src/mo_def/compUnit.ml index 30a7e5c2eaf..03fd174c377 100644 --- a/src/mo_def/compUnit.ml +++ b/src/mo_def/compUnit.ml @@ -95,47 +95,6 @@ let obj_decs obj_sort at note id_opt fields = present the unit as a list of declarations. *) - - -(* -let { imports; body = cub; _ } = cu.it in - let import_decs = - List.map (fun { it = (id, fp, ri); at; note} -> - { it = LetD ({ it = VarP id; at; note; }, - { it = ImportE (fp, ri); - at; - note = { note_typ = note; note_eff = Type.Triv} }); - at; - note = { note_typ = note; note_eff = Type.Triv } }) imports - in - - - - -let { imports; body = cub; _ } = cu.it in - let import_decs = - List.map (fun { it = (mid, fp, ri); at; note} -> - match mid with - | Surface id -> - { it = LetD ({ it = VarP id; at; note; }, - { it = ImportE (fp, ri); - at; - note = { note_typ = note; note_eff = Type.Triv} }); - at; - note = { note_typ = note; note_eff = Type.Triv } } - | Bulk (id, mod_note) -> - { it = LetD ({ it = (ObjP [{it = { id; pat = { it = VarP id; at; note }}; at; note = ()}]); at; note; }, - { it = ImportE (fp, ri); - at; - note = mod_note }); - at; - note = { note_typ = note; note_eff = Type.Triv } } - ) imports - in - - - *) - let decs_of_lib (cu : comp_unit) = let open Source in let { imports; body = cub; _ } = cu.it in @@ -150,7 +109,7 @@ let decs_of_lib (cu : comp_unit) = at; note = { note_typ = note; note_eff = Type.Triv } } | Bulk (id, mod_note) -> - { it = LetD ({ it = (ObjP [{it = { id; pat = { it = VarP id; at; note }}; at; note = ()}]); at; note; }, + { it = LetD ({ it = ObjP [{it = { id; pat = { it = VarP id; at; note }}; at; note = ()}]; at; note; }, { it = ImportE (fp, ri); at; note = mod_note });