[GHC] #9569: Tuple constraints don't work right

GHC ghc-devs at haskell.org
Thu Dec 11 10:22:08 UTC 2014


#9569: Tuple constraints don't work right
-------------------------------------+-------------------------------------
              Reporter:  simonpj     |            Owner:
                  Type:  bug         |           Status:  closed
              Priority:  normal      |        Milestone:
             Component:  Compiler    |          Version:  7.8.2
            Resolution:  fixed       |         Keywords:
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:              |       Blocked By:
  None/Unknown                       |  Related Tickets:
             Test Case:              |
  polykinds/T9569,                   |
  typecheck/should_compile/T9569a    |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by basvandijk):

 I think I was confused. The problem is not in `monad-control` but in
 `lifted-base` (which depends on `monad-control`).

 If I remove the `{-# LANGUAGE ImpredicativeTypes #-}` from
 `Control.Exception.Lifted` I get the following error on
 [https://github.com/basvandijk/lifted-
 base/blob/master/Control/Exception/Lifted.hs#L268  mask]:

 {{{
 Control/Exception/Lifted.hs:268:8:
     Cannot instantiate unification variable ‘a2’
     with a type involving foralls: (forall a. m a -> m a) -> m b
       Perhaps you want ImpredicativeTypes
     In the expression: liftBaseOp E.mask . liftRestore
     In an equation for ‘mask’: mask = liftBaseOp E.mask . liftRestore
 }}}

 Is this easy solvable (preferably without changing the API)?

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9569#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list