EricIO / cat-language

Automatically exported from code.google.com/p/cat-language
Other
0 stars 0 forks source link

Type inference on lists #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
define lookup : ( int -> int ) { (2,3,5,7,11) swap nth nip }

What is the expected output?
type: (int -> int)

What do you see instead?
type error in function lookup
inferred type (int -> any)
declared type (int -> int)

What version of the product are you using? On what operating system?
Cat 0.16

Please provide any additional information below.
Hopefully 0.17 support for "statically typed homogeneous lists" will fix this.

Original issue reported on code.google.com by nothingo...@gmail.com on 20 Jul 2007 at 5:10

GoogleCodeExporter commented 9 years ago
A simpler way to reproduce the same problem:
define takes_int : ( int -> int ) { 0 + }

Also applies to Cat 0.16.1

Original comment by nothingo...@gmail.com on 20 Aug 2007 at 11:15

GoogleCodeExporter commented 9 years ago
Thanks for the report.

Original comment by cdiggins on 21 Aug 2007 at 1:29