Closed strager closed 11 years ago
In this example, I define a typed constant:
def debug(Bool): true // :1:15: compile error: // unexpected ) // expecting |, ?, &, base type or ->
Of course, the type annotation should be (-> Bool), but to the programmer it's really just a Bool.
(-> Bool)
Bool
If programmers can give explicit type signatures to expressions and variables (a la Haskell's ::), things become cumbersome:
::
(xs i #) :: -> Int (s :: -> Set Int) show
The -> is redundant to the programmer and can be inferred.
->
In this example, I define a typed constant:
Of course, the type annotation should be
(-> Bool)
, but to the programmer it's really just aBool
.If programmers can give explicit type signatures to expressions and variables (a la Haskell's
::
), things become cumbersome:The
->
is redundant to the programmer and can be inferred.