Commit 93b1a43e authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Add Output instance for OrdList

parent d3fafbb0
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment