Show for Name and Dim

This commit is contained in:
rhiannon morris 2022-05-07 00:57:23 +02:00
parent 804f1e3638
commit 715a9fe8f9
2 changed files with 16 additions and 0 deletions

View file

@ -37,6 +37,11 @@ drepr (B x) = Right x
export Eq (Dim n) where (==) = (==) `on` drepr
export Ord (Dim n) where compare = compare `on` drepr
export
Show (Dim n) where
show (K k) = showCon App "K" $ show k
show (B i) = showCon App "B" $ show i
export
PrettyHL DimConst where
prettyM Zero = hl Dim <$> ifUnicode "𝟬" "0"