Yes, it's a known bug.  GHC just inlines over and over again.  It's
discussed in "secrets of the GHC inliner".  It's quite tiresome to fix
without compromising something else, and I have never found a real
program (rather than 'russel') that tickles the bug. 

I'd better document it, though

Simon

| -----Original Message-----
| From: Christian Maeder [mailto:[EMAIL PROTECTED]]
| Sent: 10 October 2002 16:02
| To: [EMAIL PROTECTED]
| Subject: non-termination during compilation
| 
| Hi,
| 
| the following example causes ghc to loop (or run rather long):
| 
| --- snip ---
| 
| data U = MkU (U -> Bool)
| 
| russel :: U -> Bool
| russel u@(MkU p) = not $ p u
| 
| x :: Bool
| x = russel (MkU russel)
| 
| --- snip ---
| 
| I think, a compiler should always terminate, shouldn't it!?
| 
| Compilation succeeds for "russel $ MkU russel" instead of "russel (MkU
| russel)".
| (Surely, x is bottom and therefore the example is senseless)
| 
| Regards Christian
| _______________________________________________
| Glasgow-haskell-users mailing list
| [EMAIL PROTECTED]
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
_______________________________________________
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to