diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2022-12-14 01:25:29 +0100 |
---|---|---|
committer | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2022-12-19 16:53:58 +0100 |
commit | 344f38fdfb61b5aa95df7f0c87a460200ce58a47 (patch) | |
tree | 6d72a6e18494a22f673ba2aea22db0924331cffb /compiler/GHC/StgToByteCode.hs | |
parent | 761c1f49f55afc9a9f290fafb48885c2033069ed (diff) | |
download | haskell-wip/misc-cleanup3.tar.gz |
Misc cleanupwip/misc-cleanup3
- Remove unused uniques and hs-boot declarations
- Fix types of seq and unsafeCoerce#
- Remove FastString/String roundtrip in JS
- Use TTG to enforce totality
- Remove enumeration in Heap/Inspect; the 'otherwise' clause
serves the primitive types well.
Diffstat (limited to 'compiler/GHC/StgToByteCode.hs')
-rw-r--r-- | compiler/GHC/StgToByteCode.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/GHC/StgToByteCode.hs b/compiler/GHC/StgToByteCode.hs index 989121207d..7cf5f477b7 100644 --- a/compiler/GHC/StgToByteCode.hs +++ b/compiler/GHC/StgToByteCode.hs @@ -271,7 +271,7 @@ argBits :: Platform -> [ArgRep] -> [Bool] argBits _ [] = [] argBits platform (rep : args) | isFollowableArg rep = False : argBits platform args - | otherwise = take (argRepSizeW platform rep) (repeat True) ++ argBits platform args + | otherwise = replicate (argRepSizeW platform rep) True ++ argBits platform args non_void :: [ArgRep] -> [ArgRep] non_void = filter nv @@ -1818,8 +1818,7 @@ mkMultiBranch maybe_ncons raw_ways = do mkTree vals range_lo range_hi = let n = length vals `div` 2 - vals_lo = take n vals - vals_hi = drop n vals + (vals_lo, vals_hi) = splitAt n vals v_mid = fst (head vals_hi) in do label_geq <- getLabelBc |