aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/analysis/function.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/analysis/function.lux6
1 files changed, 5 insertions, 1 deletions
diff --git a/new-luxc/source/luxc/lang/analysis/function.lux b/new-luxc/source/luxc/lang/analysis/function.lux
index a2aa95c08..b4aa31c90 100644
--- a/new-luxc/source/luxc/lang/analysis/function.lux
+++ b/new-luxc/source/luxc/lang/analysis/function.lux
@@ -17,6 +17,7 @@
["&;" inference])
[";L" variable #+ Variable])))
+(exception: #export Cannot-Analyse-Function)
(exception: #export Invalid-Function-Type)
(exception: #export Cannot-Apply-Function)
@@ -27,7 +28,10 @@
[functionT macro;expected-type]
(loop [expectedT functionT]
(&;with-stacked-errors
- (function [_] (Invalid-Function-Type (%type expectedT)))
+ (function [_] (Cannot-Analyse-Function (format " Type: " (%type expectedT) "\n"
+ "Function: " func-name "\n"
+ "Argument: " arg-name "\n"
+ " Body: " (%code body))))
(case expectedT
(#;Named name unnamedT)
(recur unnamedT)