From 8a629bbbb0bd4950fb0f3c6d14c1a9a0ba057174 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 2 Mar 2019 21:09:39 -0400 Subject: Added the capacity to extract type-information from values to create new types based on that. --- stdlib/source/test/lux/type.lux | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'stdlib/source/test') 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 ))))) + +(def: extraction + Test + (_.test "Can extract types." + (let [example (: (Maybe Nat) + #.Nonae)] + (type/= (type (List Nat)) + (:extract [a] + {(Maybe a) example} + (List a)))))) -- cgit v1.2.3