aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
authorEduardo Julian2019-03-02 21:09:39 -0400
committerEduardo Julian2019-03-02 21:09:39 -0400
commit8a629bbbb0bd4950fb0f3c6d14c1a9a0ba057174 (patch)
tree7d0de954b940609660b061c6eb5155b940ba771b /stdlib/source/test
parent0b6be3e4022acfa4650f09f53b9aa5a5e7818cf7 (diff)
Added the capacity to extract type-information from values to create new types based on that.
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/type.lux10
1 files changed, 10 insertions, 0 deletions
diff --git a/stdlib/source/test/lux/type.lux b/stdlib/source/test/lux/type.lux
index b4796911a..c7daced97 100644
--- a/stdlib/source/test/lux/type.lux
+++ b/stdlib/source/test/lux/type.lux
@@ -166,3 +166,13 @@
($_ seq
<quant-tests>
)))))
+
+(def: extraction
+ Test
+ (_.test "Can extract types."
+ (let [example (: (Maybe Nat)
+ #.Nonae)]
+ (type/= (type (List Nat))
+ (:extract [a]
+ {(Maybe a) example}
+ (List a))))))