Skip to content

HexFloatLiterals doesn't parse for unboxed Float# and Double# literals

In ghc 9.4.2 (reproduced in both ghci and ghc single-file mode)

Test.hs:

{-# language HexFloatLiterals, MagicHash #-}
module Test where
import GHC.Types

a = D# 0x1p0##

complains

Test.hs:6:1: error:
    parse error (possibly incorrect indentation or mismatched brackets)

but replacing it with a = D# 1.0## or a = 0x1p0 :: Double is fine.

Similarly for floats.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information