[Haskell-cafe] Typeclass constraints not inferred when defining a function

Albert Y. C. Lai trebla at vex.net
Thu Feb 9 20:31:57 UTC 2017


On 2017-02-09 01:20 PM, Stephen Demos wrote:
> However, he showed me that defining the same function in ghci using a
> let binding doesn't yield the same error. In fact, when using `:t`, it
> shows that ghci successfully infers the typeclass constraint on the
> function -

ghci deliberately deviates from normal behaviour for convenience.

Unfortunately it is not very documented in the user's guide.



More information about the Haskell-Cafe mailing list