logo       

Re: [GHC] #317: Simplifier doesn't preserve bottoms sometimes: msg#00169

lang.haskell.glasgow.bugs

Subject: Re: [GHC] #317: Simplifier doesn't preserve bottoms sometimes

#317: Simplifier doesn't preserve bottoms sometimes
----------------------+-----------------------------------------------------
Reporter: simonmar | Owner: simonpj
Type: bug | Status: assigned
Priority: low | Milestone: 6.8
Component: Compiler | Version: 6.4
Severity: normal | Resolution: None
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Unknown |
----------------------+-----------------------------------------------------
Comment (by int-e@xxxxxx):

In ghc 6.5, and presumably 6.6 (untested), something funny happens if you
use a bang pattern in {{{stops}}}, like this:
{{{
import GHC.Exts

main = print test2

test2 :: Bool
test2 = stops (bot ())
where
stops :: Int# -> Bool
stops !_ = True

bot :: () -> Int#
bot () = bot ()
}}}
The resulting program terminates, printing a newline and nothing else. I'm
not sure if bang patterns should work at all on unboxed types, but this
behaviour is surprising.

--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/317>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise