From e8f09ff3f9d40922238d646c8fbcbacf9cfdfb62 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Fri, 1 Mar 2024 22:25:02 +0100 Subject: Little typecheck work --- src/HSVIS/AST.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/HSVIS/AST.hs') 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 -- cgit v1.2.3-70-g09d2