aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/type/opaque.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/type/opaque.lux')
-rw-r--r--stdlib/source/lux/type/opaque.lux54
1 files changed, 27 insertions, 27 deletions
diff --git a/stdlib/source/lux/type/opaque.lux b/stdlib/source/lux/type/opaque.lux
index acd73d6a4..3b50fcbc2 100644
--- a/stdlib/source/lux/type/opaque.lux
+++ b/stdlib/source/lux/type/opaque.lux
@@ -6,12 +6,12 @@
(data [text "text/" Eq<Text> Monoid<Text>]
["E" error]
(coll [list "list/" Functor<List> Monoid<List>]))
- [meta]
- (meta [code]
- ["s" syntax #+ syntax:]
- (syntax ["cs" common]
- (common ["csr" reader]
- ["csw" writer])))))
+ [macro]
+ (macro [code]
+ ["s" syntax #+ syntax:]
+ (syntax ["cs" common]
+ (common ["csr" reader]
+ ["csw" writer])))))
(def: (get k plist)
(All [a]
@@ -60,8 +60,8 @@
(def: (install-casts' this-module-name name type-vars)
(-> Text Text (List Text) (Meta Unit))
- (do meta;Monad<Meta>
- [this-module (meta;find-module this-module-name)
+ (do macro;Monad<Meta>
+ [this-module (macro;find-module this-module-name)
#let [type-varsC (list/map code;local-symbol type-vars)
opaque-declaration (` ((~ (code;local-symbol name)) (~@ type-varsC)))
representation-declaration (` ((~ (code;local-symbol (representation-name name))) (~@ type-varsC)))
@@ -77,7 +77,7 @@
(~ value)))))
_
- (meta;fail ($_ text/compose "Wrong syntax for " down-cast))))])))
+ (macro;fail ($_ text/compose "Wrong syntax for " down-cast))))])))
(update@ #;defs (put up-cast (: Def
[Macro macro-anns
(function [tokens]
@@ -89,15 +89,15 @@
(~ value)))))
_
- (meta;fail ($_ text/compose "Wrong syntax for " up-cast))))]))))]]
+ (macro;fail ($_ text/compose "Wrong syntax for " up-cast))))]))))]]
(function [compiler]
(#E;Success [(update@ #;modules (put this-module-name this-module) compiler)
[]]))))
(def: (un-install-casts' this-module-name)
(-> Text (Meta Unit))
- (do meta;Monad<Meta>
- [this-module (meta;find-module this-module-name)
+ (do macro;Monad<Meta>
+ [this-module (macro;find-module this-module-name)
#let [this-module (|> this-module
(update@ #;defs (remove down-cast))
(update@ #;defs (remove up-cast)))]]
@@ -108,9 +108,9 @@
(syntax: #hidden (install-casts [name s;local-symbol]
[type-vars (s;tuple (p;some s;local-symbol))])
(do @
- [this-module-name meta;current-module-name
- ?down-cast (meta;find-macro [this-module-name down-cast])
- ?up-cast (meta;find-macro [this-module-name up-cast])]
+ [this-module-name macro;current-module-name
+ ?down-cast (macro;find-macro [this-module-name down-cast])
+ ?up-cast (macro;find-macro [this-module-name up-cast])]
(case [?down-cast ?up-cast]
[#;None #;None]
(do @
@@ -118,16 +118,16 @@
(wrap (list)))
_
- (meta;fail ($_ text/compose
- "Cannot temporarily define casting functions ("
- down-cast " & " up-cast
- ") because definitions like that already exist.")))))
+ (macro;fail ($_ text/compose
+ "Cannot temporarily define casting functions ("
+ down-cast " & " up-cast
+ ") because definitions like that already exist.")))))
(syntax: #hidden (un-install-casts)
- (do meta;Monad<Meta>
- [this-module-name meta;current-module-name
- ?down-cast (meta;find-macro [this-module-name down-cast])
- ?up-cast (meta;find-macro [this-module-name up-cast])]
+ (do macro;Monad<Meta>
+ [this-module-name macro;current-module-name
+ ?down-cast (macro;find-macro [this-module-name down-cast])
+ ?up-cast (macro;find-macro [this-module-name up-cast])]
(case [?down-cast ?up-cast]
[(#;Some _) (#;Some _)]
(do @
@@ -135,10 +135,10 @@
(wrap (list)))
_
- (meta;fail ($_ text/compose
- "Cannot un-define casting functions ("
- down-cast " & " up-cast
- ") because they do not exist.")))))
+ (macro;fail ($_ text/compose
+ "Cannot un-define casting functions ("
+ down-cast " & " up-cast
+ ") because they do not exist.")))))
(def: declaration
(s;Syntax [Text (List Text)])