aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/tool/compiler/phase/extension/analysis/lux.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/tool/compiler/phase/extension/analysis/lux.lux51
1 files changed, 26 insertions, 25 deletions
diff --git a/stdlib/source/lux/tool/compiler/phase/extension/analysis/lux.lux b/stdlib/source/lux/tool/compiler/phase/extension/analysis/lux.lux
index 51402fad8..48401f0c6 100644
--- a/stdlib/source/lux/tool/compiler/phase/extension/analysis/lux.lux
+++ b/stdlib/source/lux/tool/compiler/phase/extension/analysis/lux.lux
@@ -90,31 +90,32 @@
_ (<>.fail (exception.construct ..char-text-must-be-size-1 [raw])))))
(def: lux::syntax-char-case!
- (..custom [($_ <>.and
- <c>.any
- (<c>.tuple (<>.some (<>.and (<c>.tuple (<>.many ..text-char))
- <c>.any)))
- <c>.any)
- (function (_ extension-name phase [input conditionals else])
- (do ////.monad
- [input (typeA.with-type text.Char
- (phase input))
- expectedT (///.lift macro.expected-type)
- conditionals (monad.map @ (function (_ [cases branch])
- (do @
- [branch (typeA.with-type expectedT
- (phase branch))]
- (wrap [cases branch])))
- conditionals)
- else (typeA.with-type expectedT
- (phase else))]
- (wrap (|> conditionals
- (list@map (function (_ [cases branch])
- (/////analysis.tuple
- (list (/////analysis.tuple (list@map (|>> /////analysis.nat) cases))
- branch))))
- (list& input else)
- (#/////analysis.Extension extension-name)))))])))
+ (..custom
+ [($_ <>.and
+ <c>.any
+ (<c>.tuple (<>.some (<>.and (<c>.tuple (<>.many ..text-char))
+ <c>.any)))
+ <c>.any)
+ (function (_ extension-name phase [input conditionals else])
+ (do ////.monad
+ [input (typeA.with-type text.Char
+ (phase input))
+ expectedT (///.lift macro.expected-type)
+ conditionals (monad.map @ (function (_ [cases branch])
+ (do @
+ [branch (typeA.with-type expectedT
+ (phase branch))]
+ (wrap [cases branch])))
+ conditionals)
+ else (typeA.with-type expectedT
+ (phase else))]
+ (wrap (|> conditionals
+ (list@map (function (_ [cases branch])
+ (/////analysis.tuple
+ (list (/////analysis.tuple (list@map (|>> /////analysis.nat) cases))
+ branch))))
+ (list& input else)
+ (#/////analysis.Extension extension-name)))))])))
## "lux is" represents reference/pointer equality.
(def: lux::is