OCamlPro / ocaml-top

A simple cross-platform OCaml code editor built for top-level evaluation.
http://typerex.org/ocaml-top.html
GNU General Public License v3.0
64 stars 8 forks source link

The type a. t syntax is not handled correctly #38

Closed yallop closed 11 years ago

yallop commented 11 years ago

The following function gives a syntax error when evaluated (run):

let f : type a. a -> a
   = fun x -> x

The error is:

OCaml version 4.01.0+dev12-2013-03-28

# let f : type a

Characters 14-16:  let f : type a;;
              ^^
Error: Syntax error
AltGr commented 11 years ago

Hmm, right, it seems that a phrase boundary is detected there, so only the first part is sent to the toplevel. I am investigating

Thanks for reporting

AltGr commented 11 years ago

Fixed by https://github.com/OCamlPro/ocp-indent/commit/259b85f27d8859bb6d14fdf5e4c33ca1e04b9aba