diff options
author | Ben Orchard <thefirstmuffinman@gmail.com> | 2022-05-24 14:18:45 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-05-03 20:16:18 -0400 |
commit | 931c8d82f28fb98a7e0ad0a837eff05c08021cbe (patch) | |
tree | 2c23bfc55f915762e43d4cf87aff21991b8a73d0 /utils | |
parent | 00a8a5ff9abf5bb1a0c2a9225c7bca5ec3bdf306 (diff) | |
download | haskell-931c8d82f28fb98a7e0ad0a837eff05c08021cbe.tar.gz |
Add sized primitive literal syntax
Adds a new LANGUAGE pragma ExtendedLiterals, which enables defining
unboxed numeric literals such as `0xFF#Word8 :: Word8#`.
Implements GHC proposal 0451:
https://github.com/ghc-proposals/ghc-proposals/blob/b384a538b34f79d18a0201455b7b3c473bc8c936/proposals/0451-sized-literals.rst
Fixes #21422.
Bumps haddock submodule.
Co-authored-by: Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io>
Diffstat (limited to 'utils')
-rw-r--r-- | utils/check-exact/ExactPrint.hs | 6 | ||||
m--------- | utils/haddock | 0 |
2 files changed, 6 insertions, 0 deletions
diff --git a/utils/check-exact/ExactPrint.hs b/utils/check-exact/ExactPrint.hs index 5db255f765..f4d4defb5b 100644 --- a/utils/check-exact/ExactPrint.hs +++ b/utils/check-exact/ExactPrint.hs @@ -4695,7 +4695,13 @@ hsLit2String lit = HsInt _ (IL src _ v) -> toSourceTextWithSuffix src v "" HsIntPrim src v -> toSourceTextWithSuffix src v "" HsWordPrim src v -> toSourceTextWithSuffix src v "" + HsInt8Prim src v -> toSourceTextWithSuffix src v "" + HsInt16Prim src v -> toSourceTextWithSuffix src v "" + HsInt32Prim src v -> toSourceTextWithSuffix src v "" HsInt64Prim src v -> toSourceTextWithSuffix src v "" + HsWord8Prim src v -> toSourceTextWithSuffix src v "" + HsWord16Prim src v -> toSourceTextWithSuffix src v "" + HsWord32Prim src v -> toSourceTextWithSuffix src v "" HsWord64Prim src v -> toSourceTextWithSuffix src v "" HsInteger src v _ -> toSourceTextWithSuffix src v "" HsRat _ fl@(FL{fl_text = src }) _ -> toSourceTextWithSuffix src fl "" diff --git a/utils/haddock b/utils/haddock -Subproject 03ba53ca764f56a13d12607c110f923f129e809 +Subproject e16e20d592a6f5d9ed1af17b77fafd649524234 |