Skip to content

tagToEnum# . dataToTag# not optimized away

Consider

foo :: Int# -> Int#
foo x = dataToTag# (tagToEnum# x :: Bool)

bar :: Bool -> Bool
bar x = tagToEnum# (dataToTag# x)

These are both effectively identity functions. But while foo simplifies to one, bar does not! We might want to fix that.

Trac metadata
Trac field Value
Version 8.2.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information