From 953f49d5a46209f2d75e67b50edea378261108cd Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 29 May 2017 22:05:57 -0400 Subject: - Fixes for pattern-matching (case) analysis. - Small refactorings. - Improved common procedures analysis. - Can now handle tagged structures (variants & records). - Tests for pattern-matching, functions (definition & application), and common procedures. --- new-luxc/source/luxc/analyser/function.lux | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'new-luxc/source/luxc/analyser/function.lux') diff --git a/new-luxc/source/luxc/analyser/function.lux b/new-luxc/source/luxc/analyser/function.lux index 838de4181..394e65c4d 100644 --- a/new-luxc/source/luxc/analyser/function.lux +++ b/new-luxc/source/luxc/analyser/function.lux @@ -17,8 +17,8 @@ (def: #export (analyse-function analyse func-name arg-name body) (-> &;Analyser Text Text Code (Lux Analysis)) (do Monad - [original macro;expected-type] - (loop [expected original] + [functionT macro;expected-type] + (loop [expected functionT] (&;with-stacked-errors (function [_] (format "Functions require function types: " (type;to-text expected))) (case expected @@ -79,7 +79,7 @@ (#;Function inputT outputT) (<| (:: @ map (|>. #la;Function)) &;with-scope - (&env;with-local [func-name original]) + (&env;with-local [func-name functionT]) (&env;with-local [arg-name inputT]) (&;with-expected-type outputT) (analyse body)) -- cgit v1.2.3