aboutsummaryrefslogtreecommitdiff
path: root/library/lib.ml
diff options
context:
space:
mode:
authorMaxime Dénès2019-07-08 15:00:36 +0200
committerMaxime Dénès2019-09-16 09:56:58 +0200
commit4614010ceddb9ed5100fa4e43d2807b172143a19 (patch)
tree79fbcf2cb11e04765b5736399c85cb06ac5298c4 /library/lib.ml
parent2957e86c93556b0baf86b662d34fce1a2096edc2 (diff)
Specialize `ImportObject` to `Export`
`Import` does not actually need to register an object, only `Export` does. So we specialize and rename the object into `ExportObject`.
Diffstat (limited to 'library/lib.ml')
-rw-r--r--library/lib.ml9
1 files changed, 3 insertions, 6 deletions
diff --git a/library/lib.ml b/library/lib.ml
index 3f51826315..851f086961 100644
--- a/library/lib.ml
+++ b/library/lib.ml
@@ -73,11 +73,8 @@ let classify_segment seg =
clean ((id,o)::substl, keepl, anticipl) stk
| KeepObject _ ->
clean (substl, (id,o)::keepl, anticipl) stk
- | ImportObject { export } ->
- if export then
- clean ((id,o)::substl, keepl, anticipl) stk
- else
- clean acc stk
+ | ExportObject _ ->
+ clean ((id,o)::substl, keepl, anticipl) stk
| AtomicObject obj ->
begin match classify_object obj with
| Dispose -> clean acc stk
@@ -615,7 +612,7 @@ let discharge_item ((sp,_ as oname),e) =
| Leaf lobj ->
begin match lobj with
| ModuleObject _ | ModuleTypeObject _ | IncludeObject _ | KeepObject _
- | ImportObject _ -> None
+ | ExportObject _ -> None
| AtomicObject obj ->
Option.map (fun o -> (basename sp,o)) (discharge_object (oname,obj))
end