|
Strictness problem: msg#00033lang.haskell.glasgow.bugs
The following program should, if I'm not completely mistaken, output something involving Correct: > module Main where > f x = case x of > x@True -> \y -> x && y > x@False -> \y -> x && y > main = putStrLn $ f (error "Correct") `seq` "Error" However, whether it does so is a complicated function of the GHC version and optimisation settings: GHC version -O2? Correct? --------------------------- 4.08.1 No Yes 4.08.1 Yes No 5.04.2 No No 5.04.2 Yes Yes 6.0.1 _ No Recent CVS No No Recent CVS Yes Yes (Hugs Yes) All tests were run on a Solaris system, except for the CVS one (which I don't have access to, so I don't know the exact date of checkout). Different fs give different behaviour, at least for 6.0.1. Try e.g. > f x = case x of > True -> id > False -> id with and without -O2. /NAD
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: RFunE: "Unused"ness for warnings transitive in GHC 6.0.1, Simon Peyton-Jones |
|---|---|
| Next by Date: | internal error: RTS exhausted max heap size (GHC 6.0.1), Ben Rudiak-Gould |
| Previous by Thread: | RFunE: "Unused"ness for warnings transitive in GHC 6.0.1, Mike Gunter |
| Next by Thread: | internal error: RTS exhausted max heap size (GHC 6.0.1), Ben Rudiak-Gould |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |