Opened 12 years ago

Closed 12 years ago

Last modified 48 years ago

#475 closed bug (Wont Fix)

GHC and GHCi hang when compiling simple program

Reported by: nobody Owned by: nobody
Priority: normal Milestone:
Component: Compiler Version: None
Keywords: Cc:
Operating System: Architecture:
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


When interpreting the following four-line program using
GHCi on Windows, GHCi hangs, never completing
compilation and giving no output:

data Paradox = Roll (Paradox -> Int)
unroll (Roll x) = x
selfapply x = unroll x x
uhoh = selfapply (Roll selfapply)

If I add a simple main method of the form 'main = do
print (fst ("Hello world", uhoh))', and then compile
with GHC, it hangs as well. However, if I use a main
method which does not mention uhoh, such as 'main = do
print "Hello world"', and then compile with GHC,
compilation is successful. However, in this case,
compilation with GHCi still hangs.

As it happens, I have seen this bug in both versions
6.4 and 6.4.1 of GHC for Windows.

-Sridhar Ramesh,

Change History (1)

comment:1 Changed 12 years ago by simonpj

Status: assignedclosed
Logged In: YES 

This is a documented bug.

Until it bites on a program someone really cares about, I'm 
not going to fix it!  (The only way I know to fix it involves 
imposing some arbitrary bound on the number of inlinings, 
which will be bad for some legitimate programs; or something 
more elaborate, which has a complexity burden of its own.)

Note: See TracTickets for help on using tickets.