on master help sign in
Fix port parser! Copy paste error on the operator.
commitbdeb36eb6f4bac99412313a53c6e176278938b14 authorEvan Czaplicki <info@elm-lang.org> dateFri 3 Jan 2014, 12:12 (13 years ago) parenta5f7944
2 files changed+4−3
compiler/Parse/Declaration.hs+3−3 compiler/SourceSyntax/Declaration.hs+1
compiler/Parse/Declaration.hs+3−3
@@ -63,6 +63,6 @@ port =
6363 name <- lowVar
6464 whitespace
6565 let port' op ctor expr = do { try op ; whitespace ; ctor name <$> expr }
66− D.Port <$> choice [ port' hasType D.PortAnnotation Type.expr
67− , port' hasType D.SendDefinition Expr.expr
68− , port' hasType D.SendDefinition Expr.expr ]
66+ D.Port <$> choice [ port' hasType D.PortAnnotation Type.expr
67+ , port' (string "<-") D.SendDefinition Expr.expr
68+ , port' (string "->") D.RecvDefinition Expr.expr ]
compiler/SourceSyntax/Declaration.hs+1
@@ -25,6 +25,7 @@ data ParsePort
2525 = PortAnnotation String T.Type
2626 | SendDefinition String Expr.LParseExpr
2727 | RecvDefinition String Expr.LParseExpr
28+ deriving (Eq,Show)
2829
2930data Port
3031 = Send String Expr.LExpr T.Type