@@ -22,14 +22,14 @@ data Derivation = Json | JS | Binary | New
2222 deriving (Eq, Show)
2323
2424data ParsePort
25− = PortAnnotation String T.Type
26− | SendDefinition String Expr.LParseExpr
27− | RecvDefinition String Expr.LParseExpr
25+ = PPAnnotation String T.Type
26+ | PPOut String Expr.LParseExpr
27+ | PPIn String Expr.LParseExpr
2828 deriving (Show)
2929
3030data Port
31− = Send String Expr.LExpr T.Type
32− | Recv String Expr.LExpr T.Type
31+ = Out String Expr.LExpr T.Type
32+ | In String Expr.LExpr T.Type
3333 deriving (Show)
3434
3535type ParseDeclaration = Declaration' ParsePort Expr.ParseDef
@@ -100,15 +100,15 @@ instance (Pretty port, Pretty def) => Pretty (Declaration' port def) where
100100instance Pretty ParsePort where
101101 pretty port =
102102 case port of
103− PortAnnotation name tipe -> prettyPort name ":" tipe
104− SendDefinition name expr -> prettyPort name "<-" expr
105− RecvDefinition name expr -> prettyPort name "->" expr
103+ PPAnnotation name tipe -> prettyPort name ":" tipe
104+ PPOut name expr -> prettyPort name "<-" expr
105+ PPIn name expr -> prettyPort name "->" expr
106106
107107instance Pretty Port where
108108 pretty port =
109109 case port of
110− Send name expr tipe -> mkPort "<-" name expr tipe
111− Recv name expr tipe -> mkPort "->" name expr tipe
110+ Out name expr tipe -> mkPort "<-" name expr tipe
111+ In name expr tipe -> mkPort "->" name expr tipe
112112 where
113113 mkPort arrow name expr tipe =
114114 P.vcat [ prettyPort name ":" tipe