diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2018-06-14 09:19:51 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-06-14 10:03:28 -0400 |
commit | 6f083b3df830a74e3d4c08f1b4a5204c4822c537 (patch) | |
tree | f82f4130a97636be9ce96ba3426ad3fada148d25 /compiler/deSugar/Desugar.hs | |
parent | 233d8150e672494dc5764d0dad5ea721a56517a1 (diff) | |
download | haskell-6f083b3df830a74e3d4c08f1b4a5204c4822c537.tar.gz |
desugar: Rip out unsafeGlobalDynFlags usage in decomposeRuleLhs
Reviewers: dfeuer
Reviewed By: dfeuer
Subscribers: dfeuer, rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4776
Diffstat (limited to 'compiler/deSugar/Desugar.hs')
-rw-r--r-- | compiler/deSugar/Desugar.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/deSugar/Desugar.hs b/compiler/deSugar/Desugar.hs index 532bd0077f..583bc5979c 100644 --- a/compiler/deSugar/Desugar.hs +++ b/compiler/deSugar/Desugar.hs @@ -393,12 +393,12 @@ dsRule (L loc (HsRule _ name rule_act vars lhs rhs)) -- Substitute the dict bindings eagerly, -- and take the body apart into a (f args) form - ; case decomposeRuleLhs bndrs'' lhs'' of { + ; dflags <- getDynFlags + ; case decomposeRuleLhs dflags bndrs'' lhs'' of { Left msg -> do { warnDs NoReason msg; return Nothing } ; Right (final_bndrs, fn_id, args) -> do - { dflags <- getDynFlags - ; let is_local = isLocalId fn_id + { let is_local = isLocalId fn_id -- NB: isLocalId is False of implicit Ids. This is good because -- we don't want to attach rules to the bindings of implicit Ids, -- because they don't show up in the bindings until just before code gen |