diff options
| author | Andreas Voellmy <andreas.voellmy@gmail.com> | 2015-03-09 18:27:54 -0400 |
|---|---|---|
| committer | Andreas Voellmy <andreas.voellmy@gmail.com> | 2015-03-09 18:27:54 -0400 |
| commit | c4ac3c9d981e23a0bc1aa990414213f2049173c8 (patch) | |
| tree | 878cd4b1b2dd6ad729c143b82cb16fc80b8f29c7 /compiler/utils/Outputable.hs | |
| parent | 74625d6847e970e8bdc6991c327515b3e10b231b (diff) | |
| parent | 6188d0ab4f5eaa85b5e5c743939b71f95ade688c (diff) | |
| download | haskell-c4ac3c9d981e23a0bc1aa990414213f2049173c8.tar.gz | |
Merge branch 'master' of git://git.haskell.org/ghc
Diffstat (limited to 'compiler/utils/Outputable.hs')
| -rw-r--r-- | compiler/utils/Outputable.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/utils/Outputable.hs b/compiler/utils/Outputable.hs index 6c7ae08379..c557224fc1 100644 --- a/compiler/utils/Outputable.hs +++ b/compiler/utils/Outputable.hs @@ -105,6 +105,7 @@ import Data.Word import System.IO ( Handle ) import System.FilePath import Text.Printf +import Data.Graph (SCC(..)) import GHC.Fingerprint import GHC.Show ( showMultiLineString ) @@ -769,6 +770,10 @@ instance (Outputable elt) => Outputable (IM.IntMap elt) where instance Outputable Fingerprint where ppr (Fingerprint w1 w2) = text (printf "%016x%016x" w1 w2) +instance Outputable a => Outputable (SCC a) where + ppr (AcyclicSCC v) = text "NONREC" $$ (nest 3 (ppr v)) + ppr (CyclicSCC vs) = text "REC" $$ (nest 3 (vcat (map ppr vs))) + {- ************************************************************************ * * |
