aboutsummaryrefslogtreecommitdiff
path: root/src/HSVIS/Pretty.hs
blob: 0f98da3f40893e7cad513618d445e0c813ea25fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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 minBound x