summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Types.hs
diff options
context:
space:
mode:
authorSebastian Graf <sebastian.graf@kit.edu>2020-08-26 18:50:30 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-09-10 10:35:33 -0400
commit1207576ac0cfdd3fe1ea00b5505f7c874613451e (patch)
tree33acda217dadd8e5eaa38f55f19a6ce6be54dd6f /compiler/GHC/Tc/Types.hs
parent67ce72da1689058cb689ffbb6fcbd5cd12af56df (diff)
downloadhaskell-1207576ac0cfdd3fe1ea00b5505f7c874613451e.tar.gz
PmCheck: Big refactor using guard tree variants more closely following source syntax (#18565)
Previously, we desugared and coverage checked plain guard trees as described in Lower Your Guards. That caused (in !3849) quite a bit of pain when we need to partially recover tree structure of the input syntax to return covered sets for long-distance information, for example. In this refactor, I introduced a guard tree variant for each relevant source syntax component of a pattern-match (mainly match groups, match, GRHS, empty case, pattern binding). I made sure to share as much coverage checking code as possible, so that the syntax-specific checking functions are just wrappers around the more substantial checking functions for the LYG primitives (`checkSequence`, `checkGrds`). The refactoring payed off in clearer code and elimination of all panics related to assumed guard tree structure and thus fixes #18565. I also took the liberty to rename and re-arrange the order of functions and comments in the module, deleted some dead and irrelevant Notes, wrote some new ones and gave an overview module haddock.
Diffstat (limited to 'compiler/GHC/Tc/Types.hs')
-rw-r--r--compiler/GHC/Tc/Types.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Tc/Types.hs b/compiler/GHC/Tc/Types.hs
index b782dceee8..5111dbbe3d 100644
--- a/compiler/GHC/Tc/Types.hs
+++ b/compiler/GHC/Tc/Types.hs
@@ -323,7 +323,7 @@ data DsLclEnv = DsLclEnv {
dsl_meta :: DsMetaEnv, -- Template Haskell bindings
dsl_loc :: RealSrcSpan, -- To put in pattern-matching error msgs
- -- See Note [Note [Type and Term Equality Propagation] in "GHC.HsToCore.PmCheck"
+ -- See Note [Note [Long-distance information] in "GHC.HsToCore.PmCheck"
-- The set of reaching values Deltas is augmented as we walk inwards,
-- refined through each pattern match in turn
dsl_deltas :: Deltas