diff options
Diffstat (limited to 'src/HSVIS/AST.hs')
-rw-r--r-- | src/HSVIS/AST.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/HSVIS/AST.hs b/src/HSVIS/AST.hs index a789c82..f95a3cc 100644 --- a/src/HSVIS/AST.hs +++ b/src/HSVIS/AST.hs @@ -141,6 +141,12 @@ data Operator = OAdd | OSub | OMul | ODiv | OMod | OEqu | OPow instance Pretty Name where prettysPrec _ (Name n) = showString ("\"" ++ n ++ "\"") +instance (X Kind s ~ (), Pretty (E Kind s)) => Pretty (Kind s) where + prettysPrec _ (KType ()) = showString "Type" + prettysPrec d (KFun () a b) = + showParen (d > -1) $ prettysPrec 0 a . showString " -> " . prettysPrec 0 b + prettysPrec d (KExt () e) = prettysPrec d e + instance HasExt DataDef where type HasXField DataDef = 'True type HasECon DataDef = 'False |