summaryrefslogtreecommitdiffstats
path: root/app/Pretty.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Pretty.hs')
-rw-r--r--app/Pretty.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/Pretty.hs b/app/Pretty.hs
index 07b3296..7732dae 100644
--- a/app/Pretty.hs
+++ b/app/Pretty.hs
@@ -14,6 +14,7 @@ module Pretty
)
where
+import Data.Monoid
import Pretty.Color
data Doc
@@ -24,6 +25,12 @@ data Doc
class Pretty a where
pretty :: a -> Doc
+instance (Monoid Doc) where
+ mempty = Col []
+
+instance (Semigroup Doc) where
+ a <> b = Col [a, b]
+
instance Pretty Doc where
pretty = id