GHC non-termination

Simon Peyton-Jones simonpj at microsoft.com
Tue Sep 5 15:38:42 EDT 2006


You and many others --- but the example is always the same!
http://www.haskell.org/ghc/docs/latest/html/users_guide/bugs.html#bugs-g
hc

Simon

| -----Original Message-----
| From: glasgow-haskell-users-bounces at haskell.org
[mailto:glasgow-haskell-users-
| bounces at haskell.org] On Behalf Of Robert Dockins
| Sent: 05 September 2006 20:48
| To: glasgow-haskell-users at haskell.org
| Subject: GHC non-termination
| 
| Hello all,
| 
| I've discovered that GHC doesn't deal very well with the following
| program.  It appears to diverge when running the following program
| with 'runghc'.  The main compiler can also be persuaded to diverge in
| a similar fashion.  Hugs exhibits correct behavior, ie, it prints
| "hello".
| 
| This is with GHC 6.4.2.  I've tested on linux x86 and PPC OS X.
| 
| 
| 
| newtype Mu a = Roll { unroll :: Mu a -> a }
| 
| omega :: a
| omega = (\x -> (unroll x) x) (Roll (\x -> (unroll x) x))
| 
| main = putStrLn "hello"
| 
| 
| 
| Rob Dockins
| 
| Speak softly and drive a Sherman tank.
| Laugh hard; it's a long way to the bank.
|            -- TMBG
| 
| 
| 
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


More information about the Glasgow-haskell-users mailing list