diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2017-04-04 21:47:29 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-04-04 21:47:51 -0400 |
commit | 1831aed16d9883b2845fa6997e38b9ac3d72f191 (patch) | |
tree | 5f18307cfda76206dc74f15f0678039e667d2427 /compiler/rename | |
parent | 5315223683b64c665959781112f8206fb8230a54 (diff) | |
download | haskell-1831aed16d9883b2845fa6997e38b9ac3d72f191.tar.gz |
Replace Digraph's Node type synonym with a data type
This refactoring makes it more obvious when we are constructing
a Node for the digraph rather than a less useful 3-tuple.
Reviewers: austin, goldfire, bgamari, simonmar, dfeuer
Reviewed By: dfeuer
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3414
Diffstat (limited to 'compiler/rename')
-rw-r--r-- | compiler/rename/RnSource.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rename/RnSource.hs b/compiler/rename/RnSource.hs index 30915d58b7..af145e815f 100644 --- a/compiler/rename/RnSource.hs +++ b/compiler/rename/RnSource.hs @@ -49,7 +49,7 @@ import DynFlags import Util ( debugIsOn, lengthExceeds, partitionWith ) import HscTypes ( HscEnv, hsc_dflags ) import ListSetOps ( findDupsEq, removeDups, equivClasses ) -import Digraph ( SCC, flattenSCC, flattenSCCs +import Digraph ( SCC, flattenSCC, flattenSCCs, Node(..) , stronglyConnCompFromEdgedVerticesUniq ) import UniqSet import qualified GHC.LanguageExtensions as LangExt @@ -1349,7 +1349,8 @@ depAnalTyClDecls :: GlobalRdrEnv depAnalTyClDecls rdr_env ds_w_fvs = stronglyConnCompFromEdgedVerticesUniq edges where - edges = [ (d, tcdName (unLoc d), map (getParent rdr_env) (nonDetEltsUniqSet fvs)) + edges :: [ Node Name (LTyClDecl Name) ] + edges = [ DigraphNode d (tcdName (unLoc d)) (map (getParent rdr_env) (nonDetEltsUniqSet fvs)) | (d, fvs) <- ds_w_fvs ] -- It's OK to use nonDetEltsUFM here as -- stronglyConnCompFromEdgedVertices is still deterministic |