@@ -1,4 +1,4 @@
1−module Parse.Expression (def,term,typeAnnotation) where
1+module Parse.Expression (def,term,typeAnnotation,expr) where
3import Control.Arrow ((***))
3import Control.Arrow ((***))
4import Control.Applicative ((<$>), (<*>))
4import Control.Applicative ((<$>), (<*>))
@@ -16,7 +16,6 @@ import SourceSyntax.Location as Location
16import SourceSyntax.Pattern hiding (tuple,list)
16import SourceSyntax.Pattern hiding (tuple,list)
17import qualified SourceSyntax.Literal as Literal
17import qualified SourceSyntax.Literal as Literal
18import SourceSyntax.Expression
18import SourceSyntax.Expression
19−import SourceSyntax.Declaration (Declaration(Definition))
22-------- Basic Terms --------
21-------- Basic Terms --------
@@ -191,6 +190,7 @@ caseExpr = do
191 with = brackets (semiSep1 (case_ <?> "cases { x -> ... }"))
190 with = brackets (semiSep1 (case_ <?> "cases { x -> ... }"))
192 without = block (do c <- case_ ; whitespace ; return c)
191 without = block (do c <- case_ ; whitespace ; return c)
193+expr :: IParser (LExpr t v)
194expr = addLocation (choice [ ifExpr, letExpr, caseExpr ])
194expr = addLocation (choice [ ifExpr, letExpr, caseExpr ])
195 <|> lambdaExpr
195 <|> lambdaExpr
196 <|> binaryExpr
196 <|> binaryExpr