diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2015-03-03 07:21:32 -0600 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2015-03-03 07:21:33 -0600 |
commit | 89458eba5721de1b6b3378415f26e110bab8cc0f (patch) | |
tree | 9bdcb564437e6053e1f490cd1892f4df0de9736b /compiler/prelude/PrelRules.hs | |
parent | 5200bdeb26c5ec98739b14b10fc8907296bceeb9 (diff) | |
download | haskell-89458eba5721de1b6b3378415f26e110bab8cc0f.tar.gz |
Pretty-print # on unboxed literals in core
Summary:
Ticket #10104 dealt with showing the '#'s on types with unboxed fields. This
commit pretty prints the '#'s on unboxed literals in core output.
Test Plan: simplCore/should_compile/T8274
Reviewers: jstolarek, simonpj, austin
Reviewed By: simonpj, austin
Subscribers: simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D678
GHC Trac Issues: #8274
Diffstat (limited to 'compiler/prelude/PrelRules.hs')
-rw-r--r-- | compiler/prelude/PrelRules.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/prelude/PrelRules.hs b/compiler/prelude/PrelRules.hs index 03df3b6f9d..5c6b70072b 100644 --- a/compiler/prelude/PrelRules.hs +++ b/compiler/prelude/PrelRules.hs @@ -562,13 +562,13 @@ Consider this code: This optimises to: Shift.$wgo = \ (w_sCS :: GHC.Prim.Int#) (w1_sCT :: [GHC.Types.Bool]) -> case w1_sCT of _ { - [] -> __word 0; + [] -> 0##; : x_aAW xs_aAX -> case x_aAW of _ { GHC.Types.False -> case w_sCS of wild2_Xh { __DEFAULT -> Shift.$wgo (GHC.Prim.+# wild2_Xh 1) xs_aAX; - 9223372036854775807 -> __word 0 }; + 9223372036854775807 -> 0## }; GHC.Types.True -> case GHC.Prim.>=# w_sCS 64 of _ { GHC.Types.False -> @@ -576,17 +576,17 @@ Shift.$wgo = \ (w_sCS :: GHC.Prim.Int#) (w1_sCT :: [GHC.Types.Bool]) -> __DEFAULT -> case Shift.$wgo (GHC.Prim.+# wild3_Xh 1) xs_aAX of ww_sCW { __DEFAULT -> GHC.Prim.or# (GHC.Prim.narrow32Word# - (GHC.Prim.uncheckedShiftL# (__word 1) wild3_Xh)) + (GHC.Prim.uncheckedShiftL# 1## wild3_Xh)) ww_sCW }; 9223372036854775807 -> GHC.Prim.narrow32Word# -!!!!--> (GHC.Prim.uncheckedShiftL# (__word 1) 9223372036854775807) +!!!!--> (GHC.Prim.uncheckedShiftL# 1## 9223372036854775807) }; GHC.Types.True -> case w_sCS of wild3_Xh { __DEFAULT -> Shift.$wgo (GHC.Prim.+# wild3_Xh 1) xs_aAX; - 9223372036854775807 -> __word 0 + 9223372036854775807 -> 0## } } } } Note the massive shift on line "!!!!". It can't happen, because we've checked |