diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2016-04-20 12:56:40 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2016-04-20 14:28:34 +0100 |
commit | 353d8ae6fafe117a1cac4adf6f029a5baccc2780 (patch) | |
tree | 9a55b083e597b0d2d614639a54c85b0119384bd2 /utils | |
parent | 7319b80a2cdffdfac8586946d0c7b0fdc8d77dae (diff) | |
download | haskell-353d8ae6fafe117a1cac4adf6f029a5baccc2780.tar.gz |
SCC analysis for instances as well as types/classes
This big patch is in pursuit of Trac #11348.
It is largely the work of Alex Veith (thank you!), with some
follow-up simplification and refactoring from Simon PJ.
The main payload is described in RnSource
Note [Dependency analysis of type, class, and instance decls]
which is pretty detailed.
* There is a new data type HsDecls.TyClGroup, for a strongly
connected component of type/class/instance/role decls.
The hs_instds field of HsGroup disappears, in consequence
This forces some knock-on changes, including a minor
haddock submodule update
Smaller, weakly-related things
* I found that both the renamer and typechecker were building an
identical env for RoleAnnots, so I put common code for
RoleAnnotEnv in RnEnv.
* I found that tcInstDecls1 had very clumsy error handling, so I
put it together into TcInstDcls.doClsInstErrorChecks
Diffstat (limited to 'utils')
-rw-r--r-- | utils/ghctags/Main.hs | 3 | ||||
m--------- | utils/haddock | 0 |
2 files changed, 2 insertions, 1 deletions
diff --git a/utils/ghctags/Main.hs b/utils/ghctags/Main.hs index 0eff514b70..ba116b6bd4 100644 --- a/utils/ghctags/Main.hs +++ b/utils/ghctags/Main.hs @@ -256,7 +256,8 @@ boundValues mod group = , bind <- bagToList binds , x <- boundThings mod bind ] _other -> error "boundValues" - tys = [ n | ns <- map (fst . hsLTyClDeclBinders) (tyClGroupConcat (hs_tyclds group)) + tys = [ n | ns <- map (fst . hsLTyClDeclBinders) + (hs_tyclds group >>= group_tyclds) , n <- map found ns ] fors = concat $ map forBound (hs_fords group) where forBound lford = case unLoc lford of diff --git a/utils/haddock b/utils/haddock -Subproject 5c82c9fc2d21ddaae4a2470f1c375426968f19c +Subproject 56dbfe17d272670e5f2d082401c025755796950 |