[Haskell-cafe] Solved but strange error in type inference

Yucheng Zhang yczhang89 at gmail.com
Tue Jan 3 19:05:34 CET 2012

On Wed, Jan 4, 2012 at 1:07 AM, Yves Parès <limestrael at gmail.com> wrote:
>> I wonder why the redeclared type variables cannot match those of legSome?
> Try to put a totally wrong type to subsome, like
> subsome :: Int
> and tell us from the error what type is actually inferred.

The actually inferred type is

    Couldn't match expected type `Int'
                with actual type `[([Symbols nt t], [s] -> t0)]
                                  -> Either [Char] ([t], t0)'
    In the expression: subsome :: Int

I still don't understand why the original mismatch happens.

More information about the Haskell-Cafe mailing list