diff options
author | David Feuer <david.feuer@gmail.com> | 2018-06-11 10:32:23 -0400 |
---|---|---|
committer | David Feuer <David.Feuer@gmail.com> | 2018-06-11 10:33:40 -0400 |
commit | 502026fc0a35460c7f04b26a11320723a7bbfdff (patch) | |
tree | 2fb4d41b6c7138fbf856bac410c653f80ba96d20 /compiler/coreSyn/CoreSyn.hs | |
parent | 93220d46fceabf3afeae36f1fda94e1698c3639a (diff) | |
download | haskell-502026fc0a35460c7f04b26a11320723a7bbfdff.tar.gz |
Make seq# evaluatedness look through casts
In d964b05, I forgot to look through casts to find the `seq#`
identifier. Fix that.
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4804
Diffstat (limited to 'compiler/coreSyn/CoreSyn.hs')
-rw-r--r-- | compiler/coreSyn/CoreSyn.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/coreSyn/CoreSyn.hs b/compiler/coreSyn/CoreSyn.hs index 4dd70b0c99..50e40d1531 100644 --- a/compiler/coreSyn/CoreSyn.hs +++ b/compiler/coreSyn/CoreSyn.hs @@ -2046,10 +2046,11 @@ collectArgs expr go e as = (e, as) -- | Attempt to remove the last N arguments of a function call. --- Strip off any ticks encountered along the way and any ticks +-- Strip off any ticks or coercions encountered along the way and any -- at the end. stripNArgs :: Word -> Expr a -> Maybe (Expr a) stripNArgs !n (Tick _ e) = stripNArgs n e +stripNArgs n (Cast f _) = stripNArgs n f stripNArgs 0 e = Just e stripNArgs n (App f _) = stripNArgs (n - 1) f stripNArgs _ _ = Nothing |