[commit: ghc] wip/names3: Fix unboxed sum arity calculation (ba730e8)

git at git.haskell.org git at git.haskell.org
Tue Sep 13 15:07:00 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/names3
Link       : http://ghc.haskell.org/trac/ghc/changeset/ba730e81c08e2f50faeb6b844a75f19b04317466/ghc

>---------------------------------------------------------------

commit ba730e81c08e2f50faeb6b844a75f19b04317466
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Mon Sep 12 16:17:57 2016 -0400

    Fix unboxed sum arity calculation


>---------------------------------------------------------------

ba730e81c08e2f50faeb6b844a75f19b04317466
 compiler/prelude/KnownUniques.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/prelude/KnownUniques.hs b/compiler/prelude/KnownUniques.hs
index 0e5995c..70244c0 100644
--- a/compiler/prelude/KnownUniques.hs
+++ b/compiler/prelude/KnownUniques.hs
@@ -81,7 +81,7 @@ getUnboxedSumName n =
     case n .&. 0xff of
       0xff -> tyConName $ sumTyCon arity
       alt  -> dataConName $ sumDataCon (alt + 1) arity
-  where arity = n `shiftR` 0xff
+  where arity = n `shiftR` 8
 
 -- Note [Uniques for tuple type and data constructors]
 -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



More information about the ghc-commits mailing list