From aac5a7796939cd705d955acb616cbff38474606d Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 3 Jul 2018 19:49:04 -0400 Subject: - Re-named "@abstraction" to ":abstraction" and "@representation" to ":representation". --- lux-mode/lux-mode.el | 2 +- new-luxc/source/luxc/lang/host/common-lisp.lux | 40 +++++----- new-luxc/source/luxc/lang/host/php.lux | 100 ++++++++++++------------- new-luxc/source/luxc/lang/host/python.lux | 100 ++++++++++++------------- new-luxc/source/luxc/lang/host/r.lux | 72 +++++++++--------- stdlib/source/lux/concurrency/actor.lux | 12 +-- stdlib/source/lux/concurrency/frp.lux | 6 +- stdlib/source/lux/concurrency/promise.lux | 12 +-- stdlib/source/lux/concurrency/semaphore.lux | 16 ++-- stdlib/source/lux/concurrency/stm.lux | 12 +-- stdlib/source/lux/data/color.lux | 8 +- stdlib/source/lux/data/lazy.lux | 4 +- stdlib/source/lux/data/tainted.lux | 4 +- stdlib/source/lux/data/text/unicode.lux | 18 ++--- stdlib/source/lux/lang/host/scheme.lux | 52 ++++++------- stdlib/source/lux/math/constructive.lux | 4 +- stdlib/source/lux/math/modular.lux | 28 +++---- stdlib/source/lux/time/duration.lux | 16 ++-- stdlib/source/lux/time/instant.lux | 18 ++--- stdlib/source/lux/type/abstract.lux | 10 +-- stdlib/source/lux/type/quotient.lux | 8 +- stdlib/source/lux/type/refinement.lux | 8 +- stdlib/source/lux/type/resource.lux | 6 +- stdlib/source/lux/type/unit.lux | 4 +- stdlib/source/lux/world/net/tcp.jvm.lux | 8 +- stdlib/source/lux/world/net/udp.jvm.lux | 10 +-- 26 files changed, 289 insertions(+), 289 deletions(-) diff --git a/lux-mode/lux-mode.el b/lux-mode/lux-mode.el index 894b7148c..cc4882185 100644 --- a/lux-mode/lux-mode.el +++ b/lux-mode/lux-mode.el @@ -224,7 +224,7 @@ Called by `imenu--generic-function'." "word:" "abstract:" "unit:" "scale:" - ":" ":coerce" ":assume" "@abstraction" "@representation" "^@representation" + ":" ":coerce" ":assume" ":abstraction" ":representation" "^:representation" "function" "case" "undefined" "ident-for" "static" "and" "or" "char" diff --git a/new-luxc/source/luxc/lang/host/common-lisp.lux b/new-luxc/source/luxc/lang/host/common-lisp.lux index 3ba69314d..108f69e27 100644 --- a/new-luxc/source/luxc/lang/host/common-lisp.lux +++ b/new-luxc/source/luxc/lang/host/common-lisp.lux @@ -16,18 +16,18 @@ Text - (def: name (All [k] (-> (Var k) Text)) (|>> @representation)) + (def: name (All [k] (-> (Var k) Text)) (|>> :representation)) - (def: #export var (-> Text (Var Single)) (|>> @abstraction)) + (def: #export var (-> Text (Var Single)) (|>> :abstraction)) (def: #export (poly vars) (-> (List (Var Single)) (Var Poly)) - (@abstraction + (:abstraction (format "(" (|> vars (list/map ..name) (text.join-with " ")) ")"))) (def: #export (poly+ vars rest) (-> (List (Var Single)) (Var Single) (Var Poly)) - (@abstraction + (:abstraction (format "(" (|> vars (list/map ..name) (text.join-with " ")) " &rest " (..name rest) ")"))) @@ -42,24 +42,24 @@ Text - (def: #export expression (-> Expression Text) (|>> @representation)) + (def: #export expression (-> Expression Text) (|>> :representation)) - (def: #export code (-> Text Expression) (|>> @abstraction)) + (def: #export code (-> Text Expression) (|>> :abstraction)) (type: #export Lambda [PVar Expression]) (def: #export nil Expression - (@abstraction "()")) + (:abstraction "()")) (def: #export bool (-> Bool Expression) - (|>> (case> true (@abstraction "t") + (|>> (case> true (:abstraction "t") false ..nil))) (def: #export int (-> Int Expression) - (|>> %i @abstraction)) + (|>> %i :abstraction)) (def: #export float (-> Frac Expression) @@ -74,11 +74,11 @@ ## else [%f]) - @abstraction)) + :abstraction)) (def: #export (double value) (-> Frac Expression) - (@abstraction + (:abstraction (.cond (f/= number.positive-infinity value) "(/ 1.0d0 0.0d0)" @@ -100,24 +100,24 @@ (def: #export string (-> Text Expression) - (|>> %t @abstraction)) + (|>> %t :abstraction)) (do-template [ ] [(def: #export (-> Text Expression) - (|>> (format ) @abstraction))] + (|>> (format ) :abstraction))] [symbol "'"] [keyword ":"]) (def: #export (form elements) (-> (List Expression) Expression) - (@abstraction + (:abstraction (format "(" (|> elements (list/map expression) (text.join-with " ")) ")"))) (def: #export @@ (All [k] (-> (Var k) Expression)) - (|>> ..name @abstraction)) + (|>> ..name :abstraction)) (def: #export global (-> Text Expression) @@ -350,15 +350,15 @@ expression (#.Cons single #.Nil) - (@abstraction - (format single " " (@representation expression))) + (:abstraction + (format single " " (:representation expression))) _ - (@abstraction + (:abstraction (format (|> conditions (list/map ..symbol) (.list& (..symbol "or")) ..form - @representation) - " " (@representation expression)))))] + :representation) + " " (:representation expression)))))] [conditional+ "#+"] [conditional- "#-"]) diff --git a/new-luxc/source/luxc/lang/host/php.lux b/new-luxc/source/luxc/lang/host/php.lux index 603888d3e..50d618f85 100644 --- a/new-luxc/source/luxc/lang/host/php.lux +++ b/new-luxc/source/luxc/lang/host/php.lux @@ -28,7 +28,7 @@ (type: #export Computation (Code' (Expression' Computation'))) (type: #export Statement (Code' Statement')) - (def: #export code (-> Code Text) (|>> @representation)) + (def: #export code (-> Code Text) (|>> :representation)) (def: nest (-> Text Text) @@ -41,18 +41,18 @@ (def: computation (-> Text Computation) - (|>> (text.enclose ["(" ")"]) @abstraction)) + (|>> (text.enclose ["(" ")"]) :abstraction)) (def: (statement code) (-> Text Statement) - (@abstraction (format code ";"))) + (:abstraction (format code ";"))) (def: parameters (-> (List Argument) Text) (|>> (list/map (.function (_ [reference? var]) (if reference? - (format "&" (@representation var)) - (@representation var)))) + (format "&" (:representation var)) + (:representation var)))) (text.join-with ", ") (text.enclose ["(" ")"]))) @@ -71,23 +71,23 @@ (def: #export var (-> Text Var) - (|>> (format "$") @abstraction)) + (|>> (format "$") :abstraction)) (def: #export global (-> Text Global) - (|>> @abstraction)) + (|>> :abstraction)) (def: #export null Computation - (@abstraction "NULL")) + (:abstraction "NULL")) (def: #export bool (-> Bool Computation) - (|>> %b @abstraction)) + (|>> %b :abstraction)) (def: #export int (-> Int Computation) - (|>> %i @abstraction)) + (|>> %i :abstraction)) (def: #export float (-> Frac Computation) @@ -101,16 +101,16 @@ [(new> "NAN" computation)] ## else - [%f @abstraction]))) + [%f :abstraction]))) (def: #export string (-> Text Computation) - (|>> %t @abstraction)) + (|>> %t :abstraction)) (def: #export (apply args func) (-> (List Expression) Expression Computation) - (@abstraction - (format (@representation func) (..arguments args)))) + (:abstraction + (format (:representation func) (..arguments args)))) (def: #export (function arguments uses body) (-> (List Argument) (List Argument) Statement Computation) @@ -123,7 +123,7 @@ (computation (format "function " (..parameters arguments) " " uses " " - (block (@representation body)))))) + (block (:representation body)))))) (do-template [ ] [(def: #export @@ -156,7 +156,7 @@ (format "array(" (|> kvs (list/map (.function (_ [key value]) - (format (@representation key) " => " (@representation value)))) + (format (:representation key) " => " (:representation value)))) (text.join-with ", ")) ")"))) @@ -192,30 +192,30 @@ (def: #export (new constructor inputs) (-> Global (List Expression) Computation) (computation - (format "new " (@representation constructor) (arguments inputs)))) + (format "new " (:representation constructor) (arguments inputs)))) (def: #export (send method inputs object) (-> Text (List Expression) Expression Computation) (computation - (format (@representation object) "->" method (arguments inputs)))) + (format (:representation object) "->" method (arguments inputs)))) (def: #export (nth idx array) (-> Expression Expression Computation) (computation - (format (@representation array) "[" (@representation idx) "]"))) + (format (:representation array) "[" (:representation idx) "]"))) (def: #export (? test then else) (-> Expression Expression Expression Computation) (computation - (format (@representation test) " ? " - (@representation then) " : " - (@representation else)))) + (format (:representation test) " ? " + (:representation then) " : " + (:representation else)))) (do-template [ ] [(def: #export ( param subject) (-> Expression Expression Computation) (computation - (format (@representation subject) " " " " (@representation param))))] + (format (:representation subject) " " " " (:representation param))))] [or "||"] [and "&&"] @@ -240,12 +240,12 @@ (def: #export not (-> Computation Computation) - (|>> @representation (format "!") @abstraction)) + (|>> :representation (format "!") :abstraction)) (do-template [ ] [(def: #export ( var value) (-> Var Expression ) - ( (format (@representation var) " = " (@representation value))))] + ( (format (:representation var) " = " (:representation value))))] [set! Statement ..statement] [set!' Computation ..computation] @@ -254,11 +254,11 @@ (def: #export (set-nth! idx value array) (-> Expression Expression Expression Statement) (..statement - (format (@representation array) "[" (@representation idx) "] = " (@representation value)))) + (format (:representation array) "[" (:representation idx) "] = " (:representation value)))) (def: #export global! (-> Var Statement) - (|>> @representation (format "global ") ..statement)) + (|>> :representation (format "global ") ..statement)) (def: #export (set-global! name value) (-> Text Expression Statement) @@ -266,34 +266,34 @@ (def: #export (if! test then! else!) (-> Expression Statement Statement Statement) - (@abstraction - (format "if (" (@representation test) ")" - (block (@representation then!)) + (:abstraction + (format "if (" (:representation test) ")" + (block (:representation then!)) " else " - (block (@representation else!))))) + (block (:representation else!))))) (def: #export (when! test then!) (-> Expression Statement Statement) - (@abstraction - (format "if (" (@representation test) ") " - (block (@representation then!))))) + (:abstraction + (format "if (" (:representation test) ") " + (block (:representation then!))))) (def: #export (then! post! pre!) (-> Statement Statement Statement) - (@abstraction - (format (@representation pre!) + (:abstraction + (format (:representation pre!) "\n" - (@representation post!)))) + (:representation post!)))) ## (def: #export (while! test body!) ## (-> Computation Statement Statement) - ## (@abstraction + ## (:abstraction ## (format "while " (expression test) ":" ## (nest body!)))) ## (def: #export (for-in! variable inputs body!) ## (-> SVariable Computation Statement Statement) - ## (@abstraction + ## (:abstraction ## (format "for " (..name variable) " in " (expression inputs) ":" ## (nest body!)))) @@ -304,21 +304,21 @@ (def: (catch! except) (-> Except Text) - (let [declaration (format "(" (@representation (get@ #class except)) - " " (@representation (get@ #exception except)) ")")] + (let [declaration (format "(" (:representation (get@ #class except)) + " " (:representation (get@ #exception except)) ")")] (format "catch" declaration " " - (block (@representation (get@ #handler except)))))) + (block (:representation (get@ #handler except)))))) (def: #export (try! body! excepts) (-> Statement (List Except) Statement) - (@abstraction - (format "try " (block (@representation body!)) "\n" + (:abstraction + (format "try " (block (:representation body!)) "\n" (|> excepts (list/map catch!) (text.join-with "\n"))))) (do-template [ ] [(def: #export ( message) (-> Expression Statement) - (statement (format " " (@representation message))))] + (statement (format " " (:representation message))))] [throw! "throw"] [return! "return"] @@ -327,17 +327,17 @@ (def: #export do! (-> Expression Statement) - (|>> @representation statement)) + (|>> :representation statement)) (def: #export (define! name value) (-> Global Expression Statement) - (do! (..apply (list (|> name @representation ..string) + (do! (..apply (list (|> name :representation ..string) value) (..global "define")))) (def: #export (function! name args body) (-> Global (List Argument) Statement Statement) - (@abstraction - (format "function " (@representation name) (..parameters args) - " " (block (@representation body))))) + (:abstraction + (format "function " (:representation name) (..parameters args) + " " (block (:representation body))))) ) diff --git a/new-luxc/source/luxc/lang/host/python.lux b/new-luxc/source/luxc/lang/host/python.lux index b2b639cb2..c9835aa5d 100644 --- a/new-luxc/source/luxc/lang/host/python.lux +++ b/new-luxc/source/luxc/lang/host/python.lux @@ -16,14 +16,14 @@ Text - (def: name (All [k] (-> (Var k) Text)) (|>> @representation)) + (def: name (All [k] (-> (Var k) Text)) (|>> :representation)) - (def: #export var (-> Text (Var Single)) (|>> @abstraction)) + (def: #export var (-> Text (Var Single)) (|>> :abstraction)) (do-template [ ] [(def: #export (-> (Var Single) (Var )) - (|>> @representation (format ) @abstraction))] + (|>> :representation (format ) :abstraction))] [poly Poly "*"] [keyword Keyword "**"] @@ -39,23 +39,23 @@ Text - (def: #export expression (-> Expression Text) (|>> @representation)) + (def: #export expression (-> Expression Text) (|>> :representation)) - (def: #export code (-> Text Expression) (|>> @abstraction)) + (def: #export code (-> Text Expression) (|>> :abstraction)) (def: #export none Expression - (@abstraction "None")) + (:abstraction "None")) (def: #export bool (-> Bool Expression) (|>> (case> true "True" false "False") - @abstraction)) + :abstraction)) (def: #export int (-> Int Expression) - (|>> %i @abstraction)) + (|>> %i :abstraction)) (def: #export float (-> Frac Expression) @@ -70,17 +70,17 @@ ## else [%f]) - @abstraction)) + :abstraction)) (def: #export string (-> Text Expression) - (|>> %t @abstraction)) + (|>> %t :abstraction)) (def: (composite-literal left-delimiter right-delimiter entry-serializer) (All [a] (-> Text Text (-> a Text) (-> (List a) Expression))) (function (_ entries) - (@abstraction (format "(" left-delimiter + (:abstraction (format "(" left-delimiter (|> entries (list/map entry-serializer) (text.join-with ",")) right-delimiter ")")))) @@ -95,30 +95,30 @@ (def: #export (slice from to list) (-> Expression Expression Expression Expression) - (@abstraction (format "(" (@representation list) - "[" (@representation from) ":" (@representation to) "]" + (:abstraction (format "(" (:representation list) + "[" (:representation from) ":" (:representation to) "]" ")"))) (def: #export (slice-from from list) (-> Expression Expression Expression) - (@abstraction (format "(" (@representation list) - "[" (@representation from) ":]" + (:abstraction (format "(" (:representation list) + "[" (:representation from) ":]" ")"))) (def: #export dict (-> (List [Expression Expression]) Expression) - (composite-literal "{" "}" (.function (_ [k v]) (format (@representation k) " : " (@representation v))))) + (composite-literal "{" "}" (.function (_ [k v]) (format (:representation k) " : " (:representation v))))) (def: #export (apply args func) (-> (List Expression) Expression Expression) - (@abstraction (format "(" (@representation func) + (:abstraction (format "(" (:representation func) "(" (text.join-with "," (list/map expression args)) ")" ")"))) (do-template [ ] [(def: ( var) (-> Expression Text) - (format (@representation var)))] + (format (:representation var)))] [splat-poly Poly "*"] [splat-keyword Keyword "**"] @@ -127,9 +127,9 @@ (do-template [ ] [(def: #export ( args extra func) (-> (List Expression) Expression Expression Expression) - (@abstraction (format "(" (@representation func) + (:abstraction (format "(" (:representation func) (format "(" (|> args - (list/map (function (_ arg) (format (@representation arg) ", "))) + (list/map (function (_ arg) (format (:representation arg) ", "))) (text.join-with "")) ( extra) ")") ")")))] @@ -140,7 +140,7 @@ (def: #export (field name object) (-> Text Expression Expression) - (@abstraction (format "(" (@representation object) "." name ")"))) + (:abstraction (format "(" (:representation object) "." name ")"))) (def: #export (send args method object) (-> (List Expression) Text Expression Expression) @@ -158,21 +158,21 @@ (def: #export (nth idx array) (-> Expression Expression Expression) - (@abstraction (format "(" (@representation array) "[" (@representation idx) "])"))) + (:abstraction (format "(" (:representation array) "[" (:representation idx) "])"))) (def: #export (if test then else) (-> Expression Expression Expression Expression) - (@abstraction (format "(" (@representation then) - " if " (@representation test) - " else " (@representation else) + (:abstraction (format "(" (:representation then) + " if " (:representation test) + " else " (:representation else) ")"))) (do-template [ ] [(def: #export ( param subject) (-> Expression Expression Expression) - (@abstraction (format "(" (@representation subject) + (:abstraction (format "(" (:representation subject) " " " " - (@representation param) ")")))] + (:representation param) ")")))] [is "is"] [= "=="] @@ -196,9 +196,9 @@ (do-template [ ] [(def: #export ( param subject) (-> Expression Expression Expression) - (@abstraction (format "(" (@representation param) + (:abstraction (format "(" (:representation param) " " " " - (@representation subject) ")")))] + (:representation subject) ")")))] [or "or"] [and "and"] @@ -206,16 +206,16 @@ (def: #export (not subject) (-> Expression Expression) - (@abstraction (format "(not " (@representation subject) ")"))) + (:abstraction (format "(not " (:representation subject) ")"))) (def: #export (@@ var) (All [k] (-> (Var k) Expression)) - (@abstraction (format "(" (..name var) ")"))) + (:abstraction (format "(" (..name var) ")"))) (def: #export (lambda arguments body) (-> (List (Ex [k] (Var k))) Expression Expression) - (@abstraction (format "(" "lambda " (|> arguments (list/map ..name) (text.join-with ", ")) ": " - (@representation body) ")"))) + (:abstraction (format "(" "lambda " (|> arguments (list/map ..name) (text.join-with ", ")) ": " + (:representation body) ")"))) (def: #export global (-> Text Expression) @@ -231,28 +231,28 @@ Text - (def: #export statement (-> Statement Text) (|>> @representation)) + (def: #export statement (-> Statement Text) (|>> :representation)) (def: nest (-> Statement Text) - (|>> @representation + (|>> :representation (format "\n") (text.replace-all "\n" "\n "))) (def: #export (set-nth! idx value array) (-> Expression Expression Expression Statement) - (@abstraction (format (expression array) "[" (expression idx) "] = " (expression value)))) + (:abstraction (format (expression array) "[" (expression idx) "] = " (expression value)))) (def: #export (set! vars value) (-> (List (Var Single)) Expression Statement) - (@abstraction + (:abstraction (format (|> vars (list/map ..name) (text.join-with ", ")) " = " (expression value)))) (def: #export (if! test then! else!) (-> Expression Statement Statement Statement) - (@abstraction + (:abstraction (format "if " (expression test) ":" (nest then!) "\n" "else:" @@ -260,7 +260,7 @@ (def: #export (when! test then!) (-> Expression Statement Statement) - (@abstraction + (:abstraction (format "if " (expression test) ":" (nest then!)))) @@ -273,31 +273,31 @@ (def: #export (then! pre! post!) (-> Statement Statement Statement) - (@abstraction - (format (@representation pre!) + (:abstraction + (format (:representation pre!) "\n" - (@representation post!)))) + (:representation post!)))) (def: #export (while! test body!) (-> Expression Statement Statement) - (@abstraction + (:abstraction (format "while " (expression test) ":" (nest body!)))) (def: #export (for-in! var inputs body!) (-> SVar Expression Statement Statement) - (@abstraction + (:abstraction (format "for " (..name var) " in " (expression inputs) ":" (nest body!)))) (def: #export (do! expression) (-> Expression Statement) - (@abstraction + (:abstraction (format (..expression expression) ";"))) (def: #export no-op! Statement - (@abstraction "\n")) + (:abstraction "\n")) (type: #export Except {#classes (List Text) @@ -306,7 +306,7 @@ (def: #export (try! body! excepts) (-> Statement (List Except) Statement) - (@abstraction + (:abstraction (format "try:" (nest body!) (|> excepts @@ -319,7 +319,7 @@ (do-template [ ] [(def: #export ( message) (-> Expression Statement) - (@abstraction + (:abstraction (format " " (expression message))))] [raise! "raise"] @@ -329,12 +329,12 @@ (def: #export (def! name args body) (-> (Var Single) (List (Ex [k] (Var k))) Statement Statement) - (@abstraction + (:abstraction (format "def " (..name name) "(" (|> args (list/map ..name) (text.join-with ",")) "):" (nest body)))) (def: #export (import! module-name) (-> Text Statement) - (@abstraction (format "import " module-name))) + (:abstraction (format "import " module-name))) ) diff --git a/new-luxc/source/luxc/lang/host/r.lux b/new-luxc/source/luxc/lang/host/r.lux index 960063a11..6667d531f 100644 --- a/new-luxc/source/luxc/lang/host/r.lux +++ b/new-luxc/source/luxc/lang/host/r.lux @@ -16,10 +16,10 @@ Text - (def: name (All [k] (-> (Var k) Text)) (|>> @representation)) + (def: name (All [k] (-> (Var k) Text)) (|>> :representation)) - (def: #export var (-> Text (Var Single)) (|>> @abstraction)) - (def: #export var-args (Var Poly) (@abstraction "...")) + (def: #export var (-> Text (Var Single)) (|>> :abstraction)) + (def: #export var-args (Var Poly) (:abstraction "...")) ) (type: #export SVar (Var Single)) @@ -30,13 +30,13 @@ Text - (def: #export expression (-> Expression Text) (|>> @representation)) + (def: #export expression (-> Expression Text) (|>> :representation)) - (def: #export code (-> Text Expression) (|>> @abstraction)) + (def: #export code (-> Text Expression) (|>> :abstraction)) (def: (self-contained code) (-> Text Expression) - (@abstraction + (:abstraction (format "(" code ")"))) (def: nest @@ -50,8 +50,8 @@ (def: #export (block expression) (-> Expression Expression) - (@abstraction - (format "{" (@representation expression) "}"))) + (:abstraction + (format "{" (:representation expression) "}"))) (def: #export null Expression @@ -107,7 +107,7 @@ (def: #export named-list (-> (List [Text Expression]) Expression) (composite-literal "list(" ")" (.function (_ [key value]) - (format key "=" (@representation value))))) + (format key "=" (:representation value))))) (do-template [ ] [(def: #export @@ -121,24 +121,24 @@ (def: #export (slice from to list) (-> Expression Expression Expression Expression) (self-contained - (format (@representation list) - "[" (@representation from) ":" (@representation to) "]"))) + (format (:representation list) + "[" (:representation from) ":" (:representation to) "]"))) (def: #export (slice-from from list) (-> Expression Expression Expression) (self-contained - (format (@representation list) - "[-1" ":-" (@representation from) "]"))) + (format (:representation list) + "[-1" ":-" (:representation from) "]"))) (def: #export (apply args func) (-> (List Expression) Expression Expression) (self-contained - (format (@representation func) "(" (text.join-with "," (list/map expression args)) ")"))) + (format (:representation func) "(" (text.join-with "," (list/map expression args)) ")"))) (def: #export (apply-kw args kw-args func) (-> (List Expression) (List [Text Expression]) Expression Expression) (self-contained - (format (@representation func) + (format (:representation func) (format "(" (text.join-with "," (list/map expression args)) "," (text.join-with "," (list/map (.function (_ [key val]) @@ -149,20 +149,20 @@ (def: #export (nth idx list) (-> Expression Expression Expression) (self-contained - (format (@representation list) "[[" (@representation idx) "]]"))) + (format (:representation list) "[[" (:representation idx) "]]"))) (def: #export (if test then else) (-> Expression Expression Expression Expression) (self-contained - (format "if(" (@representation test) ")" - " " (.._block (@representation then)) - " else " (.._block (@representation else))))) + (format "if(" (:representation test) ")" + " " (.._block (:representation then)) + " else " (.._block (:representation else))))) (def: #export (when test then) (-> Expression Expression Expression) (self-contained - (format "if(" (@representation test) ") {" - (.._block (@representation then)) + (format "if(" (:representation test) ") {" + (.._block (:representation then)) "\n" "}"))) (def: #export (cond clauses else) @@ -176,9 +176,9 @@ [(def: #export ( param subject) (-> Expression Expression Expression) (self-contained - (format (@representation subject) + (format (:representation subject) " " " " - (@representation param))))] + (:representation param))))] [= "=="] [< "<"] @@ -222,7 +222,7 @@ (do-template [ ] [(def: #export (-> Expression Expression) - (|>> @representation (format ) self-contained))] + (|>> :representation (format ) self-contained))] [not "!"] [negate "-"] @@ -235,25 +235,25 @@ (def: #export (range from to) (-> Expression Expression Expression) (self-contained - (format (@representation from) ":" (@representation to)))) + (format (:representation from) ":" (:representation to)))) (def: #export (function inputs body) (-> (List (Ex [k] (Var k))) Expression Expression) (let [args (|> inputs (list/map ..name) (text.join-with ", "))] (self-contained (format "function(" args ") " - (.._block (@representation body)))))) + (.._block (:representation body)))))) (def: #export (try body warning error finally) (-> Expression (Maybe Expression) (Maybe Expression) (Maybe Expression) Expression) (let [optional (: (-> Text (Maybe Expression) (-> Text Text) Text) (.function (_ parameter value preparation) (|> value - (maybe/map (|>> @representation preparation (format ", " parameter " = "))) + (maybe/map (|>> :representation preparation (format ", " parameter " = "))) (maybe.default ""))))] (self-contained (format "tryCatch(" - (.._block (@representation body)) + (.._block (:representation body)) (optional "warning" warning id) (optional "error" error id) (optional "finally" finally .._block) @@ -262,14 +262,14 @@ (def: #export (while test body) (-> Expression Expression Expression) (self-contained - (format "while (" (@representation test) ") " - (.._block (@representation body))))) + (format "while (" (:representation test) ") " + (.._block (:representation body))))) (def: #export (for-in var inputs body) (-> SVar Expression Expression Expression) (self-contained (format "for (" (..name var) " in " (..expression inputs) ")" - (.._block (@representation body))))) + (.._block (:representation body))))) (do-template [ ] [(def: #export ( message) @@ -283,17 +283,17 @@ (def: #export (set! var value) (-> (Var Single) Expression Expression) (self-contained - (format (..name var) " <- " (@representation value)))) + (format (..name var) " <- " (:representation value)))) (def: #export (set-nth! idx value list) (-> Expression Expression SVar Expression) (self-contained - (format (..name list) "[[" (@representation idx) "]] <- " (@representation value)))) + (format (..name list) "[[" (:representation idx) "]] <- " (:representation value)))) (def: #export (then pre post) (-> Expression Expression Expression) - (@abstraction - (format (@representation pre) + (:abstraction + (format (:representation pre) "\n" - (@representation post)))) + (:representation post)))) ) diff --git a/stdlib/source/lux/concurrency/actor.lux b/stdlib/source/lux/concurrency/actor.lux index 77543ba78..ad3bccfdc 100644 --- a/stdlib/source/lux/concurrency/actor.lux +++ b/stdlib/source/lux/concurrency/actor.lux @@ -49,7 +49,7 @@ ## TODO: Delete after new-luxc becomes the new standard compiler. (def: (actor mailbox obituary) (All [s] (-> (Atom ) (Promise ) (Actor s))) - (@abstraction {#mailbox mailbox + (:abstraction {#mailbox mailbox #obituary obituary})) (type: #export (Message s) @@ -70,7 +70,7 @@ self (actor (atom (promise #.None)) (promise #.None)) process (loop [state init - |mailbox| (io.run (atom.read (get@ #mailbox (@representation self))))] + |mailbox| (io.run (atom.read (get@ #mailbox (:representation self))))] (do promise.Monad [[head tail] |mailbox| ?state' (handle head state self)] @@ -79,7 +79,7 @@ (do @ [_ (end error state)] (exec (io.run (promise.resolve [error state (#.Cons head (obituary tail))] - (get@ #obituary (@representation self)))) + (get@ #obituary (:representation self)))) (wrap []))) (#e.Success state') @@ -88,7 +88,7 @@ (def: #export (alive? actor) (All [s] (-> (Actor s) Bool)) - (case (promise.poll (get@ #obituary (@representation actor))) + (case (promise.poll (get@ #obituary (:representation actor))) #.None true @@ -101,7 +101,7 @@ (if (alive? actor) (let [entry [message (promise #.None)]] (do Monad - [|mailbox| (atom.read (get@ #mailbox (@representation actor)))] + [|mailbox| (atom.read (get@ #mailbox (:representation actor)))] (loop [|mailbox| |mailbox|] (case (promise.poll |mailbox|) #.None @@ -109,7 +109,7 @@ [resolved? (promise.resolve entry |mailbox|)] (if resolved? (do @ - [_ (atom.write (product.right entry) (get@ #mailbox (@representation actor)))] + [_ (atom.write (product.right entry) (get@ #mailbox (:representation actor)))] (wrap true)) (recur |mailbox|))) diff --git a/stdlib/source/lux/concurrency/frp.lux b/stdlib/source/lux/concurrency/frp.lux index 28d7be094..7b4bfbec0 100644 --- a/stdlib/source/lux/concurrency/frp.lux +++ b/stdlib/source/lux/concurrency/frp.lux @@ -16,16 +16,16 @@ (def: #export (channel _) (All [a] (-> Any (Channel a))) - (@abstraction (atom (list)))) + (:abstraction (atom (list)))) - (def: #export (listen listener (^@representation channel)) + (def: #export (listen listener (^:representation channel)) (All [a] (-> (-> a (IO Any)) (Channel a) (IO Any))) ## TODO: Simplify when possible. (do io.Monad [_ (atom.update (|>> (#.Cons listener)) channel)] (wrap []))) - (def: #export (publish (^@representation channel) value) + (def: #export (publish (^:representation channel) value) {#.doc "Publish to a channel."} (All [a] (-> (Channel a) a (IO Any))) (do io.Monad diff --git a/stdlib/source/lux/concurrency/promise.lux b/stdlib/source/lux/concurrency/promise.lux index 3ccdc22e9..866cdd8da 100644 --- a/stdlib/source/lux/concurrency/promise.lux +++ b/stdlib/source/lux/concurrency/promise.lux @@ -19,16 +19,16 @@ (def: #export (promise ?value) (All [a] (-> (Maybe a) (Promise a))) - (@abstraction (atom [?value (list)]))) + (:abstraction (atom [?value (list)]))) - (def: #export (poll (^@representation promise)) + (def: #export (poll (^:representation promise)) {#.doc "Polls a promise's value."} (All [a] (-> (Promise a) (Maybe a))) (|> (atom.read promise) io.run product.left)) - (def: #export (resolve value (^@representation promise)) + (def: #export (resolve value (^:representation promise)) {#.doc "Sets an promise's value if it has not been done yet."} (All [a] (-> a (Promise a) (IO Bool))) (do io.Monad @@ -46,9 +46,9 @@ [_ (monad.map @ (function (_ f) (f value)) _observers)] (wrap true)) - (resolve value (@abstraction promise))))))) + (resolve value (:abstraction promise))))))) - (def: #export (await f (^@representation promise)) + (def: #export (await f (^:representation promise)) (All [a] (-> (-> a (IO Any)) (Promise a) Any)) (let [(^@ old [_value _observers]) (io.run (atom.read promise))] (case _value @@ -59,7 +59,7 @@ (let [new [_value (#.Cons f _observers)]] (if (io.run (atom.compare-and-swap old new promise)) [] - (await f (@abstraction promise))))))) + (await f (:abstraction promise))))))) ) (def: #export (resolved? promise) diff --git a/stdlib/source/lux/concurrency/semaphore.lux b/stdlib/source/lux/concurrency/semaphore.lux index 23303a236..fa312fcc8 100644 --- a/stdlib/source/lux/concurrency/semaphore.lux +++ b/stdlib/source/lux/concurrency/semaphore.lux @@ -18,12 +18,12 @@ (def: #export (semaphore init-open-positions) (-> Nat Semaphore) - (@abstraction (atom.atom {#open-positions init-open-positions + (:abstraction (atom.atom {#open-positions init-open-positions #waiting-list (list)}))) (def: #export (wait semaphore) (Ex [k] (-> Semaphore (Promise Any))) - (let [semaphore (@representation semaphore)] + (let [semaphore (:representation semaphore)] (io.run (loop [signal (: (Promise Any) (promise.promise #.None))] @@ -45,7 +45,7 @@ (def: #export (signal semaphore) (Ex [k] (-> Semaphore (Promise Any))) - (let [semaphore (@representation semaphore)] + (let [semaphore (:representation semaphore)] (promise.future (loop [_ []] (do io.Monad @@ -77,15 +77,15 @@ (def: #export (mutex _) (-> Any Mutex) - (@abstraction (semaphore +1))) + (:abstraction (semaphore +1))) (def: (acquire mutex) (-> Mutex (Promise Any)) - (wait (@representation mutex))) + (wait (:representation mutex))) (def: (release mutex) (-> Mutex (Promise Any)) - (signal (@representation mutex))) + (signal (:representation mutex))) (def: #export (synchronize mutex procedure) (All [a] (-> Mutex (IO (Promise a)) (Promise a))) @@ -109,7 +109,7 @@ (def: #export (barrier limit) (-> Limit Barrier) - (@abstraction {#limit limit + (:abstraction {#limit limit #count (atom.atom +0) #start-turnstile (semaphore +0) #end-turnstile (semaphore +0)})) @@ -124,7 +124,7 @@ (:: promise.Monad wrap [])))) (do-template [ ] - [(def: ( (^@representation barrier)) + [(def: ( (^:representation barrier)) (-> Barrier (Promise Any)) (do promise.Monad [#let [limit (refinement.un-refine (get@ #limit barrier)) diff --git a/stdlib/source/lux/concurrency/stm.lux b/stdlib/source/lux/concurrency/stm.lux index 5c9e2d68c..9fef9f59e 100644 --- a/stdlib/source/lux/concurrency/stm.lux +++ b/stdlib/source/lux/concurrency/stm.lux @@ -20,20 +20,20 @@ (def: #export (var value) {#.doc "Creates a new STM var, with a default value."} (All [a] (-> a (Var a))) - (@abstraction (atom.atom [value (list)]))) + (:abstraction (atom.atom [value (list)]))) (def: read!! (All [a] (-> (Var a) a)) - (|>> @representation atom.read io.run product.left)) + (|>> :representation atom.read io.run product.left)) - (def: #export (read! (^@representation var)) + (def: #export (read! (^:representation var)) {#.doc "Reads var immediately, without going through a transaction."} (All [a] (-> (Var a) (IO a))) (|> var atom.read (:: io.Functor map product.left))) - (def: (write! new-value (^@representation var)) + (def: (write! new-value (^:representation var)) (All [a] (-> a (Var a) (IO Any))) (do io.Monad [(^@ old [_value _observers]) (atom.read var) @@ -42,7 +42,7 @@ (do @ [_ (monad.map @ (function (_ f) (f new-value)) _observers)] (wrap [])) - (write! new-value (@abstraction var))))) + (write! new-value (:abstraction var))))) ## TODO: Remove when possible (def: (helper|follow var) @@ -53,7 +53,7 @@ (All [a] (-> (Var a) (IO (frp.Channel a)))) (do io.Monad [#let [channel (helper|follow target) - target (@representation target)] + target (:representation target)] _ (atom.update (function (_ [value observers]) [value (#.Cons (frp.publish channel) observers)]) target)] diff --git a/stdlib/source/lux/data/color.lux b/stdlib/source/lux/data/color.lux index 56e324cac..241347859 100644 --- a/stdlib/source/lux/data/color.lux +++ b/stdlib/source/lux/data/color.lux @@ -25,18 +25,18 @@ (def: #export (color [red green blue]) (-> [Nat Nat Nat] Color) - (@abstraction [(n/% rgb red) + (:abstraction [(n/% rgb red) (n/% rgb green) (n/% rgb blue)])) (def: #export unpack (-> Color [Nat Nat Nat]) - (|>> @representation)) + (|>> :representation)) (struct: #export _ (eq.Eq Color) (def: (= reference sample) - (let [[rr rg rb] (@representation reference) - [sr sg sb] (@representation sample)] + (let [[rr rg rb] (:representation reference) + [sr sg sb] (:representation sample)] (and (n/= rr sr) (n/= rg sg) (n/= rb sb))))) diff --git a/stdlib/source/lux/data/lazy.lux b/stdlib/source/lux/data/lazy.lux index fcd07cd5d..94932a497 100644 --- a/stdlib/source/lux/data/lazy.lux +++ b/stdlib/source/lux/data/lazy.lux @@ -15,7 +15,7 @@ (def: (freeze' generator) (All [a] (-> (-> [] a) (Lazy a))) (let [cache (atom.atom #.None)] - (@abstraction (function (_ _) + (:abstraction (function (_ _) (case (io.run (atom.read cache)) (#.Some value) value @@ -27,7 +27,7 @@ (def: #export (thaw l-value) (All [a] (-> (Lazy a) a)) - ((@representation l-value) []))) + ((:representation l-value) []))) (syntax: #export (freeze expr) (with-gensyms [g!_] diff --git a/stdlib/source/lux/data/tainted.lux b/stdlib/source/lux/data/tainted.lux index d1ecbd213..b3f883fdf 100644 --- a/stdlib/source/lux/data/tainted.lux +++ b/stdlib/source/lux/data/tainted.lux @@ -8,11 +8,11 @@ (def: #export taint (All [a] (-> a (Tainted a))) - (|>> @abstraction)) + (|>> :abstraction)) (def: #export trust (All [a] (-> (Tainted a) a)) - (|>> @representation))) + (|>> :representation))) (def: #export (validate pred tainted) (All [a] (-> (-> a Bool) (Tainted a) (Maybe a))) diff --git a/stdlib/source/lux/data/text/unicode.lux b/stdlib/source/lux/data/text/unicode.lux index 7b1eb0fa9..6f76d053b 100644 --- a/stdlib/source/lux/data/text/unicode.lux +++ b/stdlib/source/lux/data/text/unicode.lux @@ -13,14 +13,14 @@ {} (Interval Char) - (def: empty (@abstraction (interval.between number.Enum nat/top nat/bottom))) + (def: empty (:abstraction (interval.between number.Enum nat/top nat/bottom))) (struct: _ (Monoid Segment) (def: identity ..empty) (def: (compose left right) - (let [left (@representation left) - right (@representation right)] - (@abstraction + (let [left (:representation left) + right (:representation right)] + (:abstraction (interval.between number.Enum (n/min (:: left bottom) (:: right bottom)) @@ -29,12 +29,12 @@ (def: #export (segment start end) (-> Char Char Segment) - (@abstraction (interval.between number.Enum (n/min start end) (n/max start end)))) + (:abstraction (interval.between number.Enum (n/min start end) (n/max start end)))) (do-template [ ] [(def: #export (-> Segment Char) - (|>> @representation (get@ )))] + (|>> :representation (get@ )))] [start #interval.bottom] [end #interval.top] @@ -42,13 +42,13 @@ (def: #export (size segment) (-> Segment Nat) - (let [start (get@ #interval.bottom (@representation segment)) - end (get@ #interval.top (@representation segment))] + (let [start (get@ #interval.bottom (:representation segment)) + end (get@ #interval.top (:representation segment))] (|> end (n/- start) inc))) (def: #export (within? segment char) (All [a] (-> Segment Char Bool)) - (interval.within? (@representation segment) char)) + (interval.within? (:representation segment) char)) ) (do-template [ ] diff --git a/stdlib/source/lux/lang/host/scheme.lux b/stdlib/source/lux/lang/host/scheme.lux index f6e7b1834..adc8504bb 100644 --- a/stdlib/source/lux/lang/host/scheme.lux +++ b/stdlib/source/lux/lang/host/scheme.lux @@ -27,9 +27,9 @@ {#mandatory (List Var) #rest (Maybe Var)}) - (def: #export code (-> Code Text) (|>> @representation)) + (def: #export code (-> Code Text) (|>> :representation)) - (def: #export var (-> Text Var) (|>> @abstraction)) + (def: #export var (-> Text Var) (|>> :abstraction)) (def: (arguments [vars rest]) (-> Arguments Code) @@ -40,33 +40,33 @@ rest _ - (|> (format " . " (@representation rest)) + (|> (format " . " (:representation rest)) (format (|> vars (list/map ..code) (text.join-with " "))) (text.enclose ["(" ")"]) - @abstraction)) + :abstraction)) #.None (|> vars (list/map ..code) (text.join-with " ") (text.enclose ["(" ")"]) - @abstraction))) + :abstraction))) (def: #export nil Computation - (@abstraction "'()")) + (:abstraction "'()")) (def: #export bool (-> Bool Computation) (|>> (case> true "#t" false "#f") - @abstraction)) + :abstraction)) (def: #export int (-> Int Computation) - (|>> %i @abstraction)) + (|>> %i :abstraction)) (def: #export float (-> Frac Computation) @@ -81,7 +81,7 @@ ## else [%f]) - @abstraction)) + :abstraction)) (def: #export positive-infinity Computation (..float number.positive-infinity)) (def: #export negative-infinity Computation (..float number.negative-infinity)) @@ -89,15 +89,15 @@ (def: #export string (-> Text Computation) - (|>> %t @abstraction)) + (|>> %t :abstraction)) (def: #export symbol (-> Text Computation) - (|>> (format "'") @abstraction)) + (|>> (format "'") :abstraction)) (def: #export global (-> Text Global) - (|>> @abstraction)) + (|>> :abstraction)) (def: form (-> (List Code) Text) @@ -107,7 +107,7 @@ (def: #export (apply/* func args) (-> Expression (List Expression) Computation) - (@abstraction (..form (#.Cons func args)))) + (:abstraction (..form (#.Cons func args)))) (do-template [ ] [(def: #export @@ -223,7 +223,7 @@ (do-template [ ] [(def: #export (-> (List Expression) Computation) - (|>> (list& (..global )) ..form @abstraction))] + (|>> (list& (..global )) ..form :abstraction))] [or "or"] [and "and"] @@ -232,15 +232,15 @@ (do-template [
]
     [(def: #export ( bindings body)
        (-> (List [ Expression]) Expression Computation)
-       (@abstraction
+       (:abstraction
         (..form (list (..global )
                       (|> bindings
                           (list/map (.function (_ [binding/name binding/value])
-                                      (@abstraction
+                                      (:abstraction
                                        (..form (list (
 binding/name)
                                                      binding/value)))))
                           ..form
-                          @abstraction)
+                          :abstraction)
                       body))))]
 
     [let           "let"           Var       .id]
@@ -253,12 +253,12 @@
 
   (def: #export (if test then else)
     (-> Expression Expression Expression Computation)
-    (@abstraction
+    (:abstraction
      (..form (list (..global "if") test then else))))
 
   (def: #export (when test then)
     (-> Expression Expression Computation)
-    (@abstraction
+    (:abstraction
      (..form (list (..global "when") test then))))
 
   (def: #export (cond clauses else)
@@ -267,19 +267,19 @@
                      (if test then next))
                    else
                    (list.reverse clauses))
-        @representation
-        @abstraction))
+        :representation
+        :abstraction))
 
   (def: #export (lambda arguments body)
     (-> Arguments Expression Computation)
-    (@abstraction
+    (:abstraction
      (..form (list (..global "lambda")
                    (..arguments arguments)
                    body))))
 
   (def: #export (define name arguments body)
     (-> Var Arguments Expression Computation)
-    (@abstraction
+    (:abstraction
      (..form (list (..global "define")
                    (|> arguments
                        (update@ #mandatory (|>> (#.Cons name)))
@@ -288,15 +288,15 @@
 
   (def: #export begin
     (-> (List Expression) Computation)
-    (|>> (#.Cons (..global "begin")) ..form @abstraction))
+    (|>> (#.Cons (..global "begin")) ..form :abstraction))
 
   (def: #export (set! name value)
     (-> Var Expression Computation)
-    (@abstraction
+    (:abstraction
      (..form (list (..global "set!") name value))))
 
   (def: #export (with-exception-handler handler body)
     (-> Expression Expression Computation)
-    (@abstraction
+    (:abstraction
      (..form (list (..global "with-exception-handler") handler body))))
   )
diff --git a/stdlib/source/lux/math/constructive.lux b/stdlib/source/lux/math/constructive.lux
index b154e9c20..2a904f7cb 100644
--- a/stdlib/source/lux/math/constructive.lux
+++ b/stdlib/source/lux/math/constructive.lux
@@ -25,12 +25,12 @@
     (.All [t]
       (.Ex [w]
         (-> t (Witness t w))))
-    (.|>> @abstraction))
+    (.|>> :abstraction))
 
   (.def: #export ?
     (.All [t w]
       (-> (Witness t w) t))
-    (.|>> @representation))
+    (.|>> :representation))
   )
 
 (syntax: #export (@ {name s.symbol})
diff --git a/stdlib/source/lux/math/modular.lux b/stdlib/source/lux/math/modular.lux
index 7c71b86b1..01e02a706 100644
--- a/stdlib/source/lux/math/modular.lux
+++ b/stdlib/source/lux/math/modular.lux
@@ -25,11 +25,11 @@
     (Ex [m] (-> Int (Error (Modulus m))))
     (if (i/= 0 value)
       (ex.throw zero-cannot-be-a-modulus [])
-      (#e.Success (@abstraction value))))
+      (#e.Success (:abstraction value))))
 
   (def: #export (to-int modulus)
     (All [m] (-> (Modulus m) Int))
-    (|> modulus @representation))
+    (|> modulus :representation))
   )
 
 (exception: #export [m] (incorrect-modulus {modulus (Modulus m)}
@@ -74,12 +74,12 @@
   (def: #export (mod modulus)
     (All [m] (-> (Modulus m) (-> Int (Mod m))))
     (function (_ value)
-      (@abstraction {#remainder (i/mod (to-int modulus) value)
+      (:abstraction {#remainder (i/mod (to-int modulus) value)
                      #modulus modulus})))
 
   (def: #export (un-mod modular)
     (All [m] (-> (Mod m) [Int (Modulus m)]))
-    (@representation modular))
+    (:representation modular))
 
   (def: separator Text " mod ")
 
@@ -87,7 +87,7 @@
     (All [m] (-> (Modulus m) (Codec Text (Mod m))))
 
     (def: (encode modular)
-      (let [[remainder modulus] (@representation modular)]
+      (let [[remainder modulus] (:representation modular)]
         ($_ text/compose
             (int/encode remainder)
             separator
@@ -103,19 +103,19 @@
 
   (def: #export (equalize reference sample)
     (All [r s] (-> (Mod r) (Mod s) (Error (Mod r))))
-    (let [[reference reference-modulus] (@representation reference)
-          [sample sample-modulus] (@representation sample)]
+    (let [[reference reference-modulus] (:representation reference)
+          [sample sample-modulus] (:representation sample)]
       (if (i/= (to-int reference-modulus)
                (to-int sample-modulus))
-        (#e.Success (@abstraction {#remainder sample
+        (#e.Success (:abstraction {#remainder sample
                                    #modulus reference-modulus}))
         (ex.throw cannot-equalize-moduli [reference-modulus sample-modulus]))))
 
   (do-template [ ]
     [(def: #export ( reference sample)
        (All [m] (-> (Mod m) (Mod m) Bool))
-       (let [[reference _] (@representation reference)
-             [sample _] (@representation sample)]
+       (let [[reference _] (:representation reference)
+             [sample _] (:representation sample)]
          ( reference sample)))]
 
     [m/= i/=]
@@ -128,9 +128,9 @@
   (do-template [ ]
     [(def: #export ( param subject)
        (All [m] (-> (Mod m) (Mod m) (Mod m)))
-       (let [[param modulus] (@representation param)
-             [subject _] (@representation subject)]
-         (@abstraction {#remainder (|> subject
+       (let [[param modulus] (:representation param)
+             [subject _] (:representation subject)]
+         (:abstraction {#remainder (|> subject
                                        ( param)
                                        (i/mod (to-int modulus)))
                         #modulus modulus})))]
@@ -152,7 +152,7 @@
 
   (def: #export (inverse modular)
     (All [m] (-> (Mod m) (Maybe (Mod m))))
-    (let [[value modulus] (@representation modular)
+    (let [[value modulus] (:representation modular)
           _modulus (to-int modulus)
           [vk mk gcd] (i/gcd+ value _modulus)
           co-prime? (i/= 1 gcd)]
diff --git a/stdlib/source/lux/time/duration.lux b/stdlib/source/lux/time/duration.lux
index 5efccf432..a29eda6da 100644
--- a/stdlib/source/lux/time/duration.lux
+++ b/stdlib/source/lux/time/duration.lux
@@ -18,16 +18,16 @@
 
   (def: #export from-millis
     (-> Int Duration)
-    (|>> @abstraction))
+    (|>> :abstraction))
 
   (def: #export to-millis
     (-> Duration Int)
-    (|>> @representation))
+    (|>> :representation))
 
   (do-template [ ]
     [(def: #export ( param subject)
        (-> Duration Duration Duration)
-       (@abstraction ( (@representation param) (@representation subject))))]
+       (:abstraction ( (:representation param) (:representation subject))))]
 
     [merge i/+]
     [frame i/%]
@@ -35,21 +35,21 @@
 
   (def: #export (scale scalar duration)
     (-> Int Duration Duration)
-    (@abstraction (i/* scalar (@representation duration))))
+    (:abstraction (i/* scalar (:representation duration))))
 
   (def: #export (query param subject)
     (-> Duration Duration Int)
-    (i// (@representation param) (@representation subject)))
+    (i// (:representation param) (:representation subject)))
 
   (struct: #export _ (Eq Duration)
     (def: (= param subject)
-      (i/= (@representation param) (@representation subject))))
+      (i/= (:representation param) (:representation subject))))
 
   (struct: #export _ (Order Duration)
     (def: eq Eq)
     (do-template [ ]
       [(def: ( param subject)
-         ( (@representation param) (@representation subject)))]
+         ( (:representation param) (:representation subject)))]
 
       [<  i/<]
       [<= i/<=]
@@ -60,7 +60,7 @@
   (do-template [ ]
     [(def: #export ( duration)
        (-> Duration Bool)
-       ( 0 (@representation duration)))]
+       ( 0 (:representation duration)))]
 
     [positive? i/>]
     [negative? i/<]
diff --git a/stdlib/source/lux/time/instant.lux b/stdlib/source/lux/time/instant.lux
index 12fe66172..1a2af827e 100644
--- a/stdlib/source/lux/time/instant.lux
+++ b/stdlib/source/lux/time/instant.lux
@@ -24,37 +24,37 @@
 
   (def: #export from-millis
     (-> Int Instant)
-    (|>> @abstraction))
+    (|>> :abstraction))
 
   (def: #export to-millis
     (-> Instant Int)
-    (|>> @representation))
+    (|>> :representation))
 
   (def: #export (span from to)
     (-> Instant Instant duration.Duration)
-    (duration.from-millis (i/- (@representation from) (@representation to))))
+    (duration.from-millis (i/- (:representation from) (:representation to))))
 
   (def: #export (shift duration instant)
     (-> duration.Duration Instant Instant)
-    (@abstraction (i/+ (duration.to-millis duration) (@representation instant))))
+    (:abstraction (i/+ (duration.to-millis duration) (:representation instant))))
 
   (def: #export (relative instant)
     (-> Instant duration.Duration)
-    (|> instant @representation duration.from-millis))
+    (|> instant :representation duration.from-millis))
 
   (def: #export (absolute offset)
     (-> duration.Duration Instant)
-    (|> offset duration.to-millis @abstraction))
+    (|> offset duration.to-millis :abstraction))
 
   (struct: #export _ (Eq Instant)
     (def: (= param subject)
-      (:: number.Eq = (@representation param) (@representation subject))))
+      (:: number.Eq = (:representation param) (:representation subject))))
 
   (struct: #export _ (Order Instant)
     (def: eq Eq)
     (do-template []
       [(def: ( param subject)
-         (:: number.Order  (@representation param) (@representation subject)))]
+         (:: number.Order  (:representation param) (:representation subject)))]
 
       [<] [<=] [>] [>=]
       ))
@@ -63,7 +63,7 @@
     (def: order Order)
     (do-template []
       [(def: 
-         (|>> @representation (:: number.Enum ) @abstraction))]
+         (|>> :representation (:: number.Enum ) :abstraction))]
 
       [succ] [pred]
       ))
diff --git a/stdlib/source/lux/type/abstract.lux b/stdlib/source/lux/type/abstract.lux
index 1bb084cf5..0cbe49087 100644
--- a/stdlib/source/lux/type/abstract.lux
+++ b/stdlib/source/lux/type/abstract.lux
@@ -48,8 +48,8 @@
       plist'
       (#.Cons [k' v'] (remove k plist')))))
 
-(def: down-cast Text "@abstraction")
-(def: up-cast Text "@representation")
+(def: down-cast Text ":abstraction")
+(def: up-cast Text ":representation")
 (def: macro-anns Code (' {#.macro? true}))
 
 (def: representation-name
@@ -165,14 +165,14 @@
                  (list/compose primitives
                                (list (` ((~! un-install-casts)))))))))
 
