Show for Name and Dim
This commit is contained in:
parent
804f1e3638
commit
715a9fe8f9
2 changed files with 16 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue