[GHC] #2044: "Can't unify" error in debugger

GHC trac at galois.com
Sat Apr 5 18:03:31 EDT 2008


#2044: "Can't unify" error in debugger
--------------------+-------------------------------------------------------
 Reporter:  r6144   |          Owner:  simonpj
     Type:  bug     |         Status:  new    
 Priority:  normal  |      Milestone:  6.8.3  
Component:  GHCi    |        Version:  6.8.2  
 Severity:  normal  |     Resolution:         
 Keywords:          |     Difficulty:  Unknown
 Testcase:          |   Architecture:  x86    
       Os:  Linux   |  
--------------------+-------------------------------------------------------
Changes (by igloo):

  * owner:  => simonpj

Comment:

 ...but not with the HEAD.

 This program:
 {{{
 {-# LANGUAGE ScopedTypeVariables, ExistentialQuantification #-}

 import Control.Monad.ST.Strict
 import Data.Array.ST

 rsRandom :: ST s a
 rsRandom = undefined

 write :: Int -> ST s (forall ss . (STUArray ss Int Double) -> ST ss ())
 write i = rsRandom >>= \x -> return (\buf -> writeArray buf i x)
 }}}
 is accepted by the 6.8 branch, but not the HEAD. I'd expect it to be
 rejected too (`x` is monomorphic, and generalisation won't make a higher
 rank type), so I think the HEAD is right, but I will let Simon PJ have the
 last word...

 I don't think this is worth fixing just for 6.8.3, unless there are other
 programs that the HEAD also accepts that trigger the problem, so if the
 program ought to be rejected then I think that we can close this ticket.

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


More information about the Glasgow-haskell-bugs mailing list