From 2d9588f5b309aa6b5114d8719bfe3d0b17abbcff Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Tue, 27 Sep 2022 15:57:23 +0300 Subject: Fix position math --- src/Evaluator.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Evaluator.hs') 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 -- cgit v1.3