Cannot instantiate unification variable

Kazu Yamamoto (=?iso-2022-jp?B?GyRCOzNLXE9CSScbKEI=?=) kazu at iij.ad.jp
Tue Nov 26 02:44:37 UTC 2013


Hi,

Recent GHC head on 32bit Linux cannot build conduit-1.0.9.2. (See the
attached log.)  A while ago, GHC head on 32bit Linux could build it.
The same GHC head on 64bit Linux can build it.

Michael Snoyman suggested me to add ImpredicativeTypes. When I added
it to the Internal.hs, GHC head on 32bit Linux can build it.  And he
said to other released GHCs can build it. Actually, GHC 7.4.2 on
32bit Linux can build it.

He believes that this is a bug of GHC head (on 32bit Linux). Any
information?

Note that conduit-1.0.9.3 already includes ImpredicativeTypes.

--Kazu

Building conduit-1.0.9.2...
Preprocessing library conduit-1.0.9.2...
[2 of 8] Compiling Data.Conduit.Internal ( Data/Conduit/Internal.hs, dist/build/Dat
a/Conduit/Internal.o )

Data/Conduit/Internal.hs:211:105:
    Cannot instantiate unification variable ‛b0’
    with a type involving foralls:
      (forall a. m1 a -> n1 a)
      -> ConduitM i o m1 b1 -> ConduitM i o n1 b1
      Perhaps you want ImpredicativeTypes
    In the expression:
        GHC.Exts.coerce
          (hoist ::
             (forall (a :: *). m a -> n a)
             -> Pipe i i o () m b -> Pipe i i o () n b) ::
          forall (m :: * -> *) (b :: *) (n :: * -> *). Monad m =>
          (forall (a :: *). m a -> n a)
          -> ConduitM i o m b -> ConduitM i o n b
    In an equation for ‛hoist’:
        hoist
          = GHC.Exts.coerce
              (hoist ::
                 (forall (a :: *). m a -> n a)
                 -> Pipe i i o () m b -> Pipe i i o () n b) ::
              forall (m :: * -> *) (b :: *) (n :: * -> *). Monad m =>
              (forall (a :: *). m a -> n a)
              -> ConduitM i o m b -> ConduitM i o n b


More information about the ghc-devs mailing list