@@ -22,14 +22,14 @@ data Derivation = Json | JS | Binary | New
22 deriving (Eq, Show)
22 deriving (Eq, Show)
24data ParsePort
24data ParsePort
25− = PortAnnotation String T.Type
25+ = PPAnnotation String T.Type
26− | SendDefinition String Expr.LParseExpr
26+ | PPOut String Expr.LParseExpr
27− | RecvDefinition String Expr.LParseExpr
27+ | PPIn String Expr.LParseExpr
28 deriving (Show)
28 deriving (Show)
31− = Send String Expr.LExpr T.Type
31+ = Out String Expr.LExpr T.Type
32− | Recv String Expr.LExpr T.Type
32+ | In String Expr.LExpr T.Type
33 deriving (Show)
33 deriving (Show)
35type ParseDeclaration = Declaration' ParsePort Expr.ParseDef
35type ParseDeclaration = Declaration' ParsePort Expr.ParseDef
@@ -100,15 +100,15 @@ instance (Pretty port, Pretty def) => Pretty (Declaration' port def) where
100instance Pretty ParsePort where
100instance Pretty ParsePort where
101 pretty port =
101 pretty port =
102 case port of
102 case port of
103− PortAnnotation name tipe -> prettyPort name ":" tipe
103+ PPAnnotation name tipe -> prettyPort name ":" tipe
104− SendDefinition name expr -> prettyPort name "<-" expr
104+ PPOut name expr -> prettyPort name "<-" expr
105− RecvDefinition name expr -> prettyPort name "->" expr
105+ PPIn name expr -> prettyPort name "->" expr
107instance Pretty Port where
107instance Pretty Port where
108 pretty port =
108 pretty port =
109 case port of
109 case port of
110− Send name expr tipe -> mkPort "<-" name expr tipe
110+ Out name expr tipe -> mkPort "<-" name expr tipe
111− Recv name expr tipe -> mkPort "->" name expr tipe
111+ In name expr tipe -> mkPort "->" name expr tipe
113 mkPort arrow name expr tipe =
113 mkPort arrow name expr tipe =
114 P.vcat [ prettyPort name ":" tipe
114 P.vcat [ prettyPort name ":" tipe