summaryrefslogtreecommitdiff
path: root/ghc/GHCi/UI/Info.hs
diff options
context:
space:
mode:
authorZubin Duggal <zubin@cmi.ac.in>2020-01-08 16:28:28 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-07-25 00:44:30 -0400
commit02133353e712e98bfbbc6ed32305b137bb3654eb (patch)
tree12909a607dd2910501813fc4d0550913ade367be /ghc/GHCi/UI/Info.hs
parentba205046e4f2ea94b1c978c050b917de4daaf092 (diff)
downloadhaskell-02133353e712e98bfbbc6ed32305b137bb3654eb.tar.gz
Simplify XRec definition
Change `Located X` usage to `XRec pass X` This increases the scope of the LPat experiment to almost all of GHC. Introduce UnXRec and MapXRec classes Fixes #17587 and #18408 Updates haddock submodule Co-authored-by: Philipp Krüger <philipp.krueger1@gmail.com>
Diffstat (limited to 'ghc/GHCi/UI/Info.hs')
-rw-r--r--ghc/GHCi/UI/Info.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/ghc/GHCi/UI/Info.hs b/ghc/GHCi/UI/Info.hs
index 7304c20cee..2b035e4428 100644
--- a/ghc/GHCi/UI/Info.hs
+++ b/ghc/GHCi/UI/Info.hs
@@ -349,6 +349,7 @@ processAllTypeCheckedModule tcm = do
getTypeLPat (L spn pat) =
pure (Just (getMaybeId pat,spn,hsPatType pat))
where
+ getMaybeId :: Pat GhcTc -> Maybe Id
getMaybeId (VarPat _ (L _ vid)) = Just vid
getMaybeId _ = Nothing