From e8f09ff3f9d40922238d646c8fbcbacf9cfdfb62 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Fri, 1 Mar 2024 22:25:02 +0100 Subject: Little typecheck work --- src/HSVIS/Pretty.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/HSVIS/Pretty.hs') 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 -- cgit v1.2.3-70-g09d2