diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2022-09-27 15:57:23 +0300 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2022-12-05 14:21:53 +0200 |
| commit | 2d9588f5b309aa6b5114d8719bfe3d0b17abbcff (patch) | |
| tree | 88bb881399b1382b5a90b63a5be06d712d5e051c /src/Evaluator.hs | |
| parent | 3b1144988c49c1221b1c5f6b8f7544f1dea7cb44 (diff) | |
Fix position math
Diffstat (limited to 'src/Evaluator.hs')
| -rw-r--r-- | src/Evaluator.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Evaluator.hs b/src/Evaluator.hs index 4f40706..2797fcd 100644 --- a/src/Evaluator.hs +++ b/src/Evaluator.hs @@ -106,7 +106,7 @@ evaluateFunctionDef env asts = do params <- mapM assertIsASTSymbol params' let letExprs = take (length exprs - 1) exprs - let nonLetExprM = L.find isLetAST letExprs + let nonLetExprM = L.find (not . isLetAST) letExprs case nonLetExprM of Just nonLetExpr -> throwL (astPos nonLetExpr) $ "non-let expression in function definition before body: " ++ show nonLetExpr |
