Skip to content

Core pretty-printer doesn't print # on unboxed literals

I just noticed that Core pretty printer produces something like this (this is part of expected output for T3772 in testsuite):

    case GHC.Prim.<=# n# 0 of _ {
      __DEFAULT -> xs n#;
      1 -> GHC.Tuple.()
    }

Both 0 (in scrutinee) and 1 (one of branch alternatives) are unboxed values, so they should be printed as 0# and 1# respectively. I haven't checked whether unboxed literals of other types (Word, Double, Float) are printed in that way, but I would guess that yes.

Trac metadata
Trac field Value
Version 7.7
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