
1 Aug
2009
1 Aug
'09
6:43 p.m.
2009/08/01 Michael P Mossey
This is surprising to a conventional programmer. But does this naturally relate to other features of Haskell. Perhaps laziness? (I.e. data of type Foo doesn't always need a type b so it just doesn't have one until it needs one.)
Laziness is a runtime thing; type constraints are compile time. So "...doesn't have one until it needs one." isn't right -- `t3` will *never* have a type for `b` in the program snippet above. If you add more code (create a different context) then you might constrain `b` more and lead to a more definite type. The type is always a static type, though -- types don't get more specific as the program runs. -- Jason Dusek