diff options
author | John Ericson <git@JohnEricson.me> | 2020-01-25 15:46:07 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-04-23 18:32:43 -0400 |
commit | c42754d5fdd3c2db554d9541bab22d1b3def4be7 (patch) | |
tree | eea28083a89e73b8e08a0d2387eaff19ecf05f13 /compiler/GHC/Hs/Instances.hs | |
parent | 5946c85abcf66555cdbcd3eed02cb8f512b6110c (diff) | |
download | haskell-c42754d5fdd3c2db554d9541bab22d1b3def4be7.tar.gz |
Trees That Grow refactor for `ConPat` and `CoPat`
- `ConPat{In,Out}` -> `ConPat`
- `CoPat` -> `XPat (CoPat ..)`
Note that `GHC.HS.*` still uses `HsWrap`, but only when `p ~ GhcTc`.
After this change, moving the type family instances out of `GHC.HS.*` is
sufficient to break the cycle.
Add XCollectPat class to decide how binders are collected from XXPat based on the pass.
Previously we did this with IsPass, but that doesn't work for Haddock's
DocNameI, and the constraint doesn't express what actual distinction is being
made. Perhaps a class for collecting binders more generally is in order, but we
haven't attempted this yet.
Pure refactor of code around ConPat
- InPat/OutPat synonyms removed
- rename several identifiers
- redundant constraints removed
- move extension field in ConPat to be first
- make ConPat use record syntax more consistently
Fix T6145 (ConPatIn became ConPat)
Add comments from SPJ.
Add comment about haddock's use of CollectPass.
Updates haddock submodule.
Diffstat (limited to 'compiler/GHC/Hs/Instances.hs')
-rw-r--r-- | compiler/GHC/Hs/Instances.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/GHC/Hs/Instances.hs b/compiler/GHC/Hs/Instances.hs index 0d67899b4c..db7a46805c 100644 --- a/compiler/GHC/Hs/Instances.hs +++ b/compiler/GHC/Hs/Instances.hs @@ -358,6 +358,9 @@ deriving instance Data (Pat GhcPs) deriving instance Data (Pat GhcRn) deriving instance Data (Pat GhcTc) +deriving instance Data CoPat +deriving instance Data ConPatTc + deriving instance Data ListPatTc -- deriving instance (DataIdLR p p, Data body) => Data (HsRecFields p body) |