diff options
author | Tom Smeding <tom@tomsmeding.com> | 2024-03-01 22:25:02 +0100 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2024-03-01 22:25:02 +0100 |
commit | e8f09ff3f9d40922238d646c8fbcbacf9cfdfb62 (patch) | |
tree | ec1b118a1f50efbb74c6d9de503380f76ad5f776 /src/HSVIS/Pretty.hs | |
parent | e094e3294e9c93fd1123b008a4b0e5f53915f5be (diff) |
Little typecheck work
Diffstat (limited to 'src/HSVIS/Pretty.hs')
-rw-r--r-- | src/HSVIS/Pretty.hs | 7 |
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 |