aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/extension.lux
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/lang/extension.lux')
-rw-r--r--new-luxc/source/luxc/lang/extension.lux19
1 files changed, 16 insertions, 3 deletions
diff --git a/new-luxc/source/luxc/lang/extension.lux b/new-luxc/source/luxc/lang/extension.lux
index 248bfbb71..ff3a4d24e 100644
--- a/new-luxc/source/luxc/lang/extension.lux
+++ b/new-luxc/source/luxc/lang/extension.lux
@@ -6,7 +6,9 @@
[text]
(coll [dict #+ Dict]))
[macro])
- [//])
+ [//]
+ (// ["la" analysis]
+ ["ls" synthesis]))
(exception: #export Unknown-Analysis)
(exception: #export Unknown-Synthesis)
@@ -24,7 +26,9 @@
(List Code) (Meta Code)))
(type: #export Synthesis
- (-> (List Code) (Meta Code)))
+ (-> (-> la.Analysis ls.Synthesis) (List Code) Code))
+
+(type: #export Syntheses (Dict Text Synthesis))
(type: #export Translation
(-> (List Code) (Meta Code)))
@@ -34,7 +38,7 @@
(type: #export Extensions
{#analysis (Dict Text Analysis)
- #synthesis (Dict Text Synthesis)
+ #synthesis Syntheses
#translation (Dict Text Translation)
#statement (Dict Text Statement)})
@@ -75,6 +79,15 @@
[find-statement Statement #statement Unknown-Statement]
)
+(do-template [<name> <type> <category>]
+ [(def: #export <name>
+ (Meta <type>)
+ (|> ..get
+ (:: macro.Monad<Meta> map (get@ <category>))))]
+
+ [all-syntheses (Dict Text Synthesis) #synthesis]
+ )
+
(do-template [<name> <type> <category> <exception>]
[(def: #export (<name> name extension)
(-> Text <type> (Meta Unit))