aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lux-mode/lux-mode.el2
-rw-r--r--stdlib/source/lux/tool/compiler/default/platform.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/extension/statement.lux10
-rw-r--r--stdlib/source/lux/type.lux6
-rw-r--r--stdlib/source/test/lux/type.lux6
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}
- <type>)
+ [[_ handlerT handlerV] (evaluate! (:by-example [anchor expression statement]
+ {(Handler anchor expression statement)
+ handler}
+ <type>)
valueC)]
(<| <scope>
(//.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))))))