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

!Toploop.parse_toplevel_phrase hangs after loading camlp4 #4593

Closed
vicuna opened this Issue Aug 4, 2008 · 1 comment

Comments

Projects
None yet
1 participant
@vicuna
Copy link
Collaborator

commented Aug 4, 2008

Original bug ID: 4593
Reporter: @Chris00
Assigned to: ertai
Status: closed (set by @xavierleroy on 2010-04-29T12:31:17Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 3.10.2
Fixed in version: 3.11+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Monitored by: @hcarty

Bug description

$ ocaml
Objective Caml version 3.10.2

#directory "+camlp4";;

#load "camlp4o.cma";;

    Camlp4 Parsing version 3.10.2

!Toploop.parse_toplevel_phrase (Lexing.from_string"let y = 1;;");;

(* the process hangs *)

If I put the above directives in a file, say
--- ev.ml ----------------------------------
#directory "+camlp4";;
#load "camlp4o.cma";;
!Toploop.parse_toplevel_phrase (Lexing.from_string"let y = 1;;");;

Then

$ ocaml
Objective Caml version 3.10.2

#use "ev.ml";;

    Camlp4 Parsing version 3.10.2
  • : Parsetree.toplevel_phrase =

(* the toplevel terminates *)

This may be linked to bug #4495 but I have not checked. In any case, this makes it really difficult to use syntax extensions in the toplevel (especially the ones that need some identifiers to be declared).

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Oct 13, 2008

Comment author: ertai

Thanks for the report, this is now fixed in the CVS HEAD and release311 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.