#5595: Type error: expected type = actual type ???
---------------------------------+------------------------------------------
    Reporter:  basvandijk        |        Owner:                           
        Type:  bug               |       Status:  new                      
    Priority:  normal            |    Milestone:                           
   Component:  Compiler          |      Version:  7.2.1                    
    Keywords:                    |     Testcase:                           
   Blockedby:                    |   Difficulty:                           
          Os:  Unknown/Multiple  |     Blocking:                           
Architecture:  Unknown/Multiple  |      Failure:  GHC rejects valid program
---------------------------------+------------------------------------------

Comment(by simonpj):

 Thank you for reporting this.  In `TcUnify` there is this comment:
 {{{
           -- Check for escape; e.g. (forall a. a->b) ~ (forall a. a->a)
           -- VERY UNSATISFACTORY; the constraint might be fine, but
           -- we fail eagerly because we don't have any place to put
           -- the bindings from an implication constraint
           -- This only works because most constraints get solved on the
 fly
           -- See Note [Avoid deferring]
 }}}
 You are the first to trip over this place, where we took a short cut in
 the implementation.  It's really a bug -- admittedly to do with matching
 polymorphic types -- and we think we know how to fix it.  It it's not just
 a quick fix (else we'd have done it before now).

 The problem is the type function under a higher-rank forall.  I don't know
 a good workaround.  We'll get to it, but not instantly. Is it ruining your
 life?

 Simon

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5595#comment:2>
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