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

GHC trac at galois.com
Thu Oct 19 12:08:16 EDT 2006


#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   |  
----------------------+-----------------------------------------------------
Changes (by igloo):

  * architecture:  => Unknown
  * difficulty:  => Unknown
  * milestone:  => 6.8
  * testcase:  =>
  * os:  => Unknown

Old description:

> {{{
> Here's a test due to Iavor Diatchki
> [iavor.diatchki at gmail.com]:
>
> >> test2  :: Bool
> >> test2   = stops (bot ())
> >>   where
> >>   stops  :: Int# -> Bool
> >>   stops _ = True
>
> ghc 6.4 gives the value True for test2.
> }}}

New description:

 {{{
 Here's a test due to Iavor Diatchki
 [iavor.diatchki at gmail.com]:

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

 ghc 6.4 gives the value True for test2.
 }}}

Comment:

 Still happens with 6.6; here's a complete testcase:
 {{{
 import GHC.Exts

 main = print test2

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

 bot :: () -> Int#
 bot () = bot ()
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/317>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list