aboutsummaryrefslogtreecommitdiff
path: root/src/Language/SimpleShell/Parser/Function.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Language/SimpleShell/Parser/Function.hs')
-rw-r--r--src/Language/SimpleShell/Parser/Function.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Language/SimpleShell/Parser/Function.hs b/src/Language/SimpleShell/Parser/Function.hs
index 26f5a5c..a0c5a9b 100644
--- a/src/Language/SimpleShell/Parser/Function.hs
+++ b/src/Language/SimpleShell/Parser/Function.hs
@@ -25,6 +25,7 @@ functionP = do
t' <- simpleTypeP
fname <- nameP
params <- symbol "(" *> paramP `sepBy` symbol "," <* symbol ")"
+ symbol "="
let (ts, vars) = unzip params
body <- forceType t' (bodyP params) <|> fail "Function return type mismatch."
return ((t', ts), Function fname vars body)