add support for <{..}> and ~~> syntax as well as typing for Kappa-calculus
[ghc-hetmet.git] / compiler / types / TypeRep.lhs
index db41403..ec20914 100644 (file)
@@ -648,8 +648,16 @@ pprTcApp _ pp tc [ty]
   | tc `hasKey` argTypeKindTyConKey      = ptext (sLit "??")
 
 pprTcApp p pp tc tys
+
   | isTupleTyCon tc && tyConArity tc == length tys
   = tupleParens (tupleTyConBoxity tc) (sep (punctuate comma (map (pp TopPrec) tys)))
+
+  | tc `hasKey` hetMetKappaTyConKey, [ty1,ty2] <- tys
+  = pp TopPrec ty1 <> ptext (sLit "~~>") <> pp TopPrec ty2
+
+  | tc `hasKey` hetMetCodeTypeTyConKey, [ty1,ty2] <- tys
+  = ptext (sLit "<[") <> pp TopPrec ty2 <> ptext (sLit "]>@") <> pp TopPrec ty1
+
   | otherwise
   = pprTypeNameApp p pp (getName tc) tys