Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use Map.Make after "hol.ml"? #73

Open
fblanqui opened this issue Jan 16, 2023 · 3 comments
Open

How to use Map.Make after "hol.ml"? #73

fblanqui opened this issue Jan 16, 2023 · 3 comments

Comments

@fblanqui
Copy link

Hello. Using ocaml.4.02.3 and campl5.6.17 I get the following problem:

#use "hol.ml";;
# module OrdInt = struct type t = int let compare = (-) end;;
Toplevel input:
# module OrdInt = struct type t = int let compare = (-) end;;
         ^^^^^^
Parse error: 'type' or 'rec' expected after 'module' (in [str_item])

Why can't I define modules anymore? How do I do to build maps on integers (Map.Make(OrdInt))?

@maggesi
Copy link

maggesi commented Jan 16, 2023

You can use

unset_jrh_lexer;;

to go back to normal OCaml syntax and

set_jrh_lexer;;

to reactivate CAML Light / HOL Light syntax.

@fblanqui
Copy link
Author

Thanks!

@aqjune-aws
Copy link
Contributor

Now we officially have a Help document for unset_jrh_lexer. :) https://github.com/jrh13/hol-light/blob/master/Help/unset_jrh_lexer.hlp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants