[Haskell-cafe] Skolems!

Bertram Felgenhauer bertram.felgenhauer at googlemail.com
Mon Jan 26 21:54:56 UTC 2015


Tom Murphy wrote:
> So it's the "(rigid, skolem)" error you sometimes happen across. The code
> that's causing it, though, is pretty unsuspicious:

Just two clues, pointing towards `b` being monomorphic as one
ontributing factor:

* adding {-# LANGUAGE NoMonoLocalBinds #-} works.
* giving `b` a standalone type signature makes it work, that is:
    let
        b :: forall x y. Foo x y -> Bool
        b = g (a :: Maybe String)

I'm not sure how enabling GADTs affects type-checking here.

Cheers,

Bertram


More information about the Haskell-Cafe mailing list