Skip to content

Spec differences from implementation

sandersn edited this page Sep 14, 2010 · 1 revision

This will probably also include places where the spec is not specfic enough.

Anyway, the spec asserts that “type lazy” is valid type syntax, when it is not.

let x = lazy 12;; gives x the type Lazy, which can also be entered int Lazy but let x : int lazy = lazy 12;; is illegal while let x : int Lazy = lazy 12;; is not. In addition being a valid type name, Lazy appears to be a valid constructor with one type argument, but I kept getting an error message “No constructors are available for the type Lazy<_type_>” when trying to use it.

In any case, Fing’s parser behaviour needs to change to match the implementation; the Lazy type is not special, even though the Lazy constructor has its own keyword lazy. So Lazy doesn’t need any special support from the Fing parser.

Also, github comments use markdown but the wiki uses textile? What is going on here? Is one a subset of the other? Why should I have to learn both?

Clone this wiki locally