diff options
Diffstat (limited to 'stdlib/source/library/lux/control/parser/type.lux')
-rw-r--r-- | stdlib/source/library/lux/control/parser/type.lux | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/stdlib/source/library/lux/control/parser/type.lux b/stdlib/source/library/lux/control/parser/type.lux index 1e2c037d5..73a4a9e4e 100644 --- a/stdlib/source/library/lux/control/parser/type.lux +++ b/stdlib/source/library/lux/control/parser/type.lux @@ -153,20 +153,20 @@ (All [a] (-> (Parser a) (Parser a))) (do //.monad [headT ..any] - (let [members (<flattener> (type.un_name headT))] + (let [members (<flattener> (type.anonymous headT))] (if (n.> 1 (list.size members)) (local members poly) (//.fail (exception.construct <exception> headT))))))] - [variant type.flatten_variant #.Sum ..not_variant] - [tuple type.flatten_tuple #.Product ..not_tuple] + [variant type.flat_variant #.Sum ..not_variant] + [tuple type.flat_tuple #.Product ..not_tuple] ) (def: polymorphic' (Parser [Nat Type]) (do //.monad [headT any - #let [[num_arg bodyT] (type.flatten_univ_q (type.un_name headT))]] + #let [[num_arg bodyT] (type.flat_univ_q (type.anonymous headT))]] (if (n.= 0 num_arg) (//.fail (exception.construct ..not_polymorphic headT)) (wrap [num_arg bodyT])))) @@ -212,17 +212,17 @@ (All [i o] (-> (Parser i) (Parser o) (Parser [i o]))) (do //.monad [headT any - #let [[inputsT outputT] (type.flatten_function (type.un_name headT))]] + #let [[inputsT outputT] (type.flat_function (type.anonymous headT))]] (if (n.> 0 (list.size inputsT)) (//.and (local inputsT in_poly) (local (list outputT) out_poly)) (//.fail (exception.construct ..not_function headT))))) -(def: #export (apply poly) +(def: #export (applied poly) (All [a] (-> (Parser a) (Parser a))) (do //.monad [headT any - #let [[funcT paramsT] (type.flatten_application (type.un_name headT))]] + #let [[funcT paramsT] (type.flat_application (type.anonymous headT))]] (if (n.= 0 (list.size paramsT)) (//.fail (exception.construct ..not_application headT)) (..local (#.Cons funcT paramsT) poly)))) @@ -310,7 +310,7 @@ (All [a] (-> (Parser a) (Parser [Code a]))) (do {! //.monad} [headT any] - (case (type.un_name headT) + (case (type.anonymous headT) (^ (#.Apply (|nothing|) (#.UnivQ _ headT'))) (do ! [[recT _ output] (|> poly @@ -327,10 +327,10 @@ (do //.monad [env ..env headT any] - (case (type.un_name headT) + (case (type.anonymous headT) (^multi (^ (#.Apply (|nothing|) (#.Parameter funcT_idx))) (n.= 0 (adjusted_idx env funcT_idx)) - [(dictionary.get 0 env) (#.Some [self_type self_call])]) + {(dictionary.get 0 env) (#.Some [self_type self_call])}) (wrap self_call) _ @@ -340,7 +340,7 @@ (Parser Code) (do {! //.monad} [env ..env - [funcT argsT] (..apply (//.and any (//.many any))) + [funcT argsT] (..applied (//.and any (//.many any))) _ (local (list funcT) (..parameter! 0)) allC (let [allT (list& funcT argsT)] (|> allT |