evincarofautumn / kitten

A statically typed concatenative systems programming language.
http://kittenlang.org/
Other
1.09k stars 39 forks source link

Poor error messages if 'def' colon is ommitted #71

Closed strager closed 11 years ago

strager commented 11 years ago
def foo(Int -> Int) // Note missing colon.
  ->x
  x x *

3 foo sayInt

// :1:1: type error: cannot solve effect type constraint () = IO
// :1:9: note: () is from here
evincarofautumn commented 11 years ago

Requiring a block would give better errors. Is that acceptable?

def pi: 3.141592653589793
//    ^ Notice the colon.
strager commented 11 years ago

Yes, that'd be great.

evincarofautumn commented 11 years ago

Grumble grump write some tests grump.