#5655: Oddity with ConstraintKinds and TypeFamilies
-------------------------------+--------------------------------------------
    Reporter:  illissius       |       Owner:                           
        Type:  bug             |      Status:  new                      
    Priority:  normal          |   Component:  Compiler (Type checker)  
     Version:  7.3             |    Keywords:                           
    Testcase:                  |   Blockedby:                           
          Os:  Linux           |    Blocking:                           
Architecture:  x86_64 (amd64)  |     Failure:  GHC rejects valid program
-------------------------------+--------------------------------------------
 See the attached program (not sure how to reduce it further - I don't know
 whether the relevant interaction is really with !TypeFamilies, Rank2Types,
 or what).

 When compiled with -DWORKAROUND, it compiles, when without, it doesn't.
 The difference:

 {{{
 #ifndef WORKAROUND
     ap :: (forall a. C e a => a -> r) -> e -> r
 #else
     ap :: c ~ C e => (forall a. c a => a -> r) -> e -> r
 #endif
 }}}

 (Where 'C e' is an associated type of 'e' of kind * -> Constraint.)

 I sort of assumed that 'Some Type' and 'a ~ Some Type => a' would always
 be equivalent, but maybe I'm wrong. Feel free to mark as invalid if I am.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5655>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to