diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/macro/poly/functor.lux | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/stdlib/source/lux/macro/poly/functor.lux b/stdlib/source/lux/macro/poly/functor.lux index 78b668f2c..c9de93cbb 100644 --- a/stdlib/source/lux/macro/poly/functor.lux +++ b/stdlib/source/lux/macro/poly/functor.lux @@ -34,7 +34,7 @@ [g!vars _] (poly;polymorphic :x:) #let [num-vars (list;size g!vars) new-env (poly;extend-env g!type-fun g!vars env)] - _ (compiler;assert (>+ +0 num-vars) + _ (compiler;assert (n.> +0 num-vars) "Functors must have at least 1 type-variable.")] (let [->Functor (: (-> AST AST) (lambda [.type.] (` (functor;Functor (~ .type.))))) @@ -47,7 +47,7 @@ (wrap value)) ## Type-var (do @ - [_ (poly;var new-env (dec+ num-vars) :type:)] + [_ (poly;var new-env (n.dec num-vars) :type:)] (wrap (` ((~ g!func) (~ value))))) ## Tuples/records (do @ @@ -116,7 +116,7 @@ (~ .out.)))))))))) ## No structure (as you'd expect from Identity) (do @ - [_ (poly;var new-env (dec+ num-vars) :x:)] + [_ (poly;var new-env (n.dec num-vars) :x:)] (wrap (` (: (~ (->Functor (type;type-to-ast :x:))) (struct (def: ((~ g!map) (~ g!func) (~ g!input)) ((~ g!func) (~ g!input)))))))) |