diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2017-11-05 21:49:11 +0200 |
---|---|---|
committer | Alan Zimmerman <alan.zimm@gmail.com> | 2017-11-08 17:49:54 +0200 |
commit | 438dd1cbba13d35f3452b4dcef3f94ce9a216905 (patch) | |
tree | 0678edb3697fb53b5f38a6e80473e658961f4b53 /utils | |
parent | fe6848f544c2a14086bcef388c46f4070c22d287 (diff) | |
download | haskell-438dd1cbba13d35f3452b4dcef3f94ce9a216905.tar.gz |
WIP on Doing a combined Step 1 and 3 for Trees That Grow
See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow
Trees that grow extension points are added for
- ValBinds
- HsPat
- HsLit
- HsOverLit
- HsType
- HsTyVarBndr
- HsAppType
- FieldOcc
- AmbiguousFieldOcc
Updates haddock submodule
Test Plan: ./validate
Reviewers: shayan-najd, simonpj, austin, goldfire, bgamari
Subscribers: goldfire, rwbarton, thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D4147
Diffstat (limited to 'utils')
-rw-r--r-- | utils/ghctags/Main.hs | 25 | ||||
m--------- | utils/haddock | 0 |
2 files changed, 12 insertions, 13 deletions
diff --git a/utils/ghctags/Main.hs b/utils/ghctags/Main.hs index f74c7514db..059692622e 100644 --- a/utils/ghctags/Main.hs +++ b/utils/ghctags/Main.hs @@ -254,7 +254,7 @@ boundValues :: ModuleName -> HsGroup GhcRn -> [FoundThing] -- ^Finds all the top-level definitions in a module boundValues mod group = let vals = case hs_valds group of - ValBindsOut nest _sigs -> + XValBindsLR (NValBinds nest _sigs) -> [ x | (_rec, binds) <- nest , bind <- bagToList binds , x <- boundThings mod bind ] @@ -291,21 +291,20 @@ boundThings modname lbinding = lid id = FoundThing modname (getOccString id) loc in case unLoc lpat of WildPat _ -> tl - VarPat (L _ name) -> lid name : tl - LazyPat p -> patThings p tl - AsPat id p -> patThings p (thing id : tl) - ParPat p -> patThings p tl - BangPat p -> patThings p tl - ListPat ps _ _ -> foldr patThings tl ps - TuplePat ps _ _ -> foldr patThings tl ps - PArrPat ps _ -> foldr patThings tl ps + VarPat _ (L _ name) -> lid name : tl + LazyPat _ p -> patThings p tl + AsPat _ id p -> patThings p (thing id : tl) + ParPat _ p -> patThings p tl + BangPat _ p -> patThings p tl + ListPat _ ps _ _ -> foldr patThings tl ps + TuplePat _ ps _ -> foldr patThings tl ps + PArrPat _ ps -> foldr patThings tl ps ConPatIn _ conargs -> conArgs conargs tl ConPatOut{ pat_args = conargs } -> conArgs conargs tl - LitPat _ -> tl + LitPat _ _ -> tl NPat {} -> tl -- form of literal pattern? - NPlusKPat id _ _ _ _ _ -> thing id : tl - SigPatIn p _ -> patThings p tl - SigPatOut p _ -> patThings p tl + NPlusKPat _ id _ _ _ _ -> thing id : tl + SigPat _ p -> patThings p tl _ -> error "boundThings" conArgs (PrefixCon ps) tl = foldr patThings tl ps conArgs (RecCon (HsRecFields { rec_flds = flds })) tl diff --git a/utils/haddock b/utils/haddock -Subproject 1789c77a6ed1580dc10a4391dc8c398e902f03b +Subproject 73a26af844ac50b8bec39de11d64452a6286b00 |