-(syntax: #export (^@representation {name (s.form s.local-symbol)}
+(syntax: #export (^:representation {name (s.form s.local-symbol)}
                                    body
                                    {branches (p.some s.any)})
   (let [g!representation (code.local-symbol name)]
     (do @
       [current-module macro.current-module-name
-       #let [g!@representation (code.symbol [current-module "@representation"])]]
+       #let [g!:representation (code.symbol [current-module up-cast])]]
       (wrap (list& g!representation
-                   (` (.let [(~ g!representation) ((~ g!@representation) (~ g!representation))]
+                   (` (.let [(~ g!representation) ((~ g!:representation) (~ g!representation))]
                         (~ body)))
                    branches)))))
diff --git a/stdlib/source/lux/type/quotient.lux b/stdlib/source/lux/type/quotient.lux
index 2be136009..567d7af42 100644
--- a/stdlib/source/lux/type/quotient.lux
+++ b/stdlib/source/lux/type/quotient.lux
@@ -18,11 +18,11 @@
     (All [t c]
       (Ex [q]
         (-> (-> t c) (Class t c q))))
-    (|>> @abstraction))
+    (|>> :abstraction))
 
   (def: expose
     (All [t c q] (-> (Class t c q) (-> t c)))
-    (|>> @representation))
+    (|>> :representation))
   )
 
 (abstract: #export (Quotient t c q)
@@ -35,13 +35,13 @@
     (All [t c q]
       (-> (Class t c q) t
           (Quotient t c q)))
-    (@abstraction {#value value
+    (:abstraction {#value value
                    #label ((expose class) value)}))
 
   (do-template [  ]
     [(def: #export 
        (All [t c q] (-> (Quotient t c q) ))
-       (|>> @representation (get@ )))]
+       (|>> :representation (get@ )))]
 
     [value t #value]
     [label c #label]
diff --git a/stdlib/source/lux/type/refinement.lux b/stdlib/source/lux/type/refinement.lux
index 7431c93fe..3abcf2a1c 100644
--- a/stdlib/source/lux/type/refinement.lux
+++ b/stdlib/source/lux/type/refinement.lux
@@ -25,14 +25,14 @@
         (-> (Pred t) (Refiner t r))))
     (function (_ un-refined)
       (if (predicate un-refined)
-        (#.Some (@abstraction {#value un-refined
+        (#.Some (:abstraction {#value un-refined
                                #predicate predicate}))
         #.None)))
 
   (do-template [  ]
     [(def: #export ( refined)
        (All [t r] (-> (Ref t r) ))
-       (|> refined @representation (get@ )))]
+       (|> refined :representation (get@ )))]
 
     [un-refine t        #value]
     [predicate (Pred t) #predicate]
@@ -43,10 +43,10 @@
       (-> (-> t t)
           (-> (Ref t r) (Maybe (Ref t r)))))
     (function (_ refined)
-      (let [[value predicate] (@representation refined)
+      (let [[value predicate] (:representation refined)
             value' (transform value)]
         (if (predicate value')
-          (#.Some (@abstraction {#value value'
+          (#.Some (:abstraction {#value value'
                                  #predicate predicate}))
           #.None))))
   )
diff --git a/stdlib/source/lux/type/resource.lux b/stdlib/source/lux/type/resource.lux
index 2c7062c1a..eafda2092 100644
--- a/stdlib/source/lux/type/resource.lux
+++ b/stdlib/source/lux/type/resource.lux
@@ -80,7 +80,7 @@
   (do-template [ ]
     [(def: 
        (Ex [k] (-> [] (Key  k)))
-       (|>> @abstraction))]
+       (|>> :abstraction))]
 
     [ordered-key     Ordered]
     [commutative-key Commutative]
@@ -97,7 +97,7 @@
     [(def: #export ( value)
        (All [v] (Ex [k] (-> v (Affine  (Key  k) (Res k v)))))
        (function (_ keys)
-         (::  wrap [[( []) keys] (@abstraction value)])))]
+         (::  wrap [[( []) keys] (:abstraction value)])))]
 
     [ordered-pure      Identity identity.Monad Ordered     ordered-key]
     [ordered-sync      IO       io.Monad             Ordered     ordered-key]
@@ -111,7 +111,7 @@
        (All [v k m]
          (-> (Res k v) (Relevant  (Key m k) v)))
        (function (_ [key keys])
-         (::  wrap [keys (@representation resource)])))]
+         (::  wrap [keys (:representation resource)])))]
 
     [read-pure  Identity identity.Monad]
     [read-sync  IO       io.Monad]
diff --git a/stdlib/source/lux/type/unit.lux b/stdlib/source/lux/type/unit.lux
index 88b56730b..0b5e2dcec 100644
--- a/stdlib/source/lux/type/unit.lux
+++ b/stdlib/source/lux/type/unit.lux
@@ -21,11 +21,11 @@
   
   (def: #export in
     (All [unit] (-> Int (Qty unit)))
-    (|>> @abstraction))
+    (|>> :abstraction))
 
   (def: #export out
     (All [unit] (-> (Qty unit) Int))
-    (|>> @representation)))
+    (|>> :representation)))
 
 (sig: #export (Scale s)
   (: (All [u] (-> (Qty u) (Qty (s u))))
diff --git a/stdlib/source/lux/world/net/tcp.jvm.lux b/stdlib/source/lux/world/net/tcp.jvm.lux
index fddd6a94e..a18b5e6de 100644
--- a/stdlib/source/lux/world/net/tcp.jvm.lux
+++ b/stdlib/source/lux/world/net/tcp.jvm.lux
@@ -46,12 +46,12 @@
     (promise.future
      (do io.Monad
        [bytes-read (InputStream::read [data (.int offset) (.int length)]
-                                      (get@ #in (@representation self)))]
+                                      (get@ #in (:representation self)))]
        (wrap (.nat bytes-read)))))
   
   (def: #export (write data offset length self)
     (-> Blob Nat Nat TCP (Task Any))
-    (let [out (get@ #out (@representation self))]
+    (let [out (get@ #out (:representation self))]
       (promise.future
        (do io.Monad
          [_ (OutputStream::write [data (.int offset) (.int length)]
@@ -60,7 +60,7 @@
 
   (def: #export (close self)
     (-> TCP (Task Any))
-    (let [(^open) (@representation self)]
+    (let [(^open) (:representation self)]
       (promise.future
        (do io.Monad
          [_ (AutoCloseable::close [] in)
@@ -72,7 +72,7 @@
     (do io.Monad
       [input (Socket::getInputStream [] socket)
        output (Socket::getOutputStream [] socket)]
-      (wrap (@abstraction {#socket socket
+      (wrap (:abstraction {#socket socket
                            #in input
                            #out output}))))
   )
diff --git a/stdlib/source/lux/world/net/udp.jvm.lux b/stdlib/source/lux/world/net/udp.jvm.lux
index 5818020e6..5f0f52831 100644
--- a/stdlib/source/lux/world/net/udp.jvm.lux
+++ b/stdlib/source/lux/world/net/udp.jvm.lux
@@ -61,7 +61,7 @@
   
   (def: #export (read data offset length self)
     (-> Blob Nat Nat UDP (T.Task [Nat //.Address //.Port]))
-    (let [(^open) (@representation self)
+    (let [(^open) (:representation self)
           packet (DatagramPacket::new|receive [data (.int offset) (.int length)])]
       (P.future
        (do (e.ErrorT io.Monad)
@@ -76,13 +76,13 @@
     (P.future
      (do (e.ErrorT io.Monad)
        [address (resolve address)
-        #let [(^open) (@representation self)]]
+        #let [(^open) (:representation self)]]
        (DatagramSocket::send (DatagramPacket::new|send [data (.int offset) (.int length) address (.int port)])
                              socket))))
 
   (def: #export (close self)
     (-> UDP (T.Task Any))
-    (let [(^open) (@representation self)]
+    (let [(^open) (:representation self)]
       (P.future
        (AutoCloseable::close [] socket))))
 
@@ -91,12 +91,12 @@
     (P.future
      (do (e.ErrorT io.Monad)
        [socket (DatagramSocket::new|client [])]
-       (wrap (@abstraction (#socket socket))))))
+       (wrap (:abstraction (#socket socket))))))
 
   (def: #export (server port)
     (-> //.Port (T.Task UDP))
     (P.future
      (do (e.ErrorT io.Monad)
        [socket (DatagramSocket::new|server [(.int port)])]
-       (wrap (@abstraction (#socket socket))))))
+       (wrap (:abstraction (#socket socket))))))
   )
-- 
cgit v1.2.3