aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/type/refinement.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/type/refinement.lux39
1 files changed, 20 insertions, 19 deletions
diff --git a/stdlib/source/library/lux/type/refinement.lux b/stdlib/source/library/lux/type/refinement.lux
index 79860cfbc..fd571bc68 100644
--- a/stdlib/source/library/lux/type/refinement.lux
+++ b/stdlib/source/library/lux/type/refinement.lux
@@ -7,7 +7,7 @@
[parser
["<[0]>" code]]]
["[0]" macro (.only)
- [syntax (.only syntax:)]]
+ [syntax (.only syntax)]]
["[0]" type (.only)
[primitive (.except)]]]])
@@ -84,22 +84,23 @@
[yes
{.#Item head no}]))))
-(syntax: .public (type [refiner <code>.any])
- ... TODO: Switch to the cleaner approach ASAP.
- (macro.with_symbols [g!t g!% g!_ g!:refiner:]
- (in (list (` (let [... (~ g!_) (.is (.Ex ((~ g!_) (~ g!t) (~ g!%))
- ... (..Refined (~ g!t) (~ g!%)))
- ... (~ refiner))
- ]
- (.case (.type_of (~ refiner))
- {.#Apply (~ g!%) {.#Apply (~ g!t) (~ g!:refiner:)}}
- (.type (..Refined (~ g!t) (~ g!%)))
+(def: .public type
+ (syntax (_ [refiner <code>.any])
+ ... TODO: Switch to the cleaner approach ASAP.
+ (macro.with_symbols [g!t g!% g!_ g!:refiner:]
+ (in (list (` (let [ ... (~ g!_) (.is (.Ex ((~ g!_) (~ g!t) (~ g!%))
+ ... (..Refined (~ g!t) (~ g!%)))
+ ... (~ refiner))
+ ]
+ (.case (.type_of (~ refiner))
+ {.#Apply (~ g!%) {.#Apply (~ g!t) (~ g!:refiner:)}}
+ (.type (..Refined (~ g!t) (~ g!%)))
- (~ g!_)
- (.undefined))))
- ... (` ((~! type.by_example) [(~ g!t) (~ g!%)]
- ... (..Refiner (~ g!t) (~ g!%))
- ... (~ refiner)
-
- ... (..Refined (~ g!t) (~ g!%))))
- ))))
+ (~ g!_)
+ (.undefined))))
+ ... (` ((~! type.by_example) [(~ g!t) (~ g!%)]
+ ... (..Refiner (~ g!t) (~ g!%))
+ ... (~ refiner)
+
+ ... (..Refined (~ g!t) (~ g!%))))
+ )))))