@@ -9,12 +9,15 @@ import qualified Parse.Expression as Expr
9import qualified Parse.Type as Type
9import qualified Parse.Type as Type
10import qualified AST.Declaration as D
10import qualified AST.Declaration as D
12declaration :: IParser D.SourceDecl
13declaration :: IParser D.SourceDecl
13declaration = typeDecl <|> infixDecl <|> port <|> definition
14declaration = typeDecl <|> infixDecl <|> port <|> definition
15definition :: IParser D.SourceDecl
17definition :: IParser D.SourceDecl
16definition = D.Definition <$> Expr.def
18definition = D.Definition <$> Expr.def
18typeDecl :: IParser D.SourceDecl
21typeDecl :: IParser D.SourceDecl
20 do reserved "type" <?> "type declaration"
23 do reserved "type" <?> "type declaration"