Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change to accept syms without parens and to declare multiple names
Syntax of names is changed such that in simple declaration and binding contexts the parentheses around a symbol can be omitted. For example, previously one would write: {(+), (-)} = Int (+): int -> int -> int Now one can also write: {+, -} = Int + : int -> int -> int Parentheses are still required when declaring symbol named functions: type (|) a b = ;; ... (+) x y = ;; ... Of course, the infix notation can still also be used: type a | n = ;; ... x + y = ;; ... Syntax of declarations is also changed such that multiple names can be declared with the same type. Previously one would write: (+): int -> int -> int (-): int -> int -> int Now one can also write: + - : int -> int -> int To make this possible, only implicit type parameters are allowed before the colon. Previously one could write: id a: a -> a Now one must write: id: (a : type) -> a -> a Implicit type parameters are still allowed before the colon: id 'a: a -> a As explicit type parameters preceding the colon are a relic from 1ML without type inference this should not cause major inconvenience. Syntax of paths (namelists) is also changed to allow symbols without parentheses.
- Loading branch information