diff options
| author | letouzey | 2013-08-20 08:22:42 +0000 |
|---|---|---|
| committer | letouzey | 2013-08-20 08:22:42 +0000 |
| commit | fac949450909b5ef17078f220ae809cf54ae3f08 (patch) | |
| tree | faf5fd79415c5282766c2cdea79624b276b31774 /library/lib.ml | |
| parent | 6f53ffee4a1c85ac07e82c65d31de0d2a367566b (diff) | |
Safe_typing code refactoring
- No more modinfo sub-record in the safe_environment record,
this was a syntactic pain.
senv.modinfo.modpath --> senv.modpath
senv.modinfo.variant --> senv.modvariant
senv.modinfo.resolver --> senv.modresolver
senv.modinfo.resolver_of_param --> senv.paramresolver
senv.modinfo.label : removed (can be inferred from modpath)
- No more systematic chaining of safe_environment ('old' field).
Instead, earlier safe_environment is stored in the modvariant field
when necessary (STRUCT and SIG case).
- Improved sharing between end_module and end_modtype
- More qualified names instead of open, better comments, ...
- Some user errors are now checked earlier elsewhere (see for
instance vernac_end_segment), so we can turn these errors into
asserts. The user error about higher-order include is now algebraic.
- Highlight the idea of a state monad in Safe_typing :
type 'a safe_transformer = safe_environment -> 'a * safe_environment
More systematic code in Global, thanks to 'globalize' function.
- Declaremods : less informations stored in openmod_info
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16708 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'library/lib.ml')
| -rw-r--r-- | library/lib.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/lib.ml b/library/lib.ml index 379d0e8ad0..159ac2d6d8 100644 --- a/library/lib.ml +++ b/library/lib.ml @@ -220,7 +220,7 @@ let add_anonymous_entry node = let add_leaf id obj = let (path, _) = current_prefix () in - if Names.mp_eq path Names.initial_path then + if Names.ModPath.equal path Names.initial_path then error ("No session module started (use -top dir)"); let oname = make_oname id in cache_object (oname,obj); @@ -296,7 +296,7 @@ let end_mod is_type = let oname,fs = try match find_entry_p is_opening_node with | oname,OpenedModule (ty,_,_,fs) -> - if Pervasives.(=) ty is_type then oname, fs + if ty == is_type then oname, fs else error_still_opened (module_kind ty) oname | oname,OpenedSection _ -> error_still_opened "section" oname | _ -> assert false |
