aboutsummaryrefslogtreecommitdiff
path: root/src/HSVIS/Pretty.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/HSVIS/Pretty.hs')
-rw-r--r--src/HSVIS/Pretty.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/HSVIS/Pretty.hs b/src/HSVIS/Pretty.hs
index ffde90e..0f98da3 100644
--- a/src/HSVIS/Pretty.hs
+++ b/src/HSVIS/Pretty.hs
@@ -1,11 +1,16 @@
module HSVIS.Pretty where
+import Data.Void
+
class Pretty a where
prettysPrec :: Int -> a -> ShowS
+instance Pretty Void where
+ prettysPrec _ = absurd
+
prettyPrec :: Pretty a => Int -> a -> String
prettyPrec d x = prettysPrec d x ""
pretty :: Pretty a => a -> String
-pretty x = prettyPrec 0 x
+pretty x = prettyPrec minBound x