diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/lang/compiler/analysis/function.lux | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/stdlib/source/lux/lang/compiler/analysis/function.lux b/stdlib/source/lux/lang/compiler/analysis/function.lux index b6e09f11a..b16b18e59 100644 --- a/stdlib/source/lux/lang/compiler/analysis/function.lux +++ b/stdlib/source/lux/lang/compiler/analysis/function.lux @@ -35,9 +35,7 @@ (do macro.Monad<Meta> [functionT macro.expected-type] (loop [expectedT functionT] - (///.with-stacked-errors - (.function (_ _) - (ex.construct cannot-analyse [expectedT function-name arg-name body])) + (///.with-stack cannot-analyse [expectedT function-name arg-name body] (case expectedT (#.Named name unnamedT) (recur unnamedT) @@ -95,9 +93,7 @@ (def: #export (apply analyse functionT functionA args) (-> Compiler Type Analysis (List Code) (Meta Analysis)) - (///.with-stacked-errors - (.function (_ _) - (ex.construct cannot-apply [functionT args])) - (do macro.Monad<Meta> - [[applyT argsA] (//inference.general analyse functionT args)] - (wrap (//.apply [functionA argsA]))))) + (<| (///.with-stack cannot-apply [functionT args]) + (do macro.Monad<Meta> + [[applyT argsA] (//inference.general analyse functionT args)]) + (wrap (//.apply [functionA argsA])))) |