
10 Jun
2006
10 Jun
'06
6:06 a.m.
Greg Buchholz
tmap :: (b -> a, b -> a) -> Twist b b -> Twist a a
...I'm wondering why they couldn't infer the more general...
tmap :: (a -> b, c -> d) -> Twist a c -> Twist b d
Because the latter type involves polymorphic recursion. Standard H-M cannot infer a poly recursive type, but Haskell is willing to check it if you give it a signature. Regards, Malcolm