[Haskell-cafe] Haskell's type inference considered harmful [Re: [Haskell] A riddle...]

Christopher Done chrisdone at gmail.com
Tue Jul 17 09:40:59 CEST 2012

On 17 July 2012 09:27, Andreas Abel <andreas.abel at ifi.lmu.de> wrote:
>   1. Haskell's type inference is NON-COMPOSITIONAL!
> In the riddle below, I am defining two things f ("rgbliste") and g ("farbliste").  Even though they are not strongly connected, but g comes after f in the definition order, the code of g influences the type of f.  THAT'S WRONG! :-(

Bindings at the same level in Haskell are mutually recursive. Order of
declaration does not matter. These two terms are unified by the type
system. So I'm not sure what you expect to happen here.

More information about the Haskell-Cafe mailing list