diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/type/poly.lux | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/stdlib/source/library/lux/type/poly.lux b/stdlib/source/library/lux/type/poly.lux index 10070fc6a..f2cecab1e 100644 --- a/stdlib/source/library/lux/type/poly.lux +++ b/stdlib/source/library/lux/type/poly.lux @@ -1,27 +1,27 @@ (.using - [library - [lux "*" - ["[0]" meta] - ["[0]" type] - [abstract - ["[0]" monad {"+" do}]] - [control - ["[0]" maybe] - ["<>" parser ("[1]#[0]" monad) - ["<[0]>" type {"+" Env}] - ["<[0]>" code {"+" Parser}]]] - [data - ["[0]" product] - ["[0]" text] - [collection - ["[0]" list ("[1]#[0]" functor)] - ["[0]" dictionary]]] - [macro {"+" with_symbols} - ["[0]" code] - [syntax {"+" syntax:}]] - [math - [number - ["n" nat]]]]]) + [library + [lux "*" + ["[0]" meta] + ["[0]" type] + [abstract + ["[0]" monad {"+" do}]] + [control + ["[0]" maybe] + ["<>" parser ("[1]#[0]" monad) + ["<[0]>" type {"+" Env}] + ["<[0]>" code {"+" Parser}]]] + [data + ["[0]" product] + ["[0]" text] + [collection + ["[0]" list ("[1]#[0]" functor)] + ["[0]" dictionary]]] + [macro {"+" with_symbols} + ["[0]" code] + [syntax {"+" syntax:}]] + [math + [number + ["n" nat]]]]]) (def: polyP (Parser [Code Text Code]) @@ -61,14 +61,14 @@ ([.#Var] [.#Ex]) {.#Parameter idx} - (let [idx (<type>.adjusted_idx env idx)] + (let [idx (<type>.argument env idx)] (if (n.= 0 idx) (|> (dictionary.value idx env) maybe.trusted product.left (code env)) (` (.$ (~ (code.nat (-- idx))))))) {.#Apply {.#Primitive "" {.#End}} {.#Parameter idx}} - (case (<type>.adjusted_idx env idx) + (case (<type>.argument env idx) 0 (|> env (dictionary.value 0) maybe.trusted product.left (code env)) idx (undefined)) |