"ref", several errors in parsing and typing
Here you are some bugs with refs:
# type X ('a) = ref 'a;; Characters 14-17: Parsing error: [phrase] or ";;" expected (in [toplevel phrases]) # type X ('a) = ref ('a) ;; Characters 14-22: Unknown parametric type ref # type X ('a) = ref Int ;; Characters 5-6: Capture variable not allowed: ref # type X = ref Int ;; Characters 5-6: Capture variable not allowed: ref # type X = (ref Int) ;; Characters 11-14: Capture variable not allowed: ref
and a typo
let x = ref ('a -> 'a) (fun (x:'b):'b = x);; Characters 9-44: Type ref 'a -> 'a constains polymorphic variables ^^^^