From fafed063904d6ca7bfa3d9c4ba4b8d44e7b97549 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 12 Mar 2019 23:24:41 -0400 Subject: Re-named ":extract" to ":by-example". --- lux-mode/lux-mode.el | 2 +- stdlib/source/lux/tool/compiler/default/platform.lux | 2 +- stdlib/source/lux/tool/compiler/phase/extension/statement.lux | 10 +++++----- stdlib/source/lux/type.lux | 6 +++--- stdlib/source/test/lux/type.lux | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lux-mode/lux-mode.el b/lux-mode/lux-mode.el index f43034057..c72a1f76e 100644 --- a/lux-mode/lux-mode.el +++ b/lux-mode/lux-mode.el @@ -245,7 +245,7 @@ Called by `imenu--generic-function'." (control//contract (altRE "pre" "post")) ;; Type (type//syntax (altRE "|" "&" "->" "All" "Ex" "Rec" "primitive" "\\$" "type")) - (type//checking (altRE ":" ":coerce" ":~" ":assume" ":of" ":cast" ":share" ":extract")) + (type//checking (altRE ":" ":coerce" ":~" ":assume" ":of" ":cast" ":share" ":by-example")) (type//abstract (altRE "abstract:" ":abstraction" ":representation" ":transmutation" "\\^:representation")) (type//unit (altRE "unit:" "scale:")) (type//poly (altRE "poly:" "derived:")) diff --git a/stdlib/source/lux/tool/compiler/default/platform.lux b/stdlib/source/lux/tool/compiler/default/platform.lux index ced79a306..73b5d8764 100644 --- a/stdlib/source/lux/tool/compiler/default/platform.lux +++ b/stdlib/source/lux/tool/compiler/default/platform.lux @@ -1,6 +1,6 @@ (.module: [lux (#- Module) - [type (#+ :share :extract)] + [type (#+ :share)] [control ["." monad (#+ Monad do)]] [data diff --git a/stdlib/source/lux/tool/compiler/phase/extension/statement.lux b/stdlib/source/lux/tool/compiler/phase/extension/statement.lux index 749924650..4f5bdb922 100644 --- a/stdlib/source/lux/tool/compiler/phase/extension/statement.lux +++ b/stdlib/source/lux/tool/compiler/phase/extension/statement.lux @@ -10,7 +10,7 @@ ["." list ("#/." functor)] ["." dictionary]]] ["." macro] - [type (#+ :share :extract) + [type (#+ :share :by-example) ["." check]]] ["." // ["." bundle] @@ -183,10 +183,10 @@ (case inputsC+ (^ (list [_ (#.Text name)] valueC)) (do ///.monad - [[_ handlerT handlerV] (evaluate! (:extract [anchor expression statement] - {(Handler anchor expression statement) - handler} - ) + [[_ handlerT handlerV] (evaluate! (:by-example [anchor expression statement] + {(Handler anchor expression statement) + handler} + ) valueC)] (<| (//.install name) diff --git a/stdlib/source/lux/type.lux b/stdlib/source/lux/type.lux index a760180c5..f18544494 100644 --- a/stdlib/source/lux/type.lux +++ b/stdlib/source/lux/type.lux @@ -391,9 +391,9 @@ (:assume (~ (get@ #expression computation))))))] (wrap (list (` ((~ shareC) (~ (get@ #expression exemplar))))))))) -(syntax: #export (:extract {type-vars type-parameters} - {exemplar typed} - {extraction s.any}) +(syntax: #export (:by-example {type-vars type-parameters} + {exemplar typed} + {extraction s.any}) (wrap (list (` (:of (:share [(~+ (list/map code.local-identifier type-vars))] {(~ (get@ #type exemplar)) (~ (get@ #expression exemplar))} diff --git a/stdlib/source/test/lux/type.lux b/stdlib/source/test/lux/type.lux index c7daced97..b9a6f09e4 100644 --- a/stdlib/source/test/lux/type.lux +++ b/stdlib/source/test/lux/type.lux @@ -173,6 +173,6 @@ (let [example (: (Maybe Nat) #.Nonae)] (type/= (type (List Nat)) - (:extract [a] - {(Maybe a) example} - (List a)))))) + (:by-example [a] + {(Maybe a) example} + (List a)))))) -- cgit v1.2.3