aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/module/descriptor/type.lux
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/module/descriptor/type.lux')
-rw-r--r--new-luxc/source/luxc/module/descriptor/type.lux75
1 files changed, 38 insertions, 37 deletions
diff --git a/new-luxc/source/luxc/module/descriptor/type.lux b/new-luxc/source/luxc/module/descriptor/type.lux
index d9079e893..d661aa385 100644
--- a/new-luxc/source/luxc/module/descriptor/type.lux
+++ b/new-luxc/source/luxc/module/descriptor/type.lux
@@ -76,43 +76,44 @@
(l;Lexer Type)
(l;rec
(function [type-decoder]
- (let% [<simple> (do-template [<type> <signal>]
- [(|> (l/wrap <type>) (l;after (l;text <signal>)))]
-
- [Type type-signal]
- [#;Void void-signal]
- [#;Unit unit-signal])
- <combinators> (do-template [<tag> <prefix>]
- [(do l;Monad<Lexer>
- [_ (l;text <prefix>)
- left type-decoder
- right type-decoder]
- (wrap (<tag> left right)))]
-
- [#;Product product-signal]
- [#;Sum sum-signal]
- [#;Function function-signal]
- [#;App application-signal])
- <abstractions> (do-template [<tag> <prefix>]
- [(do l;Monad<Lexer>
- [_ (l;text <prefix>)
- env (&;decode-list type-decoder)
- body type-decoder]
- (wrap (<tag> env body)))]
-
- [#;UnivQ uq-signal]
- [#;ExQ eq-signal])
- <wildcards> (do-template [<tag> <prefix>]
- [(do l;Monad<Lexer>
- [_ (l;text <prefix>)
- id (l;codec number;Codec<Text,Int>
- (l;some' l;digit))
- _ (l;text &;stop-signal)]
- (wrap (<tag> (int-to-nat id))))]
-
- [#;Bound bound-signal]
- [#;Ex ex-signal]
- [#;Var var-signal])]
+ (with-expansions
+ [<simple> (do-template [<type> <signal>]
+ [(|> (l/wrap <type>) (l;after (l;text <signal>)))]
+
+ [Type type-signal]
+ [#;Void void-signal]
+ [#;Unit unit-signal])
+ <combinators> (do-template [<tag> <prefix>]
+ [(do l;Monad<Lexer>
+ [_ (l;text <prefix>)
+ left type-decoder
+ right type-decoder]
+ (wrap (<tag> left right)))]
+
+ [#;Product product-signal]
+ [#;Sum sum-signal]
+ [#;Function function-signal]
+ [#;App application-signal])
+ <abstractions> (do-template [<tag> <prefix>]
+ [(do l;Monad<Lexer>
+ [_ (l;text <prefix>)
+ env (&;decode-list type-decoder)
+ body type-decoder]
+ (wrap (<tag> env body)))]
+
+ [#;UnivQ uq-signal]
+ [#;ExQ eq-signal])
+ <wildcards> (do-template [<tag> <prefix>]
+ [(do l;Monad<Lexer>
+ [_ (l;text <prefix>)
+ id (l;codec number;Codec<Text,Int>
+ (l;some' l;digit))
+ _ (l;text &;stop-signal)]
+ (wrap (<tag> (int-to-nat id))))]
+
+ [#;Bound bound-signal]
+ [#;Ex ex-signal]
+ [#;Var var-signal])]
($_ l;either
(do l;Monad<Lexer>
[_ (l;text host-signal)