aboutsummaryrefslogtreecommitdiff
path: root/src/HSVIS/Pretty.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-03-01 22:25:02 +0100
committerTom Smeding <tom@tomsmeding.com>2024-03-01 22:25:02 +0100
commite8f09ff3f9d40922238d646c8fbcbacf9cfdfb62 (patch)
treeec1b118a1f50efbb74c6d9de503380f76ad5f776 /src/HSVIS/Pretty.hs
parente094e3294e9c93fd1123b008a4b0e5f53915f5be (diff)
Little typecheck work
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