summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2014-08-01 16:40:18 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2014-08-07 09:55:14 +0100
commit93b1a43ebe8bf145b35e903966d4a62b7847f213 (patch)
treed461f798721f67a06b8f957069d749283e6d40f4
parentd3fafbb0e37bf052f63ba0d4af0c40ff03a81a2c (diff)
downloadhaskell-93b1a43ebe8bf145b35e903966d4a62b7847f213.tar.gz
Add Output instance for OrdList
-rw-r--r--compiler/utils/OrdList.lhs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/utils/OrdList.lhs b/compiler/utils/OrdList.lhs
index d1d8708dd3..42abb51696 100644
--- a/compiler/utils/OrdList.lhs
+++ b/compiler/utils/OrdList.lhs
@@ -15,6 +15,8 @@ module OrdList (
mapOL, fromOL, toOL, foldrOL, foldlOL
) where
+import Outputable
+
infixl 5 `appOL`
infixl 5 `snocOL`
infixr 5 `consOL`
@@ -28,6 +30,8 @@ data OrdList a
| Two (OrdList a) -- Invariant: non-empty
(OrdList a) -- Invariant: non-empty
+instance Outputable a => Outputable (OrdList a) where
+ ppr ol = ppr (fromOL ol) -- Convert to list and print that
nilOL :: OrdList a
isNilOL :: OrdList a -> Bool