#7194: Typechecker allows a skolem to escapt
-------------------------------+--------------------------------------------
  Reporter:  simonpj           |          Owner:                  
      Type:  bug               |         Status:  closed          
  Priority:  normal            |      Milestone:                  
 Component:  Compiler          |        Version:  7.4.2           
Resolution:  fixed             |       Keywords:                  
        Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown      |     Difficulty:  Unknown         
  Testcase:                    |      Blockedby:                  
  Blocking:                    |        Related:                  
-------------------------------+--------------------------------------------
Changes (by igloo):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 This now gives a type error:
 {{{
 T7194.hs:18:35:
     Couldn't match expected type `b0' with actual type `F a'
       because type variable `a' would escape its scope
     This (rigid, skolem) type variable is bound by
       the type signature for g :: C (F a) => a -> Int
       at T7194.hs:17:23-41
     Relevant bindings include
       x :: b0 (bound at T7194.hs:17:9)
       g :: a -> Int (bound at T7194.hs:18:18)
       y :: a (bound at T7194.hs:18:20)
     In the return type of a call of `foo'
     In the expression: foo y
     In the first argument of `length', namely `[x, foo y]'
 }}}

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