From 1083d34c8563d3ce200f2f363ce36b19bf792f6f Mon Sep 17 00:00:00 2001 From: Fabian Kirchner Date: Tue, 13 Aug 2024 10:21:00 +0200 Subject: feat: show batteries separately and correct state --- app/Pretty.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/Pretty.hs') 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 -- cgit v1.2.3