Re: [Haskell-cafe] Inferred type not most general?

2006-06-10 Thread Malcolm Wallace
Greg Buchholz [EMAIL PROTECTED] writes: 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

[Haskell-cafe] Inferred type not most general?

2006-06-09 Thread Greg Buchholz
I'm curious about a type inference oddity. In the code below, if I leave off the type signature for tmap, both GHC and Hugs infer that tmap has type... 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 -