Bug: GHC hangs rather than reporting an occurs check error

Ian Lynagh igloo at earth.li
Thu Mar 20 16:39:10 EDT 2008


On Thu, Mar 20, 2008 at 02:38:56AM -0400, Bryan Donlan wrote:
> 
> I've found a case where GHC will hang (consuming more and more memory)
> when it should report an occurs check error. The test case is at
> http://fushizen.net/~bd/kaos-ghc.loop.tgz - the error in question is
> that the arguments in the StateT instance for HOLift are reversed like
> so:
> 
> -instance HOLift m (StateT s m) where
> +instance HOLift (StateT s m) m where

I haven't looked at this in detail, but you have enabled the
UndecidableInstances extension, so it's not necessarily a bug if the
type checker goes into a loop.


Thanks
Ian



More information about the Glasgow-haskell-users mailing list