
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

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@haskell.org [mailto:glasgow-haskell-users- | bounces@haskell.org] On Behalf Of Robert Dockins | Sent: 05 September 2006 20:48 | To: glasgow-haskell-users@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@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Ah. My apologies for bringing up such a well-worn issue, then. On Sep 5, 2006, at 3:38 PM, Simon Peyton-Jones wrote:
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@haskell.org [mailto:glasgow-haskell-users- | bounces@haskell.org] On Behalf Of Robert Dockins | Sent: 05 September 2006 20:48 | To: glasgow-haskell-users@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@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Speak softly and drive a Sherman tank. Laugh hard; it's a long way to the bank. -- TMBG
participants (2)
-
Robert Dockins
-
Simon Peyton-Jones