diff options
Diffstat (limited to '')
360 files changed, 2611 insertions, 2562 deletions
diff --git a/lux-jvm/source/luxc/lang/directive/jvm.lux b/lux-jvm/source/luxc/lang/directive/jvm.lux index 0ec4fb1d5..8f1fab5e2 100644 --- a/lux-jvm/source/luxc/lang/directive/jvm.lux +++ b/lux-jvm/source/luxc/lang/directive/jvm.lux @@ -38,7 +38,8 @@ ["_" inst]]]]) (import: org/objectweb/asm/Label - (new [])) + ["#::." + (new [])]) (def: (literal literal) (-> /.Literal Inst) diff --git a/lux-jvm/source/luxc/lang/host/jvm.lux b/lux-jvm/source/luxc/lang/host/jvm.lux index 6d2e49b22..dea97851a 100644 --- a/lux-jvm/source/luxc/lang/host/jvm.lux +++ b/lux-jvm/source/luxc/lang/host/jvm.lux @@ -32,7 +32,8 @@ (import: org/objectweb/asm/ClassWriter) (import: org/objectweb/asm/Label - (new [])) + ["#::." + (new [])]) (type: #export Def (-> org/objectweb/asm/ClassWriter org/objectweb/asm/ClassWriter)) diff --git a/lux-jvm/source/luxc/lang/host/jvm/def.lux b/lux-jvm/source/luxc/lang/host/jvm/def.lux index 0f841ba96..a9003b485 100644 --- a/lux-jvm/source/luxc/lang/host/jvm/def.lux +++ b/lux-jvm/source/luxc/lang/host/jvm/def.lux @@ -30,49 +30,52 @@ (import: java/lang/String) (import: org/objectweb/asm/Opcodes - (#static ACC_PUBLIC int) - (#static ACC_PROTECTED int) - (#static ACC_PRIVATE int) - - (#static ACC_TRANSIENT int) - (#static ACC_VOLATILE int) - - (#static ACC_ABSTRACT int) - (#static ACC_FINAL int) - (#static ACC_STATIC int) - (#static ACC_SYNCHRONIZED int) - (#static ACC_STRICT int) - - (#static ACC_SUPER int) - (#static ACC_INTERFACE int) - - (#static V1_1 int) - (#static V1_2 int) - (#static V1_3 int) - (#static V1_4 int) - (#static V1_5 int) - (#static V1_6 int) - (#static V1_7 int) - (#static V1_8 int) - ) + ["#::." + (#static ACC_PUBLIC int) + (#static ACC_PROTECTED int) + (#static ACC_PRIVATE int) + + (#static ACC_TRANSIENT int) + (#static ACC_VOLATILE int) + + (#static ACC_ABSTRACT int) + (#static ACC_FINAL int) + (#static ACC_STATIC int) + (#static ACC_SYNCHRONIZED int) + (#static ACC_STRICT int) + + (#static ACC_SUPER int) + (#static ACC_INTERFACE int) + + (#static V1_1 int) + (#static V1_2 int) + (#static V1_3 int) + (#static V1_4 int) + (#static V1_5 int) + (#static V1_6 int) + (#static V1_7 int) + (#static V1_8 int)]) (import: org/objectweb/asm/FieldVisitor - (visitEnd [] void)) + ["#::." + (visitEnd [] void)]) (import: org/objectweb/asm/MethodVisitor - (visitCode [] void) - (visitMaxs [int int] void) - (visitEnd [] void)) + ["#::." + (visitCode [] void) + (visitMaxs [int int] void) + (visitEnd [] void)]) (import: org/objectweb/asm/ClassWriter - (#static COMPUTE_MAXS int) - (#static COMPUTE_FRAMES int) - (new [int]) - (visit [int int java/lang/String java/lang/String java/lang/String [java/lang/String]] void) - (visitEnd [] void) - (visitField [int java/lang/String java/lang/String java/lang/String java/lang/Object] org/objectweb/asm/FieldVisitor) - (visitMethod [int java/lang/String java/lang/String java/lang/String [java/lang/String]] org/objectweb/asm/MethodVisitor) - (toByteArray [] [byte])) + ["#::." + (#static COMPUTE_MAXS int) + (#static COMPUTE_FRAMES int) + (new [int]) + (visit [int int java/lang/String java/lang/String java/lang/String [java/lang/String]] void) + (visitEnd [] void) + (visitField [int java/lang/String java/lang/String java/lang/String java/lang/Object] org/objectweb/asm/FieldVisitor) + (visitMethod [int java/lang/String java/lang/String java/lang/String [java/lang/String]] org/objectweb/asm/MethodVisitor) + (toByteArray [] [byte])]) (def: (string-array values) (-> (List Text) (Array Text)) diff --git a/lux-jvm/source/luxc/lang/host/jvm/inst.lux b/lux-jvm/source/luxc/lang/host/jvm/inst.lux index 69f822591..9d51a15bb 100644 --- a/lux-jvm/source/luxc/lang/host/jvm/inst.lux +++ b/lux-jvm/source/luxc/lang/host/jvm/inst.lux @@ -48,100 +48,103 @@ wrap)) (`` (import: org/objectweb/asm/Opcodes - (#static NOP int) - - ## Conversion - (~~ (declare D2F D2I D2L - F2D F2I F2L - I2B I2C I2D I2F I2L I2S - L2D L2F L2I)) - - ## Primitive - (~~ (declare T_BOOLEAN T_CHAR T_FLOAT T_DOUBLE - T_BYTE T_SHORT T_INT T_LONG)) - - ## Class - (~~ (declare CHECKCAST NEW INSTANCEOF)) - - ## Stack - (~~ (declare DUP DUP_X1 DUP_X2 - DUP2 DUP2_X1 DUP2_X2 - POP POP2 - SWAP)) - - ## Jump - (~~ (declare IF_ICMPEQ IF_ICMPGT IF_ICMPLT - IF_ICMPNE IF_ICMPGE IF_ICMPLE - IF_ACMPEQ IF_ACMPNE IFNULL IFNONNULL - IFEQ IFNE IFLT IFLE IFGT IFGE - GOTO)) - - (~~ (declare BIPUSH SIPUSH)) - (~~ (declare ICONST_M1 ICONST_0 ICONST_1 ICONST_2 ICONST_3 ICONST_4 ICONST_5 - LCONST_0 LCONST_1 - FCONST_0 FCONST_1 FCONST_2 - DCONST_0 DCONST_1)) - (#static ACONST_NULL int) - - ## Var - (~~ (declare IINC - ILOAD LLOAD FLOAD DLOAD ALOAD - ISTORE LSTORE FSTORE DSTORE ASTORE)) - - ## Arithmetic - (~~ (declare IADD ISUB IMUL IDIV IREM INEG - LADD LSUB LMUL LDIV LREM LNEG LCMP - FADD FSUB FMUL FDIV FREM FNEG FCMPG FCMPL - DADD DSUB DMUL DDIV DREM DNEG DCMPG DCMPL)) - - ## Bit-wise - (~~ (declare IAND IOR IXOR ISHL ISHR IUSHR - LAND LOR LXOR LSHL LSHR LUSHR)) - - ## Array - (~~ (declare ARRAYLENGTH NEWARRAY ANEWARRAY - AALOAD AASTORE - BALOAD BASTORE - SALOAD SASTORE - IALOAD IASTORE - LALOAD LASTORE - FALOAD FASTORE - DALOAD DASTORE - CALOAD CASTORE)) - - ## Member - (~~ (declare GETSTATIC PUTSTATIC GETFIELD PUTFIELD - INVOKESTATIC INVOKESPECIAL INVOKEVIRTUAL INVOKEINTERFACE)) - - (#static ATHROW int) - - ## Concurrency - (~~ (declare MONITORENTER MONITOREXIT)) - - ## Return - (~~ (declare RETURN IRETURN LRETURN FRETURN DRETURN ARETURN)) + ["#::." + (#static NOP int) + + ## Conversion + (~~ (declare D2F D2I D2L + F2D F2I F2L + I2B I2C I2D I2F I2L I2S + L2D L2F L2I)) + + ## Primitive + (~~ (declare T_BOOLEAN T_CHAR T_FLOAT T_DOUBLE + T_BYTE T_SHORT T_INT T_LONG)) + + ## Class + (~~ (declare CHECKCAST NEW INSTANCEOF)) + + ## Stack + (~~ (declare DUP DUP_X1 DUP_X2 + DUP2 DUP2_X1 DUP2_X2 + POP POP2 + SWAP)) + + ## Jump + (~~ (declare IF_ICMPEQ IF_ICMPGT IF_ICMPLT + IF_ICMPNE IF_ICMPGE IF_ICMPLE + IF_ACMPEQ IF_ACMPNE IFNULL IFNONNULL + IFEQ IFNE IFLT IFLE IFGT IFGE + GOTO)) + + (~~ (declare BIPUSH SIPUSH)) + (~~ (declare ICONST_M1 ICONST_0 ICONST_1 ICONST_2 ICONST_3 ICONST_4 ICONST_5 + LCONST_0 LCONST_1 + FCONST_0 FCONST_1 FCONST_2 + DCONST_0 DCONST_1)) + (#static ACONST_NULL int) + + ## Var + (~~ (declare IINC + ILOAD LLOAD FLOAD DLOAD ALOAD + ISTORE LSTORE FSTORE DSTORE ASTORE)) + + ## Arithmetic + (~~ (declare IADD ISUB IMUL IDIV IREM INEG + LADD LSUB LMUL LDIV LREM LNEG LCMP + FADD FSUB FMUL FDIV FREM FNEG FCMPG FCMPL + DADD DSUB DMUL DDIV DREM DNEG DCMPG DCMPL)) + + ## Bit-wise + (~~ (declare IAND IOR IXOR ISHL ISHR IUSHR + LAND LOR LXOR LSHL LSHR LUSHR)) + + ## Array + (~~ (declare ARRAYLENGTH NEWARRAY ANEWARRAY + AALOAD AASTORE + BALOAD BASTORE + SALOAD SASTORE + IALOAD IASTORE + LALOAD LASTORE + FALOAD FASTORE + DALOAD DASTORE + CALOAD CASTORE)) + + ## Member + (~~ (declare GETSTATIC PUTSTATIC GETFIELD PUTFIELD + INVOKESTATIC INVOKESPECIAL INVOKEVIRTUAL INVOKEINTERFACE)) + + (#static ATHROW int) + + ## Concurrency + (~~ (declare MONITORENTER MONITOREXIT)) + + ## Return + (~~ (declare RETURN IRETURN LRETURN FRETURN DRETURN ARETURN))] )) (import: org/objectweb/asm/Label - (new [])) + ["#::." + (new [])]) (import: org/objectweb/asm/MethodVisitor - (visitCode [] void) - (visitMaxs [int int] void) - (visitEnd [] void) - (visitInsn [int] void) - (visitLdcInsn [java/lang/Object] void) - (visitFieldInsn [int java/lang/String java/lang/String java/lang/String] void) - (visitTypeInsn [int java/lang/String] void) - (visitVarInsn [int int] void) - (visitIntInsn [int int] void) - (visitMethodInsn [int java/lang/String java/lang/String java/lang/String boolean] void) - (visitLabel [org/objectweb/asm/Label] void) - (visitJumpInsn [int org/objectweb/asm/Label] void) - (visitTryCatchBlock [org/objectweb/asm/Label org/objectweb/asm/Label org/objectweb/asm/Label java/lang/String] void) - (visitLookupSwitchInsn [org/objectweb/asm/Label [int] [org/objectweb/asm/Label]] void) - (visitTableSwitchInsn [int int org/objectweb/asm/Label [org/objectweb/asm/Label]] void) - ) + ["#::." + (visitCode [] void) + (visitMaxs [int int] void) + (visitEnd [] void) + (visitInsn [int] void) + (visitLdcInsn [java/lang/Object] void) + (visitFieldInsn [int java/lang/String java/lang/String java/lang/String] void) + (visitTypeInsn [int java/lang/String] void) + (visitVarInsn [int int] void) + (visitIntInsn [int int] void) + (visitMethodInsn [int java/lang/String java/lang/String java/lang/String boolean] void) + (visitLabel [org/objectweb/asm/Label] void) + (visitJumpInsn [int org/objectweb/asm/Label] void) + (visitTryCatchBlock [org/objectweb/asm/Label org/objectweb/asm/Label org/objectweb/asm/Label java/lang/String] void) + (visitLookupSwitchInsn [org/objectweb/asm/Label [int] [org/objectweb/asm/Label]] void) + (visitTableSwitchInsn [int int org/objectweb/asm/Label [org/objectweb/asm/Label]] void) + ]) ## [Insts] (def: #export make-label diff --git a/lux-jvm/source/luxc/lang/translation/jvm.lux b/lux-jvm/source/luxc/lang/translation/jvm.lux index 30a130150..dce3017f5 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm.lux @@ -42,13 +42,16 @@ ) (import: java/lang/reflect/Field - (get [#? java/lang/Object] #try #? java/lang/Object)) + ["#::." + (get [#? java/lang/Object] #try #? java/lang/Object)]) (import: (java/lang/Class a) - (getField [java/lang/String] #try java/lang/reflect/Field)) + ["#::." + (getField [java/lang/String] #try java/lang/reflect/Field)]) (import: java/lang/Object - (getClass [] (java/lang/Class java/lang/Object))) + ["#::." + (getClass [] (java/lang/Class java/lang/Object))]) (import: java/lang/ClassLoader) @@ -124,7 +127,7 @@ (io.run (do (try.with io.monad) [_ (loader.store eval-class bytecode library) class (loader.load eval-class loader) - value (:: io.monad wrap (..class-value eval-class class))] + value (\ io.monad wrap (..class-value eval-class class))] (wrap [value [eval-class bytecode]]))))) @@ -132,7 +135,7 @@ (-> Library java/lang/ClassLoader Definition (Try Any)) (io.run (do (try.with io.monad) [existing-class? (|> (atom.read library) - (:: io.monad map (dictionary.contains? class-name)) + (\ io.monad map (dictionary.contains? class-name)) (try.lift io.monad) (: (IO (Try Bit)))) _ (if existing-class? @@ -153,8 +156,8 @@ (: Host (structure (def: (evaluate! context valueI) - (:: try.monad map product.left - (..evaluate! library loader context valueI))) + (\ try.monad map product.left + (..evaluate! library loader context valueI))) (def: execute! (..execute! library loader)) @@ -175,7 +178,7 @@ [#let [class-name (..class-name context)] _ (loader.store class-name bytecode library) class (loader.load class-name loader)] - (:: io.monad wrap (..class-value class-name class)))))))))) + (\ io.monad wrap (..class-value class-name class)))))))))) (def: #export $Variant (type.array ..$Value)) (def: #export $Tuple (type.array ..$Value)) diff --git a/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux b/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux index 0388c5c7f..e73ea068e 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux @@ -53,8 +53,9 @@ (phase.throw extension.invalid-syntax [extension-name %synthesis input])))) (import: java/lang/Double - (#static MIN_VALUE java/lang/Double) - (#static MAX_VALUE java/lang/Double)) + ["#::." + (#static MIN_VALUE java/lang/Double) + (#static MAX_VALUE java/lang/Double)]) (def: $String (type.class "java.lang.String" (list))) (def: $CharSequence (type.class "java.lang.CharSequence" (list))) diff --git a/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux b/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux index 86b814bad..77f421703 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux @@ -956,20 +956,20 @@ _.ARETURN) (#.Right returnT) - (cond (or (:: type.equivalence = type.boolean returnT) - (:: type.equivalence = type.byte returnT) - (:: type.equivalence = type.short returnT) - (:: type.equivalence = type.int returnT) - (:: type.equivalence = type.char returnT)) + (cond (or (\ type.equivalence = type.boolean returnT) + (\ type.equivalence = type.byte returnT) + (\ type.equivalence = type.short returnT) + (\ type.equivalence = type.int returnT) + (\ type.equivalence = type.char returnT)) _.IRETURN - (:: type.equivalence = type.long returnT) + (\ type.equivalence = type.long returnT) _.LRETURN - (:: type.equivalence = type.float returnT) + (\ type.equivalence = type.float returnT) _.FRETURN - ## (:: type.equivalence = type.double returnT) + ## (\ type.equivalence = type.double returnT) _.DRETURN)))) (def: class::anonymous @@ -1038,7 +1038,7 @@ returnT exceptionsT]) (|>> bodyG (returnI returnT))))))) - (:: @ map _def.fuse)) + (\ @ map _def.fuse)) #let [directive [anonymous-class-name (_def.class #$.V1_6 #$.Public $.finalC anonymous-class-name (list) diff --git a/lux-jvm/source/luxc/lang/translation/jvm/primitive.lux b/lux-jvm/source/luxc/lang/translation/jvm/primitive.lux index 2e0aba43e..2d8bff828 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/primitive.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/primitive.lux @@ -23,12 +23,14 @@ (operation@wrap (_.GETSTATIC Boolean (if value "TRUE" "FALSE") Boolean))))) (import: java/lang/Byte - (#static MAX_VALUE byte) - (#static MIN_VALUE byte)) + ["#::." + (#static MAX_VALUE byte) + (#static MIN_VALUE byte)]) (import: java/lang/Short - (#static MAX_VALUE short) - (#static MIN_VALUE short)) + ["#::." + (#static MAX_VALUE short) + (#static MIN_VALUE short)]) (def: #export (i64 value) (-> (I64 Any) (Operation Inst)) @@ -64,7 +66,8 @@ (operation@wrap (|>> constantI (_.wrap type.long)))))) (import: java/lang/Double - (#static doubleToRawLongBits #manual [double] int)) + ["#::." + (#static doubleToRawLongBits #manual [double] int)]) (def: d0-bits Int diff --git a/lux-jvm/source/luxc/lang/translation/jvm/reference.lux b/lux-jvm/source/luxc/lang/translation/jvm/reference.lux index 61eac8dcc..c7570d01a 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/reference.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/reference.lux @@ -38,8 +38,8 @@ (def: (foreign archive variable) (-> Archive Register (Operation Inst)) (do {@ phase.monad} - [class-name (:: @ map //.class-name - (generation.context archive))] + [class-name (\ @ map //.class-name + (generation.context archive))] (wrap (|>> (_.ALOAD 0) (_.GETFIELD (type.class class-name (list)) (|> variable .nat foreign-name) @@ -61,6 +61,6 @@ (def: #export (constant archive name) (-> Archive Name (Operation Inst)) (do {@ phase.monad} - [class-name (:: @ map //.class-name - (generation.remember archive name))] + [class-name (\ @ map //.class-name + (generation.remember archive name))] (wrap (_.GETSTATIC (type.class class-name (list)) //.value-field //.$Value)))) diff --git a/lux-jvm/source/luxc/lang/translation/jvm/structure.lux b/lux-jvm/source/luxc/lang/translation/jvm/structure.lux index c268cb14a..d91ed3d14 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/structure.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/structure.lux @@ -55,18 +55,20 @@ (_.int (.int idx)) memberI _.AASTORE))))) - (:: @ map _.fuse))] + (\ @ map _.fuse))] (wrap (|>> (_.int (.int size)) (_.array //runtime.$Value) membersI)))) (import: java/lang/Byte - (#static MAX_VALUE byte) - (#static MIN_VALUE byte)) + ["#::." + (#static MAX_VALUE byte) + (#static MIN_VALUE byte)]) (import: java/lang/Short - (#static MAX_VALUE short) - (#static MIN_VALUE short)) + ["#::." + (#static MAX_VALUE short) + (#static MIN_VALUE short)]) (def: #export (tagI lefts right?) (-> Nat Bit Inst) diff --git a/lux-jvm/source/program.lux b/lux-jvm/source/program.lux index 433f76d36..8a6729e1d 100644 --- a/lux-jvm/source/program.lux +++ b/lux-jvm/source/program.lux @@ -66,13 +66,16 @@ ["translation" extension]]]]]) (import: java/lang/reflect/Method - (invoke [java/lang/Object [java/lang/Object]] #try java/lang/Object)) + ["#::." + (invoke [java/lang/Object [java/lang/Object]] #try java/lang/Object)]) (import: (java/lang/Class c) - (getMethod [java/lang/String [(java/lang/Class java/lang/Object)]] #try java/lang/reflect/Method)) + ["#::." + (getMethod [java/lang/String [(java/lang/Class java/lang/Object)]] #try java/lang/reflect/Method)]) (import: java/lang/Object - (getClass [] (java/lang/Class java/lang/Object))) + ["#::." + (getClass [] (java/lang/Class java/lang/Object))]) (def: _object-class (java/lang/Class java/lang/Object) @@ -172,6 +175,6 @@ ..extender service [packager.package - (format (/cli.target service) (:: file.default separator) "program.jar")])] + (format (/cli.target service) (\ file.default separator) "program.jar")])] (..declare-success! [])) (io.io []))) diff --git a/lux-mode/lux-mode.el b/lux-mode/lux-mode.el index 4d1e9bbc6..e10d8cfe4 100644 --- a/lux-mode/lux-mode.el +++ b/lux-mode/lux-mode.el @@ -334,8 +334,8 @@ Called by `imenu--generic-function'." (type//capability (altRE "capability:")) ;; Data (data//record (altRE "get@" "set@" "update@")) - (data//signature (altRE "open:" "structure" "::")) - (data//implicit (altRE "implicit:" "implicit" ":::")) + (data//signature (altRE "open:" "structure" "\\\\")) + (data//implicit (altRE "implicit:" "implicit" "\\\\\\\\")) (data//collection (altRE "list" "list&" "row" "tree")) ;; Code (code//quotation (altRE "`" "`'" "'" "~" "~\\+" "~!" "~'")) diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux index 639d9ab09..a5ee64cab 100644 --- a/stdlib/source/lux.lux +++ b/stdlib/source/lux.lux @@ -4375,9 +4375,9 @@ "(open: ''i:.'' number)" __paragraph "## Will generate:" ..new-line - "(def: i:+ (:: number +))" ..new-line - "(def: i:- (:: number -))" ..new-line - "(def: i:* (:: number *))" ..new-line + "(def: i:+ (\ number +))" ..new-line + "(def: i:- (\ number -))" ..new-line + "(def: i:* (\ number *))" ..new-line "..."))} (case tokens (^ (list [_ (#Text alias)] struct)) @@ -4586,13 +4586,13 @@ (~ =imports)))]] (wrap (#Cons =module =refers)))) -(macro: #export (:: tokens) +(macro: #export (\ tokens) {#.doc (text$ ($_ "lux text concat" "## Allows accessing the value of a structure's member." ..new-line - "(:: codec encode)" + "(\ codec encode)" __paragraph "## Also allows using that value as a function." ..new-line - "(:: codec encode +123)"))} + "(\ codec encode +123)"))} (case tokens (^ (list struct [_ (#Identifier member)])) (return (list (` (let [(^open ".") (~ struct)] (~ (identifier$ member)))))) @@ -5172,8 +5172,8 @@ (with-expansions [<tests> (template [<expr> <text> <pattern>] [(compare <pattern> <expr>) - (compare <text> (:: Code/encode encode <expr>)) - (compare #1 (:: equivalence = <expr> <expr>))] + (compare <text> (\ Code/encode encode <expr>)) + (compare #1 (\ equivalence = <expr> <expr>))] [(bit #1) "#1" [_ (#.Bit #1)]] [(bit #0) "#0" [_ (#.Bit #0)]] @@ -5281,7 +5281,7 @@ (wrap [meta (#Record =pairs)])) _ - (:: meta-monad return token) + (\ meta-monad return token) )) (macro: #export (static tokens) @@ -5468,7 +5468,7 @@ (macro: #export (^@ tokens) {#.doc (doc "Allows you to simultaneously bind and de-structure a value." (def: (hash (^@ set [Hash<a> _])) - (list\fold (function (_ elem acc) (+ (:: Hash<a> hash elem) acc)) + (list\fold (function (_ elem acc) (+ (\ Hash<a> hash elem) acc)) 0 (to-list set))))} (case tokens diff --git a/stdlib/source/lux/abstract/apply.lux b/stdlib/source/lux/abstract/apply.lux index febf31a73..21d3fb2df 100644 --- a/stdlib/source/lux/abstract/apply.lux +++ b/stdlib/source/lux/abstract/apply.lux @@ -23,14 +23,14 @@ (def: (apply fgf fgx) ## TODO: Switch from this version to the one below (in comments) ASAP. - (let [fgf' (:: f-apply apply - (:: f-monad wrap (:: g-apply apply)) - fgf)] - (:: f-apply apply fgf' fgx)) - ## (let [applyF (:: f-apply apply) - ## applyG (:: g-apply apply)] + (let [fgf' (\ f-apply apply + (\ f-monad wrap (\ g-apply apply)) + fgf)] + (\ f-apply apply fgf' fgx)) + ## (let [applyF (\ f-apply apply) + ## applyG (\ g-apply apply)] ## ($_ applyF - ## (:: f-monad wrap applyG) + ## (\ f-monad wrap applyG) ## fgf ## fgx)) )) diff --git a/stdlib/source/lux/abstract/codec.lux b/stdlib/source/lux/abstract/codec.lux index 2a5048cf3..ad59ce450 100644 --- a/stdlib/source/lux/abstract/codec.lux +++ b/stdlib/source/lux/abstract/codec.lux @@ -19,10 +19,10 @@ (-> (Codec c b) (Codec b a) (Codec c a))) (def: encode - (|>> (:: ba-codec encode) - (:: cb-codec encode))) + (|>> (\ ba-codec encode) + (\ cb-codec encode))) (def: (decode cy) (do try.monad - [by (:: cb-codec decode cy)] - (:: ba-codec decode by)))) + [by (\ cb-codec decode cy)] + (\ ba-codec decode by)))) diff --git a/stdlib/source/lux/abstract/comonad/cofree.lux b/stdlib/source/lux/abstract/comonad/cofree.lux index eadfa788f..8e43cd9bf 100644 --- a/stdlib/source/lux/abstract/comonad/cofree.lux +++ b/stdlib/source/lux/abstract/comonad/cofree.lux @@ -12,7 +12,7 @@ (All [F] (-> (Functor F) (Functor (CoFree F)))) (def: (map f [head tail]) - [(f head) (:: dsl map (map f) tail)])) + [(f head) (\ dsl map (map f) tail)])) (structure: #export (comonad dsl) (All [F] (-> (Functor F) (CoMonad (CoFree F)))) @@ -24,4 +24,4 @@ (def: (split [head tail]) [[head tail] - (:: dsl map split tail)])) + (\ dsl map split tail)])) diff --git a/stdlib/source/lux/abstract/equivalence.lux b/stdlib/source/lux/abstract/equivalence.lux index d65e101a8..a467f0b50 100644 --- a/stdlib/source/lux/abstract/equivalence.lux +++ b/stdlib/source/lux/abstract/equivalence.lux @@ -15,10 +15,10 @@ (def: (= reference sample) (case [reference sample] [(#.Left reference) (#.Left sample)] - (:: left = reference sample) + (\ left = reference sample) [(#.Right reference) (#.Right sample)] - (:: right = reference sample) + (\ right = reference sample) _ false)))) @@ -27,8 +27,8 @@ (All [l r] (-> (Equivalence l) (Equivalence r) (Equivalence [l r]))) (structure (def: (= [a b] [x y]) - (and (:: left = a x) - (:: right = b y))))) + (and (\ left = a x) + (\ right = b y))))) (def: #export (rec sub) (All [a] (-> (-> (Equivalence a) (Equivalence a)) (Equivalence a))) @@ -42,4 +42,4 @@ (def: (map f equivalence) (structure (def: (= reference sample) - (:: equivalence = (f reference) (f sample)))))) + (\ equivalence = (f reference) (f sample)))))) diff --git a/stdlib/source/lux/abstract/hash.lux b/stdlib/source/lux/abstract/hash.lux index df2dd2e27..f22bdc62a 100644 --- a/stdlib/source/lux/abstract/hash.lux +++ b/stdlib/source/lux/abstract/hash.lux @@ -15,25 +15,25 @@ (All [l r] (-> (Hash l) (Hash r) (Hash (| l r)))) (structure (def: &equivalence - (equivalence.sum (:: left &equivalence) - (:: right &equivalence))) + (equivalence.sum (\ left &equivalence) + (\ right &equivalence))) (def: (hash value) (<| (:coerce Nat) (case value (#.Left value) - ("lux i64 *" +2 (:coerce Int (:: left hash value))) + ("lux i64 *" +2 (:coerce Int (\ left hash value))) (#.Right value) - ("lux i64 *" +3 (:coerce Int (:: right hash value)))))))) + ("lux i64 *" +3 (:coerce Int (\ right hash value)))))))) (def: #export (product left right) (All [l r] (-> (Hash l) (Hash r) (Hash (& l r)))) (structure (def: &equivalence - (equivalence.product (:: left &equivalence) - (:: right &equivalence))) + (equivalence.product (\ left &equivalence) + (\ right &equivalence))) (def: (hash [leftV rightV]) (:coerce Nat ("lux i64 +" - (:coerce Int (:: left hash leftV)) - (:coerce Int (:: right hash rightV))))))) + (:coerce Int (\ left hash leftV)) + (:coerce Int (\ right hash rightV))))))) diff --git a/stdlib/source/lux/abstract/interval.lux b/stdlib/source/lux/abstract/interval.lux index c429fa5c8..b1b026440 100644 --- a/stdlib/source/lux/abstract/interval.lux +++ b/stdlib/source/lux/abstract/interval.lux @@ -75,14 +75,14 @@ (def: #export (union left right) (All [a] (-> (Interval a) (Interval a) (Interval a))) (structure (def: &enum (get@ #&enum right)) - (def: bottom (order.min (:: right &order) (:: left bottom) (:: right bottom))) - (def: top (order.max (:: right &order) (:: left top) (:: right top))))) + (def: bottom (order.min (\ right &order) (\ left bottom) (\ right bottom))) + (def: top (order.max (\ right &order) (\ left top) (\ right top))))) (def: #export (intersection left right) (All [a] (-> (Interval a) (Interval a) (Interval a))) (structure (def: &enum (get@ #&enum right)) - (def: bottom (order.max (:: right &order) (:: left bottom) (:: right bottom))) - (def: top (order.min (:: right &order) (:: left top) (:: right top))))) + (def: bottom (order.max (\ right &order) (\ left bottom) (\ right bottom))) + (def: top (order.min (\ right &order) (\ left top) (\ right top))))) (def: #export (complement interval) (All [a] (-> (Interval a) (Interval a))) @@ -94,9 +94,9 @@ (def: #export (precedes? reference sample) (All [a] (-> (Interval a) (Interval a) Bit)) (let [(^open ".") reference - limit (:: reference bottom)] - (and (< limit (:: sample bottom)) - (< limit (:: sample top))))) + limit (\ reference bottom)] + (and (< limit (\ sample bottom)) + (< limit (\ sample top))))) (def: #export (succeeds? reference sample) (All [a] (-> (Interval a) (Interval a) Bit)) @@ -116,9 +116,9 @@ (def: #export (meets? reference sample) (All [a] (-> (Interval a) (Interval a) Bit)) (let [(^open ",\.") reference - limit (:: reference bottom)] - (and (,\= limit (:: sample top)) - (order.<= ,\&order limit (:: sample bottom))))) + limit (\ reference bottom)] + (and (,\= limit (\ sample top)) + (order.<= ,\&order limit (\ sample bottom))))) (def: #export (touches? reference sample) (All [a] (-> (Interval a) (Interval a) Bit)) @@ -129,11 +129,11 @@ [(def: #export (<name> reference sample) (All [a] (-> (Interval a) (Interval a) Bit)) (let [(^open ",\.") reference] - (and (,\= (:: reference <eq-side>) - (:: sample <eq-side>)) + (and (,\= (\ reference <eq-side>) + (\ sample <eq-side>)) (<ineq> ,\&order - (:: reference <ineq-side>) - (:: sample <ineq-side>)))))] + (\ reference <ineq-side>) + (\ sample <ineq-side>)))))] [starts? ,\bottom order.<= ,\top] [finishes? ,\top order.>= ,\bottom] @@ -142,8 +142,8 @@ (structure: #export equivalence (All [a] (Equivalence (Interval a))) (def: (= reference sample) (let [(^open ",\.") reference] - (and (,\= ,\bottom (:: sample bottom)) - (,\= ,\top (:: sample top)))))) + (and (,\= ,\bottom (\ sample bottom)) + (,\= ,\top (\ sample top)))))) (def: #export (nested? reference sample) (All [a] (-> (Interval a) (Interval a) Bit)) @@ -151,8 +151,8 @@ (and (inner? reference) (inner? sample)) (and (outer? reference) (outer? sample))) (let [(^open ",\.") reference] - (and (order.>= ,\&order (:: reference bottom) (:: sample bottom)) - (order.<= ,\&order (:: reference top) (:: sample top)))) + (and (order.>= ,\&order (\ reference bottom) (\ sample bottom)) + (order.<= ,\&order (\ reference top) (\ sample top)))) (or (singleton? reference) (and (inner? reference) (outer? sample))) @@ -160,16 +160,16 @@ ## (and (outer? reference) (inner? sample)) (let [(^open ",\.") reference] - (or (and (order.>= ,\&order (:: reference bottom) (:: sample bottom)) - (order.> ,\&order (:: reference bottom) (:: sample top))) - (and (,\< (:: reference top) (:: sample bottom)) - (order.<= ,\&order (:: reference top) (:: sample top))))) + (or (and (order.>= ,\&order (\ reference bottom) (\ sample bottom)) + (order.> ,\&order (\ reference bottom) (\ sample top))) + (and (,\< (\ reference top) (\ sample bottom)) + (order.<= ,\&order (\ reference top) (\ sample top))))) )) (def: #export (overlaps? reference sample) (All [a] (-> (Interval a) (Interval a) Bit)) (let [(^open ",\.") reference] - (and (not (:: ..equivalence = reference sample)) + (and (not (\ ..equivalence = reference sample)) (cond (singleton? sample) #0 @@ -178,8 +178,8 @@ (or (and (inner? sample) (outer? reference)) (and (outer? sample) (inner? reference))) - (or (order.>= ,\&order (:: reference bottom) (:: sample top)) - (order.<= ,\&order (:: reference top) (:: sample bottom))) + (or (order.>= ,\&order (\ reference bottom) (\ sample top)) + (order.<= ,\&order (\ reference top) (\ sample bottom))) ## both inner (inner? sample) diff --git a/stdlib/source/lux/abstract/monad.lux b/stdlib/source/lux/abstract/monad.lux index 052191e66..1d7c67401 100644 --- a/stdlib/source/lux/abstract/monad.lux +++ b/stdlib/source/lux/abstract/monad.lux @@ -110,8 +110,8 @@ (All [! a b] (-> (Monad !) (-> a (! b)) (-> (! a) (! b)))) - (|>> (:: monad map f) - (:: monad join))) + (|>> (\ monad map f) + (\ monad join))) (def: #export (seq monad) {#.doc "Run all the monadic values in the list and produce a list of the base values."} @@ -175,7 +175,7 @@ (M a))) (case xs #.Nil - (:: monad wrap init) + (\ monad wrap init) (#.Cons x xs') (do monad diff --git a/stdlib/source/lux/abstract/monad/free.lux b/stdlib/source/lux/abstract/monad/free.lux index 5194963b4..3eb01064d 100644 --- a/stdlib/source/lux/abstract/monad/free.lux +++ b/stdlib/source/lux/abstract/monad/free.lux @@ -19,7 +19,7 @@ (#Pure (f a)) (#Effect value) - (#Effect (:: dsl map (map f) value))))) + (#Effect (\ dsl map (map f) value))))) (structure: #export (apply dsl) (All [F] (-> (Functor F) (Apply (Free F)))) @@ -32,14 +32,14 @@ (#Pure (f a)) [(#Pure f) (#Effect fa)] - (#Effect (:: dsl map - (:: (..functor dsl) map f) - fa)) + (#Effect (\ dsl map + (\ (..functor dsl) map f) + fa)) [(#Effect ff) _] - (#Effect (:: dsl map - (function (_ f) (apply f ea)) - ff)) + (#Effect (\ dsl map + (function (_ f) (apply f ea)) + ff)) ))) (structure: #export (monad dsl) @@ -61,7 +61,7 @@ (#Effect fa)) (#Effect fefa) - (#Effect (:: dsl map - (:: (monad dsl) join) - fefa)) + (#Effect (\ dsl map + (\ (monad dsl) join) + fefa)) ))) diff --git a/stdlib/source/lux/abstract/monad/indexed.lux b/stdlib/source/lux/abstract/monad/indexed.lux index 14bbf75f0..4e6f51942 100644 --- a/stdlib/source/lux/abstract/monad/indexed.lux +++ b/stdlib/source/lux/abstract/monad/indexed.lux @@ -45,11 +45,11 @@ (def: named-monad (Parser [(Maybe Text) Code]) - (p.either (s.record (p.and (:: p.monad map (|>> #.Some) - s.local-identifier) + (p.either (s.record (p.and (\ p.monad map (|>> #.Some) + s.local-identifier) s.any)) - (:: p.monad map (|>> [#.None]) - s.any))) + (\ p.monad map (|>> [#.None]) + s.any))) (syntax: #export (do {[?name monad] ..named-monad} {context (s.tuple (p.some context))} diff --git a/stdlib/source/lux/abstract/monoid.lux b/stdlib/source/lux/abstract/monoid.lux index 7f4254af3..c87cf8b40 100644 --- a/stdlib/source/lux/abstract/monoid.lux +++ b/stdlib/source/lux/abstract/monoid.lux @@ -13,8 +13,8 @@ (All [l r] (-> (Monoid l) (Monoid r) (Monoid [l r]))) (structure (def: identity - [(:: left identity) (:: right identity)]) + [(\ left identity) (\ right identity)]) (def: (compose [lL rL] [lR rR]) - [(:: left compose lL lR) - (:: right compose rL rR)]))) + [(\ left compose lL lR) + (\ right compose rL rR)]))) diff --git a/stdlib/source/lux/abstract/order.lux b/stdlib/source/lux/abstract/order.lux index dad99b8b4..21f5739d2 100644 --- a/stdlib/source/lux/abstract/order.lux +++ b/stdlib/source/lux/abstract/order.lux @@ -22,28 +22,28 @@ (def: #export (<= order parameter subject) Comparison - (or (:: order < parameter subject) - (:: order = parameter subject))) + (or (\ order < parameter subject) + (\ order = parameter subject))) (def: #export (> order parameter subject) Comparison - (:: order < subject parameter)) + (\ order < subject parameter)) (def: #export (>= order parameter subject) Comparison - (or (:: order < subject parameter) - (:: order = subject parameter))) + (or (\ order < subject parameter) + (\ order = subject parameter))) (type: #export (Choice a) (-> (Order a) a a a)) (def: #export (min order x y) Choice - (if (:: order < y x) x y)) + (if (\ order < y x) x y)) (def: #export (max order x y) Choice - (if (:: order < y x) y x)) + (if (\ order < y x) y x)) (structure: #export functor (contravariant.Functor Order) @@ -51,7 +51,7 @@ (def: (map f order) (structure (def: &equivalence - (:: equivalence.functor map f (:: order &equivalence))) + (\ equivalence.functor map f (\ order &equivalence))) (def: (< reference sample) - (:: order < (f reference) (f sample)))))) + (\ order < (f reference) (f sample)))))) diff --git a/stdlib/source/lux/control/concurrency/actor.lux b/stdlib/source/lux/control/concurrency/actor.lux index 97c080273..f9ab10327 100644 --- a/stdlib/source/lux/control/concurrency/actor.lux +++ b/stdlib/source/lux/control/concurrency/actor.lux @@ -53,8 +53,8 @@ [current (promise.poll read)] (case current (#.Some [head tail]) - (:: ! map (|>> (#.Cons head)) - (pending tail)) + (\ ! map (|>> (#.Cons head)) + (pending tail)) #.None (wrap #.Nil)))) @@ -111,12 +111,12 @@ (let [[obituary _] (get@ #obituary (:representation actor))] (|> obituary promise.poll - (:: io.functor map - (|>> (case> #.None - yes + (\ io.functor map + (|>> (case> #.None + yes - _ - no)))))) + _ + no)))))) (def: #export (obituary actor) (All [s] (-> (Actor s) (IO (Maybe (Obituary s))))) @@ -219,7 +219,7 @@ (def: actor-decl^ (Parser [Text (List Text)]) (<>.either (<c>.form (<>.and <c>.local-identifier (<>.some <c>.local-identifier))) - (<>.and <c>.local-identifier (:: <>.monad wrap (list))))) + (<>.and <c>.local-identifier (\ <>.monad wrap (list))))) (type: On-MailC [[Text Text Text] Code]) @@ -288,10 +288,10 @@ Nat ((on-stop cause state) - (:: promise.monad wrap - (log! (if (exception.match? ..poisoned cause) - (format "Counter was poisoned: " (%.nat state)) - cause)))) + (\ promise.monad wrap + (log! (if (exception.match? ..poisoned cause) + (format "Counter was poisoned: " (%.nat state)) + cause)))) (message: #export (count! {increment Nat} state self Any) (let [state' (n.+ increment state)] @@ -357,7 +357,7 @@ (def: reference^ (Parser [Name (List Text)]) (<>.either (<c>.form (<>.and <c>.identifier (<>.some <c>.local-identifier))) - (<>.and <c>.identifier (:: <>.monad wrap (list))))) + (<>.and <c>.identifier (\ <>.monad wrap (list))))) (syntax: #export (message: {export csr.export} diff --git a/stdlib/source/lux/control/concurrency/frp.lux b/stdlib/source/lux/control/concurrency/frp.lux index f4dbffe81..4709a0cad 100644 --- a/stdlib/source/lux/control/concurrency/frp.lux +++ b/stdlib/source/lux/control/concurrency/frp.lux @@ -134,7 +134,7 @@ [?ma ma] (case ?ma (#.Some [a ma']) - (exec (io.run (:: sink feed a)) + (exec (io.run (\ sink feed a)) (recur ma')) #.None @@ -142,7 +142,7 @@ (recur mma')) #.None - (wrap (: Any (io.run (:: sink close)))))))) + (wrap (: Any (io.run (\ sink close)))))))) output)))) (type: #export (Subscriber a) @@ -226,7 +226,7 @@ (exec (io.run (loop [_ []] (do io.monad [value action - _ (:: sink feed value)] + _ (\ sink feed value)] (promise.await recur (promise.wait milli-seconds))))) [output sink]))) @@ -251,7 +251,7 @@ [cons channel] (case cons (#.Some [head tail]) - (if (:: equivalence = previous head) + (if (\ equivalence = previous head) (distinct' equivalence previous tail) (wrap (#.Some [head (distinct' equivalence head tail)]))) @@ -276,8 +276,8 @@ [cons channel] (case cons (#.Some [head tail]) - (:: ! map (|>> (#.Cons head)) - (consume tail)) + (\ ! map (|>> (#.Cons head)) + (consume tail)) #.None (wrap #.Nil)))) diff --git a/stdlib/source/lux/control/concurrency/promise.lux b/stdlib/source/lux/control/concurrency/promise.lux index 017ad67a8..e4835b8d8 100644 --- a/stdlib/source/lux/control/concurrency/promise.lux +++ b/stdlib/source/lux/control/concurrency/promise.lux @@ -60,7 +60,7 @@ (All [a] (-> (Promise a) (IO (Maybe a)))) (|>> :representation atom.read - (:: io.functor map product.left))) + (\ io.functor map product.left))) (def: #export (await f promise) (All [a] (-> (-> a (IO Any)) (Promise a) (IO Any))) @@ -81,12 +81,12 @@ {#.doc "Checks whether a promise's value has already been resolved."} (All [a] (-> (Promise a) (IO Bit))) (|>> ..poll - (:: io.functor map - (|>> (case> #.None - #0 + (\ io.functor map + (|>> (case> #.None + #0 - (#.Some _) - #1))))) + (#.Some _) + #1))))) (structure: #export functor (Functor Promise) diff --git a/stdlib/source/lux/control/concurrency/semaphore.lux b/stdlib/source/lux/control/concurrency/semaphore.lux index 36ac7cd34..a405b7b3e 100644 --- a/stdlib/source/lux/control/concurrency/semaphore.lux +++ b/stdlib/source/lux/control/concurrency/semaphore.lux @@ -32,7 +32,7 @@ {#.doc "A tool for controlling access to resources by multiple concurrent processes."} (def: most-positions-possible - (.nat (:: i.interval top))) + (.nat (\ i.interval top))) (def: #export (semaphore initial-open-positions) (-> Nat Semaphore) @@ -163,7 +163,7 @@ (do promise.monad [_ (..signal turnstile)] (recur (inc step))) - (:: promise.monad wrap [])))) + (\ promise.monad wrap [])))) (template [<phase> <update> <goal> <turnstile>] [(def: (<phase> (^:representation barrier)) diff --git a/stdlib/source/lux/control/concurrency/stm.lux b/stdlib/source/lux/control/concurrency/stm.lux index d5684cf97..523aa5567 100644 --- a/stdlib/source/lux/control/concurrency/stm.lux +++ b/stdlib/source/lux/control/concurrency/stm.lux @@ -54,7 +54,7 @@ (do ! [_ (monad.map ! (function (_ sink) (do ! - [result (:: sink feed new-value)] + [result (\ sink feed new-value)] (case result (#try.Success _) (wrap []) @@ -94,8 +94,8 @@ (list.find (function (_ [_var _original _current]) (is? (:coerce (Var Any) var) (:coerce (Var Any) _var)))) - (:: maybe.monad map (function (_ [_var _original _current]) - _current)) + (\ maybe.monad map (function (_ [_var _original _current]) + _current)) (:assume) )) diff --git a/stdlib/source/lux/control/parser.lux b/stdlib/source/lux/control/parser.lux index 7397d03e0..1cb4e2298 100644 --- a/stdlib/source/lux/control/parser.lux +++ b/stdlib/source/lux/control/parser.lux @@ -102,8 +102,8 @@ (#try.Success [input (list)]) (#try.Success [input' head]) - (run (:: ..monad map (|>> (list& head)) - (some parser)) + (run (\ ..monad map (|>> (list& head)) + (some parser)) input')))) (def: #export (many parser) @@ -112,8 +112,8 @@ (-> (Parser s a) (Parser s (List a)))) (do {! ..monad} [head parser] - (:: ! map (|>> (list& head)) - (some parser)))) + (\ ! map (|>> (list& head)) + (some parser)))) (def: #export (and p1 p2) {#.doc "Sequencing combinator."} @@ -161,7 +161,7 @@ [x p xs (exactly (dec n) p)] (wrap (#.Cons x xs))) - (:: ..monad wrap (list)))) + (\ ..monad wrap (list)))) (def: #export (at-least n p) {#.doc "Parse at least N times."} @@ -186,7 +186,7 @@ (wrap (#.Cons x xs))) input') )) - (:: ..monad wrap (list)))) + (\ ..monad wrap (list)))) (def: #export (between from to p) {#.doc "Parse between N and M times."} @@ -194,7 +194,7 @@ (do ..monad [min-xs (exactly from p) max-xs (at-most (n.- from to) p)] - (wrap (:: list.monad join (list min-xs max-xs))))) + (wrap (\ list.monad join (list min-xs max-xs))))) (def: #export (sep-by sep p) {#.doc "Parsers instances of 'p' that are separated by instances of 'sep'."} @@ -316,7 +316,7 @@ (#try.Failure error) (#try.Success [input' to-decode]) - (case (:: codec decode to-decode) + (case (\ codec decode to-decode) (#try.Failure error) (#try.Failure error) diff --git a/stdlib/source/lux/control/parser/analysis.lux b/stdlib/source/lux/control/parser/analysis.lux index 6105b5f5a..9b4a14d86 100644 --- a/stdlib/source/lux/control/parser/analysis.lux +++ b/stdlib/source/lux/control/parser/analysis.lux @@ -102,7 +102,7 @@ (function (_ input) (case input (^ (list& (<tag> actual) input')) - (if (:: <eq> = expected actual) + (if (\ <eq> = expected actual) (#try.Success [input' []]) (exception.throw ..cannot-parse input)) diff --git a/stdlib/source/lux/control/parser/binary.lux b/stdlib/source/lux/control/parser/binary.lux index 3d1d30564..6f262f9d2 100644 --- a/stdlib/source/lux/control/parser/binary.lux +++ b/stdlib/source/lux/control/parser/binary.lux @@ -107,7 +107,7 @@ ..bits/8)] (`` (case flag (^template [<number> <tag> <parser>] - [<number> (:: ! map (|>> <tag>) <parser>)]) + [<number> (\ ! map (|>> <tag>) <parser>)]) ((~~ (template.splice <case>+))) _ (//.lift (exception.throw ..invalid-tag [(~~ (template.count <case>+)) flag])))))) diff --git a/stdlib/source/lux/control/parser/cli.lux b/stdlib/source/lux/control/parser/cli.lux index e89b77a16..de654eb24 100644 --- a/stdlib/source/lux/control/parser/cli.lux +++ b/stdlib/source/lux/control/parser/cli.lux @@ -133,7 +133,7 @@ (wrap []))) (program: [name] - (io (log! (:: text.monoid compose "Hello, " name)))) + (io (log! (\ text.monoid compose "Hello, " name)))) (program: [{config config^}] (do io.monad diff --git a/stdlib/source/lux/control/parser/code.lux b/stdlib/source/lux/control/parser/code.lux index 2df442a8f..9dc99e49a 100644 --- a/stdlib/source/lux/control/parser/code.lux +++ b/stdlib/source/lux/control/parser/code.lux @@ -63,7 +63,7 @@ (function (_ tokens) (case tokens (#.Cons [[_ (<tag> actual)] tokens']) - (if (:: <eq> = expected actual) + (if (\ <eq> = expected actual) (#try.Success [tokens' []]) <failure>) @@ -112,7 +112,7 @@ (function (_ tokens) (case tokens (#.Cons [[_ (<tag> ["" actual])] tokens']) - (if (:: <eq> = expected actual) + (if (\ <eq> = expected actual) (#try.Success [tokens' []]) <failure>) diff --git a/stdlib/source/lux/control/parser/environment.lux b/stdlib/source/lux/control/parser/environment.lux index 7f3630dd1..fbe256c24 100644 --- a/stdlib/source/lux/control/parser/environment.lux +++ b/stdlib/source/lux/control/parser/environment.lux @@ -36,4 +36,4 @@ (def: #export (run parser environment) (All [a] (-> (Parser a) /.Environment (Try a))) - (:: try.monad map product.right (parser environment))) + (\ try.monad map product.right (parser environment))) diff --git a/stdlib/source/lux/control/parser/json.lux b/stdlib/source/lux/control/parser/json.lux index fe82104d0..a7cf8fa9f 100644 --- a/stdlib/source/lux/control/parser/json.lux +++ b/stdlib/source/lux/control/parser/json.lux @@ -91,7 +91,7 @@ [head ..any] (case head (<tag> value) - (wrap (:: <equivalence> = test value)) + (wrap (\ <equivalence> = test value)) _ (//.fail (exception.construct ..unexpected-value [head]))))) @@ -103,7 +103,7 @@ [head ..any] (case head (<tag> value) - (if (:: <equivalence> = test value) + (if (\ <equivalence> = test value) (wrap []) (//.fail (exception.construct ..value-mismatch [(<tag> test) (<tag> value)]))) diff --git a/stdlib/source/lux/control/parser/synthesis.lux b/stdlib/source/lux/control/parser/synthesis.lux index cdca47d1c..be67d76d8 100644 --- a/stdlib/source/lux/control/parser/synthesis.lux +++ b/stdlib/source/lux/control/parser/synthesis.lux @@ -106,7 +106,7 @@ (.function (_ input) (case input (^ (list& (<tag> actual) input')) - (if (:: <eq> = expected actual) + (if (\ <eq> = expected actual) (#try.Success [input' []]) (exception.throw ..cannot-parse input)) diff --git a/stdlib/source/lux/control/parser/text.lux b/stdlib/source/lux/control/parser/text.lux index aede52006..ebcf3c53a 100644 --- a/stdlib/source/lux/control/parser/text.lux +++ b/stdlib/source/lux/control/parser/text.lux @@ -288,7 +288,7 @@ [(def: #export (<name> parser) {#.doc (code.text ($_ /\compose "Lex " <doc-modifier> " characters as a single continuous text."))} (-> (Parser Text) (Parser Text)) - (|> parser <base> (:: //.monad map /.concat)))] + (|> parser <base> (\ //.monad map /.concat)))] [some //.some "some"] [many //.many "many"] @@ -308,7 +308,7 @@ [(def: #export (<name> amount parser) {#.doc (code.text ($_ /\compose "Lex " <doc-modifier> " N characters."))} (-> Nat (Parser Text) (Parser Text)) - (|> parser (<base> amount) (:: //.monad map /.concat)))] + (|> parser (<base> amount) (\ //.monad map /.concat)))] [exactly //.exactly "exactly"] [at-most //.at-most "at most"] @@ -329,7 +329,7 @@ (def: #export (between from to parser) {#.doc "Lex between N and M characters."} (-> Nat Nat (Parser Text) (Parser Text)) - (|> parser (//.between from to) (:: //.monad map /.concat))) + (|> parser (//.between from to) (\ //.monad map /.concat))) (def: #export (between! from to parser) {#.doc "Lex between N and M characters."} diff --git a/stdlib/source/lux/control/parser/type.lux b/stdlib/source/lux/control/parser/type.lux index c9b8a5c96..3ac8f657d 100644 --- a/stdlib/source/lux/control/parser/type.lux +++ b/stdlib/source/lux/control/parser/type.lux @@ -173,7 +173,7 @@ (All [a] (-> (Parser a) (Parser [Code (List Code) a]))) (do {! //.monad} [headT any - funcI (:: ! map dictionary.size ..env) + funcI (\ ! map dictionary.size ..env) [num-args non-poly] (local (list headT) polymorphic') env ..env #let [funcL (label funcI) diff --git a/stdlib/source/lux/control/parser/xml.lux b/stdlib/source/lux/control/parser/xml.lux index c3d3136c7..bec2b80fe 100644 --- a/stdlib/source/lux/control/parser/xml.lux +++ b/stdlib/source/lux/control/parser/xml.lux @@ -33,7 +33,7 @@ (exception: #export (unconsumed-inputs {inputs (List XML)}) (exception.report - ["Inputs" (exception.enumerate (:: /.codec encode) inputs)])) + ["Inputs" (exception.enumerate (\ /.codec encode) inputs)])) (def: #export text (Parser Text) diff --git a/stdlib/source/lux/control/reader.lux b/stdlib/source/lux/control/reader.lux index 9236fb5a5..fc1755990 100644 --- a/stdlib/source/lux/control/reader.lux +++ b/stdlib/source/lux/control/reader.lux @@ -57,7 +57,7 @@ (def: &functor (functor.compose ..functor (get@ #monad.&functor monad))) - (def: wrap (|>> (:: monad wrap) (:: ..monad wrap))) + (def: wrap (|>> (\ monad wrap) (\ ..monad wrap))) (def: (join eMeMa) (function (_ env) @@ -68,4 +68,4 @@ (def: #export lift {#.doc "Lift monadic values to the Reader wrapper."} (All [M e a] (-> (M a) (Reader e (M a)))) - (:: ..monad wrap)) + (\ ..monad wrap)) diff --git a/stdlib/source/lux/control/region.lux b/stdlib/source/lux/control/region.lux index 3bc17e7f9..54f6c9fae 100644 --- a/stdlib/source/lux/control/region.lux +++ b/stdlib/source/lux/control/region.lux @@ -64,9 +64,9 @@ (All [! a] (-> (Monad !) (-> a (! (Try Any))) a (All [r] (Region r ! a)))) (function (_ [region cleaners]) - (:: monad wrap [(#.Cons (function (_ region) (cleaner value)) - cleaners) - (#try.Success value)]))) + (\ monad wrap [(#.Cons (function (_ region) (cleaner value)) + cleaners) + (#try.Success value)]))) (structure: #export (functor super) (All [!] @@ -76,15 +76,15 @@ (def: (map f) (function (_ fa) (function (_ region+cleaners) - (:: super map - (function (_ [cleaners' temp]) - [cleaners' (case temp - (#try.Success value) - (#try.Success (f value)) + (\ super map + (function (_ [cleaners' temp]) + [cleaners' (case temp + (#try.Success value) + (#try.Success (f value)) - (#try.Failure error) - (#try.Failure error))]) - (fa region+cleaners)))))) + (#try.Failure error) + (#try.Failure error))]) + (fa region+cleaners)))))) (structure: #export (apply super) (All [!] @@ -121,7 +121,7 @@ (def: (wrap value) (function (_ [region cleaners]) - (:: super wrap [cleaners (#try.Success value)]))) + (\ super wrap [cleaners (#try.Success value)]))) (def: (join ffa) (function (_ [region cleaners]) @@ -139,7 +139,7 @@ (-> (Monad !) Text (All [r] (Region r ! a)))) (function (_ [region cleaners]) - (:: monad wrap [cleaners (#try.Failure error)]))) + (\ monad wrap [cleaners (#try.Failure error)]))) (def: #export (throw monad exception message) (All [! e a] diff --git a/stdlib/source/lux/control/remember.lux b/stdlib/source/lux/control/remember.lux index a0d46979c..8092fb6a2 100644 --- a/stdlib/source/lux/control/remember.lux +++ b/stdlib/source/lux/control/remember.lux @@ -38,7 +38,7 @@ <c>.int) (do <>.monad [raw <c>.text] - (case (:: date.codec decode raw) + (case (\ date.codec decode raw) (#try.Success date) (wrap date) diff --git a/stdlib/source/lux/control/security/capability.lux b/stdlib/source/lux/control/security/capability.lux index be117d5bf..a1272b018 100644 --- a/stdlib/source/lux/control/security/capability.lux +++ b/stdlib/source/lux/control/security/capability.lux @@ -49,8 +49,8 @@ (do {! meta.monad} [this-module meta.current-module-name #let [[name vars] declaration] - g!brand (:: ! map (|>> %.code code.text) - (meta.gensym (format (%.name [this-module name])))) + g!brand (\ ! map (|>> %.code code.text) + (meta.gensym (format (%.name [this-module name])))) #let [capability (` (..Capability (.primitive (~ g!brand)) (~ input) (~ output)))]] (wrap (list (` (type: (~+ (writer.export export)) (~ (writer.declaration declaration)) diff --git a/stdlib/source/lux/control/state.lux b/stdlib/source/lux/control/state.lux index d4aae98a6..2441efa8e 100644 --- a/stdlib/source/lux/control/state.lux +++ b/stdlib/source/lux/control/state.lux @@ -99,13 +99,13 @@ (def: (map f sfa) (function (_ state) - (:: functor map (function (_ [s a]) [s (f a)]) - (sfa state))))) + (\ functor map (function (_ [s a]) [s (f a)]) + (sfa state))))) (structure: (with//apply monad) (All [M s] (-> (Monad M) (Apply (All [a] (-> s (M [s a])))))) - (def: &functor (with//functor (:: monad &functor))) + (def: &functor (with//functor (\ monad &functor))) (def: (apply sFf sFa) (function (_ state) @@ -127,11 +127,11 @@ {#.doc "A monad transformer to create composite stateful computations."} (All [M s] (-> (Monad M) (Monad (State' M s)))) - (def: &functor (with//functor (:: monad &functor))) + (def: &functor (with//functor (\ monad &functor))) (def: (wrap a) (function (_ state) - (:: monad wrap [state a]))) + (\ monad wrap [state a]))) (def: (join sMsMa) (function (_ state) diff --git a/stdlib/source/lux/control/try.lux b/stdlib/source/lux/control/try.lux index 1a2f5cbe0..94a01b0f7 100644 --- a/stdlib/source/lux/control/try.lux +++ b/stdlib/source/lux/control/try.lux @@ -64,7 +64,7 @@ (def: &functor (functor.compose (get@ #monad.&functor monad) ..functor)) - (def: wrap (|>> (:: ..monad wrap) (:: monad wrap))) + (def: wrap (|>> (\ ..monad wrap) (\ monad wrap))) (def: (join MeMea) (do monad @@ -78,7 +78,7 @@ (def: #export (lift monad) (All [M a] (-> (Monad M) (-> (M a) (M (Try a))))) - (:: monad map (:: ..monad wrap))) + (\ monad map (\ ..monad wrap))) (structure: #export (equivalence (^open "_\.")) (All [a] (-> (Equivalence a) (Equivalence (Try a)))) diff --git a/stdlib/source/lux/control/writer.lux b/stdlib/source/lux/control/writer.lux index db9df51c3..9c4b2850a 100644 --- a/stdlib/source/lux/control/writer.lux +++ b/stdlib/source/lux/control/writer.lux @@ -34,7 +34,7 @@ (def: (apply ff fa) (let [[log1 f] ff [log2 a] fa] - [(:: monoid compose log1 log2) (f a)]))) + [(\ monoid compose log1 log2) (f a)]))) (structure: #export (monad monoid) (All [l] @@ -43,11 +43,11 @@ (def: &functor ..functor) (def: wrap - (|>> [(:: monoid identity)])) + (|>> [(\ monoid identity)])) (def: (join mma) (let [[log1 [log2 a]] mma] - [(:: monoid compose log1 log2) a]))) + [(\ monoid compose log1 log2) a]))) (structure: #export (with monoid monad) (All [l M] (-> (Monoid l) (Monad M) (Monad (All [a] (M (Writer l a)))))) @@ -58,7 +58,7 @@ (def: wrap (let [writer (..monad monoid)] - (|>> (:: writer wrap) (:: monad wrap)))) + (|>> (\ writer wrap) (\ monad wrap)))) (def: (join MlMla) (do monad @@ -68,10 +68,10 @@ ## On new compiler MlMla) [l2 a] Mla] - (wrap [(:: monoid compose l1 l2) a])))) + (wrap [(\ monoid compose l1 l2) a])))) (def: #export (lift monoid monad) (All [l M a] (-> (Monoid l) (Monad M) (-> (M a) (M (Writer l a))))) - (:: monad map (|>> [(:: monoid identity)]))) + (\ monad map (|>> [(\ monoid identity)]))) diff --git a/stdlib/source/lux/data/collection/dictionary.lux b/stdlib/source/lux/data/collection/dictionary.lux index f7a406c45..efb99a8b4 100644 --- a/stdlib/source/lux/data/collection/dictionary.lux +++ b/stdlib/source/lux/data/collection/dictionary.lux @@ -218,10 +218,10 @@ ## Produces the index of a KV-pair within a #Collisions node. (def: (collision-index Hash<k> key colls) (All [k v] (-> (Hash k) k (Collisions k v) (Maybe Index))) - (:: maybe.monad map product.left - (array.find+ (function (_ idx [key' val']) - (:: Hash<k> = key key')) - colls))) + (\ maybe.monad map product.left + (array.find+ (function (_ idx [key' val']) + (\ Hash<k> = key key')) + colls))) ## When #Hierarchy nodes grow too small, they're demoted to #Base ## nodes to save space. @@ -261,7 +261,7 @@ (#.Some (#.Right [key' val'])) (array.write! hierarchy-idx - (put' (level-up level) (:: Hash<k> hash key') key' val' Hash<k> empty) + (put' (level-up level) (\ Hash<k> hash key') key' val' Hash<k> empty) h-array) #.None @@ -318,12 +318,12 @@ ## Otherwise, if it's being used by a KV, I compare the keys. (#.Some (#.Right key' val')) - (if (:: Hash<k> = key key') + (if (\ Hash<k> = key key') ## If the same key is found, I replace the value. (#Base bitmap (update! idx (#.Right key val) base)) ## Otherwise, I compare the hashes of the keys. (#Base bitmap (update! idx - (#.Left (let [hash' (:: Hash<k> hash key')] + (#.Left (let [hash' (\ Hash<k> hash key')] (if (n.= hash hash') ## If the hashes are ## the same, a new @@ -445,7 +445,7 @@ ## If, however, there was a KV-pair instead of a sub-node. (#.Some (#.Right [key' val'])) ## Check if the keys match. - (if (:: Hash<k> = key key') + (if (\ Hash<k> = key key') ## If so, remove the KV-pair and unset the BitPosition. (#Base (unset-bit-position bit bitmap) (remove! idx base)) @@ -492,16 +492,16 @@ (get' (level-up level) hash key Hash<k> sub-node) (#.Some (#.Right [key' val'])) - (if (:: Hash<k> = key key') + (if (\ Hash<k> = key key') (#.Some val') #.None)) #.None)) ## For #Collisions nodes, do a linear scan of all the known KV-pairs. (#Collisions _hash _colls) - (:: maybe.monad map product.right - (array.find (|>> product.left (:: Hash<k> = key)) - _colls)) + (\ maybe.monad map product.right + (array.find (|>> product.left (\ Hash<k> = key)) + _colls)) )) (def: (size' node) @@ -562,17 +562,17 @@ (def: #export (put key val dict) (All [k v] (-> k v (Dictionary k v) (Dictionary k v))) (let [[Hash<k> node] dict] - [Hash<k> (put' root-level (:: Hash<k> hash key) key val Hash<k> node)])) + [Hash<k> (put' root-level (\ Hash<k> hash key) key val Hash<k> node)])) (def: #export (remove key dict) (All [k v] (-> k (Dictionary k v) (Dictionary k v))) (let [[Hash<k> node] dict] - [Hash<k> (remove' root-level (:: Hash<k> hash key) key Hash<k> node)])) + [Hash<k> (remove' root-level (\ Hash<k> hash key) key Hash<k> node)])) (def: #export (get key dict) (All [k v] (-> k (Dictionary k v) (Maybe v))) (let [[Hash<k> node] dict] - (get' root-level (:: Hash<k> hash key) key Hash<k> node))) + (get' root-level (\ Hash<k> hash key) key Hash<k> node))) (def: #export (contains? key dict) (All [k v] (-> k (Dictionary k v) Bit)) @@ -722,4 +722,4 @@ (All [k] (Functor (Dictionary k))) (def: (map f fa) - (update@ #root (:: ..functor' map f) fa))) + (update@ #root (\ ..functor' map f) fa))) diff --git a/stdlib/source/lux/data/collection/dictionary/ordered.lux b/stdlib/source/lux/data/collection/dictionary/ordered.lux index fc02cd5bf..b924a2e5d 100644 --- a/stdlib/source/lux/data/collection/dictionary/ordered.lux +++ b/stdlib/source/lux/data/collection/dictionary/ordered.lux @@ -63,11 +63,11 @@ (#.Some node) (let [node-key (get@ #key node)] - (cond (:: dict = node-key key) + (cond (\ dict = node-key key) ## (_\= node-key key) (#.Some (get@ #value node)) - (:: dict < node-key key) + (\ dict < node-key key) ## (_\< node-key key) (recur (get@ #left node)) @@ -86,9 +86,9 @@ (#.Some node) (let [node-key (get@ #key node)] - (or (:: dict = node-key key) + (or (\ dict = node-key key) ## (_\= node-key key) - (if (:: dict < node-key key) + (if (\ dict < node-key key) ## (_\< node-key key) (recur (get@ #left node)) (recur (get@ #right node))))))))) @@ -360,7 +360,7 @@ (#.Some (right-balance (get@ #key right) (get@ #value right) (get@ #right right>>left) - (:: maybe.functor map redden (get@ #right right))))) + (\ maybe.functor map redden (get@ #right right))))) _ (error! error-message)) @@ -387,7 +387,7 @@ (get@ #value left>>right) (#.Some (left-balance (get@ #key left) (get@ #value left) - (:: maybe.functor map redden (get@ #left left)) + (\ maybe.functor map redden (get@ #left left)) (get@ #left left>>right))) (#.Some (black key value (get@ #right left>>right) ?right))) diff --git a/stdlib/source/lux/data/collection/list.lux b/stdlib/source/lux/data/collection/list.lux index d35df1b53..62e8a417d 100644 --- a/stdlib/source/lux/data/collection/list.lux +++ b/stdlib/source/lux/data/collection/list.lux @@ -302,7 +302,7 @@ #1 [(#.Cons x xs') (#.Cons y ys')] - (and (:: Equivalence<a> = x y) + (and (\ Equivalence<a> = x y) (= xs' ys')) [_ _] @@ -313,7 +313,7 @@ (All [a] (-> (Hash a) (Hash (List a)))) (def: &equivalence - (..equivalence (:: super &equivalence))) + (..equivalence (\ super &equivalence))) (def: (hash value) (case value @@ -322,7 +322,7 @@ (#.Cons head tail) ($_ n.* 3 - (n.+ (:: super hash head) + (n.+ (\ super hash head) (hash tail))) ))) @@ -395,7 +395,7 @@ (All [a] (-> (Equivalence a) (List a) a Bit)) (case xs #.Nil #0 - (#.Cons x' xs') (or (:: eq = x x') + (#.Cons x' xs') (or (\ eq = x x') (member? eq xs' x)))) (template [<name> <output> <side> <doc>] @@ -571,14 +571,14 @@ (def: #export (concat xss) (All [a] (-> (List (List a)) (List a))) - (:: ..monad join xss)) + (\ ..monad join xss)) (structure: #export (with monad) (All [M] (-> (Monad M) (Monad (All [a] (M (List a)))))) (def: &functor (functor.compose (get@ #monad.&functor monad) ..functor)) - (def: wrap (|>> (:: ..monad wrap) (:: monad wrap))) + (def: wrap (|>> (\ ..monad wrap) (\ monad wrap))) (def: (join MlMla) (do {! monad} @@ -592,7 +592,7 @@ (def: #export (lift monad) (All [M a] (-> (Monad M) (-> (M a) (M (List a))))) - (:: monad map (:: ..monad wrap))) + (\ monad map (\ ..monad wrap))) (def: #export (enumeration xs) {#.doc "Pairs every element in the list with its index, starting at 0."} diff --git a/stdlib/source/lux/data/collection/queue.lux b/stdlib/source/lux/data/collection/queue.lux index 69e4f7025..2d8712b82 100644 --- a/stdlib/source/lux/data/collection/queue.lux +++ b/stdlib/source/lux/data/collection/queue.lux @@ -79,9 +79,9 @@ (All [a] (-> (Equivalence a) (Equivalence (Queue a)))) (def: (= reference subject) - (:: (list.equivalence super) = - (..to-list reference) - (..to-list subject)))) + (\ (list.equivalence super) = + (..to-list reference) + (..to-list subject)))) (structure: #export functor (Functor Queue) diff --git a/stdlib/source/lux/data/collection/queue/priority.lux b/stdlib/source/lux/data/collection/queue/priority.lux index 9c526d0df..4c559e331 100644 --- a/stdlib/source/lux/data/collection/queue/priority.lux +++ b/stdlib/source/lux/data/collection/queue/priority.lux @@ -67,7 +67,7 @@ (loop [node tree] (case (tree.root node) (0 #0 reference) - (:: equivalence = reference member) + (\ equivalence = reference member) (0 #1 [left right]) (or (recur left) @@ -93,24 +93,24 @@ (#.Some right) (#.Some =left) - (#.Some (:: ..builder branch =left right))) + (#.Some (\ ..builder branch =left right))) (case (recur right) #.None (#.Some left) (#.Some =right) - (#.Some (:: ..builder branch left =right))))))))) + (#.Some (\ ..builder branch left =right))))))))) (def: #export (push priority value queue) (All [a] (-> Priority a (Queue a) (Queue a))) - (let [addition (:: ..builder leaf priority value)] + (let [addition (\ ..builder leaf priority value)] (:abstraction (case (:representation queue) #.None (#.Some addition) (#.Some tree) - (#.Some (:: ..builder branch tree addition)))))) + (#.Some (\ ..builder branch tree addition)))))) ) (def: #export empty? diff --git a/stdlib/source/lux/data/collection/row.lux b/stdlib/source/lux/data/collection/row.lux index ae60e87d5..9bc47be18 100644 --- a/stdlib/source/lux/data/collection/row.lux +++ b/stdlib/source/lux/data/collection/row.lux @@ -231,8 +231,8 @@ (exception: incorrect-row-structure) (exception: #export [a] (index-out-of-bounds {row (Row a)} {index Nat}) - (exception.report ["Size" (:: n.decimal encode (get@ #size row))] - ["Index" (:: n.decimal encode index)])) + (exception.report ["Size" (\ n.decimal encode (get@ #size row))] + ["Index" (\ n.decimal encode index)])) (exception: base-was-not-found) @@ -363,10 +363,10 @@ (def: (= v1 v2) (case [v1 v2] [(#Base b1) (#Base b2)] - (:: (array.equivalence Equivalence<a>) = b1 b2) + (\ (array.equivalence Equivalence<a>) = b1 b2) [(#Hierarchy h1) (#Hierarchy h2)] - (:: (array.equivalence (node-equivalence Equivalence<a>)) = h1 h2) + (\ (array.equivalence (node-equivalence Equivalence<a>)) = h1 h2) _ #0))) @@ -431,7 +431,7 @@ (def: (map f xs) {#level (get@ #level xs) #size (get@ #size xs) - #root (|> xs (get@ #root) (array\map (:: node-functor map f))) + #root (|> xs (get@ #root) (array\map (\ node-functor map f))) #tail (|> xs (get@ #tail) (array\map f))})) (structure: #export apply diff --git a/stdlib/source/lux/data/collection/set.lux b/stdlib/source/lux/data/collection/set.lux index 6dd536739..80cdf89a6 100644 --- a/stdlib/source/lux/data/collection/set.lux +++ b/stdlib/source/lux/data/collection/set.lux @@ -71,7 +71,7 @@ (def: &equivalence ..equivalence) (def: (hash (^@ set [hash _])) - (list\fold (function (_ elem acc) (n.+ (:: hash hash elem) acc)) + (list\fold (function (_ elem acc) (n.+ (\ hash hash elem) acc)) 0 (..to-list set)))) diff --git a/stdlib/source/lux/data/collection/set/multi.lux b/stdlib/source/lux/data/collection/set/multi.lux index 46578979d..7e4c0f7fe 100644 --- a/stdlib/source/lux/data/collection/set/multi.lux +++ b/stdlib/source/lux/data/collection/set/multi.lux @@ -129,7 +129,7 @@ (def: (hash (^:representation set)) (let [[hash _] set] (list\fold (function (_ [elem multiplicity] acc) - (|> elem (:: hash hash) (n.+ multiplicity) (n.+ acc))) + (|> elem (\ hash hash) (n.+ multiplicity) (n.+ acc))) 0 (dictionary.entries set))))) ) diff --git a/stdlib/source/lux/data/collection/set/ordered.lux b/stdlib/source/lux/data/collection/set/ordered.lux index f215f5430..d350c1e9c 100644 --- a/stdlib/source/lux/data/collection/set/ordered.lux +++ b/stdlib/source/lux/data/collection/set/ordered.lux @@ -72,8 +72,8 @@ (All [a] (Equivalence (Set a))) (def: (= reference sample) - (:: (list.equivalence (:: (:representation reference) &equivalence)) - = (..to-list reference) (..to-list sample)))) + (\ (list.equivalence (\ (:representation reference) &equivalence)) + = (..to-list reference) (..to-list sample)))) ) (def: #export (sub? super sub) diff --git a/stdlib/source/lux/data/collection/stack.lux b/stdlib/source/lux/data/collection/stack.lux index e9a7f8bf4..398fa71ba 100644 --- a/stdlib/source/lux/data/collection/stack.lux +++ b/stdlib/source/lux/data/collection/stack.lux @@ -52,7 +52,7 @@ (Equivalence (Stack a)))) (def: (= reference subject) - (:: (//.equivalence super) = (:representation reference) (:representation subject)))) + (\ (//.equivalence super) = (:representation reference) (:representation subject)))) (structure: #export functor (Functor Stack) @@ -60,6 +60,6 @@ (def: (map f value) (|> value :representation - (:: //.functor map f) + (\ //.functor map f) :abstraction))) ) diff --git a/stdlib/source/lux/data/collection/tree.lux b/stdlib/source/lux/data/collection/tree.lux index 9519ae0b9..b690e7128 100644 --- a/stdlib/source/lux/data/collection/tree.lux +++ b/stdlib/source/lux/data/collection/tree.lux @@ -63,8 +63,8 @@ (All [a] (-> (Equivalence a) (Equivalence (Tree a)))) (def: (= tx ty) - (and (:: super = (get@ #value tx) (get@ #value ty)) - (:: (list.equivalence (equivalence super)) = (get@ #children tx) (get@ #children ty))))) + (and (\ super = (get@ #value tx) (get@ #value ty)) + (\ (list.equivalence (equivalence super)) = (get@ #children tx) (get@ #children ty))))) (structure: #export functor (Functor Tree) diff --git a/stdlib/source/lux/data/collection/tree/finger.lux b/stdlib/source/lux/data/collection/tree/finger.lux index e120b068a..c3e20ce08 100644 --- a/stdlib/source/lux/data/collection/tree/finger.lux +++ b/stdlib/source/lux/data/collection/tree/finger.lux @@ -43,7 +43,7 @@ (def: (branch left right) (:abstraction {#monoid monoid - #tag (:: monoid compose (..tag left) (..tag right)) + #tag (\ monoid compose (..tag left) (..tag right)) #root (0 #1 [left right])}))) (def: #export (value tree) diff --git a/stdlib/source/lux/data/color.lux b/stdlib/source/lux/data/color.lux index 945f0576c..3673e6cce 100644 --- a/stdlib/source/lux/data/color.lux +++ b/stdlib/source/lux/data/color.lux @@ -69,14 +69,14 @@ (def: &equivalence (structure (def: (= reference sample) - (:: hash = (:representation reference) (:representation sample))))) + (\ hash = (:representation reference) (:representation sample))))) (def: hash - (|>> :representation (:: hash hash)))))) + (|>> :representation (\ hash hash)))))) (def: #export equivalence (Equivalence Color) - (:: ..hash &equivalence)) + (\ ..hash &equivalence)) (def: #export black (..from-rgb {#red 0 diff --git a/stdlib/source/lux/data/format/binary.lux b/stdlib/source/lux/data/format/binary.lux index 692dc37ee..6e70655b0 100644 --- a/stdlib/source/lux/data/format/binary.lux +++ b/stdlib/source/lux/data/format/binary.lux @@ -100,7 +100,7 @@ (def: #export (and pre post) (All [a b] (-> (Writer a) (Writer b) (Writer [a b]))) (function (_ [preV postV]) - (:: ..monoid compose (pre preV) (post postV)))) + (\ ..monoid compose (pre preV) (post postV)))) (def: #export (rec body) (All [a] (-> (-> (Writer a) (Writer a)) (Writer a))) @@ -187,10 +187,10 @@ (^open "specification\.") ..monoid [size mutation] (|> value (row\map valueW) - (:: row.fold fold - (function (_ post pre) - (specification\compose pre post)) - specification\identity))] + (\ row.fold fold + (function (_ post pre) + (specification\compose pre post)) + specification\identity))] [(n.+ <size> size) (function (_ [offset binary]) (try.assume diff --git a/stdlib/source/lux/data/format/css.lux b/stdlib/source/lux/data/format/css.lux index 31daa7462..d172c7742 100644 --- a/stdlib/source/lux/data/format/css.lux +++ b/stdlib/source/lux/data/format/css.lux @@ -45,8 +45,8 @@ (-> Font (CSS Special)) (let [with-unicode (case (get@ #/font.unicode-range font) (#.Some unicode-range) - (let [unicode-range' (format "U+" (:: nat.hex encode (get@ #/font.start unicode-range)) - "-" (:: nat.hex encode (get@ #/font.end unicode-range)))] + (let [unicode-range' (format "U+" (\ nat.hex encode (get@ #/font.start unicode-range)) + "-" (\ nat.hex encode (get@ #/font.end unicode-range)))] (list ["unicode-range" unicode-range'])) #.None diff --git a/stdlib/source/lux/data/format/css/value.lux b/stdlib/source/lux/data/format/css/value.lux index 4bce35214..3691bb2e4 100644 --- a/stdlib/source/lux/data/format/css/value.lux +++ b/stdlib/source/lux/data/format/css/value.lux @@ -831,7 +831,7 @@ (..apply "rgba" (list (%.nat red) (%.nat green) (%.nat blue) - (if (r.= (:: r.interval top) alpha) + (if (r.= (\ r.interval top) alpha) "1.0" (format "0" (%.rev alpha))))))) diff --git a/stdlib/source/lux/data/format/html.lux b/stdlib/source/lux/data/format/html.lux index 62991f6b9..65fb7b1a3 100644 --- a/stdlib/source/lux/data/format/html.lux +++ b/stdlib/source/lux/data/format/html.lux @@ -215,7 +215,7 @@ (def: #export (svg attributes content) (-> Attributes XML Element) (|> content - (:: xml.codec encode) + (\ xml.codec encode) (..raw "svg" attributes))) (type: #export Coord diff --git a/stdlib/source/lux/data/format/json.lux b/stdlib/source/lux/data/format/json.lux index 5f46f997e..04b7a51d1 100644 --- a/stdlib/source/lux/data/format/json.lux +++ b/stdlib/source/lux/data/format/json.lux @@ -172,7 +172,7 @@ (^template [<tag> <struct>] [[(<tag> x') (<tag> y')] - (:: <struct> = x' y')]) + (\ <struct> = x' y')]) ([#Boolean bit.equivalence] [#Number f.equivalence] [#String text.equivalence]) @@ -220,7 +220,7 @@ (-> Number Text) (|>> (case> (^or +0.0 -0.0) "0.0" - value (let [raw (:: f.decimal encode value)] + value (let [raw (\ f.decimal encode value)] (if (f.< +0.0 value) raw (|> raw (text.split 1) maybe.assume product.right)))))) diff --git a/stdlib/source/lux/data/format/tar.lux b/stdlib/source/lux/data/format/tar.lux index c18d81d33..160aab7e4 100644 --- a/stdlib/source/lux/data/format/tar.lux +++ b/stdlib/source/lux/data/format/tar.lux @@ -82,7 +82,7 @@ (let [suffix <suffix> padded-size (n.+ (text.size suffix) <size>)] (|>> :representation - (:: n.octal encode) + (\ n.octal encode) (..octal-padding <size>) (text.suffix suffix) encoding.to-utf8 @@ -131,7 +131,7 @@ _ ..verify-small-suffix] (<>.lift (do {! try.monad} - [value (:: n.octal decode digits)] + [value (\ n.octal decode digits)] (..small value))))) (def: big-parser @@ -146,7 +146,7 @@ (n.= expected end)))] (<>.lift (do {! try.monad} - [value (:: n.octal decode digits)] + [value (\ n.octal decode digits)] (..big value))))) (abstract: Checksum @@ -178,7 +178,7 @@ (|>> ..checksum ..coerce-small ..from-small - (:: n.octal encode) + (\ n.octal encode) (..octal-padding ..small-size) (text.suffix ..checksum-suffix) :abstraction)) @@ -199,7 +199,7 @@ (encoding.from-utf8 ascii)) _ ..verify-small-suffix value (<>.lift - (:: n.octal decode digits))] + (\ n.octal decode digits))] (wrap [value (:abstraction (format digits ..checksum-suffix))]))) ) @@ -321,8 +321,8 @@ _ (<>.assert (exception.construct ..wrong-character [expected end]) (n.= expected end))] (<>.lift - (:: try.monad map (|>> :abstraction) - (encoding.from-utf8 string))))) + (\ try.monad map (|>> :abstraction) + (encoding.from-utf8 string))))) ) (def: block-size Size 512) @@ -503,7 +503,7 @@ (def: mode-parser (Parser Mode) (do {! <>.monad} - [value (:: ! map ..from-small ..small-parser)] + [value (\ ! map ..from-small ..small-parser)] (if (n.<= (:representation ..maximum-mode) value) (wrap (:abstraction value)) @@ -832,15 +832,15 @@ (def: entry-parser (Parser Entry) ($_ <>.either - (:: <>.monad map (|>> #..Normal) - (<>.either (..file-parser ..normal) - (..file-parser ..old-normal))) - (:: <>.monad map (|>> #..Symbolic-Link) - (..file-name-parser ..symbolic-link (get@ #link-name))) - (:: <>.monad map (|>> #..Directory) - (..file-name-parser ..directory (get@ #path))) - (:: <>.monad map (|>> #..Contiguous) - (..file-parser ..contiguous)))) + (\ <>.monad map (|>> #..Normal) + (<>.either (..file-parser ..normal) + (..file-parser ..old-normal))) + (\ <>.monad map (|>> #..Symbolic-Link) + (..file-name-parser ..symbolic-link (get@ #link-name))) + (\ <>.monad map (|>> #..Directory) + (..file-name-parser ..directory (get@ #path))) + (\ <>.monad map (|>> #..Contiguous) + (..file-parser ..contiguous)))) ## It's safe to implement the parser this way because the range of values for Nat is 2^64 ## Whereas the maximum possible value for the checksum of a 512 block is (256 × 512) = 131,072 @@ -867,5 +867,5 @@ (def: #export parser (Parser Tar) (|> (<>.some entry-parser) - (:: <>.monad map row.from-list) + (\ <>.monad map row.from-list) (<>.before ..end-of-archive-parser))) diff --git a/stdlib/source/lux/data/format/xml.lux b/stdlib/source/lux/data/format/xml.lux index 512438c56..f37a300a9 100644 --- a/stdlib/source/lux/data/format/xml.lux +++ b/stdlib/source/lux/data/format/xml.lux @@ -111,7 +111,7 @@ (def: attrs^ (Parser Attrs) - (<| (:: <>.monad map (dictionary.from-list name.hash)) + (<| (\ <>.monad map (dictionary.from-list name.hash)) <>.some (<>.and (spaced^ attr-name^)) (<>.after (<text>.this "=")) @@ -257,7 +257,7 @@ [(#Node reference/tag reference/attrs reference/children) (#Node sample/tag sample/attrs sample/children)] (and (name\= reference/tag sample/tag) - (:: (dictionary.equivalence text.equivalence) = reference/attrs sample/attrs) + (\ (dictionary.equivalence text.equivalence) = reference/attrs sample/attrs) (n.= (list.size reference/children) (list.size sample/children)) (|> (list.zip/2 reference/children sample/children) diff --git a/stdlib/source/lux/data/maybe.lux b/stdlib/source/lux/data/maybe.lux index 0dcb32b6e..7b6f3ace4 100644 --- a/stdlib/source/lux/data/maybe.lux +++ b/stdlib/source/lux/data/maybe.lux @@ -73,7 +73,7 @@ #1 [(#.Some x) (#.Some y)] - (:: super = x y) + (\ super = x y) _ #0))) @@ -82,7 +82,7 @@ (All [a] (-> (Hash a) (Hash (Maybe a)))) (def: &equivalence - (..equivalence (:: super &equivalence))) + (..equivalence (\ super &equivalence))) (def: (hash value) (case value @@ -90,14 +90,14 @@ 2 (#.Some value) - (.nat ("lux i64 *" (.int 3) (.int (:: super hash value))))))) + (.nat ("lux i64 *" (.int 3) (.int (\ super hash value))))))) (structure: #export (with monad) (All [M] (-> (Monad M) (Monad (All [a] (M (Maybe a)))))) (def: &functor (functor.compose (get@ #monad.&functor monad) ..functor)) - (def: wrap (|>> (:: ..monad wrap) (:: monad wrap))) + (def: wrap (|>> (\ ..monad wrap) (\ monad wrap))) (def: (join MmMma) (do monad @@ -111,7 +111,7 @@ (def: #export (lift monad) (All [M a] (-> (Monad M) (-> (M a) (M (Maybe a))))) - (:: monad map (:: ..monad wrap))) + (\ monad map (\ ..monad wrap))) (macro: #export (default tokens state) {#.doc (doc "Allows you to provide a default value that will be used" diff --git a/stdlib/source/lux/data/name.lux b/stdlib/source/lux/data/name.lux index 6d344893c..c9a32cf6a 100644 --- a/stdlib/source/lux/data/name.lux +++ b/stdlib/source/lux/data/name.lux @@ -27,7 +27,7 @@ (def: #export equivalence (Equivalence Name) - (:: ..hash &equivalence)) + (\ ..hash &equivalence)) (structure: #export order (Order Name) @@ -35,8 +35,8 @@ (def: &equivalence ..equivalence) (def: (< [moduleP shortP] [moduleS shortS]) (if (text\= moduleP moduleS) - (:: text.order < shortP shortS) - (:: text.order < moduleP moduleS)))) + (\ text.order < shortP shortS) + (\ text.order < moduleP moduleS)))) (structure: #export codec (Codec Text Name) diff --git a/stdlib/source/lux/data/number.lux b/stdlib/source/lux/data/number.lux index 48a931637..4ac7ed07b 100644 --- a/stdlib/source/lux/data/number.lux +++ b/stdlib/source/lux/data/number.lux @@ -49,20 +49,20 @@ (if (comma-prefixed? repr') (#try.Failure <error>) (let [repr (clean-commas repr')] - (case (:: <nat> decode repr) + (case (\ <nat> decode repr) (#try.Success value) (#try.Success [state (list [meta (#.Nat value)])]) (^multi (#try.Failure _) - [(:: <int> decode repr) (#try.Success value)]) + [(\ <int> decode repr) (#try.Success value)]) (#try.Success [state (list [meta (#.Int value)])]) (^multi (#try.Failure _) - [(:: <rev> decode repr) (#try.Success value)]) + [(\ <rev> decode repr) (#try.Success value)]) (#try.Success [state (list [meta (#.Rev value)])]) (^multi (#try.Failure _) - [(:: <frac> decode repr) (#try.Success value)]) + [(\ <frac> decode repr) (#try.Success value)]) (#try.Success [state (list [meta (#.Frac value)])]) _ diff --git a/stdlib/source/lux/data/number/frac.lux b/stdlib/source/lux/data/number/frac.lux index fed714fee..d8bc34f93 100644 --- a/stdlib/source/lux/data/number/frac.lux +++ b/stdlib/source/lux/data/number/frac.lux @@ -235,7 +235,7 @@ ) (template [<hex> <name>] - [(def: <name> (|> <hex> (:: //nat.hex decode) try.assume .i64))] + [(def: <name> (|> <hex> (\ //nat.hex decode) try.assume .i64))] ["7FF7FFFFFFFFFFFF" not-a-number-bits] ["7FF0000000000000" positive-infinity-bits] @@ -342,7 +342,7 @@ (do try.monad [exponent (|> representation ("lux text clip" (//nat.+ 2 split-index) ("lux text size" representation)) - (:: codec decode))] + (\ codec decode))] (wrap [("lux text clip" 0 split-index representation) (//int.* <factor> (.int exponent))]))]) ([+1 (^or [(#.Some split-index) #.None #.None #.None] @@ -367,9 +367,9 @@ 1 "-" 0 "+" _ (undefined)) - (:: <nat> encode (.nat mantissa)) + (\ <nat> encode (.nat mantissa)) ".0E" - (:: <int> encode exponent)))) + (\ <int> encode exponent)))) (def: (decode representation) (let [negative? (text.starts-with? "-" representation) @@ -382,16 +382,16 @@ (do ! [decimal (|> mantissa ("lux text clip" (inc split-index) ("lux text size" mantissa)) - (:: <nat> decode))] + (\ <nat> decode))] (wrap [("lux text clip" 0 split-index mantissa) decimal])) #.None (#try.Failure ("lux text concat" <error> representation))) #let [whole ("lux text clip" 1 ("lux text size" whole) whole)] - mantissa (:: <nat> decode (case decimal - 0 whole - _ ("lux text concat" whole (:: <nat> encode decimal)))) + mantissa (\ <nat> decode (case decimal + 0 whole + _ ("lux text concat" whole (\ <nat> encode decimal)))) #let [sign (if negative? 1 0)]] (wrap (..from-bits ($_ //i64.or diff --git a/stdlib/source/lux/data/number/int.lux b/stdlib/source/lux/data/number/int.lux index f2bcdfeb9..38a0dc63a 100644 --- a/stdlib/source/lux/data/number/int.lux +++ b/stdlib/source/lux/data/number/int.lux @@ -181,8 +181,8 @@ [addition ..+ +0] [multiplication ..* +1] - [maximum ..max (:: ..interval bottom)] - [minimum ..min (:: ..interval top)] + [maximum ..max (\ ..interval bottom)] + [minimum ..min (\ ..interval top)] ) (def: (sign!! value) diff --git a/stdlib/source/lux/data/number/nat.lux b/stdlib/source/lux/data/number/nat.lux index dd5e52ad1..f6d5fa19c 100644 --- a/stdlib/source/lux/data/number/nat.lux +++ b/stdlib/source/lux/data/number/nat.lux @@ -191,8 +191,8 @@ [addition ..+ 0] [multiplication ..* 1] - [minimum ..min (:: ..interval top)] - [maximum ..max (:: ..interval bottom)] + [minimum ..min (\ ..interval top)] + [maximum ..max (\ ..interval bottom)] ) (def: #export (binary-character value) diff --git a/stdlib/source/lux/data/number/rev.lux b/stdlib/source/lux/data/number/rev.lux index 6345cf02d..a52be16a4 100644 --- a/stdlib/source/lux/data/number/rev.lux +++ b/stdlib/source/lux/data/number/rev.lux @@ -199,7 +199,7 @@ [(structure: #export <name> (Monoid Rev) - (def: identity (:: interval <identity>)) + (def: identity (\ interval <identity>)) (def: compose <compose>))] [addition ..+ bottom] @@ -217,7 +217,7 @@ (Codec Text Rev) (def: (encode value) - (let [raw-output (:: <codec> encode (:coerce Nat value)) + (let [raw-output (\ <codec> encode (:coerce Nat value)) max-num-chars (//nat.+ (//nat./ <char-bit-size> 64) (case (//nat.% <char-bit-size> 64) 0 0 @@ -238,7 +238,7 @@ (if (//nat.> 1 repr-size) (case ("lux text char" 0 repr) (^ (char ".")) - (case (:: <codec> decode (de-prefix repr)) + (case (\ <codec> decode (de-prefix repr)) (#try.Success output) (#try.Success (:coerce Rev output)) @@ -319,7 +319,7 @@ (recur (dec idx) #0 ("lux text concat" - (:: //nat.decimal encode digit) + (\ //nat.decimal encode digit) output)))) (if all-zeroes? "0" diff --git a/stdlib/source/lux/data/product.lux b/stdlib/source/lux/data/product.lux index f9d598433..c458a4881 100644 --- a/stdlib/source/lux/data/product.lux +++ b/stdlib/source/lux/data/product.lux @@ -54,8 +54,8 @@ (-> (Equivalence l) (Equivalence r) (Equivalence (& l r)))) (def: (= [lP rP] [lS rS]) - (and (:: leftE = lP lS) - (:: rightE = rP rS)))) + (and (\ leftE = lP lS) + (\ rightE = rP rS)))) (structure: #export (hash leftH rightH) (All [l r] @@ -63,10 +63,10 @@ (Hash (& l r)))) (def: &equivalence - (..equivalence (:: leftH &equivalence) - (:: rightH &equivalence))) + (..equivalence (\ leftH &equivalence) + (\ rightH &equivalence))) (def: (hash [left right]) ("lux i64 +" - (:: leftH hash left) - (:: rightH hash right)))) + (\ leftH hash left) + (\ rightH hash right)))) diff --git a/stdlib/source/lux/data/store.lux b/stdlib/source/lux/data/store.lux index fa3e45f00..9c2660a32 100644 --- a/stdlib/source/lux/data/store.lux +++ b/stdlib/source/lux/data/store.lux @@ -20,7 +20,7 @@ (def: (map f fa) (extend (function (_ store) - (f (:: store peek (:: store cursor)))) + (f (\ store peek (\ store cursor)))) fa))) (structure: #export comonad @@ -28,22 +28,22 @@ (def: &functor ..functor) - (def: (unwrap wa) (::: peek (::: cursor))) + (def: (unwrap wa) (\\ peek (\\ cursor))) (def: split (extend id))) (def: #export (peeks trans store) (All [s a] (-> (-> s s) (Store s a) a)) - (|> (::: cursor) trans (::: peek))) + (|> (\\ cursor) trans (\\ peek))) (def: #export (seek cursor store) (All [s a] (-> s (Store s a) (Store s a))) - (:: (::: split store) peek cursor)) + (\ (\\ split store) peek cursor)) (def: #export (seeks change store) (All [s a] (-> (-> s s) (Store s a) (Store s a))) - (|> store (::: split) (peeks change))) + (|> store (\\ split) (peeks change))) (def: #export (experiment Functor<f> change store) (All [f s a] (-> (Functor f) (-> s (f s)) (Store s a) (f a))) - (:: Functor<f> map (::: peek) (change (::: cursor)))) + (\ Functor<f> map (\\ peek) (change (\\ cursor)))) diff --git a/stdlib/source/lux/data/text/format.lux b/stdlib/source/lux/data/text/format.lux index 34aaaaf4e..5d6bdf07f 100644 --- a/stdlib/source/lux/data/text/format.lux +++ b/stdlib/source/lux/data/text/format.lux @@ -55,31 +55,31 @@ (Format <type>) <formatter>)] - [bit Bit (:: bit.codec encode)] - [nat Nat (:: nat.decimal encode)] - [int Int (:: int.decimal encode)] - [rev Rev (:: rev.decimal encode)] - [frac Frac (:: frac.decimal encode)] - [ratio ratio.Ratio (:: ratio.codec encode)] + [bit Bit (\ bit.codec encode)] + [nat Nat (\ nat.decimal encode)] + [int Int (\ int.decimal encode)] + [rev Rev (\ rev.decimal encode)] + [frac Frac (\ frac.decimal encode)] + [ratio ratio.Ratio (\ ratio.codec encode)] [text Text text.encode] - [name Name (:: name.codec encode)] + [name Name (\ name.codec encode)] [code Code code.format] [type Type type.format] - [bin Nat (:: nat.binary encode)] - [oct Nat (:: nat.octal encode)] - [hex Nat (:: nat.hex encode)] - [xml xml.XML (:: xml.codec encode)] - [json json.JSON (:: json.codec encode)] - [instant instant.Instant (:: instant.codec encode)] - [duration duration.Duration (:: duration.codec encode)] - [date date.Date (:: date.codec encode)] + [bin Nat (\ nat.binary encode)] + [oct Nat (\ nat.octal encode)] + [hex Nat (\ nat.hex encode)] + [xml xml.XML (\ xml.codec encode)] + [json json.JSON (\ json.codec encode)] + [instant instant.Instant (\ instant.codec encode)] + [duration duration.Duration (\ duration.codec encode)] + [date date.Date (\ date.codec encode)] [location Location location.format] ) (def: #export (mod modular) (All [m] (Format (modular.Mod m))) (let [[_ modulus] (modular.un-mod modular)] - (:: (modular.codec modulus) encode modular))) + (\ (modular.codec modulus) encode modular))) (def: #export (list formatter) (All [a] (-> (Format a) (Format (List a)))) diff --git a/stdlib/source/lux/data/text/regex.lux b/stdlib/source/lux/data/text/regex.lux index 863916776..bd2d8133a 100644 --- a/stdlib/source/lux/data/text/regex.lux +++ b/stdlib/source/lux/data/text/regex.lux @@ -84,9 +84,9 @@ (def: re-range^ (Parser Code) (do {! <>.monad} - [from (|> regex-char^ (:: ! map (|>> (//.nth 0) maybe.assume))) + [from (|> regex-char^ (\ ! map (|>> (//.nth 0) maybe.assume))) _ (<t>.this "-") - to (|> regex-char^ (:: ! map (|>> (//.nth 0) maybe.assume)))] + to (|> regex-char^ (\ ! map (|>> (//.nth 0) maybe.assume)))] (wrap (` (<t>.range (~ (code.nat from)) (~ (code.nat to))))))) (def: re-char^ @@ -282,7 +282,7 @@ [idx names (list& (list g!temp complex - (' #let) (` [(~ g!total) (:: (~! //.monoid) (~' compose) (~ g!total) (~ g!temp))])) + (' #let) (` [(~ g!total) (\ (~! //.monoid) (~' compose) (~ g!total) (~ g!temp))])) steps)] (#.Right [(#Capturing [?name num-captures]) scoped]) @@ -298,7 +298,7 @@ [idx! (list& name! names) (list& (list name! scoped - (' #let) (` [(~ g!total) (:: (~! //.monoid) (~' compose) (~ g!total) (~ access))])) + (' #let) (` [(~ g!total) (\ (~! //.monoid) (~' compose) (~ g!total) (~ access))])) steps)]) ))) [0 @@ -316,7 +316,7 @@ (def: (unflatten^ lexer) (-> (Parser Text) (Parser [Text Any])) - (<>.and lexer (:: <>.monad wrap []))) + (<>.and lexer (\ <>.monad wrap []))) (def: (|||^ left right) (All [l r] (-> (Parser [Text l]) (Parser [Text r]) (Parser [Text (| l r)]))) @@ -398,7 +398,7 @@ (def: (regex^ current-module) (-> Text (Parser Code)) - (:: <>.monad map product.right (re-alternative^ #1 re-scoped^ current-module))) + (\ <>.monad map product.right (re-alternative^ #1 re-scoped^ current-module))) (syntax: #export (regex {pattern <c>.text}) {#.doc (doc "Create lexers using regular-expression syntax." diff --git a/stdlib/source/lux/data/text/unicode.lux b/stdlib/source/lux/data/text/unicode.lux index 25f213a98..ff0a8a507 100644 --- a/stdlib/source/lux/data/text/unicode.lux +++ b/stdlib/source/lux/data/text/unicode.lux @@ -27,10 +27,10 @@ right (:representation right)] (:abstraction (interval.between n.enum - (n.min (:: left bottom) - (:: right bottom)) - (n.max (:: left top) - (:: right top))))))) + (n.min (\ left bottom) + (\ right bottom)) + (n.max (\ left top) + (\ right top))))))) (def: #export (segment start end) (-> Char Char Segment) @@ -204,14 +204,14 @@ (def: #export (compose left right) (-> Set Set Set) (:abstraction - (:: builder branch - (:representation left) - (:representation right)))) + (\ builder branch + (:representation left) + (:representation right)))) (def: (singleton segment) (-> Segment Set) (:abstraction - (:: builder leaf segment []))) + (\ builder leaf segment []))) (def: #export (set [head tail]) (-> [Segment (List Segment)] Set) diff --git a/stdlib/source/lux/data/trace.lux b/stdlib/source/lux/data/trace.lux index 94e02ea6b..3467ee5dd 100644 --- a/stdlib/source/lux/data/trace.lux +++ b/stdlib/source/lux/data/trace.lux @@ -28,8 +28,8 @@ {#monoid monoid #trace (function (_ t2) ((get@ #trace wa) - (:: monoid compose t1 t2)))})}))) + (\ monoid compose t1 t2)))})}))) (def: #export (run context tracer) (All [t a] (-> t (Trace t a) a)) - (:: tracer trace context)) + (\ tracer trace context)) diff --git a/stdlib/source/lux/host.js.lux b/stdlib/source/lux/host.js.lux index da2f5a9c5..43e3e90bf 100644 --- a/stdlib/source/lux/host.js.lux +++ b/stdlib/source/lux/host.js.lux @@ -238,9 +238,9 @@ (#Field [static? field fieldT]) (if static? (` ((~! syntax:) ((~ (qualify field))) - (:: (~! meta.monad) (~' wrap) - (list (` (.:coerce (~ (nullable-type fieldT)) - ("js constant" (~ (code.text (format real-class "." field)))))))))) + (\ (~! meta.monad) (~' wrap) + (list (` (.:coerce (~ (nullable-type fieldT)) + ("js constant" (~ (code.text (format real-class "." field)))))))))) (` (def: ((~ (qualify field)) (~ g!object)) (-> (~ g!type) diff --git a/stdlib/source/lux/host.jvm.lux b/stdlib/source/lux/host.jvm.lux index 7dd6140cc..3334e29be 100644 --- a/stdlib/source/lux/host.jvm.lux +++ b/stdlib/source/lux/host.jvm.lux @@ -297,32 +297,32 @@ (-> Primitive-Mode (Type Primitive) Code) (case mode #ManualPrM - (cond (:: type.equivalence = type.boolean type) (` ..Boolean) - (:: type.equivalence = type.byte type) (` ..Byte) - (:: type.equivalence = type.short type) (` ..Short) - (:: type.equivalence = type.int type) (` ..Integer) - (:: type.equivalence = type.long type) (` ..Long) - (:: type.equivalence = type.float type) (` ..Float) - (:: type.equivalence = type.double type) (` ..Double) - (:: type.equivalence = type.char type) (` ..Character) + (cond (\ type.equivalence = type.boolean type) (` ..Boolean) + (\ type.equivalence = type.byte type) (` ..Byte) + (\ type.equivalence = type.short type) (` ..Short) + (\ type.equivalence = type.int type) (` ..Integer) + (\ type.equivalence = type.long type) (` ..Long) + (\ type.equivalence = type.float type) (` ..Float) + (\ type.equivalence = type.double type) (` ..Double) + (\ type.equivalence = type.char type) (` ..Character) ## else (undefined)) #AutoPrM - (cond (:: type.equivalence = type.boolean type) + (cond (\ type.equivalence = type.boolean type) (` .Bit) - (or (:: type.equivalence = type.short type) - (:: type.equivalence = type.byte type) - (:: type.equivalence = type.int type) - (:: type.equivalence = type.long type)) + (or (\ type.equivalence = type.short type) + (\ type.equivalence = type.byte type) + (\ type.equivalence = type.int type) + (\ type.equivalence = type.long type)) (` .Int) - (or (:: type.equivalence = type.float type) - (:: type.equivalence = type.double type)) + (or (\ type.equivalence = type.float type) + (\ type.equivalence = type.double type)) (` .Frac) - (:: type.equivalence = type.char type) + (\ type.equivalence = type.char type) (` .Nat) ## else @@ -584,7 +584,7 @@ (|>> (<>.after (<c>.this! (' <comparison>))) (<>.after ..wildcard^) <c>.tuple - (:: <>.monad map <constructor>)))] + (\ <>.monad map <constructor>)))] [upper^ < type.upper] [lower^ > type.lower] @@ -627,7 +627,7 @@ (def: array^ (-> (Parser (Type Value)) (Parser (Type Array))) (|>> <c>.tuple - (:: <>.monad map type.array))) + (\ <>.monad map type.array))) (def: (type^ type-vars) (-> (List (Type Var)) (Parser (Type Value))) @@ -652,7 +652,7 @@ (def: var^ (Parser (Type Var)) - (:: <>.monad map type.var <c>.local-identifier)) + (\ <>.monad map type.var <c>.local-identifier)) (def: vars^ (Parser (List (Type Var))) @@ -723,7 +723,7 @@ ($_ <>.or (<c>.this! (' #volatile)) (<c>.this! (' #final)) - (:: <>.monad wrap []))) + (\ <>.monad wrap []))) (def: (field-decl^ type-vars) (-> (List (Type Var)) (Parser [Member-Declaration FieldDecl])) @@ -1167,7 +1167,7 @@ (syntax: #export (class: {#let [! <>.monad]} {im inheritance-modifier^} - {[full-class-name class-vars] (:: ! map parser.declaration ..declaration^)} + {[full-class-name class-vars] (\ ! map parser.declaration ..declaration^)} {super (<>.default $Object (class^ class-vars))} {interfaces (<>.default (list) @@ -1224,7 +1224,7 @@ (syntax: #export (interface: {#let [! <>.monad]} - {[full-class-name class-vars] (:: ! map parser.declaration ..declaration^)} + {[full-class-name class-vars] (\ ! map parser.declaration ..declaration^)} {supers (<>.default (list) (<c>.tuple (<>.some (class^ class-vars))))} {annotations ..annotations^} @@ -1413,7 +1413,7 @@ (wrap [arg-inputs input-jvm-types arg-types]))) _ - (:: meta.monad wrap [(list) (list) (list)]))) + (\ meta.monad wrap [(list) (list) (list)]))) (def: (decorate-return-maybe member never-null? unboxed return-term) (-> Import-Member-Declaration Bit (Type Value) Code Code) @@ -1466,7 +1466,7 @@ #AutoPrM (with-expansions [<special+>' (template.splice <special+>) <cond-cases> (template [<old> <new> <pre> <post>] - [(:: type.equivalence = <old> unboxed) + [(\ type.equivalence = <old> unboxed) (with-expansions [<post>' (template.splice <post>)] [<new> (` (.|> (~ raw) (~+ <pre>))) @@ -1700,9 +1700,9 @@ (let [[class-name _] (parser.declaration declaration)] (case (load-class class-name) (#.Right class) - (:: meta.monad wrap (if (interface? class) - #Interface - #Class)) + (\ meta.monad wrap (if (interface? class) + #Interface + #Class)) (#.Left _) (meta.fail (format "Unknown class: " class-name))))) @@ -1770,7 +1770,7 @@ "jvm object cast" "jvm conversion long-to-int"))] (`` (cond (~~ (template [<primitive> <array-op>] - [(:: type.equivalence = <primitive> type) + [(\ type.equivalence = <primitive> type) (wrap (list (` (<array-op> (~ g!size)))))] [type.boolean "jvm array new boolean"] @@ -1793,14 +1793,14 @@ (def: (lux-type->jvm-type type) (-> .Type (Meta (Type Value))) (if (lux-type\= Any type) - (:: meta.monad wrap $Object) + (\ meta.monad wrap $Object) (case type (#.Primitive name params) (`` (cond (~~ (template [<type>] [(text\= (..reflection <type>) name) (case params #.Nil - (:: meta.monad wrap <type>) + (\ meta.monad wrap <type>) _ <failure>)] @@ -1818,7 +1818,7 @@ [(text\= (..reflection (type.array <type>)) name) (case params #.Nil - (:: meta.monad wrap (type.array <type>)) + (\ meta.monad wrap (type.array <type>)) _ <failure>)] @@ -1835,8 +1835,8 @@ (text\= array.type-name name) (case params (#.Cons elementLT #.Nil) - (:: meta.monad map type.array - (lux-type->jvm-type elementLT)) + (\ meta.monad map type.array + (lux-type->jvm-type elementLT)) _ <failure>) @@ -1845,26 +1845,26 @@ (case params #.Nil (let [[_ unprefixed] (maybe.assume (text.split-with descriptor.array-prefix name))] - (:: meta.monad map type.array - (lux-type->jvm-type (#.Primitive unprefixed (list))))) + (\ meta.monad map type.array + (lux-type->jvm-type (#.Primitive unprefixed (list))))) _ <failure>) ## else - (:: meta.monad map (type.class name) - (: (Meta (List (Type Parameter))) - (monad.map meta.monad - (function (_ paramLT) - (do meta.monad - [paramJT (lux-type->jvm-type paramLT)] - (case (parser.parameter? paramJT) - (#.Some paramJT) - (wrap paramJT) - - #.None - <failure>))) - params))))) + (\ meta.monad map (type.class name) + (: (Meta (List (Type Parameter))) + (monad.map meta.monad + (function (_ paramLT) + (do meta.monad + [paramJT (lux-type->jvm-type paramLT)] + (case (parser.parameter? paramJT) + (#.Some paramJT) + (wrap paramJT) + + #.None + <failure>))) + params))))) (#.Apply A F) (case (lux-type.apply (list A) F) @@ -1889,9 +1889,9 @@ [array-type (meta.find-type array-name) array-jvm-type (lux-type->jvm-type array-type) #let [g!extension (code.text (`` (cond (~~ (template [<primitive> <extension>] - [(:: type.equivalence = - (type.array <primitive>) - array-jvm-type) + [(\ type.equivalence = + (type.array <primitive>) + array-jvm-type) <extension>] [type.boolean "jvm array length boolean"] @@ -1930,9 +1930,9 @@ "jvm object cast" "jvm conversion long-to-int"))]] (`` (cond (~~ (template [<primitive> <extension> <box>] - [(:: type.equivalence = - (type.array <primitive>) - array-jvm-type) + [(\ type.equivalence = + (type.array <primitive>) + array-jvm-type) (wrap (list (` (.|> (<extension> (~ g!idx) (~ array)) "jvm object cast" (.: (.primitive (~ (code.text <box>))))))))] @@ -1968,9 +1968,9 @@ "jvm object cast" "jvm conversion long-to-int"))]] (`` (cond (~~ (template [<primitive> <extension> <box>] - [(:: type.equivalence = - (type.array <primitive>) - array-jvm-type) + [(\ type.equivalence = + (type.array <primitive>) + array-jvm-type) (let [g!value (` (.|> (~ value) (.:coerce (.primitive (~ (code.text <box>)))) "jvm object cast"))] diff --git a/stdlib/source/lux/host.old.lux b/stdlib/source/lux/host.old.lux index 896e5758d..8bc8cbea0 100644 --- a/stdlib/source/lux/host.old.lux +++ b/stdlib/source/lux/host.old.lux @@ -671,7 +671,7 @@ ($_ p.or (s.this! (' #volatile)) (s.this! (' #final)) - (:: p.monad wrap []))) + (\ p.monad wrap []))) (def: (field-decl^ type-vars) (-> (List Type-Parameter) (Parser [Member-Declaration FieldDecl])) @@ -1416,7 +1416,7 @@ (wrap [arg-inputs arg-classes arg-types]))) _ - (:: meta.monad wrap [(list) (list) (list)]))) + (\ meta.monad wrap [(list) (list) (list)]))) (def: (decorate-return-maybe member return-term) (-> Import-Member-Declaration Code Code) @@ -1648,9 +1648,9 @@ (let [class-name (sanitize class-name)] (case (load-class class-name) (#.Right class) - (:: meta.monad wrap (if (interface? class) - #Interface - #Class)) + (\ meta.monad wrap (if (interface? class) + #Interface + #Class)) (#.Left _) (meta.fail (format "Unknown class: " class-name))))) @@ -1746,10 +1746,10 @@ (def: (type->class-name type) (-> Type (Meta Text)) (if (type\= Any type) - (:: meta.monad wrap "java.lang.Object") + (\ meta.monad wrap "java.lang.Object") (case type (#.Primitive name params) - (:: meta.monad wrap name) + (\ meta.monad wrap name) (#.Apply A F) (case (type.apply (list A) F) diff --git a/stdlib/source/lux/locale.lux b/stdlib/source/lux/locale.lux index 90d0653df..b8a6b1ec8 100644 --- a/stdlib/source/lux/locale.lux +++ b/stdlib/source/lux/locale.lux @@ -38,7 +38,7 @@ (Equivalence Locale) (def: (= reference sample) - (:: text.equivalence = (:representation reference) (:representation sample)))) + (\ text.equivalence = (:representation reference) (:representation sample)))) (structure: #export hash (Hash Locale) @@ -48,5 +48,5 @@ (def: hash (|>> :representation - (:: text.hash hash)))) + (\ text.hash hash)))) ) diff --git a/stdlib/source/lux/locale/language.lux b/stdlib/source/lux/locale/language.lux index 8aeeb1c51..d26581619 100644 --- a/stdlib/source/lux/locale/language.lux +++ b/stdlib/source/lux/locale/language.lux @@ -564,5 +564,5 @@ (def: hash (|>> ..code - (:: text.hash hash)))) + (\ text.hash hash)))) ) diff --git a/stdlib/source/lux/locale/territory.lux b/stdlib/source/lux/locale/territory.lux index fa313c20c..76ecdf965 100644 --- a/stdlib/source/lux/locale/territory.lux +++ b/stdlib/source/lux/locale/territory.lux @@ -307,5 +307,5 @@ (def: hash (|>> :representation (get@ #long) - (:: text.hash hash)))) + (\ text.hash hash)))) ) diff --git a/stdlib/source/lux/macro/code.lux b/stdlib/source/lux/macro/code.lux index 839084537..40b9763bd 100644 --- a/stdlib/source/lux/macro/code.lux +++ b/stdlib/source/lux/macro/code.lux @@ -66,7 +66,7 @@ (case [x y] (^template [<tag> <eq>] [[[_ (<tag> x')] [_ (<tag> y')]] - (:: <eq> = x' y')]) + (\ <eq> = x' y')]) ([#.Bit bit.equivalence] [#.Nat nat.equivalence] [#.Int int.equivalence] @@ -78,13 +78,13 @@ (^template [<tag>] [[[_ (<tag> xs')] [_ (<tag> ys')]] - (:: (list.equivalence =) = xs' ys')]) + (\ (list.equivalence =) = xs' ys')]) ([#.Form] [#.Tuple]) [[_ (#.Record xs')] [_ (#.Record ys')]] - (:: (list.equivalence (equivalence.product = =)) - = xs' ys') + (\ (list.equivalence (equivalence.product = =)) + = xs' ys') _ #0))) @@ -94,7 +94,7 @@ (case ast (^template [<tag> <struct>] [[_ (<tag> value)] - (:: <struct> encode value)]) + (\ <struct> encode value)]) ([#.Bit bit.codec] [#.Nat nat.decimal] [#.Int int.decimal] @@ -106,7 +106,7 @@ (text.encode value) [_ (#.Tag name)] - (text\compose "#" (:: name.codec encode name)) + (text\compose "#" (\ name.codec encode name)) (^template [<tag> <open> <close>] [[_ (<tag> members)] @@ -139,7 +139,7 @@ (def: #export (replace original substitute ast) {#.doc "Replaces all code that looks like the 'original' with the 'substitute'."} (-> Code Code Code Code) - (if (:: ..equivalence = original ast) + (if (\ ..equivalence = original ast) substitute (case ast (^template [<tag>] diff --git a/stdlib/source/lux/math/random.lux b/stdlib/source/lux/math/random.lux index e8a8d3263..44bded416 100644 --- a/stdlib/source/lux/math/random.lux +++ b/stdlib/source/lux/math/random.lux @@ -128,7 +128,7 @@ (template [<name> <type> <cast>] [(def: #export <name> (Random <type>) - (:: ..monad map <cast> ..i64))] + (\ ..monad map <cast> ..i64))] [nat Nat .nat] [int Int .int] @@ -137,17 +137,17 @@ (def: #export frac (Random Frac) - (:: ..monad map (|>> .i64 f.from-bits) ..nat)) + (\ ..monad map (|>> .i64 f.from-bits) ..nat)) (def: #export safe-frac (Random Frac) (let [mantissa-range (.int (i64.left-shift 53 1)) mantissa-max (i.frac (dec mantissa-range))] - (:: ..monad map - (|>> (i.% mantissa-range) - i.frac - (f./ mantissa-max)) - ..int))) + (\ ..monad map + (|>> (i.% mantissa-range) + i.frac + (f./ mantissa-max)) + ..int))) (def: #export (char set) (-> unicode.Set (Random Char)) @@ -156,13 +156,13 @@ in-range (: (-> Char Char) (|>> (n.% size) (n.+ start)))] (|> ..nat - (:: ..monad map in-range) + (\ ..monad map in-range) (..filter (unicode.member? set))))) (def: #export (text char-gen size) (-> (Random Char) Nat (Random Text)) (if (n.= 0 size) - (:: ..monad wrap "") + (\ ..monad wrap "") (do ..monad [x char-gen xs (text char-gen (dec size))] @@ -248,7 +248,7 @@ [x value-gen xs (<name> (dec size) value-gen)] (wrap (<plus> x xs))) - (:: ..monad wrap <zero>)))] + (\ ..monad wrap <zero>)))] [list List (.list) #.Cons] [row Row row.empty row.add] @@ -278,7 +278,7 @@ (if (n.= size (set.size xs+)) (wrap xs+) (recur []))))) - (:: ..monad wrap (set.new Hash<a>)))) + (\ ..monad wrap (set.new Hash<a>)))) (def: #export (dictionary Hash<a> size key-gen value-gen) (All [k v] (-> (Hash k) Nat (Random k) (Random v) (Random (Dictionary k v)))) @@ -293,19 +293,19 @@ (if (n.= size (dictionary.size kv+)) (wrap kv+) (recur []))))) - (:: ..monad wrap (dictionary.new Hash<a>)))) + (\ ..monad wrap (dictionary.new Hash<a>)))) (def: #export instant (Random Instant) - (:: ..monad map instant.from-millis ..int)) + (\ ..monad map instant.from-millis ..int)) (def: #export date (Random Date) - (:: ..monad map instant.date ..instant)) + (\ ..monad map instant.date ..instant)) (def: #export duration (Random Duration) - (:: ..monad map duration.from-millis ..int)) + (\ ..monad map duration.from-millis ..int)) (def: #export month (Random Month) diff --git a/stdlib/source/lux/meta.lux b/stdlib/source/lux/meta.lux index 248cef7f2..82fa1e10f 100644 --- a/stdlib/source/lux/meta.lux +++ b/stdlib/source/lux/meta.lux @@ -189,7 +189,7 @@ (wrap [module-name name])) _ - (:: ..monad wrap name))) + (\ ..monad wrap name))) (def: #export (find-macro full-name) (-> Name (Meta (Maybe Macro))) @@ -213,10 +213,10 @@ ((:coerce Macro' macro) args) #.None - (:: ..monad wrap (list syntax)))) + (\ ..monad wrap (list syntax)))) _ - (:: ..monad wrap (list syntax)))) + (\ ..monad wrap (list syntax)))) (def: #export (expand syntax) {#.doc (doc "Given code that requires applying a macro, expands repeatedly until no more direct macro-calls are left." @@ -234,10 +234,10 @@ (wrap (list\join expansion'))) #.None - (:: ..monad wrap (list syntax)))) + (\ ..monad wrap (list syntax)))) _ - (:: ..monad wrap (list syntax)))) + (\ ..monad wrap (list syntax)))) (def: #export (expand-all syntax) {#.doc "Expands all macro-calls everywhere recursively, until only primitive/base code remains."} @@ -270,7 +270,7 @@ (wrap (list (code.tuple (list\join members'))))) _ - (:: ..monad wrap (list syntax)))) + (\ ..monad wrap (list syntax)))) (def: #export count (Meta Nat) @@ -285,7 +285,7 @@ (do ..monad [id ..count] (wrap (|> id - (:: n.decimal encode) + (\ n.decimal encode) ($_ text\compose "__gensym__" prefix) [""] code.identifier)))) @@ -293,7 +293,7 @@ (-> Code (Meta Text)) (case ast [_ (#.Identifier [_ name])] - (:: ..monad wrap name) + (\ ..monad wrap name) _ (fail (text\compose "Code is not a local identifier: " (code.format ast))))) @@ -382,7 +382,7 @@ (#try.Success [compiler type']))) _ - (:: ..monad wrap type))) + (\ ..monad wrap type))) (def: #export (find-var-type name) {#.doc "Looks-up the type of a local variable somewhere in the environment."} @@ -507,15 +507,15 @@ (def: #export (definitions module) {#.doc "The entire list of definitions in a module (including the non-exported/private ones)."} (-> Text (Meta (List [Text Definition]))) - (:: ..monad map - (list.all (function (_ [name global]) - (case global - (#.Left de-aliased) - #.None - - (#.Right definition) - (#.Some [name definition])))) - (..globals module))) + (\ ..monad map + (list.all (function (_ [name global]) + (case global + (#.Left de-aliased) + #.None + + (#.Right definition) + (#.Some [name definition])))) + (..globals module))) (def: #export (exports module-name) {#.doc "All the exported definitions in a module."} diff --git a/stdlib/source/lux/target/jvm/bytecode.lux b/stdlib/source/lux/target/jvm/bytecode.lux index 80121e692..af843c6cf 100644 --- a/stdlib/source/lux/target/jvm/bytecode.lux +++ b/stdlib/source/lux/target/jvm/bytecode.lux @@ -92,7 +92,7 @@ (do try.monad [[left-exceptions left-instruction] (left resolver) [right-exceptions right-instruction] (right resolver)] - (wrap [(:: row.monoid compose left-exceptions right-exceptions) + (wrap [(\ row.monoid compose left-exceptions right-exceptions) (_\compose left-instruction right-instruction)])))))) (type: #export (Bytecode a) @@ -579,7 +579,7 @@ (-> Nat (Bytecode Register)) (case (//unsigned.u1 id) (#try.Success register) - (:: ..monad wrap register) + (\ ..monad wrap register) (#try.Failure error) (..throw ..invalid-register [id]))) @@ -690,16 +690,16 @@ (def: (jump @from @to) (-> Address Address (Try Any-Jump)) (do {! try.monad} - [jump (:: ! map //signed.value - (/address.jump @from @to))] + [jump (\ ! map //signed.value + (/address.jump @from @to))] (let [big? (n.> (//unsigned.value //unsigned.maximum/2) (.nat (i.* (if (i.>= +0 jump) +1 -1) jump)))] (if big? - (:: ! map (|>> #.Left) (//signed.s4 jump)) - (:: ! map (|>> #.Right) (//signed.s2 jump)))))) + (\ ! map (|>> #.Left) (//signed.s4 jump)) + (\ ! map (|>> #.Right) (//signed.s2 jump)))))) (exception: #export (unset-label {label Label}) (exception.report @@ -747,7 +747,7 @@ (do try.monad [[expected @to] (..resolve-label label resolver) _ (exception.assert ..mismatched-environments [(name-of <instruction>) label @here expected actual] - (:: /stack.equivalence = expected actual)) + (\ /stack.equivalence = expected actual)) jump (..jump @from @to)] (case jump (#.Left jump) @@ -798,7 +798,7 @@ (#.Some [expected (#.Some @to)]) (do try.monad [_ (exception.assert ..mismatched-environments [(name-of <instruction>) label @here expected actual] - (:: /stack.equivalence = expected actual)) + (\ /stack.equivalence = expected actual)) jump (..jump @from @to)] (case jump (#.Left jump) @@ -860,9 +860,9 @@ (wrap [@default @at-minimum @afterwards])) (#.Some [@default @at-minimum @afterwards]) (do {! try.monad} - [>default (:: ! map ..big-jump (..jump @from @default)) - >at-minimum (:: ! map ..big-jump (..jump @from @at-minimum)) - >afterwards (monad.map ! (|>> (..jump @from) (:: ! map ..big-jump)) + [>default (\ ! map ..big-jump (..jump @from @default)) + >at-minimum (\ ! map ..big-jump (..jump @from @at-minimum)) + >afterwards (monad.map ! (|>> (..jump @from) (\ ! map ..big-jump)) @afterwards)] (wrap [..no-exceptions (bytecode minimum >default [>at-minimum >afterwards])])) @@ -902,10 +902,10 @@ (wrap [@default @cases])) (#.Some [@default @cases]) (do {! try.monad} - [>default (:: ! map ..big-jump (..jump @from @default)) + [>default (\ ! map ..big-jump (..jump @from @default)) >cases (|> @cases - (monad.map ! (|>> (..jump @from) (:: ! map ..big-jump))) - (:: ! map (|>> (list.zip/2 (list\map product.left cases)))))] + (monad.map ! (|>> (..jump @from) (\ ! map ..big-jump))) + (\ ! map (|>> (list.zip/2 (list\map product.left cases)))))] (wrap [..no-exceptions (bytecode >default >cases)])) #.None diff --git a/stdlib/source/lux/target/jvm/bytecode/address.lux b/stdlib/source/lux/target/jvm/bytecode/address.lux index be848db29..9f003db8d 100644 --- a/stdlib/source/lux/target/jvm/bytecode/address.lux +++ b/stdlib/source/lux/target/jvm/bytecode/address.lux @@ -36,7 +36,7 @@ (-> U2 (-> Address (Try Address))) (|>> :representation (///unsigned.+/2 distance) - (:: try.functor map (|>> :abstraction)))) + (\ try.functor map (|>> :abstraction)))) (def: with-sign (-> Address (Try S4)) @@ -58,9 +58,9 @@ (Equivalence Address) (def: (= reference subject) - (:: ///unsigned.equivalence = - (:representation reference) - (:representation subject)))) + (\ ///unsigned.equivalence = + (:representation reference) + (:representation subject)))) (def: #export writer (Writer Address) diff --git a/stdlib/source/lux/target/jvm/bytecode/environment.lux b/stdlib/source/lux/target/jvm/bytecode/environment.lux index 7ebacf5de..7d70bdd81 100644 --- a/stdlib/source/lux/target/jvm/bytecode/environment.lux +++ b/stdlib/source/lux/target/jvm/bytecode/environment.lux @@ -71,7 +71,7 @@ (-> Stack Environment (Try [Stack Environment])) (case (get@ #..stack environment) (#.Some actual) - (if (:: /stack.equivalence = expected actual) + (if (\ /stack.equivalence = expected actual) (#try.Success [actual environment]) (exception.throw ..mismatched-stacks [expected actual])) diff --git a/stdlib/source/lux/target/jvm/bytecode/environment/limit/registry.lux b/stdlib/source/lux/target/jvm/bytecode/environment/limit/registry.lux index 0550897db..a0b8b67ab 100644 --- a/stdlib/source/lux/target/jvm/bytecode/environment/limit/registry.lux +++ b/stdlib/source/lux/target/jvm/bytecode/environment/limit/registry.lux @@ -57,9 +57,9 @@ (def: #export equivalence (Equivalence Registry) - (:: equivalence.functor map - (|>> :representation) - /////unsigned.equivalence)) + (\ equivalence.functor map + (|>> :representation) + /////unsigned.equivalence)) (def: #export writer (Writer Registry) diff --git a/stdlib/source/lux/target/jvm/bytecode/environment/limit/stack.lux b/stdlib/source/lux/target/jvm/bytecode/environment/limit/stack.lux index 9d9822e5b..e561d2a04 100644 --- a/stdlib/source/lux/target/jvm/bytecode/environment/limit/stack.lux +++ b/stdlib/source/lux/target/jvm/bytecode/environment/limit/stack.lux @@ -30,9 +30,9 @@ (def: #export equivalence (Equivalence Stack) - (:: equivalence.functor map - (|>> :representation) - /////unsigned.equivalence)) + (\ equivalence.functor map + (|>> :representation) + /////unsigned.equivalence)) (def: #export writer (Writer Stack) @@ -47,7 +47,7 @@ (-> U2 (-> Stack (Try Stack))) (|>> :representation (<op> amount) - (:: try.functor map ..stack)))] + (\ try.functor map ..stack)))] [/////unsigned.+/2 push] [/////unsigned.-/2 pop] diff --git a/stdlib/source/lux/target/jvm/bytecode/instruction.lux b/stdlib/source/lux/target/jvm/bytecode/instruction.lux index eac3f8651..f72314163 100644 --- a/stdlib/source/lux/target/jvm/bytecode/instruction.lux +++ b/stdlib/source/lux/target/jvm/bytecode/instruction.lux @@ -603,8 +603,8 @@ tableswitch-size (try.assume (do {! try.monad} [size (///unsigned.u2 size)] - (:: ! map (|>> estimator ///unsigned.value) - (//address.move size //address.start)))) + (\ ! map (|>> estimator ///unsigned.value) + (//address.move size //address.start)))) tableswitch-mutation (: Mutation (function (_ [offset binary]) [(n.+ tableswitch-size offset) @@ -667,8 +667,8 @@ lookupswitch-size (try.assume (do {! try.monad} [size (///unsigned.u2 size)] - (:: ! map (|>> estimator ///unsigned.value) - (//address.move size //address.start)))) + (\ ! map (|>> estimator ///unsigned.value) + (//address.move size //address.start)))) lookupswitch-mutation (: Mutation (function (_ [offset binary]) [(n.+ lookupswitch-size offset) diff --git a/stdlib/source/lux/target/jvm/constant.lux b/stdlib/source/lux/target/jvm/constant.lux index c58608867..8cac4b1c6 100644 --- a/stdlib/source/lux/target/jvm/constant.lux +++ b/stdlib/source/lux/target/jvm/constant.lux @@ -49,9 +49,9 @@ (def: #export class-equivalence (Equivalence Class) - (:: equivalence.functor map - ..index - //index.equivalence)) + (\ equivalence.functor map + ..index + //index.equivalence)) (def: class-writer (Writer Class) @@ -89,9 +89,9 @@ (All [kind] (-> (Equivalence kind) (Equivalence (Value kind)))) - (:: equivalence.functor map - (|>> :representation) - Equivalence<kind>)) + (\ equivalence.functor map + (|>> :representation) + Equivalence<kind>)) (template [<constructor> <type> <marker>] [(type: #export <type> (Value <marker>)) @@ -178,7 +178,7 @@ (case [reference sample] (^template [<tag> <equivalence>] [[(<tag> reference) (<tag> sample)] - (:: <equivalence> = reference sample)]) + (\ <equivalence> = reference sample)]) ([#UTF8 text.equivalence] [#Integer (..value-equivalence i32.equivalence)] [#Long (..value-equivalence int.equivalence)] diff --git a/stdlib/source/lux/target/jvm/constant/pool.lux b/stdlib/source/lux/target/jvm/constant/pool.lux index b47eb51ab..44de4ea29 100644 --- a/stdlib/source/lux/target/jvm/constant/pool.lux +++ b/stdlib/source/lux/target/jvm/constant/pool.lux @@ -56,7 +56,7 @@ (#try.Success entry) (case entry [index (<tag> reference)] - (if (:: <equivalence> = reference <value>') + (if (\ <equivalence> = reference <value>') (#try.Success [[current pool] index]) <try-again>) @@ -72,7 +72,7 @@ (|> current //index.value (//unsigned.+/2 @new) - (:: ! map //index.index)))] + (\ ! map //index.index)))] (wrap [[next (row.add [current new] pool)] current]))))))))) diff --git a/stdlib/source/lux/target/jvm/index.lux b/stdlib/source/lux/target/jvm/index.lux index eb0357b66..c4f0ec9d1 100644 --- a/stdlib/source/lux/target/jvm/index.lux +++ b/stdlib/source/lux/target/jvm/index.lux @@ -27,9 +27,9 @@ (def: #export equivalence (All [kind] (Equivalence (Index kind))) - (:: equivalence.functor map - ..value - //unsigned.equivalence)) + (\ equivalence.functor map + ..value + //unsigned.equivalence)) (def: #export writer (All [kind] (Writer (Index kind))) diff --git a/stdlib/source/lux/target/jvm/method.lux b/stdlib/source/lux/target/jvm/method.lux index 2fcf44784..3d0e9c907 100644 --- a/stdlib/source/lux/target/jvm/method.lux +++ b/stdlib/source/lux/target/jvm/method.lux @@ -58,7 +58,7 @@ @descriptor (//constant/pool.descriptor (//type.descriptor type)) attributes (|> attributes (monad.seq !) - (:: ! map row.from-list)) + (\ ! map row.from-list)) attributes (case code (#.Some code) (do ! diff --git a/stdlib/source/lux/target/jvm/modifier.lux b/stdlib/source/lux/target/jvm/modifier.lux index cd6d2671f..1434a95a4 100644 --- a/stdlib/source/lux/target/jvm/modifier.lux +++ b/stdlib/source/lux/target/jvm/modifier.lux @@ -32,9 +32,9 @@ (structure: #export equivalence (All [of] (Equivalence (Modifier of))) (def: (= reference sample) - (:: //unsigned.equivalence = - (:representation reference) - (:representation sample)))) + (\ //unsigned.equivalence = + (:representation reference) + (:representation sample)))) (template: (!wrap value) (|> value @@ -52,7 +52,7 @@ (let [sub (!unwrap sub)] (|> (!unwrap super) (i64.and sub) - (:: i64.equivalence = sub)))) + (\ i64.equivalence = sub)))) (structure: #export monoid (All [of] (Monoid (Modifier of))) @@ -65,7 +65,7 @@ (def: #export empty Modifier - (:: ..monoid identity)) + (\ ..monoid identity)) (def: #export writer (All [of] (Writer (Modifier of))) diff --git a/stdlib/source/lux/target/jvm/reflection.lux b/stdlib/source/lux/target/jvm/reflection.lux index 12c310bca..4dfdbc30c 100644 --- a/stdlib/source/lux/target/jvm/reflection.lux +++ b/stdlib/source/lux/target/jvm/reflection.lux @@ -31,65 +31,76 @@ (import: java/lang/String) (import: java/lang/Object - (toString [] java/lang/String) - (getClass [] (java/lang/Class java/lang/Object))) + ["#::." + (toString [] java/lang/String) + (getClass [] (java/lang/Class java/lang/Object))]) (import: java/lang/reflect/Type - (getTypeName [] java/lang/String)) + ["#::." + (getTypeName [] java/lang/String)]) (import: java/lang/reflect/GenericArrayType - (getGenericComponentType [] java/lang/reflect/Type)) + ["#::." + (getGenericComponentType [] java/lang/reflect/Type)]) (import: java/lang/reflect/ParameterizedType - (getRawType [] java/lang/reflect/Type) - (getActualTypeArguments [] [java/lang/reflect/Type])) + ["#::." + (getRawType [] java/lang/reflect/Type) + (getActualTypeArguments [] [java/lang/reflect/Type])]) (import: (java/lang/reflect/TypeVariable d) - (getName [] java/lang/String) - (getBounds [] [java/lang/reflect/Type])) + ["#::." + (getName [] java/lang/String) + (getBounds [] [java/lang/reflect/Type])]) (import: (java/lang/reflect/WildcardType d) - (getLowerBounds [] [java/lang/reflect/Type]) - (getUpperBounds [] [java/lang/reflect/Type])) + ["#::." + (getLowerBounds [] [java/lang/reflect/Type]) + (getUpperBounds [] [java/lang/reflect/Type])]) (import: java/lang/reflect/Modifier - (#static isStatic [int] boolean) - (#static isFinal [int] boolean) - (#static isInterface [int] boolean) - (#static isAbstract [int] boolean)) + ["#::." + (#static isStatic [int] boolean) + (#static isFinal [int] boolean) + (#static isInterface [int] boolean) + (#static isAbstract [int] boolean)]) (import: java/lang/reflect/Field - (getDeclaringClass [] (java/lang/Class java/lang/Object)) - (getModifiers [] int) - (getGenericType [] java/lang/reflect/Type)) + ["#::." + (getDeclaringClass [] (java/lang/Class java/lang/Object)) + (getModifiers [] int) + (getGenericType [] java/lang/reflect/Type)]) (import: java/lang/reflect/Method - (getName [] java/lang/String) - (getModifiers [] int) - (getDeclaringClass [] (java/lang/Class java/lang/Object)) - (getTypeParameters [] [(java/lang/reflect/TypeVariable java/lang/reflect/Method)]) - (getGenericParameterTypes [] [java/lang/reflect/Type]) - (getGenericReturnType [] java/lang/reflect/Type) - (getGenericExceptionTypes [] [java/lang/reflect/Type])) + ["#::." + (getName [] java/lang/String) + (getModifiers [] int) + (getDeclaringClass [] (java/lang/Class java/lang/Object)) + (getTypeParameters [] [(java/lang/reflect/TypeVariable java/lang/reflect/Method)]) + (getGenericParameterTypes [] [java/lang/reflect/Type]) + (getGenericReturnType [] java/lang/reflect/Type) + (getGenericExceptionTypes [] [java/lang/reflect/Type])]) (import: (java/lang/reflect/Constructor c) - (getModifiers [] int) - (getDeclaringClass [] (java/lang/Class c)) - (getTypeParameters [] [(java/lang/reflect/TypeVariable (java/lang/reflect/Constructor c))]) - (getGenericParameterTypes [] [java/lang/reflect/Type]) - (getGenericExceptionTypes [] [java/lang/reflect/Type])) + ["#::." + (getModifiers [] int) + (getDeclaringClass [] (java/lang/Class c)) + (getTypeParameters [] [(java/lang/reflect/TypeVariable (java/lang/reflect/Constructor c))]) + (getGenericParameterTypes [] [java/lang/reflect/Type]) + (getGenericExceptionTypes [] [java/lang/reflect/Type])]) (import: (java/lang/Class c) - (#static forName [java/lang/String] #try (java/lang/Class java/lang/Object)) - (getName [] java/lang/String) - (getModifiers [] int) - (isAssignableFrom [(java/lang/Class java/lang/Object)] boolean) - (getTypeParameters [] [(java/lang/reflect/TypeVariable (java/lang/Class c))]) - (getGenericInterfaces [] [java/lang/reflect/Type]) - (getGenericSuperclass [] #? java/lang/reflect/Type) - (getDeclaredField [java/lang/String] #try java/lang/reflect/Field) - (getConstructors [] [(java/lang/reflect/Constructor java/lang/Object)]) - (getDeclaredMethods [] [java/lang/reflect/Method])) + ["#::." + (#static forName [java/lang/String] #try (java/lang/Class java/lang/Object)) + (getName [] java/lang/String) + (getModifiers [] int) + (isAssignableFrom [(java/lang/Class java/lang/Object)] boolean) + (getTypeParameters [] [(java/lang/reflect/TypeVariable (java/lang/Class c))]) + (getGenericInterfaces [] [java/lang/reflect/Type]) + (getGenericSuperclass [] #? java/lang/reflect/Type) + (getDeclaredField [java/lang/String] #try java/lang/reflect/Field) + (getConstructors [] [(java/lang/reflect/Constructor java/lang/Object)]) + (getDeclaredMethods [] [java/lang/reflect/Method])]) (exception: #export (unknown-class {class External}) (exception.report @@ -188,7 +199,7 @@ (#try.Success /.wildcard) _ - (:: try.monad map <kind> (..class' parameter bound)))]) + (\ try.monad map <kind> (..class' parameter bound)))]) ([[_ (#.Some bound)] /.upper] [[(#.Some bound) _] /.lower]) @@ -231,7 +242,7 @@ (|> reflection java/lang/reflect/GenericArrayType::getGenericComponentType type - (:: try.monad map /.array)) + (\ try.monad map /.array)) _) ## else (..parameter reflection))) @@ -348,7 +359,7 @@ <then?> (|> fieldJ java/lang/reflect/Field::getGenericType ..type - (:: ! map (|>> [(java/lang/reflect/Modifier::isFinal modifiers)]))) + (\ ! map (|>> [(java/lang/reflect/Modifier::isFinal modifiers)]))) <else?> (exception.throw <exception> [field class]))))] [static-field ..not-a-static-field #1 #0] diff --git a/stdlib/source/lux/target/jvm/type.lux b/stdlib/source/lux/target/jvm/type.lux index 389bc5559..fbddbac7d 100644 --- a/stdlib/source/lux/target/jvm/type.lux +++ b/stdlib/source/lux/target/jvm/type.lux @@ -145,21 +145,21 @@ (All [category] (Equivalence (Type category))) (def: (= parameter subject) - (:: /signature.equivalence = - (..signature parameter) - (..signature subject)))) + (\ /signature.equivalence = + (..signature parameter) + (..signature subject)))) (structure: #export hash (All [category] (Hash (Type category))) (def: &equivalence ..equivalence) - (def: hash (|>> ..signature (:: /signature.hash hash)))) + (def: hash (|>> ..signature (\ /signature.hash hash)))) (def: #export (primitive? type) (-> (Type Value) (Either (Type Object) (Type Primitive))) (if (`` (or (~~ (template [<type>] - [(:: ..equivalence = (: (Type Value) <type>) type)] + [(\ ..equivalence = (: (Type Value) <type>) type)] [..boolean] [..byte] @@ -176,7 +176,7 @@ (-> (Type Return) (Either (Type Value) (Type Void))) (if (`` (or (~~ (template [<type>] - [(:: ..equivalence = (: (Type Return) <type>) type)] + [(\ ..equivalence = (: (Type Return) <type>) type)] [..void])))) (|> type (:coerce (Type Void)) #.Right) @@ -192,7 +192,7 @@ (text.clip (text.size /descriptor.class-prefix) (n.- (text.size /descriptor.class-suffix) (text.size repr))) - (:: maybe.monad map (|>> //name.internal //name.external))) + (\ maybe.monad map (|>> //name.internal //name.external))) #.None))) (def: #export format diff --git a/stdlib/source/lux/target/jvm/type/alias.lux b/stdlib/source/lux/target/jvm/type/alias.lux index f384a0ea1..9439f7d64 100644 --- a/stdlib/source/lux/target/jvm/type/alias.lux +++ b/stdlib/source/lux/target/jvm/type/alias.lux @@ -55,7 +55,7 @@ [(def: <name> (-> (Parser (Type Class)) (Parser (Type Parameter))) (|>> (<>.after (<t>.this <prefix>)) - (:: <>.monad map <bound>)))] + (\ <>.monad map <bound>)))] [lower //signature.lower-prefix //.lower ..Lower] [upper //signature.upper-prefix //.upper ..Upper] diff --git a/stdlib/source/lux/target/jvm/type/descriptor.lux b/stdlib/source/lux/target/jvm/type/descriptor.lux index 88feb606f..4b7809028 100644 --- a/stdlib/source/lux/target/jvm/type/descriptor.lux +++ b/stdlib/source/lux/target/jvm/type/descriptor.lux @@ -115,6 +115,6 @@ (text.clip prefix-size (n.- suffix-size (text.size repr))) - (:: maybe.monad map ///name.internal) + (\ maybe.monad map ///name.internal) maybe.assume)))))) ) diff --git a/stdlib/source/lux/target/jvm/type/parser.lux b/stdlib/source/lux/target/jvm/type/parser.lux index db1c018b8..67fc2aec1 100644 --- a/stdlib/source/lux/target/jvm/type/parser.lux +++ b/stdlib/source/lux/target/jvm/type/parser.lux @@ -70,9 +70,9 @@ (template [<type> <name> <head> <tail> <adapter>] [(def: #export <name> (Parser <type>) - (:: <>.functor map <adapter> - (<t>.slice (<t>.and! (<t>.one-of! <head>) - (<t>.some! (<t>.one-of! <tail>))))))] + (\ <>.functor map <adapter> + (<t>.slice (<t>.and! (<t>.one-of! <head>) + (<t>.some! (<t>.one-of! <tail>))))))] [External class-name class/head class/tail (|>> //name.internal //name.external)] [Text var-name var/head var/tail function.identity] @@ -127,7 +127,7 @@ (def: class' (-> (Parser (Type Parameter)) (Parser (Type Class))) (|>> ..class'' - (:: <>.monad map (product.uncurry //.class)))) + (\ <>.monad map (product.uncurry //.class)))) (def: #export parameter (Parser (Type Parameter)) diff --git a/stdlib/source/lux/target/jvm/type/reflection.lux b/stdlib/source/lux/target/jvm/type/reflection.lux index b21451d93..73d5c2154 100644 --- a/stdlib/source/lux/target/jvm/type/reflection.lux +++ b/stdlib/source/lux/target/jvm/type/reflection.lux @@ -62,7 +62,7 @@ element' (~~ (template [<primitive> <descriptor>] - [(:: ..equivalence = <primitive> element) + [(\ ..equivalence = <primitive> element) (//descriptor.descriptor <descriptor>)] [..boolean //descriptor.boolean] diff --git a/stdlib/source/lux/test.lux b/stdlib/source/lux/test.lux index 6ac155b40..7da6195f4 100644 --- a/stdlib/source/lux/test.lux +++ b/stdlib/source/lux/test.lux @@ -118,11 +118,11 @@ (def: #export (test message condition) {#.doc "Check that a condition is #1, and fail with the given message otherwise."} (-> Text Bit Test) - (:: random.monad wrap (assert message condition))) + (\ random.monad wrap (assert message condition))) (def: #export (lift message random) (-> Text (Random Bit) Test) - (:: random.monad map (..assert message) random)) + (\ random.monad map (..assert message) random)) (def: pcg-32-magic-inc Nat 12345) @@ -177,7 +177,7 @@ (get@ #actual-coverage counters)) report (: (-> (Set Name) Text) (|>> set.to-list - (list.sort (:: name.order <)) + (list.sort (\ name.order <)) (exception.enumerate %.name))) expected-definitions-to-cover (set.size (get@ #expected-coverage counters)) unexpected-definitions-covered (set.size unexpected) @@ -250,7 +250,7 @@ (def: (|cover| coverage condition) (-> (List Name) Bit Test) (|> (..|cover'| coverage condition) - (:: random.monad wrap))) + (\ random.monad wrap))) (def: (|with-cover| coverage test) (-> (List Name) Test Test) diff --git a/stdlib/source/lux/time.lux b/stdlib/source/lux/time.lux index 33f830703..70b053a79 100644 --- a/stdlib/source/lux/time.lux +++ b/stdlib/source/lux/time.lux @@ -51,7 +51,7 @@ (<>.either (|> (<t>.at-most 3 <t>.decimal) (<>.codec n.decimal) (<>.after (<t>.this "."))) - (:: <>.monad wrap 0))) + (\ <>.monad wrap 0))) (template [<maximum> <parser> <exception> <sub-parser>] [(exception: #export (<exception> {value Nat}) diff --git a/stdlib/source/lux/time/date.lux b/stdlib/source/lux/time/date.lux index 2963cdeba..6e7642fe3 100644 --- a/stdlib/source/lux/time/date.lux +++ b/stdlib/source/lux/time/date.lux @@ -53,7 +53,7 @@ ["Value" (n\encode day)] ["Minimum" (n\encode ..minimum-day)] ["Maximum" (n\encode (..month-days year month))] - ["Year" (:: //year.codec encode year)] + ["Year" (\ //year.codec encode year)] ["Month" (n\encode (//month.number month))])) (def: (pad value) @@ -97,12 +97,12 @@ (def: (= reference sample) (let [reference (:representation reference) sample (:representation sample)] - (and (:: //year.equivalence = - (get@ #year reference) - (get@ #year sample)) - (:: //month.equivalence = - (get@ #month reference) - (get@ #month sample)) + (and (\ //year.equivalence = + (get@ #year reference) + (get@ #year sample)) + (\ //month.equivalence = + (get@ #month reference) + (get@ #month sample)) (n.= (get@ #day reference) (get@ #day sample)))))) @@ -114,18 +114,18 @@ (def: (< reference sample) (let [reference (:representation reference) sample (:representation sample)] - (or (:: //year.order < - (get@ #year reference) - (get@ #year sample)) - (and (:: //year.equivalence = - (get@ #year reference) - (get@ #year sample)) - (or (:: //month.order < - (get@ #month reference) - (get@ #month sample)) - (and (:: //month.order = - (get@ #month reference) - (get@ #month sample)) + (or (\ //year.order < + (get@ #year reference) + (get@ #year sample)) + (and (\ //year.equivalence = + (get@ #year reference) + (get@ #year sample)) + (or (\ //month.order < + (get@ #month reference) + (get@ #month sample)) + (and (\ //month.order = + (get@ #month reference) + (get@ #month sample)) (n.< (get@ #day reference) (get@ #day sample))))))))) ) @@ -139,7 +139,7 @@ (<>.either (|> (<t>.at-most 3 <t>.decimal) (<>.codec n.decimal) (<>.after (<t>.this "."))) - (:: <>.monad wrap 0))) + (\ <>.monad wrap 0))) (template [<minimum> <maximum> <parser> <exception>] [(exception: #export (<exception> {value Nat}) @@ -174,7 +174,7 @@ (def: (encode value) (-> Date Text) ($_ text\compose - (:: //year.codec encode (..year value)) + (\ //year.codec encode (..year value)) ..separator (..pad (|> value ..month //month.number)) ..separator (..pad (..day-of-month value)))) diff --git a/stdlib/source/lux/time/duration.lux b/stdlib/source/lux/time/duration.lux index f0bda31ba..9c5d70d71 100644 --- a/stdlib/source/lux/time/duration.lux +++ b/stdlib/source/lux/time/duration.lux @@ -127,11 +127,11 @@ ) (def: (encode duration) - (if (:: ..equivalence = ..empty duration) + (if (\ ..equivalence = ..empty duration) ($_ text\compose ..positive-sign (nat\encode 0) - milli-second-suffix) + ..milli-second-suffix) (let [signed? (negative? duration) [days time-left] [(query day duration) (frame day duration)] days (if signed? diff --git a/stdlib/source/lux/time/instant.lux b/stdlib/source/lux/time/instant.lux index 0dd2c030b..7c63b7d31 100644 --- a/stdlib/source/lux/time/instant.lux +++ b/stdlib/source/lux/time/instant.lux @@ -61,14 +61,14 @@ (Equivalence Instant) (def: (= param subject) - (:: i.equivalence = (:representation param) (:representation subject)))) + (\ i.equivalence = (:representation param) (:representation subject)))) (structure: #export order (Order Instant) (def: &equivalence ..equivalence) (def: (< param subject) - (:: i.order < (:representation param) (:representation subject)))) + (\ i.order < (:representation param) (:representation subject)))) (`` (structure: #export enum (Enum Instant) @@ -76,7 +76,7 @@ (def: &order ..order) (~~ (template [<name>] [(def: <name> - (|>> :representation (:: i.enum <name>) :abstraction))] + (|>> :representation (\ i.enum <name>) :abstraction))] [succ] [pred] )))) @@ -112,7 +112,7 @@ (def: (clock-time duration) (-> Duration Time) - (let [time (if (:: duration.order < duration.empty duration) + (let [time (if (\ duration.order < duration.empty duration) (duration.merge duration.day duration) duration)] (|> time duration.to-millis .nat //.from-millis try.assume))) @@ -122,15 +122,15 @@ (let [[date time] (..date-time instant) time (..clock-time time)] ($_ text\compose - (:: date.codec encode date) ..date-suffix - (:: //.codec encode time) ..time-suffix))) + (\ date.codec encode date) ..date-suffix + (\ //.codec encode time) ..time-suffix))) (def: parser (Parser Instant) (do {! <>.monad} - [days (:: ! map date.days date.parser) + [days (\ ! map date.days date.parser) _ (<t>.this ..date-suffix) - time (:: ! map //.to-millis //.parser) + time (\ ! map //.to-millis //.parser) _ (<t>.this ..time-suffix)] (wrap (|> (if (i.< +0 days) (|> duration.day diff --git a/stdlib/source/lux/tool/compiler/default/platform.lux b/stdlib/source/lux/tool/compiler/default/platform.lux index b2225c718..7a99aa09b 100644 --- a/stdlib/source/lux/tool/compiler/default/platform.lux +++ b/stdlib/source/lux/tool/compiler/default/platform.lux @@ -100,8 +100,8 @@ row.to-list (monad.map ..monad write-artifact!) (: (Action (List Any)))) - document (:: promise.monad wrap - (document.check $.key document))] + document (\ promise.monad wrap + (document.check $.key document))] (ioW.cache system static module-id (_.run ..writer [descriptor document]))))) @@ -180,7 +180,7 @@ _ (extension.with extender (:assume directives))] (wrap []))}) (///phase.run' state) - (:: try.monad map product.left))) + (\ try.monad map product.left))) (def: #export (initialize static module expander host-analysis platform generation-bundle host-directive-bundle program anchorT,expressionT,directiveT extender import compilation-sources) diff --git a/stdlib/source/lux/tool/compiler/language/lux.lux b/stdlib/source/lux/tool/compiler/language/lux.lux index d300ec243..0d77cbe6c 100644 --- a/stdlib/source/lux/tool/compiler/language/lux.lux +++ b/stdlib/source/lux/tool/compiler/language/lux.lux @@ -97,7 +97,7 @@ ## #module-annotations (<b>.maybe <b>.code) ## #module-state - (:: <>.monad wrap #.Cached)))) + (\ <>.monad wrap #.Cached)))) (def: #export key (Key .Module) diff --git a/stdlib/source/lux/tool/compiler/language/lux/analysis.lux b/stdlib/source/lux/tool/compiler/language/lux/analysis.lux index 34d8005e1..e6fea4ef1 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/analysis.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/analysis.lux @@ -138,7 +138,7 @@ (/\= reference-value sample-value)) [(#Tuple reference) (#Tuple sample)] - (:: (list.equivalence /\=) = reference sample) + (\ (list.equivalence /\=) = reference sample) _ false))) @@ -147,19 +147,19 @@ (All [a] (-> (Hash a) (Hash (Composite a)))) (def: &equivalence - (..composite-equivalence (:: super &equivalence))) + (..composite-equivalence (\ super &equivalence))) (def: (hash value) (case value (#Variant [lefts right? value]) ($_ n.* 2 - (:: n.hash hash lefts) - (:: bit.hash hash right?) - (:: super hash value)) + (\ n.hash hash lefts) + (\ bit.hash hash right?) + (\ super hash value)) (#Tuple members) ($_ n.* 3 - (:: (list.hash super) hash members)) + (\ (list.hash super) hash members)) ))) (structure: pattern-equivalence @@ -168,10 +168,10 @@ (def: (= reference sample) (case [reference sample] [(#Simple reference) (#Simple sample)] - (:: primitive-equivalence = reference sample) + (\ primitive-equivalence = reference sample) [(#Complex reference) (#Complex sample)] - (:: (composite-equivalence =) = reference sample) + (\ (composite-equivalence =) = reference sample) [(#Bind reference) (#Bind sample)] (n.= reference sample) @@ -183,8 +183,8 @@ (-> (Equivalence Analysis) (Equivalence Branch)) (def: (= [reference-pattern reference-body] [sample-pattern sample-body]) - (and (:: pattern-equivalence = reference-pattern sample-pattern) - (:: equivalence = reference-body sample-body)))) + (and (\ pattern-equivalence = reference-pattern sample-pattern) + (\ equivalence = reference-body sample-body)))) (structure: #export equivalence (Equivalence Analysis) @@ -192,23 +192,23 @@ (def: (= reference sample) (case [reference sample] [(#Primitive reference) (#Primitive sample)] - (:: primitive-equivalence = reference sample) + (\ primitive-equivalence = reference sample) [(#Structure reference) (#Structure sample)] - (:: (composite-equivalence =) = reference sample) + (\ (composite-equivalence =) = reference sample) [(#Reference reference) (#Reference sample)] - (:: reference.equivalence = reference sample) + (\ reference.equivalence = reference sample) [(#Case [reference-analysis reference-match]) (#Case [sample-analysis sample-match])] (and (= reference-analysis sample-analysis) - (:: (list.equivalence (branch-equivalence =)) = (#.Cons reference-match) (#.Cons sample-match))) + (\ (list.equivalence (branch-equivalence =)) = (#.Cons reference-match) (#.Cons sample-match))) [(#Function [reference-environment reference-analysis]) (#Function [sample-environment sample-analysis])] (and (= reference-analysis sample-analysis) - (:: (list.equivalence =) = reference-environment sample-environment)) + (\ (list.equivalence =) = reference-environment sample-environment)) [(#Apply [reference-input reference-abstraction]) (#Apply [sample-input sample-abstraction])] @@ -216,7 +216,7 @@ (= reference-abstraction sample-abstraction)) [(#Extension reference) (#Extension sample)] - (:: (extension.equivalence =) = reference sample) + (\ (extension.equivalence =) = reference sample) _ false))) @@ -474,7 +474,7 @@ (def: #export (assert exception parameters condition) (All [e] (-> (Exception e) e Bit (Operation Any))) (if condition - (:: phase.monad wrap []) + (\ phase.monad wrap []) (..throw exception parameters))) (def: #export (fail' error) diff --git a/stdlib/source/lux/tool/compiler/language/lux/generation.lux b/stdlib/source/lux/tool/compiler/language/lux/generation.lux index 0b4ab70b2..da24f66f3 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/generation.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/generation.lux @@ -171,7 +171,7 @@ (def: #export (gensym prefix) (All [anchor expression directive] (-> Text (Operation anchor expression directive Text))) - (:: phase.monad map (|>> %.nat (format prefix)) ..next)) + (\ phase.monad map (|>> %.nat (format prefix)) ..next)) (def: #export (enter-module module) (All [anchor expression directive] @@ -187,7 +187,7 @@ (All [anchor expression directive] (-> Context expression (Operation anchor expression directive Any))) (function (_ (^@ state+ [bundle state])) - (case (:: (get@ #host state) evaluate! label code) + (case (\ (get@ #host state) evaluate! label code) (#try.Success output) (#try.Success [state+ output]) @@ -198,7 +198,7 @@ (All [anchor expression directive] (-> directive (Operation anchor expression directive Any))) (function (_ (^@ state+ [bundle state])) - (case (:: (get@ #host state) execute! code) + (case (\ (get@ #host state) execute! code) (#try.Success output) (#try.Success [state+ output]) @@ -209,7 +209,7 @@ (All [anchor expression directive] (-> Context expression (Operation anchor expression directive [Text Any directive]))) (function (_ (^@ stateE [bundle state])) - (case (:: (get@ #host state) define! context code) + (case (\ (get@ #host state) define! context code) (#try.Success output) (#try.Success [stateE output]) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/case.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/case.lux index b550f9c5a..33cf36f32 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/case.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/case.lux @@ -127,10 +127,10 @@ type.flatten-tuple (list\map (re-quantify envs)) type.tuple - (:: ///.monad wrap)) + (\ ///.monad wrap)) _ - (:: ///.monad wrap (re-quantify envs caseT))))) + (\ ///.monad wrap (re-quantify envs caseT))))) (def: (analyse-primitive type inputT location output next) (All [a] (-> Type Type Location Pattern (Operation a) (Operation [Pattern a]))) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/case/coverage.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/case/coverage.lux index adf935a89..136decfa8 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/case/coverage.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/case/coverage.lux @@ -188,7 +188,7 @@ [(#Variant allR casesR) (#Variant allS casesS)] (and (n.= (cases allR) (cases allS)) - (:: (dictionary.equivalence =) = casesR casesS)) + (\ (dictionary.equivalence =) = casesR casesS)) [(#Seq leftR rightR) (#Seq leftS rightS)] (and (= leftR leftS) @@ -234,7 +234,7 @@ (not (n.= addition-cases so-far-cases))) (ex.throw variants-do-not-match [addition-cases so-far-cases]) - (:: (dictionary.equivalence ..equivalence) = casesSF casesA) + (\ (dictionary.equivalence ..equivalence) = casesSF casesA) (ex.throw redundant-pattern [so-far addition]) ## else diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/function.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/function.lux index 8c5b74cff..b4c9ec016 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/function.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/function.lux @@ -88,10 +88,10 @@ )) (#.Function inputT outputT) - (<| (:: ! map (.function (_ [scope bodyA]) - (#/.Function (list\map (|>> /.variable) - (//scope.environment scope)) - bodyA))) + (<| (\ ! map (.function (_ [scope bodyA]) + (#/.Function (list\map (|>> /.variable) + (//scope.environment scope)) + bodyA))) /.with-scope ## Functions have access not only to their argument, but ## also to themselves, through a local variable. diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/structure.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/structure.lux index 848d0e96b..a306b178b 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/structure.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/structure.lux @@ -173,11 +173,11 @@ (case [membersT+ membersC+] [(#.Cons memberT #.Nil) _] (//type.with-type memberT - (:: ! map (|>> list) (analyse archive (code.tuple membersC+)))) + (\ ! map (|>> list) (analyse archive (code.tuple membersC+)))) [_ (#.Cons memberC #.Nil)] (//type.with-type (type.tuple membersT+) - (:: ! map (|>> list) (analyse archive memberC))) + (\ ! map (|>> list) (analyse archive memberC))) [(#.Cons memberT membersT+') (#.Cons memberC membersC+')] (do ! @@ -301,7 +301,7 @@ (case record ## empty-record = empty-tuple = unit = [] #.Nil - (:: ///.monad wrap [(list) Any]) + (\ ///.monad wrap [(list) Any]) (#.Cons [head-k head-v] _) (do {! ///.monad} diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/directive.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/directive.lux index 2bde38a7d..7bcb4a39b 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/directive.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/directive.lux @@ -66,12 +66,12 @@ (case expansion (^ (list& <lux_def_module> referrals)) (|> (recur archive <lux_def_module>) - (:: ! map (update@ #/.referrals (list\compose referrals)))) + (\ ! map (update@ #/.referrals (list\compose referrals)))) _ (|> expansion (monad.map ! (recur archive)) - (:: ! map (list\fold /.merge-requirements /.no-requirements))))) + (\ ! map (list\fold /.merge-requirements /.no-requirements))))) _ (//.throw ..not-a-directive code)))))) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux index 0fdaa8c96..c6899c4e8 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux @@ -472,8 +472,8 @@ (text.starts-with? descriptor.array-prefix name) (let [[_ unprefixed] (maybe.assume (text.split-with descriptor.array-prefix name))] - (:: phase.monad map jvm.array - (check-jvm (#.Primitive unprefixed (list))))) + (\ phase.monad map jvm.array + (check-jvm (#.Primitive unprefixed (list))))) ## else (phase\wrap (jvm.class name (list))))) @@ -512,7 +512,7 @@ (def: (check-object objectT) (-> .Type (Operation External)) (do {! phase.monad} - [name (:: ! map ..reflection (check-jvm objectT))] + [name (\ ! map ..reflection (check-jvm objectT))] (if (dictionary.contains? name ..boxes) (/////analysis.throw ..primitives-are-not-objects [name]) (phase\wrap name)))) @@ -756,47 +756,53 @@ (/////analysis.throw cannot-possibly-be-an-instance (format sub-class " !<= " object-class)))))])) (import: java/lang/Object - (equals [java/lang/Object] boolean)) + ["#::." + (equals [java/lang/Object] boolean)]) (import: java/lang/reflect/Type) (import: (java/lang/reflect/TypeVariable d) - (getName [] java/lang/String) - (getBounds [] [java/lang/reflect/Type])) + ["#::." + (getName [] java/lang/String) + (getBounds [] [java/lang/reflect/Type])]) (import: java/lang/reflect/Modifier - (#static isStatic [int] boolean) - (#static isFinal [int] boolean) - (#static isInterface [int] boolean) - (#static isAbstract [int] boolean)) + ["#::." + (#static isStatic [int] boolean) + (#static isFinal [int] boolean) + (#static isInterface [int] boolean) + (#static isAbstract [int] boolean)]) (import: java/lang/reflect/Method - (getName [] java/lang/String) - (getModifiers [] int) - (getDeclaringClass [] (java/lang/Class java/lang/Object)) - (getTypeParameters [] [(java/lang/reflect/TypeVariable java/lang/reflect/Method)]) - (getGenericParameterTypes [] [java/lang/reflect/Type]) - (getGenericReturnType [] java/lang/reflect/Type) - (getGenericExceptionTypes [] [java/lang/reflect/Type])) + ["#::." + (getName [] java/lang/String) + (getModifiers [] int) + (getDeclaringClass [] (java/lang/Class java/lang/Object)) + (getTypeParameters [] [(java/lang/reflect/TypeVariable java/lang/reflect/Method)]) + (getGenericParameterTypes [] [java/lang/reflect/Type]) + (getGenericReturnType [] java/lang/reflect/Type) + (getGenericExceptionTypes [] [java/lang/reflect/Type])]) (import: (java/lang/reflect/Constructor c) - (getModifiers [] int) - (getDeclaringClass [] (java/lang/Class c)) - (getTypeParameters [] [(java/lang/reflect/TypeVariable (java/lang/reflect/Constructor c))]) - (getGenericParameterTypes [] [java/lang/reflect/Type]) - (getGenericExceptionTypes [] [java/lang/reflect/Type])) + ["#::." + (getModifiers [] int) + (getDeclaringClass [] (java/lang/Class c)) + (getTypeParameters [] [(java/lang/reflect/TypeVariable (java/lang/reflect/Constructor c))]) + (getGenericParameterTypes [] [java/lang/reflect/Type]) + (getGenericExceptionTypes [] [java/lang/reflect/Type])]) (import: (java/lang/Class c) - (#static forName [java/lang/String] #try (java/lang/Class java/lang/Object)) - (getName [] java/lang/String) - (getModifiers [] int) - (isAssignableFrom [(java/lang/Class java/lang/Object)] boolean) - (getTypeParameters [] [(java/lang/reflect/TypeVariable (java/lang/Class c))]) - (getGenericInterfaces [] [java/lang/reflect/Type]) - (getGenericSuperclass [] #? java/lang/reflect/Type) - (getDeclaredField [java/lang/String] #try java/lang/reflect/Field) - (getConstructors [] [(java/lang/reflect/Constructor java/lang/Object)]) - (getDeclaredMethods [] [java/lang/reflect/Method])) + ["#::." + (#static forName [java/lang/String] #try (java/lang/Class java/lang/Object)) + (getName [] java/lang/String) + (getModifiers [] int) + (isAssignableFrom [(java/lang/Class java/lang/Object)] boolean) + (getTypeParameters [] [(java/lang/reflect/TypeVariable (java/lang/Class c))]) + (getGenericInterfaces [] [java/lang/reflect/Type]) + (getGenericSuperclass [] #? java/lang/reflect/Type) + (getDeclaredField [java/lang/String] #try java/lang/reflect/Field) + (getConstructors [] [(java/lang/reflect/Constructor java/lang/Object)]) + (getDeclaredMethods [] [java/lang/reflect/Method])]) (template [<name> <category> <parser>] [(def: (<name> mapping typeJ) @@ -843,7 +849,7 @@ (monad.map phase.monad (function (_ superT) (do {! phase.monad} - [super-name (:: ! map ..reflection (check-jvm superT)) + [super-name (\ ! map ..reflection (check-jvm superT)) super-class (phase.lift (reflection!.load super-name))] (wrap [[super-name superT] (java/lang/Class::isAssignableFrom super-class to-class)]))) @@ -859,10 +865,10 @@ (^ (list fromC)) (do {! phase.monad} [toT (///.lift meta.expected-type) - to-name (:: ! map ..reflection (check-jvm toT)) + to-name (\ ! map ..reflection (check-jvm toT)) [fromT fromA] (typeA.with-inference (analyse archive fromC)) - from-name (:: ! map ..reflection (check-jvm fromT)) + from-name (\ ! map ..reflection (check-jvm fromT)) can-cast? (: (Operation Bit) (`` (cond (~~ (template [<primitive> <object>] [(let [=primitive (reflection.reflection <primitive>)] @@ -1234,10 +1240,10 @@ aliasing (dictionary.merge (..aliasing expected-class-tvars actual-class-tvars) (..aliasing expected-method-tvars actual-method-tvars))] passes? (check-method aliasing class method-name method-style inputsJT method)] - (:: ! map (if passes? - (|>> #Pass) - (|>> #Hint)) - (method-signature method-style method)))))))] + (\ ! map (if passes? + (|>> #Pass) + (|>> #Hint)) + (method-signature method-style method)))))))] (case (list.all pass! candidates) (#.Cons method #.Nil) (wrap method) @@ -1264,9 +1270,9 @@ aliasing (dictionary.merge (..aliasing expected-class-tvars actual-class-tvars) (..aliasing expected-method-tvars actual-method-tvars))] passes? (check-constructor aliasing class inputsJT constructor)] - (:: ! map - (if passes? (|>> #Pass) (|>> #Hint)) - (constructor-signature constructor))))))] + (\ ! map + (if passes? (|>> #Pass) (|>> #Hint)) + (constructor-signature constructor))))))] (case (list.all pass! candidates) (#.Cons constructor #.Nil) (wrap constructor) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux index 29fb70e63..70a32ea7e 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux @@ -164,8 +164,8 @@ (^ (list typeC valueC)) (do {! ////.monad} [count (///.lift meta.count) - actualT (:: ! map (|>> (:coerce Type)) - (eval archive count Type typeC)) + actualT (\ ! map (|>> (:coerce Type)) + (eval archive count Type typeC)) _ (typeA.infer actualT)] (typeA.with-type actualT (analyse archive valueC))) @@ -180,8 +180,8 @@ (^ (list typeC valueC)) (do {! ////.monad} [count (///.lift meta.count) - actualT (:: ! map (|>> (:coerce Type)) - (eval archive count Type typeC)) + actualT (\ ! map (|>> (:coerce Type)) + (eval archive count Type typeC)) _ (typeA.infer actualT) [valueT valueA] (typeA.with-inference (analyse archive valueC))] diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux index f7cc747ff..0aeea4cd2 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux @@ -135,7 +135,7 @@ [abstractionG (phase archive abstractionS) #let [variable (: (-> Text (Operation Var)) (|>> generation.gensym - (:: ! map _.var)))] + (\ ! map _.var)))] g!inputs (monad.map ! (function (_ _) (variable "input")) (list.repeat (.nat arity) [])) g!abstraction (variable "abstraction")] diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux index ee9c3b1a2..c1418b2ce 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux @@ -743,7 +743,7 @@ ..unitG (#.Left outputT) - (:: _.monad wrap []))) + (\ _.monad wrap []))) (def: invoke::static Handler @@ -981,20 +981,20 @@ _.areturn) (#.Right returnT) - (cond (or (:: type.equivalence = type.boolean returnT) - (:: type.equivalence = type.byte returnT) - (:: type.equivalence = type.short returnT) - (:: type.equivalence = type.int returnT) - (:: type.equivalence = type.char returnT)) + (cond (or (\ type.equivalence = type.boolean returnT) + (\ type.equivalence = type.byte returnT) + (\ type.equivalence = type.short returnT) + (\ type.equivalence = type.int returnT) + (\ type.equivalence = type.char returnT)) _.ireturn - (:: type.equivalence = type.long returnT) + (\ type.equivalence = type.long returnT) _.lreturn - (:: type.equivalence = type.float returnT) + (\ type.equivalence = type.float returnT) _.freturn - ## (:: type.equivalence = type.double returnT) + ## (\ type.equivalence = type.double returnT) _.dreturn)))) (def: class::anonymous @@ -1068,7 +1068,7 @@ bodyG (returnG returnT))))))) normalized-methods) - bytecode (<| (:: ! map (format.run class.writer)) + bytecode (<| (\ ! map (format.run class.writer)) //////.lift (class.class version.v6_0 ($_ modifier\compose class.public class.final) (name.internal anonymous-class-name) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/common-lisp.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/common-lisp.lux index 975301cef..43d449402 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/common-lisp.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/common-lisp.lux @@ -21,7 +21,7 @@ (case synthesis (^template [<tag> <generator>] [(^ (<tag> value)) - (:: ///.monad wrap (<generator> value))]) + (\ ///.monad wrap (<generator> value))]) ([synthesis.bit primitive.bit] [synthesis.i64 primitive.i64] [synthesis.f64 primitive.f64] diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/common-lisp/case.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/common-lisp/case.lux index 6c6858ea9..6953a9987 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/common-lisp/case.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/common-lisp/case.lux @@ -134,7 +134,7 @@ (-> Phase Path (Operation (Expression Any))) (.case pathP (^ (/////synthesis.path/then bodyS)) - (:: ////.monad map (_.return-from ..@done) (generate bodyS)) + (\ ////.monad map (_.return-from ..@done) (generate bodyS)) #/////synthesis.Pop (////\wrap ..pop!) @@ -159,7 +159,7 @@ (^ (<simple> idx nextP)) (|> nextP (pattern-matching' generate) - (:: ////.monad map (_.progn (<choice> true idx))))]) + (\ ////.monad map (_.progn (<choice> true idx))))]) ([/////synthesis.side/left /////synthesis.simple-left-side ..left-choice] [/////synthesis.side/right /////synthesis.simple-right-side ..right-choice]) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/common-lisp/function.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/common-lisp/function.lux index 8853de638..d68f22ef0 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/common-lisp/function.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/common-lisp/function.lux @@ -37,11 +37,11 @@ (-> Text (List (Expression Any)) (Expression Any) (Operation (Expression Any))) (case inits #.Nil - (:: ////.monad wrap function-definition) + (\ ////.monad wrap function-definition) _ (do {! ////.monad} - [@closure (:: ! map _.var (///.gensym "closure"))] + [@closure (\ ! map _.var (///.gensym "closure"))] (wrap (_.labels (list [@closure [(|> (list.enumeration inits) (list\map (|>> product.left ..capture)) _.args) @@ -60,7 +60,7 @@ (///.with-anchor (_.var function-name) (generate bodyS)))) closureG+ (: (Operation (List (Expression Any))) - (monad.map ! (:: //reference.system variable) environment)) + (monad.map ! (\ //reference.system variable) environment)) #let [@curried (_.var "curried") @missing (_.var "missing") arityG (|> arity .int _.int) @@ -87,7 +87,7 @@ extra-inputs]))]) ## (|> @num-args (_.< arityG)) (_.lambda (_.args& (list) @missing) - (_.apply/2 [(_.function/1 @self) - (_.append/2 [@curried @missing])]))))]]) + (_.apply/2 [(_.function/1 @self) + (_.append/2 [@curried @missing])]))))]]) (_.function/1 @self))) )) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/common-lisp/loop.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/common-lisp/loop.lux index e3c6d4279..bc214399e 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/common-lisp/loop.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/common-lisp/loop.lux @@ -23,7 +23,7 @@ (def: #export (scope generate [start initsS+ bodyS]) (-> Phase (Scope Synthesis) (Operation (Expression Any))) (do {! ////.monad} - [@scope (:: ! map (|>> %.nat (format "scope") _.var) ///.next) + [@scope (\ ! map (|>> %.nat (format "scope") _.var) ///.next) initsG+ (monad.map ! generate initsS+) bodyG (///.with-anchor @scope (generate bodyS))] diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/common-lisp/structure.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/common-lisp/structure.lux index ef29d33dc..45241a601 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/common-lisp/structure.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/common-lisp/structure.lux @@ -16,7 +16,7 @@ (-> Phase (Tuple Synthesis) (Operation (Expression Any))) (case elemsS+ #.Nil - (:: ////.monad wrap (//primitive.text /////synthesis.unit)) + (\ ////.monad wrap (//primitive.text /////synthesis.unit)) (#.Cons singletonS #.Nil) (generate singletonS) @@ -24,13 +24,13 @@ _ (|> elemsS+ (monad.map ////.monad generate) - (:: ////.monad map _.vector/*)))) + (\ ////.monad map _.vector/*)))) (def: #export (variant generate [lefts right? valueS]) (-> Phase (Variant Synthesis) (Operation (Expression Any))) - (:: ////.monad map - (//runtime.variant (if right? - (inc lefts) - lefts) - right?) - (generate valueS))) + (\ ////.monad map + (//runtime.variant (if right? + (inc lefts) + lefts) + right?) + (generate valueS))) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/js/case.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/js/case.lux index ce9625452..13038972b 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/js/case.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/js/case.lux @@ -163,7 +163,7 @@ [(^ (<simple> idx nextP)) (|> nextP recur - (:: ///////phase.monad map (|>> (_.then (<choice> true idx)) #.Some)))]) + (\ ///////phase.monad map (|>> (_.then (<choice> true idx)) #.Some)))]) ([/////synthesis.simple-left-side ..left-choice] [/////synthesis.simple-right-side ..right-choice]) @@ -261,7 +261,7 @@ [(<tag> cons) (do {! ///////phase.monad} [cases (monad.map ! (function (_ [match then]) - (:: ! map (|>> [(list (<format> match))]) (recur then))) + (\ ! map (|>> [(list (<format> match))]) (recur then))) (#.Cons cons))] (wrap (_.switch ..peek-cursor cases diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/js/function.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/js/function.lux index 12e328a11..c939b36a6 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/js/function.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/js/function.lux @@ -67,8 +67,8 @@ (do {! ///////phase.monad} [[function-name body!] (/////generation.with-new-context archive (do ! - [scope (:: ! map ..@scope - (/////generation.context archive))] + [scope (\ ! map ..@scope + (/////generation.context archive))] (/////generation.with-anchor [1 scope] (statement expression archive bodyS)))) #let [arityO (|> arity .int _.i32) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/js/loop.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/js/loop.lux index 5e810a551..29cdc1180 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/js/loop.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/js/loop.lux @@ -49,7 +49,7 @@ ## true loop _ (do {! ///////phase.monad} - [@scope (:: ! map ..@scope /////generation.next) + [@scope (\ ! map ..@scope /////generation.next) initsO+ (monad.map ! (expression archive) initsS+) body! (/////generation.with-anchor [start @scope] (statement expression archive bodyS))] @@ -68,7 +68,7 @@ ## true loop _ (do {! ///////phase.monad} - [@scope (:: ! map ..@scope /////generation.next) + [@scope (\ ! map ..@scope /////generation.next) initsO+ (monad.map ! (expression archive) initsS+) body! (/////generation.with-anchor [start @scope] (statement expression archive bodyS)) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/debug.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/debug.lux index 657566813..f429b0442 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/debug.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/debug.lux @@ -23,7 +23,7 @@ [outcome (do (try.with @) [file (: (IO (Try (File IO))) (file.get-file io.monad file.default file-path))] - (!.use (:: file over-write) bytecode))] + (!.use (\ file over-write) bytecode))] (wrap (case outcome (#try.Success definition) file-path diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux index b13e1c63f..c87f00333 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux @@ -112,11 +112,11 @@ _.return)))) (row.row))] (io.run (do {! (try.with io.monad)} - [bytecode (:: ! map (format.run class.writer) - (io.io bytecode)) + [bytecode (\ ! map (format.run class.writer) + (io.io bytecode)) _ (loader.store eval-class bytecode library) class (loader.load eval-class loader) - value (:: io.monad wrap (class-value eval-class class))] + value (\ io.monad wrap (class-value eval-class class))] (wrap [value [eval-class bytecode]]))))) @@ -124,7 +124,7 @@ (-> Library java/lang/ClassLoader Text Definition (Try Any)) (io.run (do (try.with io.monad) [existing-class? (|> (atom.read library) - (:: io.monad map (dictionary.contains? class-name)) + (\ io.monad map (dictionary.contains? class-name)) (try.lift io.monad) (: (IO (Try Bit)))) _ (if existing-class? @@ -149,8 +149,8 @@ (structure (def: (evaluate! temp-label valueG) (let [eval-class (|> temp-label name.normalize (text.replace-all " " "$"))] - (:: try.monad map product.left - (..evaluate! library loader eval-class valueG)))) + (\ try.monad map product.left + (..evaluate! library loader eval-class valueG)))) (def: execute! (..execute! library loader)) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/reference.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/reference.lux index e74488d08..edffd87ff 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/reference.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/reference.lux @@ -41,8 +41,8 @@ (def: (foreign archive variable) (-> Archive Register (Operation (Bytecode Any))) (do {! ////.monad} - [bytecode-name (:: ! map //runtime.class-name - (generation.context archive))] + [bytecode-name (\ ! map //runtime.class-name + (generation.context archive))] (wrap ($_ _.compose ..this (_.getfield (type.class bytecode-name (list)) @@ -61,6 +61,6 @@ (def: #export (constant archive name) (-> Archive Name (Operation (Bytecode Any))) (do {! ////.monad} - [bytecode-name (:: ! map //runtime.class-name - (generation.remember archive name))] + [bytecode-name (\ ! map //runtime.class-name + (generation.remember archive name))] (wrap (_.getstatic (type.class bytecode-name (list)) //value.field //type.value)))) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/runtime.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/runtime.lux index 57d45f6c3..22db73c91 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/runtime.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/runtime.lux @@ -602,4 +602,4 @@ ## This shift is done to avoid the possibility of forged labels ## to be in the range of the labels that are generated automatically ## during the evaluation of Bytecode expressions. - (:: ////.monad map (i64.left-shift shift) generation.next))) + (\ ////.monad map (i64.left-shift shift) generation.next))) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/structure.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/structure.lux index bbf8f252c..b89bbca35 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/structure.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/structure.lux @@ -29,7 +29,7 @@ (Generator (Tuple Synthesis)) (case membersS #.Nil - (:: phase.monad wrap //runtime.unit) + (\ phase.monad wrap //runtime.unit) (#.Cons singletonS #.Nil) (generate archive singletonS) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/lua/function.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/lua/function.lux index 98c60d243..0d97b3b8c 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/lua/function.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/lua/function.lux @@ -46,7 +46,7 @@ _ (do {! ///////phase.monad} - [@closure (:: ! map _.var (/////generation.gensym "closure")) + [@closure (\ ! map _.var (/////generation.gensym "closure")) #let [directive (_.function @closure (|> (list.enumeration inits) (list\map (|>> product.left ..capture))) @@ -65,12 +65,12 @@ (do {! ///////phase.monad} [[function-name bodyO] (/////generation.with-new-context (do ! - [function-name (:: ! map ///reference.artifact-name - /////generation.context)] + [function-name (\ ! map ///reference.artifact-name + /////generation.context)] (/////generation.with-anchor (_.var function-name) (generate archive bodyS)))) closureO+ (: (Operation (List (Expression Any))) - (monad.map ! (:: //reference.system variable) environment)) + (monad.map ! (\ //reference.system variable) environment)) #let [function-name (///reference.artifact-name function-name) @curried (_.var "curried") arityO (|> arity .int _.int) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/lua/loop.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/lua/loop.lux index e04186c17..4b405a8af 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/lua/loop.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/lua/loop.lux @@ -28,7 +28,7 @@ (def: #export (scope generate archive [start initsS+ bodyS]) (Generator (Scope Synthesis)) (do {! ///////phase.monad} - [@loop (:: ! map ..loop-name /////generation.next) + [@loop (\ ! map ..loop-name /////generation.next) initsO+ (monad.map ! (generate archive) initsS+) bodyO (/////generation.with-anchor @loop (generate archive bodyS)) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/php.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/php.lux index 975301cef..43d449402 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/php.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/php.lux @@ -21,7 +21,7 @@ (case synthesis (^template [<tag> <generator>] [(^ (<tag> value)) - (:: ///.monad wrap (<generator> value))]) + (\ ///.monad wrap (<generator> value))]) ([synthesis.bit primitive.bit] [synthesis.i64 primitive.i64] [synthesis.f64 primitive.f64] diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/php/case.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/php/case.lux index 5ef6bb4b3..141f651f8 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/php/case.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/php/case.lux @@ -140,7 +140,7 @@ (-> Phase Path (Operation Statement)) (.case pathP (^ (/////synthesis.path/then bodyS)) - (:: ////.monad map _.return (generate bodyS)) + (\ ////.monad map _.return (generate bodyS)) #/////synthesis.Pop (////\wrap ..pop!) @@ -164,7 +164,7 @@ (^ (<simple> idx nextP)) (|> nextP (pattern-matching' generate) - (:: ////.monad map (_.then (<choice> true idx))))]) + (\ ////.monad map (_.then (<choice> true idx))))]) ([/////synthesis.side/left /////synthesis.simple-left-side ..left-choice] [/////synthesis.side/right /////synthesis.simple-right-side ..right-choice]) @@ -212,7 +212,7 @@ (def: (gensym prefix) (-> Text (Operation Text)) - (:: ////.monad map (|>> %.nat (format prefix)) ///.next)) + (\ ////.monad map (|>> %.nat (format prefix)) ///.next)) (def: #export (case generate [valueS pathP]) (-> Phase [Synthesis Path] (Operation (Expression Any))) @@ -222,7 +222,7 @@ @case (..gensym "case") #let [@caseG (_.global @case) @caseL (_.var @case)] - @init (:: ! map _.var (..gensym "init")) + @init (\ ! map _.var (..gensym "init")) #let [@dependencies+ (|> (case.storage pathP) (get@ #case.dependencies) set.to-list diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/php/function.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/php/function.lux index e021f5234..33660380c 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/php/function.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/php/function.lux @@ -46,8 +46,8 @@ (///.with-anchor (_.var function-name) (generate bodyS)))) closureG+ (: (Operation (List Argument)) - (monad.map ! (|>> (:: //reference.system variable) - (:: ! map _.reference)) + (monad.map ! (|>> (\ //reference.system variable) + (\ ! map _.reference)) environment)) #let [@curried (_.var "curried") arityG (|> arity .int _.int) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/php/loop.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/php/loop.lux index f94470be8..a3482d8a7 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/php/loop.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/php/loop.lux @@ -23,7 +23,7 @@ (def: #export (scope generate [start initsS+ bodyS]) (-> Phase (Scope Synthesis) (Operation (Expression Any))) (do {! ////.monad} - [@loop (:: ! map (|>> %.nat (format "loop")) ///.next) + [@loop (\ ! map (|>> %.nat (format "loop")) ///.next) #let [@loopG (_.global @loop) @loopL (_.var @loop)] initsO+ (monad.map ! generate initsS+) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/php/structure.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/php/structure.lux index 8ea387fa2..9748ede02 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/php/structure.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/php/structure.lux @@ -16,7 +16,7 @@ (-> Phase (Tuple Synthesis) (Operation (Expression Any))) (case elemsS+ #.Nil - (:: ////.monad wrap (//primitive.text /////synthesis.unit)) + (\ ////.monad wrap (//primitive.text /////synthesis.unit)) (#.Cons singletonS #.Nil) (generate singletonS) @@ -24,13 +24,13 @@ _ (|> elemsS+ (monad.map ////.monad generate) - (:: ////.monad map _.array/*)))) + (\ ////.monad map _.array/*)))) (def: #export (variant generate [lefts right? valueS]) (-> Phase (Variant Synthesis) (Operation (Expression Any))) - (:: ////.monad map - (//runtime.variant (if right? - (inc lefts) - lefts) - right?) - (generate valueS))) + (\ ////.monad map + (//runtime.variant (if right? + (inc lefts) + lefts) + right?) + (generate valueS))) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/python/function.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/python/function.lux index 28e8867a0..5ce811dfd 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/python/function.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/python/function.lux @@ -46,7 +46,7 @@ _ (do {! ///////phase.monad} - [@closure (:: ! map _.var (/////generation.gensym "closure")) + [@closure (\ ! map _.var (/////generation.gensym "closure")) #let [directive (_.def @closure (|> (list.enumeration inits) (list\map (|>> product.left ..capture))) @@ -65,12 +65,12 @@ (do {! ///////phase.monad} [[function-name bodyO] (/////generation.with-new-context (do ! - [function-name (:: ! map ///reference.artifact-name - /////generation.context)] + [function-name (\ ! map ///reference.artifact-name + /////generation.context)] (/////generation.with-anchor (_.var function-name) (generate archive bodyS)))) closureO+ (: (Operation (List (Expression Any))) - (monad.map ! (:: //reference.system variable) environment)) + (monad.map ! (\ //reference.system variable) environment)) #let [function-name (///reference.artifact-name function-name) @curried (_.var "curried") arityO (|> arity .int _.int) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/python/loop.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/python/loop.lux index e8f2bd5f7..14868757d 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/python/loop.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/python/loop.lux @@ -28,7 +28,7 @@ (def: #export (scope generate archive [start initsS+ bodyS]) (Generator (Scope Synthesis)) (do {! ///////phase.monad} - [@loop (:: ! map ..loop-name /////generation.next) + [@loop (\ ! map ..loop-name /////generation.next) initsO+ (monad.map ! (generate archive) initsS+) bodyO (/////generation.with-anchor @loop (generate archive bodyS)) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/reference.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/reference.lux index b587d2963..0bb5694b7 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/reference.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/reference.lux @@ -30,7 +30,7 @@ (All [anchor expression directive] (-> (System expression) Archive Name (////generation.Operation anchor expression directive expression))) - (phase\map (|>> ..artifact (:: system constant)) + (phase\map (|>> ..artifact (\ system constant)) (////generation.remember archive name))) (template [<sigil> <name>] @@ -38,7 +38,7 @@ (All [expression] (-> (System expression) (-> Register expression))) - (|>> %.nat (format <sigil>) (:: system variable)))] + (|>> %.nat (format <sigil>) (\ system variable)))] ["f" foreign] ["l" local] diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/ruby/function.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/ruby/function.lux index 942829635..091c8fb6a 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/ruby/function.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/ruby/function.lux @@ -57,12 +57,12 @@ (do {! ///////phase.monad} [[function-name bodyO] (/////generation.with-new-context (do ! - [function-name (:: ! map ///reference.artifact-name - /////generation.context)] + [function-name (\ ! map ///reference.artifact-name + /////generation.context)] (/////generation.with-anchor (_.local function-name) (generate archive bodyS)))) closureO+ (: (Operation (List (Expression Any))) - (monad.map ! (:: //reference.system variable) environment)) + (monad.map ! (\ //reference.system variable) environment)) #let [function-name (///reference.artifact-name function-name) @curried (_.local "curried") arityO (|> arity .int _.int) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux index 42d048ed5..cecea44e9 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux @@ -28,7 +28,7 @@ (def: #export (scope generate archive [start initsS+ bodyS]) (Generator (Scope Synthesis)) (do {! ///////phase.monad} - [@loop (:: ! map ..loop-name /////generation.next) + [@loop (\ ! map ..loop-name /////generation.next) initsO+ (monad.map ! (generate archive) initsS+) bodyO (/////generation.with-anchor @loop (generate archive bodyS))] diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/scheme.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/scheme.lux index d6d33999b..e7f50ee82 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/scheme.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/scheme.lux @@ -21,7 +21,7 @@ (case synthesis (^template [<tag> <generator>] [(^ (<tag> value)) - (:: ///.monad wrap (<generator> value))]) + (\ ///.monad wrap (<generator> value))]) ([synthesis.bit primitive.bit] [synthesis.i64 primitive.i64] [synthesis.f64 primitive.f64] diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/scheme/case.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/scheme/case.lux index b25ac6bed..5f460b749 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/scheme/case.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/scheme/case.lux @@ -166,6 +166,6 @@ (-> Phase [Synthesis Path] (Operation Computation)) (do {! ////.monad} [valueO (generate valueS)] - (<| (:: ! map (_.let (list [@cursor (_.list/* (list valueO))] - [@savepoint (_.list/* (list))]))) + (<| (\ ! map (_.let (list [@cursor (_.list/* (list valueO))] + [@savepoint (_.list/* (list))]))) (pattern-matching generate pathP)))) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/scheme/function.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/scheme/function.lux index 7206c23d5..97725a8f2 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/scheme/function.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/scheme/function.lux @@ -66,7 +66,7 @@ (///.with-anchor (_.var function-name) (generate bodyS)))) closureO+ (: (Operation (List Expression)) - (monad.map ! (:: //reference.system variable) environment)) + (monad.map ! (\ //reference.system variable) environment)) #let [arityO (|> arity .int _.int) apply-poly (.function (_ args func) (_.apply/2 (_.global "apply") func args)) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/scheme/structure.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/scheme/structure.lux index 18a74a4a3..bb11d2e1f 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/scheme/structure.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/scheme/structure.lux @@ -16,7 +16,7 @@ (-> Phase (Tuple Synthesis) (Operation Expression)) (case elemsS+ #.Nil - (:: ///.monad wrap (primitive.text synthesis.unit)) + (\ ///.monad wrap (primitive.text synthesis.unit)) (#.Cons singletonS #.Nil) (generate singletonS) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/synthesis/case.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/synthesis/case.lux index ff740e751..c9b1757ce 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/synthesis/case.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/synthesis/case.lux @@ -56,7 +56,7 @@ [#///analysis.Text #/.Text-Fork |>])) (#///analysis.Bind register) - (<| (:: ///.monad map (|>> (#/.Seq (#/.Bind register)))) + (<| (\ ///.monad map (|>> (#/.Seq (#/.Bind register)))) /.with-new-local thenC) @@ -95,7 +95,7 @@ (def: (weave-branch weave equivalence [new-test new-then] [[old-test old-then] old-tail]) (All [a] (-> (-> Path Path Path) (Equivalence a) [a Path] (/.Fork a Path) (/.Fork a Path))) - (if (:: equivalence = new-test old-test) + (if (\ equivalence = new-test old-test) [[old-test (weave new-then old-then)] old-tail] [[old-test old-then] (case old-tail diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/synthesis/function.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/synthesis/function.lux index 2831b2605..2359e03b8 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/synthesis/function.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/synthesis/function.lux @@ -107,7 +107,7 @@ [then (grow-path grow then) else (case else (#.Some else) - (:: ! map (|>> #.Some) (grow-path grow else)) + (\ ! map (|>> #.Some) (grow-path grow else)) #.None (wrap #.None))] @@ -254,10 +254,10 @@ (^ (/.function/abstraction [env' down-arity' bodyS'])) (|> bodyS' (grow env') - (:: ! map (function (_ body) - {#/.environment environment - #/.arity (inc down-arity') - #/.body body}))) + (\ ! map (function (_ body) + {#/.environment environment + #/.arity (inc down-arity') + #/.body body}))) _ (wrap {#/.environment environment diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/synthesis/loop.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/synthesis/loop.lux index 3c99cdef9..80ce194d6 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/synthesis/loop.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/synthesis/loop.lux @@ -43,7 +43,7 @@ [then (recur then) else (case else (#.Some else) - (:: ! map (|>> #.Some) (recur else)) + (\ ! map (|>> #.Some) (recur else)) #.None (wrap #.None))] diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/synthesis/variable.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/synthesis/variable.lux index 4055f70e7..1312f9ed7 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/synthesis/variable.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/synthesis/variable.lux @@ -255,10 +255,10 @@ [[redundancy then] (recur [redundancy then]) [redundancy else] (case else (#.Some else) - (:: ! map - (function (_ [redundancy else]) - [redundancy (#.Some else)]) - (recur [redundancy else])) + (\ ! map + (function (_ [redundancy else]) + [redundancy (#.Some else)]) + (recur [redundancy else])) #.None (wrap [redundancy #.None]))] @@ -438,4 +438,4 @@ (-> Synthesis (Try Synthesis)) (|>> [..initial] optimization' - (:: try.monad map product.right))) + (\ try.monad map product.right))) diff --git a/stdlib/source/lux/tool/compiler/language/lux/syntax.lux b/stdlib/source/lux/tool/compiler/language/lux/syntax.lux index f2c9a4afa..766e5cbf2 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/syntax.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/syntax.lux @@ -306,7 +306,7 @@ (case (|> source-code (!clip <start> <end>) (text.replace-all ..digit-separator "") - (:: <codec> decode)) + (\ <codec> decode)) (#.Right output) (#.Right [[(update@ #.column (|>> (!n/+ (!n/- <start> <end>))) where) <end> diff --git a/stdlib/source/lux/tool/compiler/language/lux/synthesis.lux b/stdlib/source/lux/tool/compiler/language/lux/synthesis.lux index 0fe2bf712..5b631ab1b 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/synthesis.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/synthesis.lux @@ -437,7 +437,7 @@ (def: hash (|>> (case> (^template [<tag> <hash>] [(<tag> value') - (:: <hash> hash value')]) + (\ <hash> hash value')]) ([#Bit bit.hash] [#F64 f.hash] [#Text text.hash] @@ -462,7 +462,7 @@ (case [reference sample] (^template [<tag> <equivalence>] [[(<tag> reference) (<tag> sample)] - (:: <equivalence> = reference sample)]) + (\ <equivalence> = reference sample)]) ([#Side ..side-equivalence] [#Member ..member-equivalence]) @@ -479,7 +479,7 @@ (case value (^template [<tag>] [(<tag> value) - (:: sub-hash hash value)]) + (\ sub-hash hash value)]) ([#Side] [#Member]))))) @@ -495,21 +495,21 @@ (#Bit-Fork sample-when sample-then sample-else)] (and (bit\= reference-when sample-when) (= reference-then sample-then) - (:: (maybe.equivalence =) = reference-else sample-else)) + (\ (maybe.equivalence =) = reference-else sample-else)) (^template [<tag> <equivalence>] [[(<tag> reference-cons) (<tag> sample-cons)] - (:: (list.equivalence (equivalence.product <equivalence> =)) = - (#.Cons reference-cons) - (#.Cons sample-cons))]) + (\ (list.equivalence (equivalence.product <equivalence> =)) = + (#.Cons reference-cons) + (#.Cons sample-cons))]) ([#I64-Fork i64.equivalence] [#F64-Fork f.equivalence] [#Text-Fork text.equivalence]) (^template [<tag> <equivalence>] [[(<tag> reference') (<tag> sample')] - (:: <equivalence> = reference' sample')]) + (\ <equivalence> = reference' sample')]) ([#Access ..access-equivalence] [#Then equivalence]) @@ -530,7 +530,7 @@ (All [a] (-> (Hash a) (Hash (Path' a)))) (def: &equivalence - (..path'-equivalence (:: super &equivalence))) + (..path'-equivalence (\ super &equivalence))) (def: (hash value) (case value @@ -538,23 +538,23 @@ 2 (#Access access) - (n.* 3 (:: ..access-hash hash access)) + (n.* 3 (\ ..access-hash hash access)) (#Bind register) - (n.* 5 (:: n.hash hash register)) + (n.* 5 (\ n.hash hash register)) (#Bit-Fork when then else) ($_ n.* 7 - (:: bit.hash hash when) + (\ bit.hash hash when) (hash then) - (:: (maybe.hash (path'-hash super)) hash else)) + (\ (maybe.hash (path'-hash super)) hash else)) (^template [<factor> <tag> <hash>] [(<tag> cons) (let [case-hash (product.hash <hash> (path'-hash super)) cons-hash (product.hash case-hash (list.hash case-hash))] - (n.* <factor> (:: cons-hash hash cons)))]) + (n.* <factor> (\ cons-hash hash cons)))]) ([11 #I64-Fork i64.hash] [13 #F64-Fork f.hash] [17 #Text-Fork text.hash]) @@ -563,12 +563,12 @@ [(<tag> fork) (let [recur-hash (path'-hash super) fork-hash (product.hash recur-hash recur-hash)] - (n.* <factor> (:: fork-hash hash fork)))]) + (n.* <factor> (\ fork-hash hash fork)))]) ([19 #Alt] [23 #Seq]) (#Then body) - (n.* 29 (:: super hash body)) + (n.* 29 (\ super hash body)) ))) (structure: (branch-equivalence (^open "\.")) @@ -590,13 +590,13 @@ [(#Get [reference-path reference-record]) (#Get [sample-path sample-record])] - (and (:: (list.equivalence ..member-equivalence) = reference-path sample-path) + (and (\ (list.equivalence ..member-equivalence) = reference-path sample-path) (\= reference-record sample-record)) [(#Case [reference-input reference-path]) (#Case [sample-input sample-path])] (and (\= reference-input sample-input) - (:: (path'-equivalence \=) = reference-path sample-path)) + (\ (path'-equivalence \=) = reference-path sample-path)) _ false))) @@ -605,31 +605,31 @@ (All [a] (-> (Hash a) (Hash (Branch a)))) (def: &equivalence - (..branch-equivalence (:: super &equivalence))) + (..branch-equivalence (\ super &equivalence))) (def: (hash value) (case value (#Let [input register body]) ($_ n.* 2 - (:: super hash input) - (:: n.hash hash register) - (:: super hash body)) + (\ super hash input) + (\ n.hash hash register) + (\ super hash body)) (#If [test then else]) ($_ n.* 3 - (:: super hash test) - (:: super hash then) - (:: super hash else)) + (\ super hash test) + (\ super hash then) + (\ super hash else)) (#Get [path record]) ($_ n.* 5 - (:: (list.hash ..member-hash) hash path) - (:: super hash record)) + (\ (list.hash ..member-hash) hash path) + (\ super hash record)) (#Case [input path]) ($_ n.* 7 - (:: super hash input) - (:: (..path'-hash super) hash path)) + (\ super hash input) + (\ (..path'-hash super) hash path)) ))) (structure: (loop-equivalence (^open "\.")) @@ -640,11 +640,11 @@ [(#Scope [reference-start reference-inits reference-iteration]) (#Scope [sample-start sample-inits sample-iteration])] (and (n.= reference-start sample-start) - (:: (list.equivalence \=) = reference-inits sample-inits) + (\ (list.equivalence \=) = reference-inits sample-inits) (\= reference-iteration sample-iteration)) [(#Recur reference) (#Recur sample)] - (:: (list.equivalence \=) = reference sample) + (\ (list.equivalence \=) = reference sample) _ false))) @@ -653,19 +653,19 @@ (All [a] (-> (Hash a) (Hash (Loop a)))) (def: &equivalence - (..loop-equivalence (:: super &equivalence))) + (..loop-equivalence (\ super &equivalence))) (def: (hash value) (case value (#Scope [start inits iteration]) ($_ n.* 2 - (:: n.hash hash start) - (:: (list.hash super) hash inits) - (:: super hash iteration)) + (\ n.hash hash start) + (\ (list.hash super) hash inits) + (\ super hash iteration)) (#Recur resets) ($_ n.* 3 - (:: (list.hash super) hash resets)) + (\ (list.hash super) hash resets)) ))) (structure: (function-equivalence (^open "\.")) @@ -675,14 +675,14 @@ (case [reference sample] [(#Abstraction [reference-environment reference-arity reference-body]) (#Abstraction [sample-environment sample-arity sample-body])] - (and (:: (list.equivalence \=) = reference-environment sample-environment) + (and (\ (list.equivalence \=) = reference-environment sample-environment) (n.= reference-arity sample-arity) (\= reference-body sample-body)) [(#Apply [reference-abstraction reference-arguments]) (#Apply [sample-abstraction sample-arguments])] (and (\= reference-abstraction sample-abstraction) - (:: (list.equivalence \=) = reference-arguments sample-arguments)) + (\ (list.equivalence \=) = reference-arguments sample-arguments)) _ false))) @@ -691,20 +691,20 @@ (All [a] (-> (Hash a) (Hash (Function a)))) (def: &equivalence - (..function-equivalence (:: super &equivalence))) + (..function-equivalence (\ super &equivalence))) (def: (hash value) (case value (#Abstraction [environment arity body]) ($_ n.* 2 - (:: (list.hash super) hash environment) - (:: n.hash hash arity) - (:: super hash body)) + (\ (list.hash super) hash environment) + (\ n.hash hash arity) + (\ super hash body)) (#Apply [abstraction arguments]) ($_ n.* 3 - (:: super hash abstraction) - (:: (list.hash super) hash arguments)) + (\ super hash abstraction) + (\ (list.hash super) hash arguments)) ))) (structure: (control-equivalence (^open "\.")) @@ -714,7 +714,7 @@ (case [reference sample] (^template [<tag> <equivalence>] [[(<tag> reference) (<tag> sample)] - (:: (<equivalence> \=) = reference sample)]) + (\ (<equivalence> \=) = reference sample)]) ([#Branch ..branch-equivalence] [#Loop ..loop-equivalence] [#Function ..function-equivalence]) @@ -726,13 +726,13 @@ (All [a] (-> (Hash a) (Hash (Control a)))) (def: &equivalence - (..control-equivalence (:: super &equivalence))) + (..control-equivalence (\ super &equivalence))) (def: (hash value) (case value (^template [<factor> <tag> <hash>] [(<tag> value) - (n.* <factor> (:: (<hash> super) hash value))]) + (n.* <factor> (\ (<hash> super) hash value))]) ([2 #Branch ..branch-hash] [3 #Loop ..loop-hash] [5 #Function ..function-hash]) @@ -745,7 +745,7 @@ (case [reference sample] (^template [<tag> <equivalence>] [[(<tag> reference') (<tag> sample')] - (:: <equivalence> = reference' sample')]) + (\ <equivalence> = reference' sample')]) ([#Primitive ..primitive-equivalence] [#Structure (analysis.composite-equivalence =)] [#Reference reference.equivalence] @@ -769,7 +769,7 @@ (case value (^template [<tag> <hash>] [(<tag> value) - (:: <hash> hash value)]) + (\ <hash> hash value)]) ([#Primitive ..primitive-hash] [#Structure (analysis.composite-hash recur-hash)] [#Reference reference.hash] diff --git a/stdlib/source/lux/tool/compiler/meta/archive/artifact.lux b/stdlib/source/lux/tool/compiler/meta/archive/artifact.lux index dec8938b3..319b23169 100644 --- a/stdlib/source/lux/tool/compiler/meta/archive/artifact.lux +++ b/stdlib/source/lux/tool/compiler/meta/archive/artifact.lux @@ -127,28 +127,28 @@ (do {! <>.monad} [tag <b>.nat] (case tag - 0 (:: ! map (|>> #Anonymous) <b>.any) - 1 (:: ! map (|>> #Definition) <b>.text) - 2 (:: ! map (|>> #Analyser) <b>.text) - 3 (:: ! map (|>> #Synthesizer) <b>.text) - 4 (:: ! map (|>> #Generator) <b>.text) - 5 (:: ! map (|>> #Directive) <b>.text) + 0 (\ ! map (|>> #Anonymous) <b>.any) + 1 (\ ! map (|>> #Definition) <b>.text) + 2 (\ ! map (|>> #Analyser) <b>.text) + 3 (\ ! map (|>> #Synthesizer) <b>.text) + 4 (\ ! map (|>> #Generator) <b>.text) + 5 (\ ! map (|>> #Directive) <b>.text) _ (<>.fail (exception.construct ..invalid-category [tag])))))] (|> (<b>.row/64 category) - (:: <>.monad map (row\fold (function (_ artifact registry) - (product.right - (case artifact - #Anonymous - (..resource registry) - - (^template [<tag> <create>] - [(<tag> name) - (<create> name registry)]) - ([#Definition ..definition] - [#Analyser ..analyser] - [#Synthesizer ..synthesizer] - [#Generator ..generator] - [#Directive ..directive]) - ))) - ..empty))))) + (\ <>.monad map (row\fold (function (_ artifact registry) + (product.right + (case artifact + #Anonymous + (..resource registry) + + (^template [<tag> <create>] + [(<tag> name) + (<create> name registry)]) + ([#Definition ..definition] + [#Analyser ..analyser] + [#Synthesizer ..synthesizer] + [#Generator ..generator] + [#Directive ..directive]) + ))) + ..empty))))) ) diff --git a/stdlib/source/lux/tool/compiler/meta/archive/descriptor.lux b/stdlib/source/lux/tool/compiler/meta/archive/descriptor.lux index 987aa5fbf..2ae89cf4e 100644 --- a/stdlib/source/lux/tool/compiler/meta/archive/descriptor.lux +++ b/stdlib/source/lux/tool/compiler/meta/archive/descriptor.lux @@ -42,7 +42,7 @@ <b>.text <b>.text <b>.nat - (:: <>.monad wrap #.Cached) + (\ <>.monad wrap #.Cached) (<b>.set text.hash <b>.text) artifact.parser )) diff --git a/stdlib/source/lux/tool/compiler/meta/archive/document.lux b/stdlib/source/lux/tool/compiler/meta/archive/document.lux index bc6fc5288..a8c656ff9 100644 --- a/stdlib/source/lux/tool/compiler/meta/archive/document.lux +++ b/stdlib/source/lux/tool/compiler/meta/archive/document.lux @@ -31,9 +31,9 @@ (def: #export (read key document) (All [d] (-> (Key d) (Document Any) (Try d))) (let [[document//signature document//content] (:representation document)] - (if (:: signature.equivalence = - (key.signature key) - document//signature) + (if (\ signature.equivalence = + (key.signature key) + document//signature) (#try.Success (:share [e] {(Key e) key} @@ -66,5 +66,5 @@ (def: #export parser (All [d] (-> (Parser d) (Parser (Document d)))) (|>> (<>.and signature.parser) - (:: <>.monad map (|>> :abstraction)))) + (\ <>.monad map (|>> :abstraction)))) ) diff --git a/stdlib/source/lux/tool/compiler/meta/io.lux b/stdlib/source/lux/tool/compiler/meta/io.lux index 41481d0fa..0a7927aa0 100644 --- a/stdlib/source/lux/tool/compiler/meta/io.lux +++ b/stdlib/source/lux/tool/compiler/meta/io.lux @@ -13,7 +13,7 @@ (def: #export (sanitize system) (All [m] (-> (System m) Text Text)) - (text.replace-all "/" (:: system separator))) + (text.replace-all "/" (\ system separator))) (def: #export lux-context "lux") diff --git a/stdlib/source/lux/tool/compiler/meta/io/archive.lux b/stdlib/source/lux/tool/compiler/meta/io/archive.lux index 63639f444..e2c046449 100644 --- a/stdlib/source/lux/tool/compiler/meta/io/archive.lux +++ b/stdlib/source/lux/tool/compiler/meta/io/archive.lux @@ -61,31 +61,31 @@ (def: (archive system static) (All [!] (-> (file.System !) Static Path)) (format (get@ #static.target static) - (:: system separator) + (\ system separator) (get@ #static.host static))) (def: (unversioned-lux-archive system static) (All [!] (-> (file.System !) Static Path)) (format (..archive system static) - (:: system separator) + (\ system separator) //.lux-context)) (def: (versioned-lux-archive system static) (All [!] (-> (file.System !) Static Path)) (format (..unversioned-lux-archive system static) - (:: system separator) + (\ system separator) (%.nat version.version))) (def: (module system static module-id) (All [!] (-> (file.System !) Static archive.ID Path)) (format (..versioned-lux-archive system static) - (:: system separator) + (\ system separator) (%.nat module-id))) (def: #export (artifact system static module-id name) (All [!] (-> (file.System !) Static archive.ID Text Path)) (format (..module system static module-id) - (:: system separator) + (\ system separator) name (get@ #static.artifact-extension static))) @@ -99,7 +99,7 @@ (do ! [_ (file.get-directory ! system (..unversioned-lux-archive system static)) _ (file.get-directory ! system (..versioned-lux-archive system static)) - outcome (!.use (:: system create-directory) module)] + outcome (!.use (\ system create-directory) module)] (case outcome (#try.Success output) (wrap (#try.Success [])) @@ -115,7 +115,7 @@ [artifact (: (Promise (Try (File Promise))) (file.get-file promise.monad system (..artifact system static module-id name)))] - (!.use (:: artifact over-write) content))) + (!.use (\ artifact over-write) content))) (def: #export (enable system static) (-> (file.System Promise) Static (Promise (Try Any))) @@ -129,7 +129,7 @@ (def: (general-descriptor system static) (-> (file.System Promise) Static Path) (format (..archive system static) - (:: system separator) + (\ system separator) "general-descriptor")) (def: #export (freeze system static archive) @@ -137,7 +137,7 @@ (do (try.with promise.monad) [file (: (Promise (Try (File Promise))) (file.get-file promise.monad system (..general-descriptor system static)))] - (!.use (:: file over-write) (archive.export ///.version archive)))) + (!.use (\ file over-write) (archive.export ///.version archive)))) (def: module-descriptor-file "module-descriptor") @@ -145,7 +145,7 @@ (def: (module-descriptor system static module-id) (-> (file.System Promise) Static archive.ID Path) (format (..module system static module-id) - (:: system separator) + (\ system separator) ..module-descriptor-file)) (def: #export (cache system static module-id content) @@ -154,7 +154,7 @@ [file (: (Promise (Try (File Promise))) (file.get-file promise.monad system (..module-descriptor system static module-id)))] - (!.use (:: file over-write) content))) + (!.use (\ file over-write) content))) (def: (read-module-descriptor system static module-id) (-> (file.System Promise) Static archive.ID (Promise (Try Binary))) @@ -162,7 +162,7 @@ [file (: (Promise (Try (File Promise))) (file.get-file promise.monad system (..module-descriptor system static module-id)))] - (!.use (:: file content) []))) + (!.use (\ file content) []))) (def: parser (Parser [Descriptor (Document .Module)]) @@ -188,21 +188,21 @@ (def: (cached-artifacts system static module-id) (-> (file.System Promise) Static archive.ID (Promise (Try (Dictionary Text Binary)))) (do {! (try.with promise.monad)} - [module-dir (!.use (:: system directory) (..module system static module-id)) - cached-files (!.use (:: module-dir files) [])] + [module-dir (!.use (\ system directory) (..module system static module-id)) + cached-files (!.use (\ module-dir files) [])] (|> cached-files (list\map (function (_ file) - [(!.use (:: file name) []) - (!.use (:: file path) [])])) + [(!.use (\ file name) []) + (!.use (\ file path) [])])) (list.filter (|>> product.left (text\= ..module-descriptor-file) not)) (monad.map ! (function (_ [name path]) (do ! [file (: (Promise (Try (File Promise))) - (!.use (:: system file) path)) + (!.use (\ system file) path)) data (: (Promise (Try Binary)) - (!.use (:: file content) []))] + (!.use (\ file content) []))] (wrap [name data])))) - (:: ! map (dictionary.from-list text.hash))))) + (\ ! map (dictionary.from-list text.hash))))) (type: Definitions (Dictionary Text Any)) (type: Analysers (Dictionary Text analysis.Handler)) @@ -239,11 +239,11 @@ (case (do ! [data (try.from-maybe (dictionary.get (format (%.nat artifact-id) extension) actual)) #let [context [module-id artifact-id] - directive (:: host ingest context data)]] + directive (\ host ingest context data)]] (case artifact-category #artifact.Anonymous (do ! - [_ (:: host re-learn context directive)] + [_ (\ host re-learn context directive)] (wrap [definitions [analysers synthesizers @@ -258,7 +258,7 @@ generators directives]]) (do ! - [value (:: host re-load context directive)] + [value (\ host re-load context directive)] (wrap [(dictionary.put name value definitions) [analysers synthesizers @@ -267,7 +267,7 @@ (#artifact.Analyser extension) (do ! - [value (:: host re-load context directive)] + [value (\ host re-load context directive)] (wrap [definitions [(dictionary.put extension (:coerce analysis.Handler value) analysers) synthesizers @@ -276,7 +276,7 @@ (#artifact.Synthesizer extension) (do ! - [value (:: host re-load context directive)] + [value (\ host re-load context directive)] (wrap [definitions [analysers (dictionary.put extension (:coerce synthesis.Handler value) synthesizers) @@ -285,7 +285,7 @@ (#artifact.Generator extension) (do ! - [value (:: host re-load context directive)] + [value (\ host re-load context directive)] (wrap [definitions [analysers synthesizers @@ -294,7 +294,7 @@ (#artifact.Directive extension) (do ! - [value (:: host re-load context directive)] + [value (\ host re-load context directive)] (wrap [definitions [analysers synthesizers @@ -337,12 +337,12 @@ (def: (purge! system static [module-name module-id]) (-> (file.System Promise) Static [Module archive.ID] (Promise (Try Any))) (do {! (try.with promise.monad)} - [cache (!.use (:: system directory) [(..module system static module-id)]) - artifacts (!.use (:: cache files) []) + [cache (!.use (\ system directory) [(..module system static module-id)]) + artifacts (!.use (\ cache files) []) _ (monad.map ! (function (_ artifact) - (!.use (:: artifact delete) [])) + (!.use (\ artifact delete) [])) artifacts)] - (!.use (:: cache discard) []))) + (!.use (\ cache discard) []))) (def: (valid-cache? expected actual) (-> Descriptor Input Bit) @@ -408,8 +408,8 @@ (function (_ [module [module-id descriptor,document]] archive) (archive.add module descriptor,document archive)) archive) - (:: try.monad map (dependency.load-order $.key)) - (:: try.monad join) + (\ try.monad map (dependency.load-order $.key)) + (\ try.monad join) promise\wrap) #let [purge (..full-purge pre-loaded-caches load-order)] _ (|> purge @@ -447,11 +447,11 @@ (-> (generation.Host expression directive) (file.System Promise) Static Import (List Context) (Promise (Try [Archive .Lux Bundles])))) (do promise.monad - [file (!.use (:: system file) (..general-descriptor system static))] + [file (!.use (\ system file) (..general-descriptor system static))] (case file (#try.Success file) (do (try.with promise.monad) - [binary (!.use (:: file content) []) + [binary (!.use (\ file content) []) archive (promise\wrap (archive.import ///.version binary))] (..load-every-reserved-module host-environment system static import contexts archive)) diff --git a/stdlib/source/lux/tool/compiler/meta/io/context.lux b/stdlib/source/lux/tool/compiler/meta/io/context.lux index 572905325..74f0b4bd8 100644 --- a/stdlib/source/lux/tool/compiler/meta/io/context.lux +++ b/stdlib/source/lux/tool/compiler/meta/io/context.lux @@ -49,7 +49,7 @@ (All [m] (-> (file.System m) Context Module Path)) (|> module (//.sanitize system) - (format context (:: system separator)))) + (format context (\ system separator)))) (def: (find-source-file system contexts module extension) (-> (file.System Promise) (List Context) Module Extension @@ -61,7 +61,7 @@ (#.Cons context contexts') (do promise.monad [#let [path (format (..path system context module) extension)] - file (!.use (:: system file) [path])] + file (!.use (\ system file) [path])] (case file (#try.Success file) (wrap (#try.Success [path file])) @@ -83,13 +83,13 @@ (case outcome (#try.Success [path file]) (do (try.with !) - [data (!.use (:: file content) [])] + [data (!.use (\ file content) [])] (wrap [path data])) (#try.Failure _) (do (try.with !) [[path file] (..find-source-file system contexts module ..lux-extension) - data (!.use (:: file content) [])] + data (!.use (\ file content) [])] (wrap [path data]))))) (def: (find-library-source-file import partial-host-extension module) @@ -147,7 +147,7 @@ (def: (clean-path system context path) (All [!] (-> (file.System !) Context Path (Try Path))) - (let [prefix (format context (:: system separator))] + (let [prefix (format context (\ system separator))] (case (text.split-with prefix path) #.None (exception.throw ..cannot-clean-path [prefix path]) @@ -158,23 +158,23 @@ (def: (enumerate-context system context enumeration) (-> (file.System Promise) Context Enumeration (Promise (Try Enumeration))) (do {! (try.with promise.monad)} - [directory (!.use (:: system directory) [context])] + [directory (!.use (\ system directory) [context])] (loop [directory directory enumeration enumeration] (do ! - [files (!.use (:: directory files) []) + [files (!.use (\ directory files) []) enumeration (monad.fold ! (function (_ file enumeration) - (let [path (!.use (:: file path) [])] + (let [path (!.use (\ file path) [])] (if (text.ends-with? ..lux-extension path) (do ! [path (promise\wrap (..clean-path system context path)) - source-code (!.use (:: file content) [])] + source-code (!.use (\ file content) [])] (promise\wrap (dictionary.try-put path source-code enumeration))) (wrap enumeration)))) enumeration files) - directories (!.use (:: directory directories) [])] + directories (!.use (\ directory directories) [])] (monad.fold ! recur enumeration directories))))) (def: Action diff --git a/stdlib/source/lux/tool/compiler/meta/packager/jvm.lux b/stdlib/source/lux/tool/compiler/meta/packager/jvm.lux index f5838cf80..fa63bedab 100644 --- a/stdlib/source/lux/tool/compiler/meta/packager/jvm.lux +++ b/stdlib/source/lux/tool/compiler/meta/packager/jvm.lux @@ -49,40 +49,49 @@ (import: java/lang/String) (import: java/util/jar/Attributes - (put [java/lang/Object java/lang/Object] #? java/lang/Object)) + ["#::." + (put [java/lang/Object java/lang/Object] #? java/lang/Object)]) (import: java/util/jar/Attributes$Name - (#static MAIN_CLASS java/util/jar/Attributes$Name) - (#static MANIFEST_VERSION java/util/jar/Attributes$Name)) + ["#::." + (#static MAIN_CLASS java/util/jar/Attributes$Name) + (#static MANIFEST_VERSION java/util/jar/Attributes$Name)]) (import: java/util/jar/Manifest - (new []) - (getMainAttributes [] java/util/jar/Attributes)) + ["#::." + (new []) + (getMainAttributes [] java/util/jar/Attributes)]) (import: java/io/Flushable - (flush [] void)) + ["#::." + (flush [] void)]) (import: java/io/Closeable - (close [] void)) + ["#::." + (close [] void)]) (import: java/io/OutputStream) (import: java/io/ByteArrayOutputStream - (new [int]) - (toByteArray [] [byte])) + ["#::." + (new [int]) + (toByteArray [] [byte])]) (import: java/util/zip/ZipEntry) (import: java/util/zip/ZipOutputStream - (write [[byte] int int] void) - (closeEntry [] void)) + ["#::." + (write [[byte] int int] void) + (closeEntry [] void)]) (import: java/util/jar/JarEntry - (new [java/lang/String])) + ["#::." + (new [java/lang/String])]) (import: java/util/jar/JarOutputStream - (new [java/io/OutputStream java/util/jar/Manifest]) - (putNextEntry [java/util/zip/ZipEntry] void)) + ["#::." + (new [java/io/OutputStream java/util/jar/Manifest]) + (putNextEntry [java/util/zip/ZipEntry] void)]) (def: byte 1) ## https://en.wikipedia.org/wiki/Kibibyte @@ -110,8 +119,8 @@ (Action ! java/util/jar/JarOutputStream))) (do (try.with monad) [artifact (let [[module artifact] context] - (!.use (:: file-system file) [(io.artifact file-system static module (%.nat artifact))])) - content (!.use (:: artifact content) []) + (!.use (\ file-system file) [(io.artifact file-system static module (%.nat artifact))])) + content (!.use (\ artifact content) []) #let [class-path (format (runtime.class-name context) (get@ #static.artifact-extension static))]] (wrap (do-to sink (java/util/jar/JarOutputStream::putNextEntry (java/util/jar/JarEntry::new class-path)) @@ -136,7 +145,7 @@ {(Monad !) monad} {(! (Try (Directory !))) - (:assume (!.use (:: file-system directory) [(get@ #static.target static)]))}) + (:assume (!.use (\ file-system directory) [(get@ #static.target static)]))}) order (|> archive archive.archived (monad.map try.monad (function (_ module) @@ -149,7 +158,7 @@ row.to-list (list\map (|>> (get@ #artifact.id))) [module-id]))))) - (:: monad wrap)) + (\ monad wrap)) #let [buffer (java/io/ByteArrayOutputStream::new (.int ..mebi-byte)) sink (java/util/jar/JarOutputStream::new buffer (..manifest program))] sink (monad.fold ! (..write-module monad file-system static) sink order) diff --git a/stdlib/source/lux/tool/compiler/meta/packager/script.lux b/stdlib/source/lux/tool/compiler/meta/packager/script.lux index b40873ace..5b826a4e0 100644 --- a/stdlib/source/lux/tool/compiler/meta/packager/script.lux +++ b/stdlib/source/lux/tool/compiler/meta/packager/script.lux @@ -44,8 +44,8 @@ (Action ! Binary))) (do (try.with monad) [artifact (let [[module artifact] context] - (!.use (:: file-system file) [(io.artifact file-system static module (%.nat artifact))]))] - (!.use (:: artifact content) []))) + (!.use (\ file-system file) [(io.artifact file-system static module (%.nat artifact))]))] + (!.use (\ artifact content) []))) (def: (write-module monad file-system static sequence [module artifacts] so-far) (All [! directive] @@ -55,7 +55,7 @@ (function (_ artifact so-far) (do (try.with monad) [content (..write-artifact monad file-system static [module artifact]) - content (:: monad wrap (encoding.from-utf8 content))] + content (\ monad wrap (encoding.from-utf8 content))] (wrap (sequence so-far (:share [directive] {directive @@ -73,8 +73,8 @@ (Packager !))) (function (package monad file-system static archive program) (do {! (try.with monad)} - [cache (!.use (:: file-system directory) [(get@ #static.target static)]) - order (:: monad wrap (dependency.load-order $.key archive))] + [cache (!.use (\ file-system directory) [(get@ #static.target static)]) + order (\ monad wrap (dependency.load-order $.key archive))] (|> order (list\map (function (_ [module [module-id [descriptor document]]]) [module-id @@ -84,4 +84,4 @@ row.to-list (list\map (|>> (get@ #artifact.id))))])) (monad.fold ! (..write-module monad file-system static sequence) header) - (:: ! map (|>> to-code encoding.to-utf8)))))) + (\ ! map (|>> to-code encoding.to-utf8)))))) diff --git a/stdlib/source/lux/tool/compiler/phase.lux b/stdlib/source/lux/tool/compiler/phase.lux index 312428ff7..847faaefa 100644 --- a/stdlib/source/lux/tool/compiler/phase.lux +++ b/stdlib/source/lux/tool/compiler/phase.lux @@ -42,7 +42,7 @@ (-> s (Operation s o) (Try o))) (|> state operation - (:: try.monad map product.right))) + (\ try.monad map product.right))) (def: #export get-state (All [s o] @@ -81,7 +81,7 @@ (syntax: #export (assert exception message test) (wrap (list (` (if (~ test) - (:: ..monad (~' wrap) []) + (\ ..monad (~' wrap) []) (..throw (~ exception) (~ message))))))) (def: #export identity diff --git a/stdlib/source/lux/tool/compiler/reference.lux b/stdlib/source/lux/tool/compiler/reference.lux index 5ade63e39..62ec9e3ca 100644 --- a/stdlib/source/lux/tool/compiler/reference.lux +++ b/stdlib/source/lux/tool/compiler/reference.lux @@ -28,7 +28,7 @@ (case [reference sample] (^template [<tag> <equivalence>] [[(<tag> reference) (<tag> sample)] - (:: <equivalence> = reference sample)]) + (\ <equivalence> = reference sample)]) ([#Variable /variable.equivalence] [#Constant name.equivalence]) @@ -46,7 +46,7 @@ (^template [<factor> <tag> <hash>] [(<tag> value) ($_ n.* <factor> - (:: <hash> hash value))]) + (\ <hash> hash value))]) ([2 #Variable /variable.hash] [3 #Constant name.hash]) ))) diff --git a/stdlib/source/lux/tool/compiler/reference/variable.lux b/stdlib/source/lux/tool/compiler/reference/variable.lux index e97974596..2a4d1424d 100644 --- a/stdlib/source/lux/tool/compiler/reference/variable.lux +++ b/stdlib/source/lux/tool/compiler/reference/variable.lux @@ -42,7 +42,7 @@ (|>> (case> (^template [<factor> <tag>] [(<tag> register) ($_ n.* <factor> - (:: n.hash hash register))]) + (\ n.hash hash register))]) ([2 #Local] [3 #Foreign]))))) diff --git a/stdlib/source/lux/tool/interpreter.lux b/stdlib/source/lux/tool/interpreter.lux index a8c2fe0b6..e18a27c47 100644 --- a/stdlib/source/lux/tool/interpreter.lux +++ b/stdlib/source/lux/tool/interpreter.lux @@ -77,9 +77,9 @@ #.info #.mode] #.Interpreter state)) - [state _] (:: (get@ #platform.file-system platform) - lift (phase.run' state enter-module)) - _ (:: Console<!> write ..welcome-message)] + [state _] (\ (get@ #platform.file-system platform) + lift (phase.run' state enter-module)) + _ (\ Console<!> write ..welcome-message)] (wrap state))) (with-expansions [<Interpretation> (as-is (Operation anchor expression directive [Type Any]))] @@ -201,16 +201,16 @@ multi-line? #0] (do ! [_ (if multi-line? - (:: Console<!> write " ") - (:: Console<!> write "> ")) - line (:: Console<!> read-line)] + (\ Console<!> write " ") + (\ Console<!> write "> ")) + line (\ Console<!> read-line)] (if (and (not multi-line?) (text\= ..exit-command line)) - (:: Console<!> write ..farewell-message) + (\ Console<!> write ..farewell-message) (case (read-eval-print (update@ #source (add-line line) context)) (#try.Success [context' representation]) (do ! - [_ (:: Console<!> write representation)] + [_ (\ Console<!> write representation)] (recur context' #0)) (#try.Failure error) diff --git a/stdlib/source/lux/type/abstract.lux b/stdlib/source/lux/type/abstract.lux index e89f33774..95855c5df 100644 --- a/stdlib/source/lux/type/abstract.lux +++ b/stdlib/source/lux/type/abstract.lux @@ -201,7 +201,7 @@ (def: declaration (Parser [Text (List Text)]) (<>.either (<c>.form (<>.and <c>.local-identifier (<>.some <c>.local-identifier))) - (<>.and <c>.local-identifier (:: <>.monad wrap (list))))) + (<>.and <c>.local-identifier (\ <>.monad wrap (list))))) ## TODO: Make sure the generated code always gets optimized away. ## (This applies to uses of ":abstraction" and ":representation") diff --git a/stdlib/source/lux/type/check.lux b/stdlib/source/lux/type/check.lux index 742e02557..13a1e1381 100644 --- a/stdlib/source/lux/type/check.lux +++ b/stdlib/source/lux/type/check.lux @@ -426,7 +426,7 @@ (do ! [ringE (..ring idE) ringA (..ring idA)] - (if (:: set.equivalence = ringE ringA) + (if (\ set.equivalence = ringE ringA) (wrap assumptions) ## Fuse 2 rings (do ! diff --git a/stdlib/source/lux/type/dynamic.lux b/stdlib/source/lux/type/dynamic.lux index be017585e..3d0d96ee9 100644 --- a/stdlib/source/lux/type/dynamic.lux +++ b/stdlib/source/lux/type/dynamic.lux @@ -39,8 +39,8 @@ (with-gensyms [g!type g!value] (wrap (list (` (let [[(~ g!type) (~ g!value)] ((~! ..dynamic-representation) (~ value))] (: ((~! try.Try) (~ type)) - (if (:: (~! type.equivalence) (~' =) - (.type (~ type)) (~ g!type)) + (if (\ (~! type.equivalence) (~' =) + (.type (~ type)) (~ g!type)) (#try.Success (:coerce (~ type) (~ g!value))) ((~! exception.throw) ..wrong-type [(.type (~ type)) (~ g!type)]))))))))) diff --git a/stdlib/source/lux/type/implicit.lux b/stdlib/source/lux/type/implicit.lux index cf2068839..69890cd3e 100644 --- a/stdlib/source/lux/type/implicit.lux +++ b/stdlib/source/lux/type/implicit.lux @@ -36,7 +36,7 @@ (find-type-var id' env) _ - (:: meta.monad wrap type)) + (\ meta.monad wrap type)) (#.Some [_ #.None]) (meta.fail (format "Unbound type-var " (%.nat id))) @@ -73,12 +73,12 @@ (#.Product left right) (if (n.= 0 idx) - (:: check.monad wrap left) + (\ check.monad wrap left) (find-member-type (dec idx) right)) _ (if (n.= 0 idx) - (:: check.monad wrap sig-type) + (\ check.monad wrap sig-type) (check.fail (format "Cannot find member type " (%.nat idx) " for " (%.type sig-type)))))) (def: (find-member-name member) @@ -107,7 +107,7 @@ (meta.fail (format "Too many candidate tags: " (%.list %.name candidates)))))) _ - (:: meta.monad wrap member))) + (\ meta.monad wrap member))) (def: (resolve-member member) (-> Name (Meta [Nat Type])) @@ -143,8 +143,8 @@ (Meta (List [Name Type])) (do {! meta.monad} [this-module-name meta.current-module-name] - (:: ! map (prepare-definitions this-module-name this-module-name) - (meta.definitions this-module-name)))) + (\ ! map (prepare-definitions this-module-name this-module-name) + (meta.definitions this-module-name)))) (def: import-structs (Meta (List [Name Type])) @@ -152,8 +152,8 @@ [this-module-name meta.current-module-name imp-mods (meta.imported-modules this-module-name) export-batches (monad.map ! (function (_ imp-mod) - (:: ! map (prepare-definitions imp-mod this-module-name) - (meta.definitions imp-mod))) + (\ ! map (prepare-definitions imp-mod this-module-name) + (meta.definitions imp-mod))) imp-mods)] (wrap (list\join export-batches)))) @@ -188,7 +188,7 @@ final-output])) _ - (:: check.monad wrap [(list) type]))) + (\ check.monad wrap [(list) type]))) (def: (check-apply member-type input-types output-type) (-> Type (List Type) Type (Check [])) @@ -248,7 +248,7 @@ (check.fail (format "No candidates for provisioning: " (%.type dep))) (#.Cons winner #.Nil) - (:: check.monad wrap winner) + (\ check.monad wrap winner) _ (check.fail (format "Too many candidates for provisioning: " (%.type dep) " --- " (%.list (|>> product.left %.name) candidates)))) @@ -313,10 +313,10 @@ _ (` ((~ (code.identifier constructor)) (~+ (list\map instance$ dependencies)))))) -(syntax: #export (::: - {member s.identifier} - {args (p.or (p.and (p.some s.identifier) s.end!) - (p.and (p.some s.any) s.end!))}) +(syntax: #export (\\ + {member s.identifier} + {args (p.or (p.and (p.some s.identifier) s.end!) + (p.and (p.some s.any) s.end!))}) {#.doc (doc "Automatic structure selection (for type-class style polymorphism)." "This feature layers type-class style polymorphism on top of Lux's signatures and structures." "When calling a polymorphic function, or using a polymorphic constant," @@ -328,16 +328,16 @@ "a compile-time error will be raised, to alert the user." "Examples:" "Nat equivalence" - (:: number.equivalence = x y) - (::: = x y) + (\ number.equivalence = x y) + (\\ = x y) "Can optionally add the prefix of the module where the signature was defined." - (::: eq.= x y) + (\\ eq.= x y) "(List Nat) equivalence" - (::: = - (list.indices 10) - (list.indices 10)) + (\\ = + (list.indices 10) + (list.indices 10)) "(Functor List) map" - (::: map inc (list.indices 10)) + (\\ map inc (list.indices 10)) "Caveat emptor: You need to make sure to import the module of any structure you want to use." "Otherwise, this macro will not find it.")} (case args @@ -352,9 +352,9 @@ (meta.fail (format "No structure option could be found for member: " (%.name member))) (#.Cons chosen #.Nil) - (wrap (list (` (:: (~ (instance$ chosen)) - (~ (code.local-identifier (product.right member))) - (~+ (list\map code.identifier args)))))) + (wrap (list (` (\ (~ (instance$ chosen)) + (~ (code.local-identifier (product.right member))) + (~+ (list\map code.identifier args)))))) _ (meta.fail (format "Too many options available: " @@ -367,7 +367,7 @@ (do {! meta.monad} [labels (|> (meta.gensym "") (list.repeat (list.size args)) (monad.seq !))] (wrap (list (` (let [(~+ (|> (list.zip/2 labels args) (list\map join-pair) list\join))] - (..::: (~ (code.identifier member)) (~+ labels))))))) + (..\\ (~ (code.identifier member)) (~+ labels))))))) )) (def: (implicit-bindings amount) diff --git a/stdlib/source/lux/type/resource.lux b/stdlib/source/lux/type/resource.lux index 60698b85f..b91f9d990 100644 --- a/stdlib/source/lux/type/resource.lux +++ b/stdlib/source/lux/type/resource.lux @@ -48,7 +48,7 @@ (def: (wrap value) (function (_ keys) - (:: Monad<m> wrap [keys value]))) + (\ Monad<m> wrap [keys value]))) (def: (bind f input) (function (_ keysI) @@ -107,7 +107,7 @@ [(def: #export (<name> value) (All [v] (Ex [k] (-> v (Affine <m> (Key <mode> k) (Res k v))))) (function (_ keys) - (:: <monad> wrap [[(<key> []) keys] (:abstraction value)])))] + (\ <monad> wrap [[(<key> []) keys] (:abstraction value)])))] [ordered-pure Identity identity.monad Ordered ordered-key] [ordered-sync IO io.monad Ordered ordered-key] @@ -122,7 +122,7 @@ (All [v k m] (-> (Res k v) (Relevant <m> (Key m k) v))) (function (_ [key keys]) - (:: <monad> wrap [keys (:representation resource)])))] + (\ <monad> wrap [keys (:representation resource)])))] [read-pure Identity identity.monad] [read-sync IO io.monad] @@ -151,7 +151,7 @@ (def: (no-op Monad<m>) (All [m] (-> (Monad m) (Linear m Any))) - (function (_ context) (:: Monad<m> wrap [context []]))) + (function (_ context) (\ Monad<m> wrap [context []]))) (template [<name> <m> <monad>] [(syntax: #export (<name> {swaps ..indices}) @@ -181,7 +181,7 @@ [(~+ g!outputsT+) (~ g!context)] .Any)) (function ((~ g!_) [(~+ g!inputs) (~ g!context)]) - (:: (~! <monad>) (~' wrap) [[(~+ g!outputs) (~ g!context)] []]))))))))))] + (\ (~! <monad>) (~' wrap) [[(~+ g!outputs) (~ g!context)] []]))))))))))] [exchange-pure Identity identity.monad] [exchange-sync IO io.monad] @@ -207,7 +207,7 @@ [<to> (~ g!context)] .Any)) (function ((~ g!_) [<from> (~ g!context)]) - (:: (~! <monad>) (~' wrap) [[<to> (~ g!context)] []])))))))))] + (\ (~! <monad>) (~' wrap) [[<to> (~ g!context)] []])))))))))] [group-pure Identity identity.monad (~+ g!keys) [(~+ g!keys)]] [group-sync IO io.monad (~+ g!keys) [(~+ g!keys)]] diff --git a/stdlib/source/lux/type/unit.lux b/stdlib/source/lux/type/unit.lux index a56c22e3e..deffa4e83 100644 --- a/stdlib/source/lux/type/unit.lux +++ b/stdlib/source/lux/type/unit.lux @@ -144,8 +144,8 @@ (def: #export (re-scale from to quantity) (All [si so u] (-> (Scale si) (Scale so) (Qty (si u)) (Qty (so u)))) - (let [[numerator denominator] (ratio./ (:: from ratio) - (:: to ratio))] + (let [[numerator denominator] (ratio./ (\ from ratio) + (\ to ratio))] (|> quantity out (i.* (.int numerator)) diff --git a/stdlib/source/lux/world/console.lux b/stdlib/source/lux/world/console.lux index 5aafb88d1..7d68ced07 100644 --- a/stdlib/source/lux/world/console.lux +++ b/stdlib/source/lux/world/console.lux @@ -49,7 +49,7 @@ (`` (structure (~~ (template [<capability> <forge>] [(def: <capability> (<forge> - (|>> (!.use (:: console <capability>)) promise.future)))] + (|>> (!.use (\ console <capability>)) promise.future)))] [read ..can-read] [read-line ..can-read] @@ -96,7 +96,7 @@ (function (_ _) (|> jvm-input java/io/InputStream::read - (:: (try.with io.monad) map .nat))))) + (\ (try.with io.monad) map .nat))))) (def: read-line (..can-read @@ -116,7 +116,7 @@ (def: #export (write-line message console) (All [!] (-> Text (Console !) (! Any))) - (!.use (:: console write) (format message text.new-line))) + (!.use (\ console write) (format message text.new-line))) (signature: #export (Simulation s) (: (-> s (Try [s Char])) @@ -139,7 +139,7 @@ (stm.commit (do {! stm.monad} [|state| (stm.read state)] - (case (:: simulation <simulation> |state|) + (case (\ simulation <simulation> |state|) (#try.Success [|state| output]) (do ! [_ (stm.write |state| state)] @@ -158,7 +158,7 @@ (stm.commit (do {! stm.monad} [|state| (stm.read state)] - (case (:: simulation on-write input |state|) + (case (\ simulation on-write input |state|) (#try.Success |state|) (do ! [_ (stm.write |state| state)] @@ -173,7 +173,7 @@ (stm.commit (do {! stm.monad} [|state| (stm.read state)] - (case (:: simulation on-close |state|) + (case (\ simulation on-close |state|) (#try.Success |state|) (do ! [_ (stm.write |state| state)] diff --git a/stdlib/source/lux/world/db/jdbc.lux b/stdlib/source/lux/world/db/jdbc.lux index a442fda28..86865bd9b 100644 --- a/stdlib/source/lux/world/db/jdbc.lux +++ b/stdlib/source/lux/world/db/jdbc.lux @@ -103,7 +103,7 @@ (-> (DB IO) (DB Promise)) (`` (structure (~~ (template [<name> <forge>] - [(def: <name> (<forge> (|>> (!.use (:: db <name>)) promise.future)))] + [(def: <name> (<forge> (|>> (!.use (\ db <name>)) promise.future)))] [execute can-execute] [insert can-insert] @@ -160,7 +160,7 @@ (do (try.with io.monad) [db (..connect creds) result (action db) - _ (!.use (:: db close) [])] + _ (!.use (\ db close) [])] (wrap result))) (def: #export (with-async-db creds action) @@ -171,5 +171,5 @@ (do (try.with promise.monad) [db (promise.future (..connect creds)) result (action (..async db)) - _ (promise\wrap (io.run (!.use (:: db close) [])))] + _ (promise\wrap (io.run (!.use (\ db close) [])))] (wrap result))) diff --git a/stdlib/source/lux/world/file.lux b/stdlib/source/lux/world/file.lux index a99e47d33..b4a2ce0ca 100644 --- a/stdlib/source/lux/world/file.lux +++ b/stdlib/source/lux/world/file.lux @@ -120,7 +120,7 @@ (~~ (template [<forge> <name>+] [(with-expansions [<rows> (template.splice <name>+)] (template [<name>] - [(def: <name> (<forge> (|>> (!.use (:: file <name>)))))] + [(def: <name> (<forge> (|>> (!.use (\ file <name>)))))] <rows>))] @@ -132,7 +132,7 @@ (~~ (template [<forge> <name>+] [(with-expansions [<rows> (template.splice <name>+)] (template [<name>] - [(def: <name> (<forge> (|>> (!.use (:: file <name>)) promise.future)))] + [(def: <name> (<forge> (|>> (!.use (\ file <name>)) promise.future)))] <rows>))] @@ -147,17 +147,17 @@ (def: move (..can-open - (|>> (!.use (:: file move)) (io\map (try\map async-file)) promise.future)))))) + (|>> (!.use (\ file move)) (io\map (try\map async-file)) promise.future)))))) (def: (async-directory directory) (-> (Directory IO) (Directory Promise)) (`` (structure (def: scope - (:: directory scope)) + (\ directory scope)) (~~ (template [<name> <async>] [(def: <name> (..can-query - (|>> (!.use (:: directory <name>)) + (|>> (!.use (\ directory <name>)) (io\map (try\map (list\map <async>))) promise.future)))] @@ -166,36 +166,36 @@ (def: discard (..can-delete - (|>> (!.use (:: directory discard)) promise.future)))))) + (|>> (!.use (\ directory discard)) promise.future)))))) (def: #export (async system) (-> (System IO) (System Promise)) (`` (structure (~~ (template [<name> <async>] [(def: <name> (..can-open - (|>> (!.use (:: system <name>)) (io\map (try\map <async>)) promise.future)))] + (|>> (!.use (\ system <name>)) (io\map (try\map <async>)) promise.future)))] [file ..async-file] [create-file ..async-file] [directory ..async-directory] [create-directory ..async-directory])) - (def: separator (:: system separator))))) + (def: separator (\ system separator))))) (def: #export (un-nest system file) (All [!] (-> (System !) Path (Maybe [Path Text]))) - (case (text.last-index-of (:: system separator) file) + (case (text.last-index-of (\ system separator) file) #.None #.None (#.Some last-separator) (let [[parent temp] (maybe.assume (text.split last-separator file)) - [_ child] (maybe.assume (text.split (text.size (:: system separator)) temp))] + [_ child] (maybe.assume (text.split (text.size (\ system separator)) temp))] (#.Some [parent child])))) (def: #export (nest system [parent child]) (All [!] (-> (System !) [Path Text] Path)) - (format parent (:: system separator) child)) + (format parent (\ system separator) child)) (template [<name>] [(exception: #export (<name> {file Path}) @@ -307,7 +307,7 @@ _ (java/lang/AutoCloseable::close stream)] (if (i.= size bytes-read) (wrap data) - (:: io.monad wrap (exception.throw ..cannot-read-all-data path))))))) + (\ io.monad wrap (exception.throw ..cannot-read-all-data path))))))) (def: name (..can-see @@ -327,7 +327,7 @@ (|> path java/io/File::new java/io/File::length - (:: (try.with io.monad) map .nat))))) + (\ (try.with io.monad) map .nat))))) (def: last-modified (..can-query @@ -335,7 +335,7 @@ (|> path java/io/File::new (java/io/File::lastModified) - (:: (try.with io.monad) map (|>> duration.from-millis instant.absolute)))))) + (\ (try.with io.monad) map (|>> duration.from-millis instant.absolute)))))) (def: can-execute? (..can-query @@ -394,11 +394,11 @@ (|> children array.to-list (monad.filter ! (|>> <method>)) - (:: ! map (monad.map ! (|>> java/io/File::getAbsolutePath (:: ! map <capability>)))) - (:: ! join)) + (\ ! map (monad.map ! (|>> java/io/File::getAbsolutePath (\ ! map <capability>)))) + (\ ! join)) #.None - (:: io.monad wrap (exception.throw ..not-a-directory [path])))))))] + (\ io.monad wrap (exception.throw ..not-a-directory [path])))))))] [files java/io/File::isFile file] [directories java/io/File::isDirectory directory] @@ -633,7 +633,7 @@ verdict (<method> [] stats)] (if verdict (wrap (<capability> path)) - (:: io.monad wrap (exception.throw <exception> [path])))))))] + (\ io.monad wrap (exception.throw <exception> [path])))))))] [file Stats::isFile ..file ..cannot-find-file] [directory Stats::isDirectory ..directory ..cannot-find-directory] @@ -671,14 +671,14 @@ [(def: #export (<get> monad system path) (All [!] (-> (Monad !) (System !) Path (! (Try (<signature> !))))) (do monad - [outcome (!.use (:: system <find>) path)] + [outcome (!.use (\ system <find>) path)] (case outcome (#try.Success file) (wrap (#try.Success file)) (#try.Failure error) (if (exception.match? <exception> error) - (!.use (:: system <create>) path) + (!.use (\ system <create>) path) (wrap (#try.Failure error))))))] [get-file File create-file file ..cannot-find-file] @@ -689,7 +689,7 @@ [(def: #export (<predicate> monad system path) (All [!] (-> (Monad !) (System !) Path (! Bit))) (do monad - [?file (!.use (:: system <capability>) path)] + [?file (!.use (\ system <capability>) path)] (case ?file (#try.Success file) (wrap true) @@ -915,9 +915,9 @@ (do try.monad [[name file] (..retrieve-mock-file! separator path |store|)] (..update-mock-file! separator path now - (:: binary.monoid compose - (get@ #mock-content file) - content) + (\ binary.monoid compose + (get@ #mock-content file) + content) |store|))) store)))))) @@ -1164,9 +1164,9 @@ (def: #export (make-directories monad system path) (All [!] (-> (Monad !) (System !) Path (! (Try Path)))) - (case (text.split-all-with (:: system separator) path) + (case (text.split-all-with (\ system separator) path) #.Nil - (:: monad wrap (exception.throw ..cannot-create-directory [path])) + (\ monad wrap (exception.throw ..cannot-create-directory [path])) (#.Cons head tail) (loop [current head @@ -1178,5 +1178,5 @@ (wrap current) (#.Cons head tail) - (recur (format current (:: system separator) head) + (recur (format current (\ system separator) head) tail)))))) diff --git a/stdlib/source/lux/world/file/watch.lux b/stdlib/source/lux/world/file/watch.lux index 596163bb1..a1bb5a6de 100644 --- a/stdlib/source/lux/world/file/watch.lux +++ b/stdlib/source/lux/world/file/watch.lux @@ -116,12 +116,12 @@ (def: (file-tracker fs directory) (-> (//.System Promise) (//.Directory Promise) (Promise (Try File-Tracker))) (do {! (try.with promise.monad)} - [files (!.use (:: directory files) [])] + [files (!.use (\ directory files) [])] (monad.fold ! (function (_ file tracker) (do ! - [last-modified (!.use (:: file last-modified) [])] - (wrap (dictionary.put (!.use (:: file path) []) + [last-modified (!.use (\ file last-modified) [])] + (wrap (dictionary.put (!.use (\ file path) []) [file last-modified] tracker)))) (: File-Tracker @@ -131,11 +131,11 @@ (def: (poll-files directory file-tracker) (-> (//.Directory Promise) File-Tracker (Promise (Try (List [//.Path (//.File Promise) Instant])))) (do {! (try.with promise.monad)} - [files (!.use (:: directory files) [])] + [files (!.use (\ directory files) [])] (monad.map ! (function (_ file) (do ! - [last-modified (!.use (:: file last-modified) [])] - (wrap [(!.use (:: file path) []) file last-modified]))) + [last-modified (!.use (\ file last-modified) [])] + (wrap [(!.use (\ file path) []) file last-modified]))) files))) (def: (poll-directory-changes [path [concern directory file-tracker]]) @@ -195,7 +195,7 @@ (if updated? (wrap (#try.Success [])) (do (try.with !) - [directory (!.use (:: fs directory) path) + [directory (!.use (\ fs directory) path) file-tracker (..file-tracker fs directory)] (do ! [_ (stm.commit (stm.update (dictionary.put path [new-concern directory file-tracker]) tracker))] @@ -330,9 +330,9 @@ (def: default\\key-concern (-> java/nio/file/WatchKey (IO Concern)) (|>> java/nio/file/WatchKey::pollEvents - (:: io.monad map (|>> ..default\\list - (list\map default\\event-concern) - (list\fold ..also ..none))))) + (\ io.monad map (|>> ..default\\list + (list\map default\\event-concern) + (list\fold ..also ..none))))) (import: java/nio/file/WatchService ["#::." diff --git a/stdlib/source/lux/world/net/http/query.lux b/stdlib/source/lux/world/net/http/query.lux index 315872b00..006942bfe 100644 --- a/stdlib/source/lux/world/net/http/query.lux +++ b/stdlib/source/lux/world/net/http/query.lux @@ -34,7 +34,7 @@ [_ (l.this "%") code (|> (l.exactly 2 l.hexadecimal) (p.codec nat.hex) - (:: ! map text.from-code)) + (\ ! map text.from-code)) tail component] (wrap (format head code tail)))))))) @@ -57,7 +57,7 @@ l.end)] (form (dictionary.put key "" context))))) ## if invalid form data, just stop parsing... - (:: p.monad wrap context))) + (\ p.monad wrap context))) (def: #export (parameters raw) (-> Text (Try Context)) diff --git a/stdlib/source/lux/world/net/http/request.lux b/stdlib/source/lux/world/net/http/request.lux index 21f2ee071..094f7ff97 100644 --- a/stdlib/source/lux/world/net/http/request.lux +++ b/stdlib/source/lux/world/net/http/request.lux @@ -34,8 +34,8 @@ (monad.fold try.monad (function (_ input [offset output]) (let [amount (binary.size input)] - (:: try.functor map (|>> [(n.+ amount offset)]) - (binary.copy amount 0 input offset output)))) + (\ try.functor map (|>> [(n.+ amount offset)]) + (binary.copy amount 0 input offset output)))) [0 (|> inputs (list\map binary.size) (list\fold n.+ 0) @@ -58,7 +58,7 @@ [?raw (read-text-body (get@ #//.body message))] (case (do try.monad [raw ?raw - content (:: json.codec decode raw)] + content (\ json.codec decode raw)] (json.run content reader)) (#try.Success input) (server input request) diff --git a/stdlib/source/lux/world/shell.lux b/stdlib/source/lux/world/shell.lux index 114f79ea0..142fb54e4 100644 --- a/stdlib/source/lux/world/shell.lux +++ b/stdlib/source/lux/world/shell.lux @@ -71,7 +71,7 @@ (~~ (template [<method> <capability>] [(def: <method> (<capability> - (|>> (!.use (:: process <method>)) + (|>> (!.use (\ process <method>)) promise.future)))] [read ..can-read] @@ -102,7 +102,7 @@ (function (_ input) (promise.future (do (try.with io.monad) - [process (!.use (:: shell execute) input)] + [process (!.use (\ shell execute) input)] (wrap (..async-process process))))))))) (signature: (Policy ?) @@ -292,16 +292,16 @@ ## https://en.wikipedia.org/wiki/Code_injection#Shell_injection (def: windows? (IO (Try Bit)) - (:: (try.with io.monad) map - (|>> java/lang/String::toLowerCase (text.starts-with? "windows")) - (java/lang/System::getProperty "os.name"))) + (\ (try.with io.monad) map + (|>> java/lang/String::toLowerCase (text.starts-with? "windows")) + (java/lang/System::getProperty "os.name"))) (def: (jvm::process-builder policy command arguments) (All [?] (-> (Policy ?) (Safe Command ?) (List (Safe Argument ?)) java/lang/ProcessBuilder)) - (|> (list\map (:: policy value) arguments) - (list& (:: policy value command)) + (|> (list\map (\ policy value) arguments) + (list& (\ policy value command)) ..jvm::arguments-array java/lang/ProcessBuilder::new)) @@ -315,16 +315,16 @@ [windows? ..windows? #let [builder (if windows? (..jvm::process-builder ..windows-policy - (:: ..windows-policy command command) - (list\map (:: ..windows-policy argument) arguments)) + (\ ..windows-policy command command) + (list\map (\ ..windows-policy argument) arguments)) (..jvm::process-builder ..unix-policy - (:: ..unix-policy command command) - (list\map (:: ..unix-policy argument) arguments)))] + (\ ..unix-policy command command) + (list\map (\ ..unix-policy argument) arguments)))] _ (|> builder (java/lang/ProcessBuilder::directory (java/io/File::new working-directory)) java/lang/ProcessBuilder::environment - (:: try.functor map (..jvm::load-environment environment)) - (:: io.monad wrap)) + (\ try.functor map (..jvm::load-environment environment)) + (\ io.monad wrap)) process (java/lang/ProcessBuilder::start builder)] (..default-process process)))] (for {@.old (as-is <jvm>) @@ -352,7 +352,7 @@ (stm.commit (do {! stm.monad} [|state| (stm.read state)] - (case (:: simulation <simulation> |state|) + (case (\ simulation <simulation> |state|) (#try.Success [|state| output]) (do ! [_ (stm.write |state| state)] @@ -371,7 +371,7 @@ (stm.commit (do {! stm.monad} [|state| (stm.read state)] - (case (:: simulation on-write message |state|) + (case (\ simulation on-write message |state|) (#try.Success |state|) (do ! [_ (stm.write |state| state)] @@ -385,7 +385,7 @@ (stm.commit (do {! stm.monad} [|state| (stm.read state)] - (case (:: simulation on-destroy |state|) + (case (\ simulation on-destroy |state|) (#try.Success |state|) (do ! [_ (stm.write |state| state)] diff --git a/stdlib/source/poly/lux/abstract/equivalence.lux b/stdlib/source/poly/lux/abstract/equivalence.lux index 0f5db0309..f8d8d1fa8 100644 --- a/stdlib/source/poly/lux/abstract/equivalence.lux +++ b/stdlib/source/poly/lux/abstract/equivalence.lux @@ -163,6 +163,6 @@ <type>.recursive-call ## If all else fails... (|> <type>.any - (:: ! map (|>> %.type (format "Cannot create Equivalence for: ") p.fail)) - (:: ! join)) + (\ ! map (|>> %.type (format "Cannot create Equivalence for: ") p.fail)) + (\ ! join)) )))) diff --git a/stdlib/source/poly/lux/data/format/json.lux b/stdlib/source/poly/lux/data/format/json.lux index 719817b3b..3cba2eb3b 100644 --- a/stdlib/source/poly/lux/data/format/json.lux +++ b/stdlib/source/poly/lux/data/format/json.lux @@ -73,9 +73,9 @@ (structure: int-codec (codec.Codec JSON Int) - (def: encode (|>> .nat (:: nat-codec encode))) + (def: encode (|>> .nat (\ nat-codec encode))) (def: decode - (|>> (:: nat-codec decode) (:: try.functor map .int)))) + (|>> (\ nat-codec decode) (\ try.functor map .int)))) (def: (nullable writer) {#.doc "Builds a JSON generator for potentially inexistent values."} @@ -90,9 +90,9 @@ (codec.Codec JSON (unit.Qty unit))) (def: encode - (|>> unit.out (:: ..int-codec encode))) + (|>> unit.out (\ ..int-codec encode))) (def: decode - (|>> (:: ..int-codec decode) (:: try.functor map unit.in)))) + (|>> (\ ..int-codec decode) (\ try.functor map unit.in)))) (poly: encode (with-expansions @@ -105,15 +105,15 @@ [(<type>.exactly Any) (function ((~ g!_) (~ (code.identifier ["" "0"]))) #/.Null)] [(<type>.sub Bit) (|>> #/.Boolean)] - [(<type>.sub Nat) (:: (~! ..nat-codec) (~' encode))] - [(<type>.sub Int) (:: (~! ..int-codec) (~' encode))] + [(<type>.sub Nat) (\ (~! ..nat-codec) (~' encode))] + [(<type>.sub Int) (\ (~! ..int-codec) (~' encode))] [(<type>.sub Frac) (|>> #/.Number)] [(<type>.sub Text) (|>> #/.String)]) <time> (template [<type> <codec>] [(do ! [_ (<type>.exactly <type>)] (wrap (` (: (~ (@JSON\encode inputT)) - (|>> (:: (~! <codec>) (~' encode)) #/.String)))))] + (|>> (\ (~! <codec>) (~' encode)) #/.String)))))] ## [duration.Duration duration.codec] ## [instant.Instant instant.codec] @@ -133,7 +133,7 @@ [unitT (<type>.apply (<>.after (<type>.exactly unit.Qty) <type>.any))] (wrap (` (: (~ (@JSON\encode inputT)) - (:: (~! qty-codec) (~' encode)))))) + (\ (~! qty-codec) (~' encode)))))) (do ! [#let [g!_ (code.local-identifier "_______") g!key (code.local-identifier "_______key") diff --git a/stdlib/source/program/aedifex/artifact.lux b/stdlib/source/program/aedifex/artifact.lux index 3160ef356..a26e70e50 100644 --- a/stdlib/source/program/aedifex/artifact.lux +++ b/stdlib/source/program/aedifex/artifact.lux @@ -37,7 +37,7 @@ (def: #export equivalence (Equivalence Artifact) - (:: ..hash &equivalence)) + (\ ..hash &equivalence)) (template [<separator> <definition>] [(def: <definition> @@ -81,7 +81,7 @@ (def: #export (path system) (All [!] (-> (file.System !) Artifact Path)) - (..address (:: system separator))) + (..address (\ system separator))) (def: #export (local artifact) (-> Artifact (List Text)) diff --git a/stdlib/source/program/aedifex/cache.lux b/stdlib/source/program/aedifex/cache.lux index 1aee65405..31403b839 100644 --- a/stdlib/source/program/aedifex/cache.lux +++ b/stdlib/source/program/aedifex/cache.lux @@ -37,14 +37,14 @@ (do (try.with promise.monad) [file (: (Promise (Try (File Promise))) (file.get-file promise.monad system file))] - (!.use (:: file over-write) [content]))) + (!.use (\ file over-write) [content]))) (def: #export (write-one system [artifact type] package) (-> (file.System Promise) Dependency Package (Promise (Try Artifact))) (do (try.with promise.monad) [directory (: (Promise (Try Path)) (file.make-directories promise.monad system (//.path system artifact))) - #let [prefix (format directory (:: system separator) (//artifact.identity artifact))] + #let [prefix (format directory (\ system separator) (//artifact.identity artifact))] directory (: (Promise (Try (Directory Promise))) (file.get-directory promise.monad system directory)) _ (..write! system @@ -53,17 +53,17 @@ _ (..write! system (|> package (get@ #//package.sha-1) - (:: //hash.sha-1-codec encode) + (\ //hash.sha-1-codec encode) encoding.to-utf8) (format prefix //artifact/extension.sha-1)) _ (..write! system (|> package (get@ #//package.md5) - (:: //hash.md5-codec encode) + (\ //hash.md5-codec encode) encoding.to-utf8) (format prefix //artifact/extension.md5)) _ (..write! system - (|> package (get@ #//package.pom) (:: xml.codec encode) encoding.to-utf8) + (|> package (get@ #//package.pom) (\ xml.codec encode) encoding.to-utf8) (format prefix //artifact/extension.pom))] (wrap artifact))) @@ -75,49 +75,49 @@ (list.filter (|>> product.right //package.local? not)) (monad.map ! (function (_ [dependency package]) (..write-one system dependency package))) - (:: ! map (set.from-list //artifact.hash))))) + (\ ! map (set.from-list //artifact.hash))))) (def: (read! system path) (-> (file.System Promise) Path (Promise (Try Binary))) (do (try.with promise.monad) [file (: (Promise (Try (File Promise))) - (!.use (:: system file) path))] - (!.use (:: file content) []))) + (!.use (\ system file) path))] + (!.use (\ file content) []))) (def: (decode codec data) (All [a] (-> (Codec Text a) Binary (Try a))) (let [(^open "_\.") try.monad] (|> data encoding.from-utf8 - (_\map (:: codec decode)) + (_\map (\ codec decode)) _\join))) (def: #export (read-one system [artifact type]) (-> (file.System Promise) Dependency (Promise (Try Package))) (let [prefix (format (//.path system artifact) - (:: system separator) + (\ system separator) (//artifact.identity artifact))] (do (try.with promise.monad) [pom (..read! system (format prefix //artifact/extension.pom)) library (..read! system (format prefix (//artifact/extension.extension type))) sha-1 (..read! system (format prefix //artifact/extension.sha-1)) md5 (..read! system (format prefix //artifact/extension.md5))] - (:: promise.monad wrap - (do try.monad - [pom (..decode xml.codec pom) - sha-1 (..decode //hash.sha-1-codec sha-1) - md5 (..decode //hash.md5-codec md5)] - (wrap {#//package.origin #//package.Local - #//package.library library - #//package.pom pom - #//package.sha-1 sha-1 - #//package.md5 md5})))))) + (\ promise.monad wrap + (do try.monad + [pom (..decode xml.codec pom) + sha-1 (..decode //hash.sha-1-codec sha-1) + md5 (..decode //hash.md5-codec md5)] + (wrap {#//package.origin #//package.Local + #//package.library library + #//package.pom pom + #//package.sha-1 sha-1 + #//package.md5 md5})))))) (def: #export (read-all system dependencies resolution) (-> (file.System Promise) (List Dependency) Resolution (Promise (Try Resolution))) (case dependencies #.Nil - (:: (try.with promise.monad) wrap resolution) + (\ (try.with promise.monad) wrap resolution) (#.Cons head tail) (do promise.monad @@ -133,7 +133,7 @@ (do (try.with promise.monad) [sub-dependencies (|> package //package.dependencies - (:: promise.monad wrap)) + (\ promise.monad wrap)) resolution (|> resolution (dictionary.put head package) (read-all system (set.to-list sub-dependencies)))] diff --git a/stdlib/source/program/aedifex/cli.lux b/stdlib/source/program/aedifex/cli.lux index adf52a18b..d52bf4df6 100644 --- a/stdlib/source/program/aedifex/cli.lux +++ b/stdlib/source/program/aedifex/cli.lux @@ -84,6 +84,6 @@ ($_ <>.and cli.any ..command')) - (:: <>.monad map (|>> [/.default]) - ..command') + (\ <>.monad map (|>> [/.default]) + ..command') )) diff --git a/stdlib/source/program/aedifex/command/auto.lux b/stdlib/source/program/aedifex/command/auto.lux index f7ec7a315..c2df31df5 100644 --- a/stdlib/source/program/aedifex/command/auto.lux +++ b/stdlib/source/program/aedifex/command/auto.lux @@ -28,15 +28,15 @@ (def: (targets fs path) (-> (file.System Promise) Path (Promise (List Path))) (do {! promise.monad} - [?root (!.use (:: fs directory) [path])] + [?root (!.use (\ fs directory) [path])] (case ?root (#try.Success root) (loop [root root] (do ! - [subs (:: ! map (|>> (try.default (list))) - (!.use (:: root directories) []))] - (:: ! map (|>> list.concat (list& (!.use (:: root scope) []))) - (monad.map ! recur subs)))) + [subs (\ ! map (|>> (try.default (list))) + (!.use (\ root directories) []))] + (\ ! map (|>> list.concat (list& (!.use (\ root scope) []))) + (monad.map ! recur subs)))) (#try.Failure error) (wrap (list))))) @@ -58,14 +58,14 @@ (get@ #///.sources) set.to-list (monad.map ! (..targets fs)) - (:: ! map list.concat))] + (\ ! map list.concat))] (do {! ///action.monad} - [_ (monad.map ! (:: watcher start watch.all) targets) + [_ (monad.map ! (\ watcher start watch.all) targets) _ <call>] (loop [_ []] (do ! [_ (..pause []) - events (:: watcher poll []) + events (\ watcher poll []) _ (case events (#.Cons _) (do ! diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index 30206095e..85210fd36 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -138,10 +138,10 @@ (#JS artifact) [(///runtime.node (///local.path fs artifact)) "program.js"])] [(format compiler " build") output]) - / (:: fs separator) + / (\ fs separator) cache-directory (format working-directory / target)] #let [_ (log! "[BUILD STARTED]")] - process (!.use (:: shell execute) + process (!.use (\ shell execute) [environment working-directory command @@ -149,7 +149,7 @@ (..plural "--source" (set.to-list (get@ #///.sources profile))) (..singular "--target" cache-directory) (..singular "--module" program)))]) - exit (!.use (:: process await) []) + exit (!.use (\ process await) []) #let [_ (log! (if (i.= shell.normal exit) "[BUILD ENDED]" "[BUILD FAILED]"))]] diff --git a/stdlib/source/program/aedifex/command/clean.lux b/stdlib/source/program/aedifex/command/clean.lux index f4f5e1f9e..618125a89 100644 --- a/stdlib/source/program/aedifex/command/clean.lux +++ b/stdlib/source/program/aedifex/command/clean.lux @@ -19,9 +19,9 @@ (-> (Directory Promise) (Promise (Try Any))) (do {! ///action.monad} [nodes (: (Promise (Try (List (File Promise)))) - (!.use (:: root files) [])) + (!.use (\ root files) [])) _ (monad.map ! (function (_ node) - (!.use (:: node delete) [])) + (!.use (\ node delete) [])) nodes)] (wrap []))) @@ -31,17 +31,17 @@ (#.Some target) (do {! ///action.monad} [target (: (Promise (Try (Directory Promise))) - (!.use (:: fs directory) target)) + (!.use (\ fs directory) target)) _ (loop [root target] (do ! [_ (..clean-files! root) subs (: (Promise (Try (List (Directory Promise)))) - (!.use (:: root directories) [])) + (!.use (\ root directories) [])) _ (monad.map ! recur subs)] - (!.use (:: root discard) [])))] + (!.use (\ root discard) [])))] (exec (log! "No 'target' defined for clean-up.") (wrap []))) #.None (exec (log! "No 'target' defined for clean-up.") - (:: ///action.monad wrap [])))) + (\ ///action.monad wrap [])))) diff --git a/stdlib/source/program/aedifex/command/deploy.lux b/stdlib/source/program/aedifex/command/deploy.lux index 839bc7906..1f5ccc441 100644 --- a/stdlib/source/program/aedifex/command/deploy.lux +++ b/stdlib/source/program/aedifex/command/deploy.lux @@ -33,15 +33,15 @@ (def: #export (do! repository fs identity artifact profile) (-> (Repository Promise) (file.System Promise) Identity Artifact (Command Any)) (let [deploy! (: (-> Extension Binary (Action Any)) - (:: repository upload identity artifact))] + (\ repository upload identity artifact))] (do {! ///action.monad} [library (|> profile (get@ #/.sources) set.to-list (export.library fs) - (:: ! map (binary.run tar.writer))) + (\ ! map (binary.run tar.writer))) pom (promise\wrap (///pom.write profile)) - _ (deploy! ///artifact/extension.pom (|> pom (:: xml.codec encode) encoding.to-utf8)) + _ (deploy! ///artifact/extension.pom (|> pom (\ xml.codec encode) encoding.to-utf8)) _ (deploy! ///artifact/extension.lux-library library) _ (deploy! ///artifact/extension.sha-1 (///hash.data (///hash.sha-1 library))) _ (deploy! ///artifact/extension.md5 (///hash.data (///hash.md5 library))) diff --git a/stdlib/source/program/aedifex/command/install.lux b/stdlib/source/program/aedifex/command/install.lux index 818283cc5..b152bc66c 100644 --- a/stdlib/source/program/aedifex/command/install.lux +++ b/stdlib/source/program/aedifex/command/install.lux @@ -39,7 +39,7 @@ (do (try.with promise.monad) [file (: (Promise (Try (File Promise))) (file.get-file promise.monad system file))] - (!.use (:: file over-write) [content]))) + (!.use (\ file over-write) [content]))) (def: #export (do! system profile) (-> (file.System Promise) (Command Any)) @@ -49,14 +49,14 @@ [package (export.library system (set.to-list (get@ #/.sources profile))) repository (: (Promise (Try Path)) (file.make-directories promise.monad system (///local.path system identity))) - #let [artifact-name (format repository (:: system separator) (///artifact.identity identity))] + #let [artifact-name (format repository (\ system separator) (///artifact.identity identity))] _ (..save! system (binary.run tar.writer package) (format artifact-name ///artifact/extension.lux-library)) - pom (:: promise.monad wrap (///pom.write profile)) - _ (..save! system (|> pom (:: xml.codec encode) encoding.to-utf8) + pom (\ promise.monad wrap (///pom.write profile)) + _ (..save! system (|> pom (\ xml.codec encode) encoding.to-utf8) (format artifact-name ///artifact/extension.pom)) #let [_ (log! "Successfully installed locally!")]] (wrap [])) _ - (:: promise.monad wrap (exception.throw /.no-identity [])))) + (\ promise.monad wrap (exception.throw /.no-identity [])))) diff --git a/stdlib/source/program/aedifex/command/pom.lux b/stdlib/source/program/aedifex/command/pom.lux index 695a7839f..28bd23921 100644 --- a/stdlib/source/program/aedifex/command/pom.lux +++ b/stdlib/source/program/aedifex/command/pom.lux @@ -28,8 +28,8 @@ file (: (Promise (Try (File Promise))) (file.get-file promise.monad fs ///pom.file)) outcome (|> pom - (:: xml.codec encode) + (\ xml.codec encode) encoding.to-utf8 - (!.use (:: file over-write))) + (!.use (\ file over-write))) #let [_ (log! "Successfully wrote POM file!")]] (wrap ///pom.file))) diff --git a/stdlib/source/program/aedifex/command/test.lux b/stdlib/source/program/aedifex/command/test.lux index f4da76ac4..5c205b7b8 100644 --- a/stdlib/source/program/aedifex/command/test.lux +++ b/stdlib/source/program/aedifex/command/test.lux @@ -31,14 +31,14 @@ [[compiler program] (//build.do! environment fs shell resolution profile) working-directory (promise\wrap (//build.working-directory environment)) #let [_ (log! "[TEST STARTED]")] - process (!.use (:: shell execute) + process (!.use (\ shell execute) [environment working-directory (case compiler (#//build.JVM artifact) (///runtime.java program) (#//build.JS artifact) (///runtime.node program)) (list)]) - exit (!.use (:: process await) []) + exit (!.use (\ process await) []) #let [_ (log! (if (i.= shell.normal exit) "[TEST ENDED]" "[TEST FAILED]"))]] diff --git a/stdlib/source/program/aedifex/dependency.lux b/stdlib/source/program/aedifex/dependency.lux index db997ef3b..595891924 100644 --- a/stdlib/source/program/aedifex/dependency.lux +++ b/stdlib/source/program/aedifex/dependency.lux @@ -23,4 +23,4 @@ (def: #export equivalence (Equivalence Dependency) - (:: hash &equivalence)) + (\ hash &equivalence)) diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux index f5dbb0d54..d21adaf0c 100644 --- a/stdlib/source/program/aedifex/dependency/resolution.lux +++ b/stdlib/source/program/aedifex/dependency/resolution.lux @@ -58,38 +58,38 @@ (Exception [Dependency Text]) (Promise (Try (///hash.Hash h))))) (do (try.with promise.monad) - [actual (:: repository download artifact extension)] - (:: promise.monad wrap - (do try.monad - [output (encoding.from-utf8 actual) - actual (:: codec decode output) - _ (exception.assert exception [dependency output] - (:: ///hash.equivalence = (hash library) actual))] - (wrap actual))))) + [actual (\ repository download artifact extension)] + (\ promise.monad wrap + (do try.monad + [output (encoding.from-utf8 actual) + actual (\ codec decode output) + _ (exception.assert exception [dependency output] + (\ ///hash.equivalence = (hash library) actual))] + (wrap actual))))) (def: #export (one repository dependency) (-> (Repository Promise) Dependency (Promise (Try Package))) (let [[artifact type] dependency extension (///artifact/extension.extension type)] (do (try.with promise.monad) - [library (:: repository download artifact extension) + [library (\ repository download artifact extension) sha-1 (..verified-hash dependency library repository artifact ///artifact/extension.sha-1 ///hash.sha-1 ///hash.sha-1-codec ..sha-1-does-not-match) md5 (..verified-hash dependency library repository artifact ///artifact/extension.md5 ///hash.md5 ///hash.md5-codec ..md5-does-not-match) - pom (:: repository download artifact ///artifact/extension.pom)] - (:: promise.monad wrap - (do try.monad - [pom (encoding.from-utf8 pom) - pom (:: xml.codec decode pom) - profile (<xml>.run ///pom.parser pom)] - (wrap {#///package.origin #///package.Remote - #///package.library library - #///package.pom pom - #///package.sha-1 sha-1 - #///package.md5 md5})))))) + pom (\ repository download artifact ///artifact/extension.pom)] + (\ promise.monad wrap + (do try.monad + [pom (encoding.from-utf8 pom) + pom (\ xml.codec decode pom) + profile (<xml>.run ///pom.parser pom)] + (wrap {#///package.origin #///package.Remote + #///package.library library + #///package.pom pom + #///package.sha-1 sha-1 + #///package.md5 md5})))))) (type: #export Resolution (Dictionary Dependency Package)) @@ -113,7 +113,7 @@ #.Nil (|> dependency (exception.throw ..cannot-resolve) - (:: promise.monad wrap)) + (\ promise.monad wrap)) (#.Cons repository alternatives) (do promise.monad @@ -129,7 +129,7 @@ (-> (List (Repository Promise)) (List Dependency) Resolution (Promise (Try Resolution))) (case dependencies #.Nil - (:: (try.with promise.monad) wrap resolution) + (\ (try.with promise.monad) wrap resolution) (#.Cons head tail) (do (try.with promise.monad) @@ -139,7 +139,7 @@ #.None (..any repositories head)) - sub-dependencies (:: promise.monad wrap (///package.dependencies package)) + sub-dependencies (\ promise.monad wrap (///package.dependencies package)) resolution (|> resolution (dictionary.put head package) (all repositories (set.to-list sub-dependencies)))] diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux index a484b9a0d..74d965f8c 100644 --- a/stdlib/source/program/aedifex/hash.lux +++ b/stdlib/source/program/aedifex/hash.lux @@ -53,7 +53,7 @@ (def: encode (Format Binary) (binary.fold (function (_ byte representation) - (let [hex (:: n.hex encode byte) + (let [hex (\ n.hex encode byte) hex (case (text.size hex) 1 (format "0" hex) _ hex)] @@ -124,7 +124,7 @@ (case (text.split ..hex-per-chunk input) (#.Some [head tail]) (do try.monad - [head (:: n.hex decode head) + [head (\ n.hex decode head) output (binary.write/64 index head output)] (recur tail (inc chunk) output)) @@ -134,7 +134,7 @@ (^template [<size> <write>] [<size> (do try.monad - [head (:: n.hex decode input) + [head (\ n.hex decode input) output (<write> index head output)] (constructor output))]) ([1 binary.write/8] @@ -158,7 +158,7 @@ (All [h] (Equivalence (Hash h))) (def: (= reference subject) - (:: binary.equivalence = - (:representation reference) - (:representation subject)))) + (\ binary.equivalence = + (:representation reference) + (:representation subject)))) ) diff --git a/stdlib/source/program/aedifex/input.lux b/stdlib/source/program/aedifex/input.lux index ffed02d28..e2bc72154 100644 --- a/stdlib/source/program/aedifex/input.lux +++ b/stdlib/source/program/aedifex/input.lux @@ -50,10 +50,10 @@ (def: #export (read monad fs profile) (All [!] (-> (Monad !) (file.System !) Text (! (Try Profile)))) (do (try.with monad) - [project-file (!.use (:: fs file) //project.file) - project-file (!.use (:: project-file content) [])] - (:: monad wrap - (|> project-file - (do> try.monad - [..parse-project] - [(//project.profile profile)]))))) + [project-file (!.use (\ fs file) //project.file) + project-file (!.use (\ project-file content) [])] + (\ monad wrap + (|> project-file + (do> try.monad + [..parse-project] + [(//project.profile profile)]))))) diff --git a/stdlib/source/program/aedifex/local.lux b/stdlib/source/program/aedifex/local.lux index 17ddeb4cf..34547027d 100644 --- a/stdlib/source/program/aedifex/local.lux +++ b/stdlib/source/program/aedifex/local.lux @@ -10,11 +10,11 @@ (def: #export (repository system) (All [a] (-> (file.System a) Path)) - (let [/ (:: system separator)] + (let [/ (\ system separator)] (format "~" / ".m2" / "repository"))) (def: #export (path system artifact) (All [a] (-> (file.System a) Artifact Path)) (format (..repository system) - (:: system separator) + (\ system separator) (//artifact.path system artifact))) diff --git a/stdlib/source/program/aedifex/package.lux b/stdlib/source/program/aedifex/package.lux index ae9e98a54..16c7c443b 100644 --- a/stdlib/source/program/aedifex/package.lux +++ b/stdlib/source/program/aedifex/package.lux @@ -44,7 +44,7 @@ (template [<name> <tag>] [(def: #export <name> (-> Package Bit) - (|>> (get@ #origin) (:: ..origin-equivalence = <tag>)))] + (|>> (get@ #origin) (\ ..origin-equivalence = <tag>)))] [local? #Local] [remote? #Remote] diff --git a/stdlib/source/program/aedifex/parser.lux b/stdlib/source/program/aedifex/parser.lux index 45e1e6a6a..9fdc00f3b 100644 --- a/stdlib/source/program/aedifex/parser.lux +++ b/stdlib/source/program/aedifex/parser.lux @@ -79,10 +79,10 @@ (def: license (Parser /.License) (do {! <>.monad} - [input (:: ! map - (dictionary.from-list text.hash) - (<c>.record (<>.some (<>.and <c>.local-tag - <c>.any))))] + [input (\ ! map + (dictionary.from-list text.hash) + (<c>.record (<>.some (<>.and <c>.local-tag + <c>.any))))] ($_ <>.and (..singular input "name" ..name) (..singular input "url" ..url) @@ -94,10 +94,10 @@ (def: organization (Parser /.Organization) (do {! <>.monad} - [input (:: ! map - (dictionary.from-list text.hash) - (<c>.record (<>.some (<>.and <c>.local-tag - <c>.any))))] + [input (\ ! map + (dictionary.from-list text.hash) + (<c>.record (<>.some (<>.and <c>.local-tag + <c>.any))))] ($_ <>.and (..singular input "name" ..name) (..singular input "url" ..url)))) @@ -105,10 +105,10 @@ (def: developer (Parser /.Developer) (do {! <>.monad} - [input (:: ! map - (dictionary.from-list text.hash) - (<c>.record (<>.some (<>.and <c>.local-tag - <c>.any))))] + [input (\ ! map + (dictionary.from-list text.hash) + (<c>.record (<>.some (<>.and <c>.local-tag + <c>.any))))] ($_ <>.and (..singular input "name" ..name) (..singular input "url" ..url) @@ -122,10 +122,10 @@ (def: info (Parser /.Info) (do {! <>.monad} - [input (:: ! map - (dictionary.from-list text.hash) - (<c>.record (<>.some (<>.and <c>.local-tag - <c>.any))))] + [input (\ ! map + (dictionary.from-list text.hash) + (<c>.record (<>.some (<>.and <c>.local-tag + <c>.any))))] ($_ <>.and (<>.maybe (..singular input "url" ..url)) (<>.maybe (..singular input "scm" ..scm)) @@ -173,10 +173,10 @@ (def: profile (Parser /.Profile) (do {! <>.monad} - [input (:: ! map - (dictionary.from-list text.hash) - (<c>.record (<>.some (<>.and <c>.local-tag - <c>.any)))) + [input (\ ! map + (dictionary.from-list text.hash) + (<c>.record (<>.some (<>.and <c>.local-tag + <c>.any)))) #let [^parents (: (Parser (List /.Name)) (<>.default (list) (..plural input "parents" <c>.text))) @@ -188,15 +188,15 @@ (..singular input "info" ..info))) ^repositories (: (Parser (Set //repository.Address)) (|> (..plural input "repositories" ..repository) - (:: ! map (set.from-list text.hash)) + (\ ! map (set.from-list text.hash)) (<>.default (set.new text.hash)))) ^dependencies (: (Parser (Set //dependency.Dependency)) (|> (..plural input "dependencies" ..dependency) - (:: ! map (set.from-list //dependency.hash)) + (\ ! map (set.from-list //dependency.hash)) (<>.default (set.new //dependency.hash)))) ^sources (: (Parser (Set /.Source)) (|> (..plural input "sources" ..source) - (:: ! map (set.from-list text.hash)) + (\ ! map (set.from-list text.hash)) (<>.default (set.from-list text.hash (list /.default-source))))) ^target (: (Parser (Maybe /.Target)) (<>.maybe @@ -208,7 +208,7 @@ (<>.maybe (..singular input "test" ..module))) ^deploy-repositories (: (Parser (Dictionary Text //repository.Address)) - (<| (:: ! map (dictionary.from-list text.hash)) + (<| (\ ! map (dictionary.from-list text.hash)) (<>.default (list)) (..singular input "deploy-repositories" ..deploy-repository)))]] ($_ <>.and @@ -227,13 +227,13 @@ (def: #export project (Parser Project) (let [default-profile (: (Parser Project) - (:: <>.monad map - (|>> [/.default] (list) (dictionary.from-list text.hash)) - ..profile)) + (\ <>.monad map + (|>> [/.default] (list) (dictionary.from-list text.hash)) + ..profile)) multi-profile (: (Parser Project) - (:: <>.monad map - (dictionary.from-list text.hash) - (<c>.record (<>.many (<>.and <c>.text - ..profile)))))] + (\ <>.monad map + (dictionary.from-list text.hash) + (<c>.record (<>.many (<>.and <c>.text + ..profile)))))] (<>.either multi-profile default-profile))) diff --git a/stdlib/source/program/aedifex/pom.lux b/stdlib/source/program/aedifex/pom.lux index f8fd5f4f3..c7d950092 100644 --- a/stdlib/source/program/aedifex/pom.lux +++ b/stdlib/source/program/aedifex/pom.lux @@ -152,8 +152,8 @@ (def: parse-dependency (Parser Dependency) (do {! <>.monad} - [properties (:: ! map (dictionary.from-list name.hash) - (<xml>.children (<>.some ..parse-property)))] + [properties (\ ! map (dictionary.from-list name.hash) + (<xml>.children (<>.some ..parse-property)))] (<| <>.lift try.from-maybe (do maybe.monad @@ -181,6 +181,6 @@ (do ! [dependencies (<xml>.somewhere ..parse-dependencies) _ (<>.some <xml>.ignore)] - (wrap (|> (:: /.monoid identity) + (wrap (|> (\ /.monoid identity) (update@ #/.dependencies (function (_ empty) (list\fold set.add empty dependencies))))))))) diff --git a/stdlib/source/program/aedifex/project.lux b/stdlib/source/program/aedifex/project.lux index c2946b482..bd191fffb 100644 --- a/stdlib/source/program/aedifex/project.lux +++ b/stdlib/source/program/aedifex/project.lux @@ -38,7 +38,7 @@ (dictionary.new text.hash)) (def: compose - (dictionary.merge-with (:: //.monoid compose)))) + (dictionary.merge-with (\ //.monoid compose)))) (exception: #export (unknown-profile {name Name}) (exception.report @@ -63,7 +63,7 @@ [parents (monad.map ! (profile' (set.add name lineage) project) (get@ #//.parents profile))] (wrap (list\fold (function (_ parent child) - (:: //.monoid compose child parent)) + (\ //.monoid compose child parent)) (set@ #//.parents (list) profile) parents)))) diff --git a/stdlib/source/program/aedifex/repository.lux b/stdlib/source/program/aedifex/repository.lux index e5dc55d2c..7ec522a10 100644 --- a/stdlib/source/program/aedifex/repository.lux +++ b/stdlib/source/program/aedifex/repository.lux @@ -47,10 +47,10 @@ (-> (Repository IO) (Repository Promise)) (structure (def: (download artifact extension) - (promise.future (:: repository download artifact extension))) + (promise.future (\ repository download artifact extension))) (def: (upload identity artifact extension content) - (promise.future (:: repository upload identity artifact extension content))) + (promise.future (\ repository upload identity artifact extension content))) )) (signature: #export (Simulation s) @@ -69,7 +69,7 @@ (stm.commit (do {! stm.monad} [|state| (stm.read state)] - (case (:: simulation on-download artifact extension |state|) + (case (\ simulation on-download artifact extension |state|) (#try.Success [|state| output]) (do ! [_ (stm.write |state| state)] @@ -82,7 +82,7 @@ (stm.commit (do {! stm.monad} [|state| (stm.read state)] - (case (:: simulation on-upload identity artifact extension content |state|) + (case (\ simulation on-upload identity artifact extension content |state|) (#try.Success |state|) (do ! [_ (stm.write |state| state)] @@ -159,9 +159,9 @@ (do {! (try.with io.monad)} [input (|> (java/net/URL::new url) java/net/URL::openStream - (:: ! map (|>> java/io/BufferedInputStream::new))) + (\ ! map (|>> java/io/BufferedInputStream::new))) #let [buffer (binary.create ..buffer-size)]] - (loop [output (:: binary.monoid identity)] + (loop [output (\ binary.monoid identity)] (do ! [bytes-read (java/io/BufferedInputStream::read buffer +0 (.int ..buffer-size) input)] (case bytes-read @@ -169,10 +169,10 @@ [_ (java/lang/AutoCloseable::close input)] (wrap output)) _ (if (n.= ..buffer-size bytes-read) - (recur (:: binary.monoid compose output buffer)) + (recur (\ binary.monoid compose output buffer)) (do ! - [chunk (:: io.monad wrap (binary.slice 0 (.nat bytes-read) buffer))] - (recur (:: binary.monoid compose output chunk)))))))))) + [chunk (\ io.monad wrap (binary.slice 0 (.nat bytes-read) buffer))] + (recur (\ binary.monoid compose output chunk)))))))))) (def: (upload [user password] artifact extension content) (do (try.with io.monad) @@ -190,5 +190,5 @@ code (java/net/HttpURLConnection::getResponseCode connection)] (case code +200 (wrap []) - _ (:: io.monad wrap (exception.throw ..deployment-failure [code]))))) + _ (\ io.monad wrap (exception.throw ..deployment-failure [code]))))) ) diff --git a/stdlib/source/program/compositor.lux b/stdlib/source/program/compositor.lux index 225d01362..bd5c10c66 100644 --- a/stdlib/source/program/compositor.lux +++ b/stdlib/source/program/compositor.lux @@ -82,12 +82,12 @@ monad} {(! (Try (File !))) (:assume (file.get-file monad file-system package))})] - (!.use (:: (:share [!] - {(Monad !) - monad} - {(File !) - (:assume package)}) - over-write) + (!.use (\ (:share [!] + {(Monad !) + monad} + {(File !) + (:assume package)}) + over-write) [content]))} ## TODO: Fix whatever type-checker bug is forcing me into this compromise... (:assume @@ -99,7 +99,7 @@ [content (packager monad file-system static archive context) package (: (Promise (Try (File Promise))) (file.get-file monad file-system package))] - (!.use (:: (: (File Promise) package) over-write) [content]))))))) + (!.use (\ (: (File Promise) package) over-write) [content]))))))) (with-expansions [<parameters> (as-is anchor expression artifact)] (def: #export (compiler static @@ -158,6 +158,6 @@ ## (do {! promise.monad} ## [console (|> console.default ## promise.future - ## (:: ! map (|>> try.assume console.async)))] + ## (\ ! map (|>> try.assume console.async)))] ## (interpreter.run (try.with promise.monad) console platform interpretation generation-bundle))) )))) diff --git a/stdlib/source/program/compositor/export.lux b/stdlib/source/program/compositor/export.lux index b1e525098..bc2ced5a3 100644 --- a/stdlib/source/program/compositor/export.lux +++ b/stdlib/source/program/compositor/export.lux @@ -49,7 +49,7 @@ (function (_ [path source-code]) (do try.monad [path (|> path - (text.replace-all (:: system separator) .module-separator) + (text.replace-all (\ system separator) .module-separator) tar.path) source-code (tar.content source-code)] (wrap (#tar.Normal [path @@ -57,8 +57,8 @@ tar.none ..no-ownership source-code]))))) - (:: try.monad map row.from-list) - (:: promise.monad wrap)))) + (\ try.monad map row.from-list) + (\ promise.monad wrap)))) (def: #export (export system [sources target]) (-> (file.System Promise) Export (Promise (Try Any))) @@ -66,7 +66,7 @@ [tar (..library system sources) package (: (Promise (Try (file.File Promise))) (file.get-file promise.monad system - (format target (:: system separator) ..file)))] + (format target (\ system separator) ..file)))] (|> tar (binary.run tar.writer) - (!.use (:: package over-write))))) + (!.use (\ package over-write))))) diff --git a/stdlib/source/program/compositor/import.lux b/stdlib/source/program/compositor/import.lux index 0f2d00905..318c3705c 100644 --- a/stdlib/source/program/compositor/import.lux +++ b/stdlib/source/program/compositor/import.lux @@ -36,8 +36,8 @@ (-> (file.System Promise) Library Import (Action Import)) (do (try.with promise.monad) [library (: (Action (File Promise)) - (!.use (:: system file) [library])) - binary (!.use (:: library content) [])] + (!.use (\ system file) [library])) + binary (!.use (\ library content) [])] (promise\wrap (do {! try.monad} [tar (<b>.run tar.parser binary)] diff --git a/stdlib/source/program/licentia.lux b/stdlib/source/program/licentia.lux index e9b4f0074..e95c261a9 100644 --- a/stdlib/source/program/licentia.lux +++ b/stdlib/source/program/licentia.lux @@ -57,20 +57,20 @@ (do io.monad [?done (: (IO (Try Any)) (do (try.with io.monad) - [file (!.use (:: file.default file) input) - blob (!.use (:: file content) []) + [file (!.use (\ file.default file) input) + blob (!.use (\ file content) []) document (io\wrap (do try.monad [raw-json (encoding.from-utf8 blob) json (|> raw-json (:coerce java/lang/String) java/lang/String::trim (:coerce Text) - (:: json.codec decode)) + (\ json.codec decode)) license (json.run json /input.license)] (wrap (/output.license license)))) output-file (: (IO (Try (File IO))) (file.get-file io.monad file.default output))] - (!.use (:: output-file over-write) (encoding.to-utf8 document))))] + (!.use (\ output-file over-write) (encoding.to-utf8 document))))] (case ?done (#try.Success _) (wrap (log! (success-message output))) diff --git a/stdlib/source/program/scriptum.lux b/stdlib/source/program/scriptum.lux index cc4960bf9..aa15e7bfc 100644 --- a/stdlib/source/program/scriptum.lux +++ b/stdlib/source/program/scriptum.lux @@ -303,7 +303,7 @@ (def: name-sort (All [r] (-> [Text r] [Text r] Bit)) - (let [text\< (:: text.order <)] + (let [text\< (\ text.order <)] (function (_ [n1 _] [n2 _]) (text\< n1 n2)))) @@ -490,7 +490,7 @@ [outcome (do (try.with io.monad) [target (: (IO (Try (File IO))) (file.get-file io.monad file.default path))] - (!.use (:: target over-write) (encoding.to-utf8 (md.markdown documentation))))] + (!.use (\ target over-write) (encoding.to-utf8 (md.markdown documentation))))] (case outcome (#try.Failure error) (wrap (log! (ex.construct io-error error))) diff --git a/stdlib/source/spec/aedifex/repository.lux b/stdlib/source/spec/aedifex/repository.lux index a660722d9..77c453f4b 100644 --- a/stdlib/source/spec/aedifex/repository.lux +++ b/stdlib/source/spec/aedifex/repository.lux @@ -28,15 +28,15 @@ [expected (_binary.random 100)] (wrap ($_ _.and' (do promise.monad - [upload!/good (:: subject upload valid-identity valid-artifact //artifact/extension.lux-library expected) - download!/good (:: subject download valid-artifact //artifact/extension.lux-library) + [upload!/good (\ subject upload valid-identity valid-artifact //artifact/extension.lux-library expected) + download!/good (\ subject download valid-artifact //artifact/extension.lux-library) - upload!/bad (:: subject upload invalid-identity invalid-artifact //artifact/extension.lux-library expected) - download!/bad (:: subject download invalid-artifact //artifact/extension.lux-library)] + upload!/bad (\ subject upload invalid-identity invalid-artifact //artifact/extension.lux-library expected) + download!/bad (\ subject download invalid-artifact //artifact/extension.lux-library)] (_.cover' [/.Repository] (and (case [upload!/good download!/good] [(#try.Success _) (#try.Success actual)] - (:: binary.equivalence = expected actual) + (\ binary.equivalence = expected actual) _ false) diff --git a/stdlib/source/spec/compositor/common.lux b/stdlib/source/spec/compositor/common.lux index df351c008..ed3b53f30 100644 --- a/stdlib/source/spec/compositor/common.lux +++ b/stdlib/source/spec/compositor/common.lux @@ -19,8 +19,11 @@ [default ["." platform (#+ Platform)]]]]]) -(type: #export Runner (-> Text Synthesis (Try Any))) -(type: #export Definer (-> Name Synthesis (Try Any))) +(type: #export Runner + (-> Text Synthesis (Try Any))) + +(type: #export Definer + (-> Name Synthesis (Try Any))) (type: #export (Instancer what) (All [anchor expression directive] @@ -37,7 +40,7 @@ (do phase.monad [_ runtime] (phase expressionS)))] - (:: host evaluate! evaluation-name expressionG)))) + (\ host evaluate! evaluation-name expressionG)))) (def: (definer (^slots [#platform.runtime #platform.phase #platform.host]) state) @@ -52,7 +55,7 @@ [host-name host-value host-directive] (generation.define! lux-name expressionG) _ (generation.learn lux-name host-name)] (phase (synthesis.constant lux-name))))] - (:: host evaluate! "definer" definitionG)))) + (\ host evaluate! "definer" definitionG)))) (def: #export (executors target expander platform analysis-bundle generation-bundle directive-bundle diff --git a/stdlib/source/spec/compositor/generation/case.lux b/stdlib/source/spec/compositor/generation/case.lux index 908fef201..958110ce4 100644 --- a/stdlib/source/spec/compositor/generation/case.lux +++ b/stdlib/source/spec/compositor/generation/case.lux @@ -32,7 +32,7 @@ (def: size (Random Nat) - (|> r.nat (:: r.monad map (|>> (n.% ..limit) (n.max 2))))) + (|> r.nat (\ r.monad map (|>> (n.% ..limit) (n.max 2))))) (def: (tail? size idx) (-> Nat Nat Bit) @@ -66,7 +66,7 @@ [(r.unicode 5) synthesis.text synthesis.path/text])) (do {! r.monad} [size ..size - idx (|> r.nat (:: ! map (n.% size))) + idx (|> r.nat (\ ! map (n.% size))) [subS subP] case #let [unitS (synthesis.text synthesis.unit) caseS (synthesis.tuple @@ -81,7 +81,7 @@ (wrap [caseS caseP])) (do {! r.monad} [size ..size - idx (|> r.nat (:: ! map (n.% size))) + idx (|> r.nat (\ ! map (n.% size))) [subS subP] case #let [right? (tail? size idx) caseS (synthesis.variant @@ -249,7 +249,7 @@ (_.test "===" (and (text\= (synthesis.%path special-path) (synthesis.%path special-pattern-path)) - (:: synthesis.path-equivalence = special-path special-pattern-path))) + (\ synthesis.path-equivalence = special-path special-pattern-path))) (_.test "CODE" (|> special-input (run "special-input") diff --git a/stdlib/source/spec/compositor/generation/common.lux b/stdlib/source/spec/compositor/generation/common.lux index 60caf1a32..a963cd7f6 100644 --- a/stdlib/source/spec/compositor/generation/common.lux +++ b/stdlib/source/spec/compositor/generation/common.lux @@ -118,7 +118,7 @@ (def: simple-frac (Random Frac) - (|> r.nat (:: r.monad map (|>> (n.% 1000) .int i.frac)))) + (|> r.nat (\ r.monad map (|>> (n.% 1000) .int i.frac)))) (def: (f64 run) (-> Runner Test) @@ -175,12 +175,12 @@ (def: (text run) (-> Runner Test) (do {! r.monad} - [sample-size (|> r.nat (:: ! map (|>> (n.% 10) (n.max 1)))) + [sample-size (|> r.nat (\ ! map (|>> (n.% 10) (n.max 1)))) sample-lower (r.ascii/lower-alpha sample-size) sample-upper (r.ascii/upper-alpha sample-size) sample-alpha (|> (r.ascii/alpha sample-size) (r.filter (|>> (text\= sample-upper) not))) - char-idx (|> r.nat (:: ! map (n.% sample-size))) + char-idx (|> r.nat (\ ! map (n.% sample-size))) #let [sample-lowerS (synthesis.text sample-lower) sample-upperS (synthesis.text sample-upper) sample-alphaS (synthesis.text sample-alpha) diff --git a/stdlib/source/spec/compositor/generation/function.lux b/stdlib/source/spec/compositor/generation/function.lux index 21b2b4446..6d0f8d541 100644 --- a/stdlib/source/spec/compositor/generation/function.lux +++ b/stdlib/source/spec/compositor/generation/function.lux @@ -49,7 +49,7 @@ (-> Runner Test) (do {! r.monad} [[arity local functionS] ..function - partial-arity (|> r.nat (:: ! map (|>> (n.% arity) (n.max 1)))) + partial-arity (|> r.nat (\ ! map (|>> (n.% arity) (n.max 1)))) inputs (r.list arity r.safe-frac) #let [expectation (maybe.assume (list.nth (dec local) inputs)) inputsS (list\map (|>> synthesis.f64) inputs)]] diff --git a/stdlib/source/spec/compositor/generation/reference.lux b/stdlib/source/spec/compositor/generation/reference.lux index f1e12ff96..a94824f28 100644 --- a/stdlib/source/spec/compositor/generation/reference.lux +++ b/stdlib/source/spec/compositor/generation/reference.lux @@ -40,7 +40,7 @@ (def: (variable run) (-> Runner Test) (do {! r.monad} - [register (|> r.nat (:: ! map (n.% 100))) + [register (|> r.nat (\ ! map (n.% 100))) expected r.safe-frac] (_.test "Local variables." (|> (synthesis.branch/let [(synthesis.f64 expected) diff --git a/stdlib/source/spec/compositor/generation/structure.lux b/stdlib/source/spec/compositor/generation/structure.lux index e728867eb..a8f820786 100644 --- a/stdlib/source/spec/compositor/generation/structure.lux +++ b/stdlib/source/spec/compositor/generation/structure.lux @@ -31,8 +31,8 @@ (def: (variant run) (-> Runner Test) (do {! r.monad} - [num-tags (|> r.nat (:: ! map (|>> (n.% 10) (n.max 2)))) - tag-in (|> r.nat (:: ! map (n.% num-tags))) + [num-tags (|> r.nat (\ ! map (|>> (n.% 10) (n.max 2)))) + tag-in (|> r.nat (\ ! map (n.% num-tags))) #let [last?-in (|> num-tags dec (n.= tag-in))] value-in r.i64] (_.test (%.name (name-of synthesis.variant)) @@ -66,7 +66,7 @@ (def: (tuple run) (-> Runner Test) (do {! r.monad} - [size (|> r.nat (:: ! map (|>> (n.% 10) (n.max 2)))) + [size (|> r.nat (\ ! map (|>> (n.% 10) (n.max 2)))) tuple-in (r.list size r.i64)] (_.test (%.name (name-of synthesis.tuple)) (|> (synthesis.tuple (list\map (|>> synthesis.i64) tuple-in)) diff --git a/stdlib/source/spec/lux/abstract/apply.lux b/stdlib/source/spec/lux/abstract/apply.lux index 399e69e9e..40bd37826 100644 --- a/stdlib/source/spec/lux/abstract/apply.lux +++ b/stdlib/source/spec/lux/abstract/apply.lux @@ -18,7 +18,7 @@ (def: (identity injection comparison (^open "_//.")) (All [f] (-> (Injection f) (Comparison f) (Apply f) Test)) (do {! random.monad} - [sample (:: ! map injection random.nat)] + [sample (\ ! map injection random.nat)] (_.test "Identity." ((comparison n.=) (_//apply (injection function.identity) sample) @@ -28,7 +28,7 @@ (All [f] (-> (Injection f) (Comparison f) (Apply f) Test)) (do {! random.monad} [sample random.nat - increase (:: ! map n.+ random.nat)] + increase (\ ! map n.+ random.nat)] (_.test "Homomorphism." ((comparison n.=) (_//apply (injection increase) (injection sample)) @@ -38,7 +38,7 @@ (All [f] (-> (Injection f) (Comparison f) (Apply f) Test)) (do {! random.monad} [sample random.nat - increase (:: ! map n.+ random.nat)] + increase (\ ! map n.+ random.nat)] (_.test "Interchange." ((comparison n.=) (_//apply (injection increase) (injection sample)) @@ -48,8 +48,8 @@ (All [f] (-> (Injection f) (Comparison f) (Apply f) Test)) (do {! random.monad} [sample random.nat - increase (:: ! map n.+ random.nat) - decrease (:: ! map n.- random.nat)] + increase (\ ! map n.+ random.nat) + decrease (\ ! map n.- random.nat)] (_.test "Composition." ((comparison n.=) (_$ _//apply diff --git a/stdlib/source/spec/lux/abstract/comonad.lux b/stdlib/source/spec/lux/abstract/comonad.lux index a45c89e26..ed56d5787 100644 --- a/stdlib/source/spec/lux/abstract/comonad.lux +++ b/stdlib/source/spec/lux/abstract/comonad.lux @@ -17,9 +17,9 @@ (All [f] (-> (Injection f) (CoMonad f) Test)) (do {! random.monad} [sample random.nat - morphism (:: ! map (function (_ diff) - (|>> _//unwrap (n.+ diff))) - random.nat) + morphism (\ ! map (function (_ diff) + (|>> _//unwrap (n.+ diff))) + random.nat) #let [start (injection sample)]] (_.test "Left identity." (n.= (morphism start) @@ -39,12 +39,12 @@ (All [f] (-> (Injection f) (Comparison f) (CoMonad f) Test)) (do {! random.monad} [sample random.nat - increase (:: ! map (function (_ diff) - (|>> _//unwrap (n.+ diff))) - random.nat) - decrease (:: ! map (function (_ diff) - (|>> _//unwrap(n.- diff))) - random.nat) + increase (\ ! map (function (_ diff) + (|>> _//unwrap (n.+ diff))) + random.nat) + decrease (\ ! map (function (_ diff) + (|>> _//unwrap(n.- diff))) + random.nat) #let [start (injection sample) == (comparison n.=)]] (_.test "Associativity." diff --git a/stdlib/source/spec/lux/abstract/functor.lux b/stdlib/source/spec/lux/abstract/functor.lux index b237a388e..70206e9bb 100644 --- a/stdlib/source/spec/lux/abstract/functor.lux +++ b/stdlib/source/spec/lux/abstract/functor.lux @@ -25,7 +25,7 @@ (def: (identity injection comparison (^open "@//.")) (All [f] (-> (Injection f) (Comparison f) (Functor f) Test)) (do {! random.monad} - [sample (:: ! map injection random.nat)] + [sample (\ ! map injection random.nat)] (_.test "Identity." ((comparison n.=) (@//map function.identity sample) @@ -35,7 +35,7 @@ (All [f] (-> (Injection f) (Comparison f) (Functor f) Test)) (do {! random.monad} [sample random.nat - increase (:: ! map n.+ random.nat)] + increase (\ ! map n.+ random.nat)] (_.test "Homomorphism." ((comparison n.=) (@//map increase (injection sample)) @@ -44,9 +44,9 @@ (def: (composition injection comparison (^open "@//.")) (All [f] (-> (Injection f) (Comparison f) (Functor f) Test)) (do {! random.monad} - [sample (:: ! map injection random.nat) - increase (:: ! map n.+ random.nat) - decrease (:: ! map n.- random.nat)] + [sample (\ ! map injection random.nat) + increase (\ ! map n.+ random.nat) + decrease (\ ! map n.- random.nat)] (_.test "Composition." ((comparison n.=) (|> sample (@//map increase) (@//map decrease)) diff --git a/stdlib/source/spec/lux/abstract/monad.lux b/stdlib/source/spec/lux/abstract/monad.lux index 21ccafe75..8c1cf7f76 100644 --- a/stdlib/source/spec/lux/abstract/monad.lux +++ b/stdlib/source/spec/lux/abstract/monad.lux @@ -15,9 +15,9 @@ (All [f] (-> (Injection f) (Comparison f) (Monad f) Test)) (do {! random.monad} [sample random.nat - morphism (:: ! map (function (_ diff) - (|>> (n.+ diff) _//wrap)) - random.nat)] + morphism (\ ! map (function (_ diff) + (|>> (n.+ diff) _//wrap)) + random.nat)] (_.test "Left identity." ((comparison n.=) (|> (injection sample) (_//map morphism) _//join) @@ -36,12 +36,12 @@ (All [f] (-> (Injection f) (Comparison f) (Monad f) Test)) (do {! random.monad} [sample random.nat - increase (:: ! map (function (_ diff) - (|>> (n.+ diff) _//wrap)) - random.nat) - decrease (:: ! map (function (_ diff) - (|>> (n.- diff) _//wrap)) - random.nat)] + increase (\ ! map (function (_ diff) + (|>> (n.+ diff) _//wrap)) + random.nat) + decrease (\ ! map (function (_ diff) + (|>> (n.- diff) _//wrap)) + random.nat)] (_.test "Associativity." ((comparison n.=) (|> (injection sample) (_//map increase) _//join (_//map decrease) _//join) diff --git a/stdlib/source/spec/lux/world/console.lux b/stdlib/source/spec/lux/world/console.lux index 5257785f0..761376526 100644 --- a/stdlib/source/spec/lux/world/console.lux +++ b/stdlib/source/spec/lux/world/console.lux @@ -22,11 +22,11 @@ [message (random.ascii/alpha 10)] (wrap (do promise.monad [console (promise.future console) - ?read (!.use (:: console read) []) - ?read-line (!.use (:: console read-line) []) - ?write (!.use (:: console write) [message]) - ?close/good (!.use (:: console close) []) - ?close/bad (!.use (:: console close) [])] + ?read (!.use (\ console read) []) + ?read-line (!.use (\ console read-line) []) + ?write (!.use (\ console write) [message]) + ?close/good (!.use (\ console close) []) + ?close/bad (!.use (\ console close) [])] ($_ _.and' (_.cover' [/.Can-Read] (case [?read ?read-line] diff --git a/stdlib/source/spec/lux/world/shell.lux b/stdlib/source/spec/lux/world/shell.lux index badc674b6..27ccf321c 100644 --- a/stdlib/source/spec/lux/world/shell.lux +++ b/stdlib/source/spec/lux/world/shell.lux @@ -38,8 +38,8 @@ (def: (read-test expected process) (-> Text (/.Process Promise) _.Assertion) (do promise.monad - [?read (!.use (:: process read) []) - ?await (!.use (:: process await) [])] + [?read (!.use (\ process read) []) + ?await (!.use (\ process await) [])] ($_ _.and' (_.cover' [/.Can-Read] (case ?read @@ -60,8 +60,8 @@ (def: (destroy-test process) (-> (/.Process Promise) _.Assertion) (do promise.monad - [?destroy (!.use (:: process destroy) []) - ?await (!.use (:: process await) [])] + [?destroy (!.use (\ process destroy) []) + ?await (!.use (\ process await) [])] (_.cover' [/.Can-Destroy] (and (case ?destroy (#try.Success _) @@ -82,10 +82,10 @@ (<| (_.with-cover [/.Shell /.Process]) (do {! random.monad} [message (random.ascii/alpha 10) - seconds (:: ! map (|>> (n.% 5) (n.+ 5)) random.nat)] + seconds (\ ! map (|>> (n.% 5) (n.+ 5)) random.nat)] (wrap (do promise.monad - [?echo (!.use (:: shell execute) (..echo! message)) - ?sleep (!.use (:: shell execute) (..sleep! seconds))] + [?echo (!.use (\ shell execute) (..echo! message)) + ?sleep (!.use (\ shell execute) (..sleep! seconds))] (case [?echo ?sleep] [(#try.Success echo) (#try.Success sleep)] ($_ _.and' diff --git a/stdlib/source/test/aedifex/artifact.lux b/stdlib/source/test/aedifex/artifact.lux index 94fd9a5f0..6ba31f9b7 100644 --- a/stdlib/source/test/aedifex/artifact.lux +++ b/stdlib/source/test/aedifex/artifact.lux @@ -43,10 +43,10 @@ (do random.monad [sample ..random #let [fs (: (file.System Promise) - (file.mock (:: file.default separator)))]] + (file.mock (\ file.default separator)))]] (_.cover [/.uri /.path] (|> (/.path fs sample) - (text.replace-all uri.separator (:: fs separator)) + (text.replace-all uri.separator (\ fs separator)) (text\= (/.uri sample))))) /type.test diff --git a/stdlib/source/test/aedifex/cache.lux b/stdlib/source/test/aedifex/cache.lux index 81d5fe136..7923eb8c5 100644 --- a/stdlib/source/test/aedifex/cache.lux +++ b/stdlib/source/test/aedifex/cache.lux @@ -58,7 +58,7 @@ (def: content (Random Binary) (do {! random.monad} - [content-size (:: ! map (n.% 100) random.nat)] + [content-size (\ ! map (n.% 100) random.nat)] (_binary.random content-size))) (def: package @@ -76,7 +76,7 @@ (do {! random.monad} [[main-dependency main-package] ..package dependencies (|> (//package.dependencies main-package) - (:: try.monad map set.to-list) + (\ try.monad map set.to-list) (try.default (list)) (monad.map ! (function (_ dependency) (do ! @@ -97,7 +97,7 @@ (do {! random.monad} [[dependency expected-package] ..package #let [fs (: (file.System Promise) - (file.mock (:: file.default separator)))]] + (file.mock (\ file.default separator)))]] (wrap (do promise.monad [wrote! (/.write-one fs dependency expected-package) read! (/.read-one fs dependency)] @@ -106,16 +106,16 @@ (do try.monad [_ wrote! actual-package read!] - (wrap (:: //package.equivalence = - (set@ #//package.origin #//package.Local expected-package) - actual-package))))))))) + (wrap (\ //package.equivalence = + (set@ #//package.origin #//package.Local expected-package) + actual-package))))))))) (def: plural Test (do {! random.monad} [expected ..resolution #let [fs (: (file.System Promise) - (file.mock (:: file.default separator)))]] + (file.mock (\ file.default separator)))]] (wrap (do promise.monad [wrote! (/.write-all fs expected) read! (/.read-all fs (dictionary.keys expected) //dependency/resolution.empty)] @@ -124,11 +124,11 @@ (do try.monad [_ wrote! actual read!] - (wrap (:: //dependency/resolution.equivalence = - (:: dictionary.functor map - (set@ #//package.origin #//package.Local) - expected) - actual))))))))) + (wrap (\ //dependency/resolution.equivalence = + (\ dictionary.functor map + (set@ #//package.origin #//package.Local) + expected) + actual))))))))) (def: #export test Test diff --git a/stdlib/source/test/aedifex/cli.lux b/stdlib/source/test/aedifex/cli.lux index 5dacd4f16..805ccee03 100644 --- a/stdlib/source/test/aedifex/cli.lux +++ b/stdlib/source/test/aedifex/cli.lux @@ -74,7 +74,7 @@ (cli.run /.command) (case> (#try.Success [name actual]) (and (text\= //.default name) - (:: /.equivalence = expected actual)) + (\ /.equivalence = expected actual)) (#try.Failure error) false))))) @@ -91,7 +91,7 @@ (cli.run /.command) (case> (#try.Success [actual-profile actual-command]) (and (text\= expected-profile actual-profile) - (:: /.equivalence = expected-command actual-command)) + (\ /.equivalence = expected-command actual-command)) (#try.Failure error) false))))) diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux index 13039d9d3..5fad232b1 100644 --- a/stdlib/source/test/aedifex/command/auto.lux +++ b/stdlib/source/test/aedifex/command/auto.lux @@ -62,7 +62,7 @@ (#.Cons head tail) (do (try.with !) - [_ (!.use (:: fs create-file) [head])] + [_ (!.use (\ fs create-file) [head])] (do ! [_ (promise.future (atom.write [runs tail] @runs))] (wrap (#try.Success [])))))))])) @@ -71,7 +71,7 @@ Test (<| (_.covering /._) (do {! random.monad} - [#let [/ (:: file.default separator) + [#let [/ (\ file.default separator) [fs watcher] (watch.mock /) shell (shell.mock (function (_ [actual-environment actual-working-directory actual-command actual-arguments]) @@ -93,13 +93,13 @@ program (random.ascii/alpha 5) target (random.ascii/alpha 5) working-directory (random.ascii/alpha 5) - expected-runs (:: ! map (|>> (n.% 10) (n.max 2)) random.nat) + expected-runs (\ ! map (|>> (n.% 10) (n.max 2)) random.nat) source (random.ascii/alpha 5) dummy-files (|> (random.ascii/alpha 5) (random.set text.hash (dec expected-runs)) - (:: ! map (|>> set.to-list (list\map (|>> (format source /)))))) + (\ ! map (|>> set.to-list (list\map (|>> (format source /)))))) #let [empty-profile (: Profile - (:: ///.monoid identity)) + (\ ///.monoid identity)) with-target (: (-> Profile Profile) (set@ #///.target (#.Some target))) with-program (: (-> Profile Profile) @@ -128,8 +128,8 @@ #let [[@runs command] (..command end-signal dummy-files)]] (wrap (do promise.monad [verdict (do ///action.monad - [_ (!.use (:: fs create-directory) [source]) - _ (:: watcher poll []) + [_ (!.use (\ fs create-directory) [source]) + _ (\ watcher poll []) #let [resolution (|> ///dependency/resolution.empty (dictionary.put compiler-dependency compiler-package))]] (do promise.monad diff --git a/stdlib/source/test/aedifex/command/build.lux b/stdlib/source/test/aedifex/command/build.lux index ad72b47c4..3b1802440 100644 --- a/stdlib/source/test/aedifex/command/build.lux +++ b/stdlib/source/test/aedifex/command/build.lux @@ -34,7 +34,7 @@ Test (<| (_.covering /._) (do {! random.monad} - [#let [fs (file.mock (:: file.default separator)) + [#let [fs (file.mock (\ file.default separator)) shell (shell.mock (function (_ [actual-environment actual-working-directory actual-command actual-arguments]) (#try.Success @@ -55,7 +55,7 @@ target (random.ascii/alpha 5) working-directory (random.ascii/alpha 5) #let [empty-profile (: Profile - (:: ///.monoid identity)) + (\ ///.monoid identity)) with-target (: (-> Profile Profile) (set@ #///.target (#.Some target))) with-program (: (-> Profile Profile) diff --git a/stdlib/source/test/aedifex/command/clean.lux b/stdlib/source/test/aedifex/command/clean.lux index 7246d38a7..11570d034 100644 --- a/stdlib/source/test/aedifex/command/clean.lux +++ b/stdlib/source/test/aedifex/command/clean.lux @@ -42,7 +42,7 @@ (def: (files prefix) (-> Path (Random (List [Path Binary]))) (do {! random.monad} - [count (:: ! map (n.% 10) random.nat) + [count (\ ! map (n.% 10) random.nat) names (random.set text.hash count ..node-name) contents (random.list count (_binary.random 100))] (wrap (list.zip/2 (list\map (|>> (format prefix)) (set.to-list names)) @@ -53,7 +53,7 @@ (do {! (try.with promise.monad)} [file (: (Promise (Try (File Promise))) (file.get-file promise.monad fs path))] - (!.use (:: file over-write) content))) + (!.use (\ file over-write) content))) (def: (create-directory! fs path files) (-> (file.System Promise) Path (List [Path Binary]) (Promise (Try Any))) @@ -89,8 +89,8 @@ [context ..node-name target ..node-name sub ..node-name - #let [fs (file.mock (:: file.default separator)) - / (:: fs separator) + #let [fs (file.mock (\ file.default separator)) + / (\ fs separator) target-path (format context / target) sub-path (format target-path / sub)] direct-files (..files (format target-path /)) diff --git a/stdlib/source/test/aedifex/command/deploy.lux b/stdlib/source/test/aedifex/command/deploy.lux index 52b995f6f..5e4f6615b 100644 --- a/stdlib/source/test/aedifex/command/deploy.lux +++ b/stdlib/source/test/aedifex/command/deploy.lux @@ -51,15 +51,15 @@ (case sources #.Nil (|> [] - (:: try.monad wrap) - (:: promise.monad wrap)) + (\ try.monad wrap) + (\ promise.monad wrap)) (#.Cons head tail) (do (try.with promise.monad) [_ (: (Promise (Try Path)) (file.make-directories promise.monad fs head)) _ (: (Promise (Try (File Promise))) - (file.get-file promise.monad fs (format head (:: fs separator) head ".lux")))] + (file.get-file promise.monad fs (format head (\ fs separator) head ".lux")))] (recur tail))))) (def: (execute! repository fs identity artifact profile) @@ -87,7 +87,7 @@ identity @repository.identity #let [repository (///repository.mock (@repository.simulation identity) @repository.empty) - fs (file.mock (:: file.default separator))]] + fs (file.mock (\ file.default separator))]] (wrap (do {! promise.monad} [verdict (do {! ///action.monad} [_ (..execute! repository fs identity artifact profile) @@ -95,32 +95,32 @@ (get@ #///.sources) set.to-list (export.library fs) - (:: ! map (format.run tar.writer))) + (\ ! map (format.run tar.writer))) - actual-pom (:: repository download artifact ///artifact/extension.pom) - actual-library (:: repository download artifact ///artifact/extension.lux-library) - actual-sha-1 (:: repository download artifact ///artifact/extension.sha-1) - actual-md5 (:: repository download artifact ///artifact/extension.md5) + actual-pom (\ repository download artifact ///artifact/extension.pom) + actual-library (\ repository download artifact ///artifact/extension.lux-library) + actual-sha-1 (\ repository download artifact ///artifact/extension.sha-1) + actual-md5 (\ repository download artifact ///artifact/extension.md5) #let [deployed-library! - (:: binary.equivalence = - expected-library - actual-library) + (\ binary.equivalence = + expected-library + actual-library) deployed-pom! - (:: binary.equivalence = - (|> expected-pom (:: xml.codec encode) encoding.to-utf8) - actual-pom) + (\ binary.equivalence = + (|> expected-pom (\ xml.codec encode) encoding.to-utf8) + actual-pom) deployed-sha-1! - (:: binary.equivalence = - (///hash.data (///hash.sha-1 expected-library)) - actual-sha-1) + (\ binary.equivalence = + (///hash.data (///hash.sha-1 expected-library)) + actual-sha-1) deployed-md5! - (:: binary.equivalence = - (///hash.data (///hash.md5 expected-library)) - actual-md5)]] + (\ binary.equivalence = + (///hash.data (///hash.md5 expected-library)) + actual-md5)]] (wrap (and deployed-library! deployed-pom! deployed-sha-1! diff --git a/stdlib/source/test/aedifex/command/deps.lux b/stdlib/source/test/aedifex/command/deps.lux index 8c19df87f..42739a5ff 100644 --- a/stdlib/source/test/aedifex/command/deps.lux +++ b/stdlib/source/test/aedifex/command/deps.lux @@ -43,7 +43,7 @@ (do random.monad [dependee-artifact $///artifact.random depender-artifact (random.filter (predicate.complement - (:: ///artifact.equivalence = dependee-artifact)) + (\ ///artifact.equivalence = dependee-artifact)) $///artifact.random) [_ dependee-package] $///package.random @@ -54,11 +54,11 @@ depender {#///dependency.artifact depender-artifact #///dependency.type ///artifact/type.lux-library} - dependee-pom (|> (:: ///.monoid identity) + dependee-pom (|> (\ ///.monoid identity) (set@ #///.identity (#.Some dependee-artifact)) ///pom.write try.assume) - depender-pom (|> (:: ///.monoid identity) + depender-pom (|> (\ ///.monoid identity) (set@ #///.identity (#.Some depender-artifact)) (set@ #///.dependencies (set.from-list ///dependency.hash (list dependee))) ///pom.write @@ -71,13 +71,13 @@ (set@ #///package.origin #///package.Remote) (set@ #///package.pom depender-pom)) - fs (file.mock (:: file.default separator))]] + fs (file.mock (\ file.default separator))]] (wrap (do promise.monad [verdict (do ///action.monad [pre (|> ///dependency/resolution.empty (dictionary.put dependee dependee-package) (///cache.write-all fs)) - post (|> (:: ///.monoid identity) + post (|> (\ ///.monoid identity) (set@ #///.dependencies (set.from-list ///dependency.hash (list dependee depender))) (/.do! fs (list (///repository.mock ($///dependency/resolution.single depender-artifact depender-package) []))))] (wrap (and (and (set.member? pre dependee-artifact) diff --git a/stdlib/source/test/aedifex/command/install.lux b/stdlib/source/test/aedifex/command/install.lux index 8982bc941..e858d46d2 100644 --- a/stdlib/source/test/aedifex/command/install.lux +++ b/stdlib/source/test/aedifex/command/install.lux @@ -42,15 +42,15 @@ (case sources #.Nil (|> [] - (:: try.monad wrap) - (:: promise.monad wrap)) + (\ try.monad wrap) + (\ promise.monad wrap)) (#.Cons head tail) (do (try.with promise.monad) [_ (: (Promise (Try Path)) (file.make-directories promise.monad fs head)) _ (: (Promise (Try (File Promise))) - (file.get-file promise.monad fs (format head (:: fs separator) head ".lux")))] + (file.get-file promise.monad fs (format head (\ fs separator) head ".lux")))] (recur tail))))) (def: (execute! fs sample) @@ -66,24 +66,24 @@ (<| (_.covering /._) (do random.monad [sample @profile.random - #let [fs (file.mock (:: file.default separator))]] + #let [fs (file.mock (\ file.default separator))]] (wrap (case (get@ #///.identity sample) (#.Some identity) (do {! promise.monad} [verdict (do ///action.monad [_ (..execute! fs sample) #let [artifact-path (format (///local.path fs identity) - (:: fs separator) + (\ fs separator) (///artifact.identity identity)) library-path (format artifact-path ///artifact/extension.lux-library) pom-path (format artifact-path ///artifact/extension.pom)] - library-exists! (:: promise.monad map - exception.return - (file.file-exists? promise.monad fs library-path)) - pom-exists! (:: promise.monad map - exception.return - (file.file-exists? promise.monad fs pom-path))] + library-exists! (\ promise.monad map + exception.return + (file.file-exists? promise.monad fs library-path)) + pom-exists! (\ promise.monad map + exception.return + (file.file-exists? promise.monad fs pom-path))] (wrap (and library-exists! pom-exists!)))] (_.cover' [/.do!] diff --git a/stdlib/source/test/aedifex/command/pom.lux b/stdlib/source/test/aedifex/command/pom.lux index 169318589..408debea6 100644 --- a/stdlib/source/test/aedifex/command/pom.lux +++ b/stdlib/source/test/aedifex/command/pom.lux @@ -33,7 +33,7 @@ (<| (_.covering /._) (do random.monad [sample @profile.random - #let [fs (file.mock (:: file.default separator))]] + #let [fs (file.mock (\ file.default separator))]] (wrap (do {! promise.monad} [outcome (/.do! fs sample)] (case outcome @@ -41,17 +41,17 @@ (do ! [verdict (do ///action.monad [expected (|> (///pom.write sample) - (try\map (|>> (:: xml.codec encode) encoding.to-utf8)) - (:: ! wrap)) + (try\map (|>> (\ xml.codec encode) encoding.to-utf8)) + (\ ! wrap)) file (: (Promise (Try (File Promise))) (file.get-file promise.monad fs path)) - actual (!.use (:: file content) []) + actual (!.use (\ file content) []) #let [expected-path! (text\= ///pom.file path) expected-content! - (:: binary.equivalence = expected actual)]] + (\ binary.equivalence = expected actual)]] (wrap (and expected-path! expected-content!)))] (_.cover' [/.do!] diff --git a/stdlib/source/test/aedifex/command/test.lux b/stdlib/source/test/aedifex/command/test.lux index be1a89c83..3a4bf9d79 100644 --- a/stdlib/source/test/aedifex/command/test.lux +++ b/stdlib/source/test/aedifex/command/test.lux @@ -35,7 +35,7 @@ Test (<| (_.covering /._) (do {! random.monad} - [#let [fs (file.mock (:: file.default separator)) + [#let [fs (file.mock (\ file.default separator)) shell (shell.mock (function (_ [actual-environment actual-working-directory actual-command actual-arguments]) (#try.Success @@ -56,7 +56,7 @@ target (random.ascii/alpha 5) working-directory (random.ascii/alpha 5) #let [empty-profile (: Profile - (:: ///.monoid identity)) + (\ ///.monoid identity)) with-target (: (-> Profile Profile) (set@ #///.target (#.Some target))) with-program (: (-> Profile Profile) diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux index 8bd013125..b426a100d 100644 --- a/stdlib/source/test/aedifex/dependency/resolution.lux +++ b/stdlib/source/test/aedifex/dependency/resolution.lux @@ -59,26 +59,26 @@ (-> Artifact Package (Simulation Any)) (structure (def: (on-download request extension state) - (if (:: ///artifact.equivalence = artifact request) + (if (\ ///artifact.equivalence = artifact request) (cond (text\= extension ///artifact/extension.lux-library) (#try.Success [state (get@ #///package.library package)]) (text\= extension ///artifact/extension.pom) (#try.Success [state (|> package (get@ #///package.pom) - (:: xml.codec encode) + (\ xml.codec encode) encoding.to-utf8)]) (text\= extension ///artifact/extension.sha-1) (#try.Success [state (|> package (get@ #///package.sha-1) - (:: ///hash.sha-1-codec encode) + (\ ///hash.sha-1-codec encode) encoding.to-utf8)]) (text\= extension ///artifact/extension.md5) (#try.Success [state (|> package (get@ #///package.md5) - (:: ///hash.md5-codec encode) + (\ ///hash.md5-codec encode) encoding.to-utf8)]) ## else @@ -94,33 +94,33 @@ [_ expected-package] $///package.random [_ dummy-package] (random.filter (|>> product.right (set@ #///package.pom (get@ #///package.pom expected-package)) - (:: ///package.equivalence = expected-package) + (\ ///package.equivalence = expected-package) not) $///package.random) #let [good (..single expected-artifact expected-package) bad-sha-1 (: (Simulation Any) (structure (def: (on-download actual-artifact extension state) - (if (:: ///artifact.equivalence = expected-artifact actual-artifact) + (if (\ ///artifact.equivalence = expected-artifact actual-artifact) (cond (text\= extension ///artifact/extension.lux-library) (#try.Success [state (get@ #///package.library expected-package)]) (text\= extension ///artifact/extension.pom) (#try.Success [state (|> expected-package (get@ #///package.pom) - (:: xml.codec encode) + (\ xml.codec encode) encoding.to-utf8)]) (text\= extension ///artifact/extension.sha-1) (#try.Success [state (|> dummy-package (get@ #///package.sha-1) - (:: ///hash.sha-1-codec encode) + (\ ///hash.sha-1-codec encode) encoding.to-utf8)]) (text\= extension ///artifact/extension.md5) (#try.Success [state (|> expected-package (get@ #///package.md5) - (:: ///hash.md5-codec encode) + (\ ///hash.md5-codec encode) encoding.to-utf8)]) ## else @@ -131,26 +131,26 @@ bad-md5 (: (Simulation Any) (structure (def: (on-download actual-artifact extension state) - (if (:: ///artifact.equivalence = expected-artifact actual-artifact) + (if (\ ///artifact.equivalence = expected-artifact actual-artifact) (cond (text\= extension ///artifact/extension.lux-library) (#try.Success [state (get@ #///package.library expected-package)]) (text\= extension ///artifact/extension.pom) (#try.Success [state (|> expected-package (get@ #///package.pom) - (:: xml.codec encode) + (\ xml.codec encode) encoding.to-utf8)]) (text\= extension ///artifact/extension.sha-1) (#try.Success [state (|> expected-package (get@ #///package.sha-1) - (:: ///hash.sha-1-codec encode) + (\ ///hash.sha-1-codec encode) encoding.to-utf8)]) (text\= extension ///artifact/extension.md5) (#try.Success [state (|> dummy-package (get@ #///package.md5) - (:: ///hash.md5-codec encode) + (\ ///hash.md5-codec encode) encoding.to-utf8)]) ## else @@ -167,9 +167,9 @@ (_.cover' [/.one] (case actual-package (#try.Success actual-package) - (:: ///package.equivalence = - (set@ #///package.origin #///package.Remote expected-package) - actual-package) + (\ ///package.equivalence = + (set@ #///package.origin #///package.Remote expected-package) + actual-package) (#try.Failure _) false)))) @@ -199,33 +199,33 @@ [_ expected-package] $///package.random [_ dummy-package] (random.filter (|>> product.right (set@ #///package.pom (get@ #///package.pom expected-package)) - (:: ///package.equivalence = expected-package) + (\ ///package.equivalence = expected-package) not) $///package.random) #let [good (..single expected-artifact expected-package) bad-sha-1 (: (Simulation Any) (structure (def: (on-download actual-artifact extension state) - (if (:: ///artifact.equivalence = expected-artifact actual-artifact) + (if (\ ///artifact.equivalence = expected-artifact actual-artifact) (cond (text\= extension ///artifact/extension.lux-library) (#try.Success [state (get@ #///package.library expected-package)]) (text\= extension ///artifact/extension.pom) (#try.Success [state (|> expected-package (get@ #///package.pom) - (:: xml.codec encode) + (\ xml.codec encode) encoding.to-utf8)]) (text\= extension ///artifact/extension.sha-1) (#try.Success [state (|> dummy-package (get@ #///package.sha-1) - (:: ///hash.sha-1-codec encode) + (\ ///hash.sha-1-codec encode) encoding.to-utf8)]) (text\= extension ///artifact/extension.md5) (#try.Success [state (|> expected-package (get@ #///package.md5) - (:: ///hash.md5-codec encode) + (\ ///hash.md5-codec encode) encoding.to-utf8)]) ## else @@ -236,26 +236,26 @@ bad-md5 (: (Simulation Any) (structure (def: (on-download actual-artifact extension state) - (if (:: ///artifact.equivalence = expected-artifact actual-artifact) + (if (\ ///artifact.equivalence = expected-artifact actual-artifact) (cond (text\= extension ///artifact/extension.lux-library) (#try.Success [state (get@ #///package.library expected-package)]) (text\= extension ///artifact/extension.pom) (#try.Success [state (|> expected-package (get@ #///package.pom) - (:: xml.codec encode) + (\ xml.codec encode) encoding.to-utf8)]) (text\= extension ///artifact/extension.sha-1) (#try.Success [state (|> expected-package (get@ #///package.sha-1) - (:: ///hash.sha-1-codec encode) + (\ ///hash.sha-1-codec encode) encoding.to-utf8)]) (text\= extension ///artifact/extension.md5) (#try.Success [state (|> dummy-package (get@ #///package.md5) - (:: ///hash.md5-codec encode) + (\ ///hash.md5-codec encode) encoding.to-utf8)]) ## else @@ -274,9 +274,9 @@ (_.cover' [/.any] (case actual-package (#try.Success actual-package) - (:: ///package.equivalence = - (set@ #///package.origin #///package.Remote expected-package) - actual-package) + (\ ///package.equivalence = + (set@ #///package.origin #///package.Remote expected-package) + actual-package) (#try.Failure _) false)))) @@ -300,11 +300,11 @@ (do {! random.monad} [dependee-artifact $///artifact.random depender-artifact (random.filter (predicate.complement - (:: ///artifact.equivalence = dependee-artifact)) + (\ ///artifact.equivalence = dependee-artifact)) $///artifact.random) ignored-artifact (random.filter (predicate.complement - (predicate.unite (:: ///artifact.equivalence = dependee-artifact) - (:: ///artifact.equivalence = depender-artifact))) + (predicate.unite (\ ///artifact.equivalence = dependee-artifact) + (\ ///artifact.equivalence = depender-artifact))) $///artifact.random) [_ dependee-package] $///package.random @@ -318,16 +318,16 @@ ignored {#///dependency.artifact ignored-artifact #///dependency.type ///artifact/type.lux-library} - dependee-pom (|> (:: ///.monoid identity) + dependee-pom (|> (\ ///.monoid identity) (set@ #///.identity (#.Some dependee-artifact)) ///pom.write try.assume) - depender-pom (|> (:: ///.monoid identity) + depender-pom (|> (\ ///.monoid identity) (set@ #///.identity (#.Some depender-artifact)) (set@ #///.dependencies (set.from-list ///dependency.hash (list dependee))) ///pom.write try.assume) - ignored-pom (|> (:: ///.monoid identity) + ignored-pom (|> (\ ///.monoid identity) (set@ #///.identity (#.Some ignored-artifact)) ///pom.write try.assume) diff --git a/stdlib/source/test/aedifex/hash.lux b/stdlib/source/test/aedifex/hash.lux index 745ec0910..472342c70 100644 --- a/stdlib/source/test/aedifex/hash.lux +++ b/stdlib/source/test/aedifex/hash.lux @@ -30,8 +30,8 @@ (-> (-> Binary (/.Hash h)) (Random (/.Hash h)))) (do {! random.monad} - [size (:: ! map (n.% 100) random.nat)] - (:: ! map hash (_binary.random size)))) + [size (\ ! map (n.% 100) random.nat)] + (\ ! map hash (_binary.random size)))) (def: #export test Test @@ -51,13 +51,13 @@ (_.cover [<hash> <constructor> <exception>] (and (case (<constructor> (/.data expected)) (#try.Success actual) - (:: /.equivalence = expected actual) + (\ /.equivalence = expected actual) (#try.Failure error) false) - (case (<constructor> (:: binary.monoid compose - (/.data expected) - (/.data expected))) + (case (<constructor> (\ binary.monoid compose + (/.data expected) + (/.data expected))) (#try.Success actual) false @@ -80,9 +80,9 @@ [(do random.monad [expected (..random <hash>)] (_.cover [<codec>] - (case (:: <codec> decode - (format (:: <codec> encode expected) - "AABBCC")) + (case (\ <codec> decode + (format (\ <codec> encode expected) + "AABBCC")) (#try.Success actual) false diff --git a/stdlib/source/test/aedifex/input.lux b/stdlib/source/test/aedifex/input.lux index 9f85ea5af..dc424afc8 100644 --- a/stdlib/source/test/aedifex/input.lux +++ b/stdlib/source/test/aedifex/input.lux @@ -40,9 +40,9 @@ Test (<| (_.covering /._) (do {! random.monad} - [expected (:: ! map (set@ #//.parents (list)) @profile.random) + [expected (\ ! map (set@ #//.parents (list)) @profile.random) #let [fs (: (file.System Promise) - (file.mock (:: file.default separator)))]] + (file.mock (\ file.default separator)))]] (wrap (do promise.monad [verdict (do //action.monad [file (: (Promise (Try (File Promise))) @@ -51,11 +51,11 @@ //format.profile %.code encoding.to-utf8 - (!.use (:: file over-write))) + (!.use (\ file over-write))) actual (: (Promise (Try Profile)) (/.read promise.monad fs //.default))] - (wrap (:: //.equivalence = - (update@ #//.sources ..with-default-source expected) - actual)))] + (wrap (\ //.equivalence = + (update@ #//.sources ..with-default-source expected) + actual)))] (_.cover' [/.read] (try.default false verdict))))))) diff --git a/stdlib/source/test/aedifex/local.lux b/stdlib/source/test/aedifex/local.lux index 1c713684c..1d90ff905 100644 --- a/stdlib/source/test/aedifex/local.lux +++ b/stdlib/source/test/aedifex/local.lux @@ -25,7 +25,7 @@ (do {! random.monad} [sample @artifact.random #let [fs (: (file.System Promise) - (file.mock (:: file.default separator)))]] + (file.mock (\ file.default separator)))]] ($_ _.and (_.cover [/.repository /.path] (let [path (/.path fs sample)] diff --git a/stdlib/source/test/aedifex/package.lux b/stdlib/source/test/aedifex/package.lux index 5400d4953..c1add80d3 100644 --- a/stdlib/source/test/aedifex/package.lux +++ b/stdlib/source/test/aedifex/package.lux @@ -34,7 +34,7 @@ (def: #export random (Random [//.Profile /.Package]) (do {! random.monad} - [content-size (:: ! map (n.% 100) random.nat) + [content-size (\ ! map (n.% 100) random.nat) content (_binary.random content-size) [profile pom] (random.one (function (_ profile) (try.to-maybe @@ -52,17 +52,17 @@ [[profile package] ..random] ($_ _.and (_.cover [/.local] - (and (:: //hash.equivalence = - (//hash.sha-1 (get@ #/.library package)) - (get@ #/.sha-1 package)) - (:: //hash.equivalence = - (//hash.md5 (get@ #/.library package)) - (get@ #/.md5 package)))) + (and (\ //hash.equivalence = + (//hash.sha-1 (get@ #/.library package)) + (get@ #/.sha-1 package)) + (\ //hash.equivalence = + (//hash.md5 (get@ #/.library package)) + (get@ #/.md5 package)))) (_.cover [/.dependencies] (let [expected (get@ #//.dependencies profile)] (case (/.dependencies package) (#try.Success actual) - (:: set.equivalence = expected actual) + (\ set.equivalence = expected actual) (#try.Failure error) false))) diff --git a/stdlib/source/test/aedifex/parser.lux b/stdlib/source/test/aedifex/parser.lux index 394f93977..248023e80 100644 --- a/stdlib/source/test/aedifex/parser.lux +++ b/stdlib/source/test/aedifex/parser.lux @@ -39,14 +39,14 @@ (def: (list-of random) (All [a] (-> (Random a) (Random (List a)))) (do {! random.monad} - [size (:: ! map (n.% 5) random.nat)] + [size (\ ! map (n.% 5) random.nat)] (random.list size random))) (def: (dictionary-of key-hash key-random value-random) (All [k v] (-> (Hash k) (Random k) (Random v) (Random (Dictionary k v)))) - (:: random.functor map - (dictionary.from-list key-hash) - (..list-of (random.and key-random value-random)))) + (\ random.functor map + (dictionary.from-list key-hash) + (..list-of (random.and key-random value-random)))) (def: random (Random Project) @@ -74,7 +74,7 @@ (|> expected ..with-default-sources (//project.project //.default) - (:: //project.equivalence = actual)) + (\ //project.equivalence = actual)) (#try.Failure error) false))))) @@ -82,7 +82,7 @@ (def: (with-empty-profile project) (-> Project Project) (if (dictionary.empty? project) - (//project.project //.default (:: //.monoid identity)) + (//project.project //.default (\ //.monoid identity)) project)) (def: multiple-profiles @@ -101,7 +101,7 @@ (list\map (function (_ [name profile]) [name (..with-default-sources profile)])) (dictionary.from-list text.hash) - (:: //project.equivalence = actual)) + (\ //project.equivalence = actual)) (#try.Failure error) false))))) diff --git a/stdlib/source/test/aedifex/pom.lux b/stdlib/source/test/aedifex/pom.lux index d1f278da7..fefdfb7bb 100644 --- a/stdlib/source/test/aedifex/pom.lux +++ b/stdlib/source/test/aedifex/pom.lux @@ -32,10 +32,10 @@ (#.Some _)] (case (<xml>.run /.parser pom) (#try.Success actual) - (:: //.equivalence = - (|> (:: //.monoid identity) - (set@ #//.dependencies (get@ #//.dependencies expected))) - actual) + (\ //.equivalence = + (|> (\ //.monoid identity) + (set@ #//.dependencies (get@ #//.dependencies expected))) + actual) (#try.Failure error) false) diff --git a/stdlib/source/test/aedifex/profile.lux b/stdlib/source/test/aedifex/profile.lux index b49bd7f36..7f95c07c2 100644 --- a/stdlib/source/test/aedifex/profile.lux +++ b/stdlib/source/test/aedifex/profile.lux @@ -72,20 +72,20 @@ (def: (list-of random) (All [a] (-> (Random a) (Random (List a)))) (do {! random.monad} - [size (:: ! map (n.% 5) random.nat)] + [size (\ ! map (n.% 5) random.nat)] (random.list size random))) (def: (set-of hash random) (All [a] (-> (Hash a) (Random a) (Random (Set a)))) - (:: random.functor map - (set.from-list hash) - (..list-of random))) + (\ random.functor map + (set.from-list hash) + (..list-of random))) (def: (dictionary-of key-hash key-random value-random) (All [k v] (-> (Hash k) (Random k) (Random v) (Random (Dictionary k v)))) - (:: random.functor map - (dictionary.from-list key-hash) - (..list-of (random.and key-random value-random)))) + (\ random.functor map + (dictionary.from-list key-hash) + (..list-of (random.and key-random value-random)))) (def: info (Random /.Info) diff --git a/stdlib/source/test/aedifex/project.lux b/stdlib/source/test/aedifex/project.lux index ab8cc438f..ec6849e4e 100644 --- a/stdlib/source/test/aedifex/project.lux +++ b/stdlib/source/test/aedifex/project.lux @@ -59,24 +59,24 @@ (not (text\= dummy-name name)) (not (text\= sub-name name)))) (random.ascii/alpha 1)) - #let [project ($_ (:: /.monoid compose) + #let [project ($_ (\ /.monoid compose) (/.project super-name super-profile) (/.project dummy-name dummy-profile) (/.project sub-name (set@ #//.parents (list super-name) sub-profile))) - circular ($_ (:: /.monoid compose) + circular ($_ (\ /.monoid compose) (/.project super-name (set@ #//.parents (list sub-name) super-profile)) (/.project dummy-name dummy-profile) (/.project sub-name (set@ #//.parents (list super-name) sub-profile)))]] ($_ _.and (_.cover [/.profile] (and (|> (/.profile super-name project) - (try\map (:: //.equivalence = super-profile)) + (try\map (\ //.equivalence = super-profile)) (try.default false)) (|> (/.profile dummy-name project) - (try\map (:: //.equivalence = dummy-profile)) + (try\map (\ //.equivalence = dummy-profile)) (try.default false)) (|> (/.profile sub-name project) - (try\map (:: //.equivalence = (:: //.monoid compose sub-profile super-profile))) + (try\map (\ //.equivalence = (\ //.monoid compose sub-profile super-profile))) (try.default false)))) (_.cover [/.unknown-profile] (case (/.profile fake-name project) diff --git a/stdlib/source/test/aedifex/repository.lux b/stdlib/source/test/aedifex/repository.lux index 5f05d342e..55bd3af19 100644 --- a/stdlib/source/test/aedifex/repository.lux +++ b/stdlib/source/test/aedifex/repository.lux @@ -74,7 +74,7 @@ #.None (exception.throw ..not-found [artifact extension]))) (def: (on-upload requester artifact extension content state) - (if (:: identity-equivalence = identity requester) + (if (\ identity-equivalence = identity requester) (exception.return (dictionary.put [artifact extension] content state)) (exception.throw ..invalid-identity [requester])))) @@ -83,7 +83,7 @@ (<| (_.covering /._) (do {! random.monad} [valid ..identity - invalid (random.filter (|>> (:: identity-equivalence = valid) not) + invalid (random.filter (|>> (\ identity-equivalence = valid) not) ..identity)] ($_ _.and (_.with-cover [/.mock /.Simulation] diff --git a/stdlib/source/test/licentia.lux b/stdlib/source/test/licentia.lux index 506a61c61..92b43b20c 100644 --- a/stdlib/source/test/licentia.lux +++ b/stdlib/source/test/licentia.lux @@ -46,9 +46,9 @@ [start (r.filter (|>> (n.= n\top) not) r.nat) #let [wiggle-room (n.- start n\top)] - end (:: ! map - (|>> (n.% wiggle-room) (n.max 1)) - r.nat)] + end (\ ! map + (|>> (n.% wiggle-room) (n.max 1)) + r.nat)] (wrap {#time.start start #time.end end}))) @@ -105,8 +105,8 @@ (def: (variable-list max-size gen-element) (All [a] (-> Nat (Random a) (Random (List a)))) (do {! r.monad} - [amount (:: ! map (n.% (n.max 1 max-size)) - r.nat)] + [amount (\ ! map (n.% (n.max 1 max-size)) + r.nat)] (r.list amount gen-element))) (def: black-list diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index 61e4489f3..7e138d33b 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -233,7 +233,7 @@ (def: frac-rev (Random Rev) (let [bits-to-ignore 11] - (:: random.functor map (i64.left-shift bits-to-ignore) random.rev))) + (\ random.functor map (i64.left-shift bits-to-ignore) random.rev))) (def: prelude-macros Test diff --git a/stdlib/source/test/lux/abstract/apply.lux b/stdlib/source/test/lux/abstract/apply.lux index 998c0b91c..d56860291 100644 --- a/stdlib/source/test/lux/abstract/apply.lux +++ b/stdlib/source/test/lux/abstract/apply.lux @@ -23,9 +23,9 @@ ($_ _.and (_.cover [/.compose] (let [expected (n.+ left right)] - (case (:: (/.compose maybe.monad maybe.apply list.apply) apply - (#.Some (list (n.+ left))) - (#.Some (list right))) + (case (\ (/.compose maybe.monad maybe.apply list.apply) apply + (#.Some (list (n.+ left))) + (#.Some (list right))) (^ (#.Some (list actual))) (n.= expected actual) diff --git a/stdlib/source/test/lux/abstract/codec.lux b/stdlib/source/test/lux/abstract/codec.lux index ca45c3c25..da9a7b438 100644 --- a/stdlib/source/test/lux/abstract/codec.lux +++ b/stdlib/source/test/lux/abstract/codec.lux @@ -38,7 +38,7 @@ [expected random.bit] (<| (_.covering /._) (_.cover [/.compose] - (case (|> expected (:: ..codec encode) (:: ..codec decode)) + (case (|> expected (\ ..codec encode) (\ ..codec decode)) (#try.Success actual) (bit\= expected actual) diff --git a/stdlib/source/test/lux/abstract/comonad/cofree.lux b/stdlib/source/test/lux/abstract/comonad/cofree.lux index 0c75e9f74..9fc2df11b 100644 --- a/stdlib/source/test/lux/abstract/comonad/cofree.lux +++ b/stdlib/source/test/lux/abstract/comonad/cofree.lux @@ -26,16 +26,16 @@ (def: (interpret [head tail]) (All [a] (-> (/.CoFree Sequence a) (Sequence a))) (|> tail - (sequence\map (:: (/.comonad sequence.functor) unwrap)) + (sequence\map (\ (/.comonad sequence.functor) unwrap)) [head] //.pending)) (def: comparison (Comparison (/.CoFree Sequence)) (function (_ == left right) - (:: (list.equivalence ==) = - (sequence.take 100 (..interpret left)) - (sequence.take 100 (..interpret right))))) + (\ (list.equivalence ==) = + (sequence.take 100 (..interpret left)) + (sequence.take 100 (..interpret right))))) (def: #export test Test diff --git a/stdlib/source/test/lux/abstract/enum.lux b/stdlib/source/test/lux/abstract/enum.lux index c79a7e4c0..4446d958c 100644 --- a/stdlib/source/test/lux/abstract/enum.lux +++ b/stdlib/source/test/lux/abstract/enum.lux @@ -18,7 +18,7 @@ (def: #export test Test (let [limit (: (Random Nat) - (:: random.monad map (n.% 20) random.nat))] + (\ random.monad map (n.% 20) random.nat))] (do random.monad [start limit end limit @@ -32,14 +32,14 @@ (let [expected-size (|> end (n.- start) inc) expected-start? (|> range list.head (maybe\map (n.= start)) (maybe.default false)) expected-end? (|> range list.last (maybe\map (n.= end)) (maybe.default false)) - can-be-backwards? (:: (list.equivalence n.equivalence) = - (/.range n.enum start end) - (list.reverse (/.range n.enum end start))) + can-be-backwards? (\ (list.equivalence n.equivalence) = + (/.range n.enum start end) + (list.reverse (/.range n.enum end start))) every-element-is-a-successor? (case range (#.Cons head tail) (|> (list\fold (function (_ next [verdict prev]) [(and verdict - (n.= next (:: n.enum succ prev))) + (n.= next (\ n.enum succ prev))) next]) [true head] tail) diff --git a/stdlib/source/test/lux/abstract/equivalence.lux b/stdlib/source/test/lux/abstract/equivalence.lux index ae065c031..0193773eb 100644 --- a/stdlib/source/test/lux/abstract/equivalence.lux +++ b/stdlib/source/test/lux/abstract/equivalence.lux @@ -29,34 +29,34 @@ #let [equivalence (: (Equivalence (Equivalence Nat)) (structure (def: (= left right) - (and (bit\= (:: left = leftN leftN) - (:: right = leftN leftN)) - (bit\= (:: left = rightN rightN) - (:: right = rightN rightN)) - (bit\= (:: left = leftN rightN) - (:: right = leftN rightN))))))]] + (and (bit\= (\ left = leftN leftN) + (\ right = leftN leftN)) + (bit\= (\ left = rightN rightN) + (\ right = rightN rightN)) + (bit\= (\ left = leftN rightN) + (\ right = leftN rightN))))))]] (<| (_.covering /._) ($_ _.and (_.with-cover [/.functor] ($contravariant.spec equivalence n.equivalence /.functor)) (_.cover [/.sum] (let [equivalence (/.sum n.equivalence i.equivalence)] - (and (bit\= (:: n.equivalence = leftN leftN) - (:: equivalence = (#.Left leftN) (#.Left leftN))) - (bit\= (:: n.equivalence = leftN rightN) - (:: equivalence = (#.Left leftN) (#.Left rightN))) - (bit\= (:: i.equivalence = leftI leftI) - (:: equivalence = (#.Right leftI) (#.Right leftI))) - (bit\= (:: i.equivalence = leftI rightI) - (:: equivalence = (#.Right leftI) (#.Right rightI)))))) + (and (bit\= (\ n.equivalence = leftN leftN) + (\ equivalence = (#.Left leftN) (#.Left leftN))) + (bit\= (\ n.equivalence = leftN rightN) + (\ equivalence = (#.Left leftN) (#.Left rightN))) + (bit\= (\ i.equivalence = leftI leftI) + (\ equivalence = (#.Right leftI) (#.Right leftI))) + (bit\= (\ i.equivalence = leftI rightI) + (\ equivalence = (#.Right leftI) (#.Right rightI)))))) (_.cover [/.product] (let [equivalence (/.product n.equivalence i.equivalence)] - (and (bit\= (and (:: n.equivalence = leftN leftN) - (:: i.equivalence = leftI leftI)) - (:: equivalence = [leftN leftI] [leftN leftI])) - (bit\= (and (:: n.equivalence = leftN rightN) - (:: i.equivalence = leftI rightI)) - (:: equivalence = [leftN leftI] [rightN rightI]))))) + (and (bit\= (and (\ n.equivalence = leftN leftN) + (\ i.equivalence = leftI leftI)) + (\ equivalence = [leftN leftI] [leftN leftI])) + (bit\= (and (\ n.equivalence = leftN rightN) + (\ i.equivalence = leftI rightI)) + (\ equivalence = [leftN leftI] [rightN rightI]))))) (_.cover [/.rec] (let [equivalence (: (Equivalence (List Nat)) (/.rec (function (_ equivalence) @@ -68,11 +68,11 @@ [(#.Cons leftH lefT) (#.Cons rightH rightT)] (and (n.= leftH rightH) - (:: equivalence = lefT rightT)) + (\ equivalence = lefT rightT)) _ false))))))] - (and (:: equivalence = (list sample sample) (list sample sample)) - (not (:: equivalence = (list sample sample) (list sample))) - (not (:: equivalence = (list sample sample) (list different different)))))) + (and (\ equivalence = (list sample sample) (list sample sample)) + (not (\ equivalence = (list sample sample) (list sample))) + (not (\ equivalence = (list sample sample) (list different different)))))) )))) diff --git a/stdlib/source/test/lux/abstract/fold.lux b/stdlib/source/test/lux/abstract/fold.lux index b2939f8c7..66f7a6e48 100644 --- a/stdlib/source/test/lux/abstract/fold.lux +++ b/stdlib/source/test/lux/abstract/fold.lux @@ -20,6 +20,6 @@ (<| (_.covering /._) ($_ _.and (_.cover [/.with-monoid] - (n.= (:: list.fold fold (:: n.addition compose) (:: n.addition identity) samples) + (n.= (\ list.fold fold (\ n.addition compose) (\ n.addition identity) samples) (/.with-monoid n.addition list.fold samples))) )))) diff --git a/stdlib/source/test/lux/abstract/functor.lux b/stdlib/source/test/lux/abstract/functor.lux index a900f9fd9..593400eb5 100644 --- a/stdlib/source/test/lux/abstract/functor.lux +++ b/stdlib/source/test/lux/abstract/functor.lux @@ -23,26 +23,26 @@ (<| (_.covering /._) ($_ _.and (_.cover [/.Or /.sum] - (and (case (:: (/.sum maybe.functor list.functor) map - (n.+ shift) - (#.Left (#.Some left))) + (and (case (\ (/.sum maybe.functor list.functor) map + (n.+ shift) + (#.Left (#.Some left))) (#.Left (#.Some actual)) (n.= (n.+ shift left) actual) _ false) - (case (:: (/.sum maybe.functor list.functor) map - (n.+ shift) - (#.Right (list right))) + (case (\ (/.sum maybe.functor list.functor) map + (n.+ shift) + (#.Right (list right))) (^ (#.Right (list actual))) (n.= (n.+ shift right) actual) _ false))) (_.cover [/.And /.product] - (case (:: (/.product maybe.functor list.functor) map - (n.+ shift) - [(#.Some left) (list right)]) + (case (\ (/.product maybe.functor list.functor) map + (n.+ shift) + [(#.Some left) (list right)]) (^ [(#.Some actualL) (list actualR)]) (and (n.= (n.+ shift left) actualL) (n.= (n.+ shift right) actualR)) @@ -50,9 +50,9 @@ _ false)) (_.cover [/.Then /.compose] - (case (:: (/.compose maybe.functor list.functor) map - (n.+ shift) - (#.Some (list left))) + (case (\ (/.compose maybe.functor list.functor) map + (n.+ shift) + (#.Some (list left))) (^ (#.Some (list actual))) (n.= (n.+ shift left) actual) diff --git a/stdlib/source/test/lux/abstract/interval.lux b/stdlib/source/test/lux/abstract/interval.lux index 0c8355a49..55ad4111d 100644 --- a/stdlib/source/test/lux/abstract/interval.lux +++ b/stdlib/source/test/lux/abstract/interval.lux @@ -139,13 +139,13 @@ Test (do {! random.monad} [[l m r] (|> (random.set n.hash 3 random.nat) - (:: ! map (|>> set.to-list - (list.sort n.<) - (case> (^ (list b t1 t2)) - [b t1 t2] + (\ ! map (|>> set.to-list + (list.sort n.<) + (case> (^ (list b t1 t2)) + [b t1 t2] - _ - (undefined))))) + _ + (undefined))))) #let [left (/.singleton n.enum l) right (/.singleton n.enum r)]] ($_ _.and @@ -161,13 +161,13 @@ Test (do {! random.monad} [[b t1 t2] (|> (random.set n.hash 3 random.nat) - (:: ! map (|>> set.to-list - (list.sort n.<) - (case> (^ (list b t1 t2)) - [b t1 t2] + (\ ! map (|>> set.to-list + (list.sort n.<) + (case> (^ (list b t1 t2)) + [b t1 t2] - _ - (undefined))))) + _ + (undefined))))) #let [int-left (/.between n.enum t1 t2) int-right (/.between n.enum b t1)]] ($_ _.and @@ -188,13 +188,13 @@ (do {! random.monad} [some-interval ..interval [x0 x1 x2 x3] (|> (random.set n.hash 4 random.nat) - (:: ! map (|>> set.to-list - (list.sort n.<) - (case> (^ (list x0 x1 x2 x3)) - [x0 x1 x2 x3] + (\ ! map (|>> set.to-list + (list.sort n.<) + (case> (^ (list x0 x1 x2 x3)) + [x0 x1 x2 x3] - _ - (undefined)))))] + _ + (undefined)))))] ($_ _.and (_.test "Every interval is nested into itself." (/.nested? some-interval some-interval)) @@ -221,13 +221,13 @@ (do {! random.monad} [some-interval ..interval [x0 x1 x2 x3] (|> (random.set n.hash 4 random.nat) - (:: ! map (|>> set.to-list - (list.sort n.<) - (case> (^ (list x0 x1 x2 x3)) - [x0 x1 x2 x3] + (\ ! map (|>> set.to-list + (list.sort n.<) + (case> (^ (list x0 x1 x2 x3)) + [x0 x1 x2 x3] - _ - (undefined)))))] + _ + (undefined)))))] ($_ _.and (_.test "No interval overlaps with itself." (not (/.overlaps? some-interval some-interval))) diff --git a/stdlib/source/test/lux/abstract/monad.lux b/stdlib/source/test/lux/abstract/monad.lux index 14529fdc5..19e5bb342 100644 --- a/stdlib/source/test/lux/abstract/monad.lux +++ b/stdlib/source/test/lux/abstract/monad.lux @@ -29,35 +29,35 @@ (n.= (inc mono) (: (Identity Nat) (/.bind identity.monad - (|>> inc (:: identity.monad wrap)) - (:: identity.monad wrap mono))))) + (|>> inc (\ identity.monad wrap)) + (\ identity.monad wrap mono))))) (_.cover [/.seq] - (:: (list.equivalence n.equivalence) = - (list\map inc poly) - (|> poly - (list\map (|>> inc (:: identity.monad wrap))) - (: (List (Identity Nat))) - (/.seq identity.monad) - (: (Identity (List Nat)))))) + (\ (list.equivalence n.equivalence) = + (list\map inc poly) + (|> poly + (list\map (|>> inc (\ identity.monad wrap))) + (: (List (Identity Nat))) + (/.seq identity.monad) + (: (Identity (List Nat)))))) (_.cover [/.map] - (:: (list.equivalence n.equivalence) = - (list\map inc poly) - (|> poly - (/.map identity.monad (|>> inc (:: identity.monad wrap))) - (: (Identity (List Nat)))))) + (\ (list.equivalence n.equivalence) = + (list\map inc poly) + (|> poly + (/.map identity.monad (|>> inc (\ identity.monad wrap))) + (: (Identity (List Nat)))))) (_.cover [/.filter] - (:: (list.equivalence n.equivalence) = - (list.filter n.even? poly) - (|> poly - (/.filter identity.monad (|>> n.even? (:: identity.monad wrap))) - (: (Identity (List Nat)))))) + (\ (list.equivalence n.equivalence) = + (list.filter n.even? poly) + (|> poly + (/.filter identity.monad (|>> n.even? (\ identity.monad wrap))) + (: (Identity (List Nat)))))) (_.cover [/.fold] (n.= (list\fold n.+ 0 poly) (|> poly (/.fold identity.monad (function (_ part whole) - (:: identity.monad wrap - (n.+ part whole))) + (\ identity.monad wrap + (n.+ part whole))) 0) (: (Identity Nat))))) )))) diff --git a/stdlib/source/test/lux/abstract/monad/free.lux b/stdlib/source/test/lux/abstract/monad/free.lux index 48c960d19..5cae8ef16 100644 --- a/stdlib/source/test/lux/abstract/monad/free.lux +++ b/stdlib/source/test/lux/abstract/monad/free.lux @@ -36,9 +36,9 @@ (def: comparison (Comparison (/.Free List)) (function (_ == left right) - (:: (list.equivalence ==) = - (..interpret left) - (..interpret right)))) + (\ (list.equivalence ==) = + (..interpret left) + (..interpret right)))) (def: #export test Test diff --git a/stdlib/source/test/lux/abstract/monoid.lux b/stdlib/source/test/lux/abstract/monoid.lux index e987e8fb3..2037adeea 100644 --- a/stdlib/source/test/lux/abstract/monoid.lux +++ b/stdlib/source/test/lux/abstract/monoid.lux @@ -24,10 +24,10 @@ (<| (_.covering /._) ($_ _.and (_.cover [/.compose] - (let [[natLR intLR] (:: (/.compose nat.addition int.multiplication) compose - [natL intL] [natR intR])] - (and (nat.= (:: nat.addition compose natL natR) + (let [[natLR intLR] (\ (/.compose nat.addition int.multiplication) compose + [natL intL] [natR intR])] + (and (nat.= (\ nat.addition compose natL natR) natLR) - (int.= (:: int.multiplication compose intL intR) + (int.= (\ int.multiplication compose intL intR) intLR)))) )))) diff --git a/stdlib/source/test/lux/abstract/order.lux b/stdlib/source/test/lux/abstract/order.lux index f330d88ae..38479a79f 100644 --- a/stdlib/source/test/lux/abstract/order.lux +++ b/stdlib/source/test/lux/abstract/order.lux @@ -27,12 +27,12 @@ #let [equivalence (: (Equivalence (/.Order Nat)) (structure (def: (= leftO rightO) - (and (bit\= (:: leftO < left left) - (:: rightO < left left)) - (bit\= (:: leftO < right right) - (:: rightO < right right)) - (bit\= (:: leftO < left right) - (:: rightO < left right))))))]]) + (and (bit\= (\ leftO < left left) + (\ rightO < left left)) + (bit\= (\ leftO < right right) + (\ rightO < right right)) + (bit\= (\ leftO < left right) + (\ rightO < left right))))))]]) ($_ _.and (_.with-cover [/.functor] ($contravariant.spec equivalence n.order /.functor)) @@ -45,7 +45,7 @@ (_.cover [/.<=] (and (/.<= n.order left left) (/.<= n.order right right) - (bit\= (:: n.order < left right) + (bit\= (\ n.order < left right) (/.<= n.order left right)))) (_.cover [/.>=] (and (/.>= n.order left left) diff --git a/stdlib/source/test/lux/abstract/predicate.lux b/stdlib/source/test/lux/abstract/predicate.lux index 8bf5c05f0..502e1c845 100644 --- a/stdlib/source/test/lux/abstract/predicate.lux +++ b/stdlib/source/test/lux/abstract/predicate.lux @@ -46,7 +46,7 @@ (let [generator (: (Random (/.Predicate Nat)) (|> random.nat (random.filter (|>> (n.= 0) not)) - (:: ! map multiple?)))] + (\ ! map multiple?)))] ($_ _.and (_.with-cover [/.union] ($monoid.spec equivalence /.union generator)) diff --git a/stdlib/source/test/lux/control/concurrency/actor.lux b/stdlib/source/test/lux/control/concurrency/actor.lux index 0932fba3d..0f98a0b77 100644 --- a/stdlib/source/test/lux/control/concurrency/actor.lux +++ b/stdlib/source/test/lux/control/concurrency/actor.lux @@ -195,9 +195,9 @@ (_.cover' [/.actor] verdict))) (do ! - [num-events (:: ! map (|>> (n.% 10) inc) random.nat) + [num-events (\ ! map (|>> (n.% 10) inc) random.nat) events (random.list num-events random.nat) - num-observations (:: ! map (n.% num-events) random.nat) + num-observations (\ ! map (n.% num-events) random.nat) #let [expected (list.take num-observations events) sink (: (Atom (Row Nat)) (atom.atom row.empty)) @@ -235,6 +235,6 @@ #.None false)]] (_.cover' [/.observe] - (and (:: (list.equivalence n.equivalence) = expected (row.to-list actual)) + (and (\ (list.equivalence n.equivalence) = expected (row.to-list actual)) (not died?)))))) )))) diff --git a/stdlib/source/test/lux/control/concurrency/frp.lux b/stdlib/source/test/lux/control/concurrency/frp.lux index fd5e7be02..6b10df1d8 100644 --- a/stdlib/source/test/lux/control/concurrency/frp.lux +++ b/stdlib/source/test/lux/control/concurrency/frp.lux @@ -71,8 +71,8 @@ (case (io.run (do (try.with io.monad) [#let [[channel sink] (/.channel [])] - _ (:: sink feed sample) - _ (:: sink close)] + _ (\ sink feed sample) + _ (\ sink close)] (wrap channel))) (#try.Success channel) (io.run @@ -91,8 +91,8 @@ (case (io.run (do (try.with io.monad) [#let [[channel sink] (/.channel [])] - _ (:: sink close)] - (:: sink feed sample))) + _ (\ sink close)] + (\ sink feed sample))) (#try.Success _) false @@ -139,7 +139,7 @@ listened (|> sink atom.read promise.future - (:: ! map row.to-list))] + (\ ! map row.to-list))] (_.cover' [/.Subscriber /.subscribe] (and (list\= inputs output) @@ -183,7 +183,7 @@ (wrap (do promise.monad [#let [[channel sink] (/.poll polling-delay (: (IO Nat) (io.io sample)))] _ (promise.schedule total-delay (io.io [])) - _ (promise.future (:: sink close)) + _ (promise.future (\ sink close)) actual (/.consume channel)] (_.cover' [/.poll] (and (list.every? (n.= sample) actual) @@ -191,7 +191,7 @@ (wrap (do promise.monad [#let [[channel sink] (/.periodic polling-delay)] _ (promise.schedule total-delay (io.io [])) - _ (promise.future (:: sink close)) + _ (promise.future (\ sink close)) actual (/.consume channel)] (_.cover' [/.periodic] (n.>= amount-of-polls (list.size actual))))))) diff --git a/stdlib/source/test/lux/control/concurrency/promise.lux b/stdlib/source/test/lux/control/concurrency/promise.lux index 852dca607..bd980cd55 100644 --- a/stdlib/source/test/lux/control/concurrency/promise.lux +++ b/stdlib/source/test/lux/control/concurrency/promise.lux @@ -48,7 +48,7 @@ Test (<| (_.covering /._) (do {! random.monad} - [to-wait (|> random.nat (:: ! map (|>> (n.% 100) (n.max 10)))) + [to-wait (|> random.nat (\ ! map (|>> (n.% 100) (n.max 10)))) #let [extra-time (n.* 2 to-wait)] expected random.nat dummy random.nat diff --git a/stdlib/source/test/lux/control/concurrency/semaphore.lux b/stdlib/source/test/lux/control/concurrency/semaphore.lux index d1c6ac1e4..8c31b9796 100644 --- a/stdlib/source/test/lux/control/concurrency/semaphore.lux +++ b/stdlib/source/test/lux/control/concurrency/semaphore.lux @@ -31,7 +31,7 @@ (_.with-cover [/.Semaphore] ($_ _.and (do {! random.monad} - [initial-open-positions (|> random.nat (:: ! map (|>> (n.% 10) (n.max 1)))) + [initial-open-positions (|> random.nat (\ ! map (|>> (n.% 10) (n.max 1)))) #let [semaphore (/.semaphore initial-open-positions)]] (wrap (do promise.monad [result (promise.time-out 10 (/.wait semaphore))] @@ -43,7 +43,7 @@ #.None false))))) (do {! random.monad} - [initial-open-positions (|> random.nat (:: ! map (|>> (n.% 10) (n.max 1)))) + [initial-open-positions (|> random.nat (\ ! map (|>> (n.% 10) (n.max 1)))) #let [semaphore (/.semaphore initial-open-positions)]] (wrap (do {! promise.monad} [_ (monad.map ! /.wait (list.repeat initial-open-positions semaphore)) @@ -56,7 +56,7 @@ #.None true))))) (do {! random.monad} - [initial-open-positions (|> random.nat (:: ! map (|>> (n.% 10) (n.max 1)))) + [initial-open-positions (|> random.nat (\ ! map (|>> (n.% 10) (n.max 1)))) #let [semaphore (/.semaphore initial-open-positions)]] (wrap (do {! promise.monad} [_ (monad.map ! /.wait (list.repeat initial-open-positions semaphore)) @@ -72,7 +72,7 @@ _ false))))) (do {! random.monad} - [initial-open-positions (|> random.nat (:: ! map (|>> (n.% 10) (n.max 1)))) + [initial-open-positions (|> random.nat (\ ! map (|>> (n.% 10) (n.max 1)))) #let [semaphore (/.semaphore initial-open-positions)]] (wrap (do promise.monad [outcome (/.signal semaphore)] @@ -90,7 +90,7 @@ (_.with-cover [/.Mutex] ($_ _.and (do {! random.monad} - [repetitions (|> random.nat (:: ! map (|>> (n.% 100) (n.max 10)))) + [repetitions (|> random.nat (\ ! map (|>> (n.% 100) (n.max 10)))) #let [resource (atom.atom "") expected-As (text.join-with "" (list.repeat repetitions "A")) expected-Bs (text.join-with "" (list.repeat repetitions "B")) @@ -147,7 +147,7 @@ _ false))) (do {! random.monad} - [limit (|> random.nat (:: ! map (|>> (n.% 10) (n.max 1)))) + [limit (|> random.nat (\ ! map (|>> (n.% 10) (n.max 1)))) #let [barrier (/.barrier (maybe.assume (/.limit limit))) resource (atom.atom "")]] (wrap (do {! promise.monad} diff --git a/stdlib/source/test/lux/control/concurrency/stm.lux b/stdlib/source/test/lux/control/concurrency/stm.lux index 234c9a64e..1e7dee4e4 100644 --- a/stdlib/source/test/lux/control/concurrency/stm.lux +++ b/stdlib/source/test/lux/control/concurrency/stm.lux @@ -27,7 +27,7 @@ (def: injection (Injection /.STM) - (:: /.monad wrap)) + (\ /.monad wrap)) (def: comparison (Comparison /.STM) @@ -41,7 +41,7 @@ (do {! random.monad} [dummy random.nat expected random.nat - iterations-per-process (|> random.nat (:: ! map (n.% 100)))] + iterations-per-process (|> random.nat (\ ! map (n.% 100)))] ($_ _.and (_.with-cover [/.functor] ($functor.spec ..injection ..comparison /.functor)) @@ -51,7 +51,7 @@ ($monad.spec ..injection ..comparison /.monad)) (wrap (do promise.monad - [actual (/.commit (:: /.monad wrap expected))] + [actual (/.commit (\ /.monad wrap expected))] (_.cover' [/.commit] (n.= expected actual)))) (wrap (do promise.monad @@ -84,13 +84,13 @@ [follower sink] (io.run (/.follow box))] _ (/.commit (/.write expected box)) _ (/.commit (/.update (n.* 2) box)) - _ (promise.future (:: sink close)) + _ (promise.future (\ sink close)) _ (/.commit (/.update (n.* 3) box)) changes (frp.consume follower)] (_.cover' [/.follow] - (:: (list.equivalence n.equivalence) = - (list expected (n.* 2 expected)) - changes)))) + (\ (list.equivalence n.equivalence) = + (list expected (n.* 2 expected)) + changes)))) (wrap (let [var (/.var 0)] (do {! promise.monad} [_ (|> (list.repeat iterations-per-process []) diff --git a/stdlib/source/test/lux/control/concurrency/thread.lux b/stdlib/source/test/lux/control/concurrency/thread.lux index 7794be1b9..210ff4b1d 100644 --- a/stdlib/source/test/lux/control/concurrency/thread.lux +++ b/stdlib/source/test/lux/control/concurrency/thread.lux @@ -26,7 +26,7 @@ (do {! random.monad} [dummy random.nat expected random.nat - delay (|> random.nat (:: ! map (n.% 100)))] + delay (|> random.nat (\ ! map (n.% 100)))] ($_ _.and (_.cover [/.parallelism] (n.> 0 /.parallelism)) diff --git a/stdlib/source/test/lux/control/exception.lux b/stdlib/source/test/lux/control/exception.lux index 2075913a5..7f0578c5d 100644 --- a/stdlib/source/test/lux/control/exception.lux +++ b/stdlib/source/test/lux/control/exception.lux @@ -28,7 +28,7 @@ [expected random.nat wrong (|> random.nat (random.filter (|>> (n.= expected) not))) assertion-succeeded? random.bit - #let [report-element (:: ! map %.nat random.nat)] + #let [report-element (\ ! map %.nat random.nat)] field0 report-element value0 report-element field1 report-element diff --git a/stdlib/source/test/lux/control/function.lux b/stdlib/source/test/lux/control/function.lux index 6e9fc74ac..5775b9085 100644 --- a/stdlib/source/test/lux/control/function.lux +++ b/stdlib/source/test/lux/control/function.lux @@ -20,8 +20,8 @@ Test (do {! random.monad} [expected random.nat - f0 (:: ! map n.+ random.nat) - f1 (:: ! map n.* random.nat) + f0 (\ ! map n.+ random.nat) + f1 (\ ! map n.* random.nat) dummy random.nat extra (|> random.nat (random.filter (|>> (n.= expected) not)))] (<| (_.covering /._) @@ -32,7 +32,7 @@ (n.= (left extra) (right extra))))) generator (: (Random (-> Nat Nat)) - (:: ! map n.- random.nat))] + (\ ! map n.- random.nat))] (_.with-cover [/.monoid] ($monoid.spec equivalence /.monoid generator))) diff --git a/stdlib/source/test/lux/control/function/memo.lux b/stdlib/source/test/lux/control/function/memo.lux index a19b9e6f9..6350320b5 100644 --- a/stdlib/source/test/lux/control/function/memo.lux +++ b/stdlib/source/test/lux/control/function/memo.lux @@ -50,7 +50,7 @@ Test (<| (_.covering /._) (do {! random.monad} - [input (|> random.nat (:: ! map (|>> (n.% 5) (n.+ 23))))]) + [input (|> random.nat (\ ! map (|>> (n.% 5) (n.+ 23))))]) (_.with-cover [/.Memo]) ($_ _.and (_.cover [/.closed /.none] @@ -85,7 +85,7 @@ (: (//.Mixin Nat (State (Dictionary Nat Nat) Nat)) (function (factorial delegate recur input) (case input - (^or 0 1) (:: state.monad wrap 1) + (^or 0 1) (\ state.monad wrap 1) _ (do state.monad [output' (recur (dec input))] (wrap (n.* input output'))))))) diff --git a/stdlib/source/test/lux/control/function/mixin.lux b/stdlib/source/test/lux/control/function/mixin.lux index c4d6040cd..e9308e5bb 100644 --- a/stdlib/source/test/lux/control/function/mixin.lux +++ b/stdlib/source/test/lux/control/function/mixin.lux @@ -25,7 +25,7 @@ Test (<| (_.covering /._) (do {! random.monad} - [input (|> random.nat (:: ! map (|>> (n.% 6) (n.+ 20)))) + [input (|> random.nat (\ ! map (|>> (n.% 6) (n.+ 20)))) dummy random.nat shift (|> random.nat (random.filter (|>> (n.= dummy) not))) #let [equivalence (: (Equivalence (/.Mixin Nat Nat)) diff --git a/stdlib/source/test/lux/control/parser.lux b/stdlib/source/test/lux/control/parser.lux index 569e32621..6710faaab 100644 --- a/stdlib/source/test/lux/control/parser.lux +++ b/stdlib/source/test/lux/control/parser.lux @@ -88,7 +88,7 @@ Test (do {! random.monad} [expected0 random.nat - variadic (:: ! map (|>> (n.max 1) (n.min 20)) random.nat) + variadic (\ ! map (|>> (n.max 1) (n.min 20)) random.nat) expected+ (random.list variadic random.nat) even0 (random.filter n.even? random.nat) odd0 (random.filter n.odd? random.nat) @@ -107,7 +107,7 @@ (and (|> (list\map code.nat expected+) (/.run (/.some s.nat)) (match actual - (:: (list.equivalence n.equivalence) = expected+ actual))) + (\ (list.equivalence n.equivalence) = expected+ actual))) (|> (list\map (|>> .int code.int) expected+) (/.run (/.some s.nat)) (match #.Nil @@ -116,7 +116,7 @@ (and (|> (list\map code.nat expected+) (/.run (/.many s.nat)) (match actual - (:: (list.equivalence n.equivalence) = expected+ actual))) + (\ (list.equivalence n.equivalence) = expected+ actual))) (|> (list (code.nat expected0)) (/.run (/.many s.nat)) (match (list actual) @@ -178,8 +178,8 @@ (def: combinators-1 Test (do {! random.monad} - [variadic (:: ! map (|>> (n.max 1) (n.min 20)) random.nat) - times (:: ! map (n.% variadic) random.nat) + [variadic (\ ! map (|>> (n.max 1) (n.min 20)) random.nat) + times (\ ! map (n.% variadic) random.nat) expected random.nat wrong (|> random.nat (random.filter (|>> (n.= expected) not))) expected+ (random.list variadic random.nat) @@ -189,9 +189,9 @@ (and (|> (list\map code.nat expected+) (/.run (/.exactly times s.nat)) (match actual - (:: (list.equivalence n.equivalence) = - (list.take times expected+) - actual))) + (\ (list.equivalence n.equivalence) = + (list.take times expected+) + actual))) (|> (list\map code.nat expected+) (/.run (/.exactly (inc variadic) s.nat)) fails?))) @@ -199,9 +199,9 @@ (and (|> (list\map code.nat expected+) (/.run (/.at-least times s.nat)) (match actual - (:: (list.equivalence n.equivalence) = - expected+ - actual))) + (\ (list.equivalence n.equivalence) = + expected+ + actual))) (|> (list\map code.nat expected+) (/.run (/.at-least (inc variadic) s.nat)) fails?))) @@ -209,44 +209,44 @@ (and (|> (list\map code.nat expected+) (/.run (/.at-most times s.nat)) (match actual - (:: (list.equivalence n.equivalence) = - (list.take times expected+) - actual))) + (\ (list.equivalence n.equivalence) = + (list.take times expected+) + actual))) (|> (list\map code.nat expected+) (/.run (/.at-most (inc variadic) s.nat)) (match actual - (:: (list.equivalence n.equivalence) = - expected+ - actual))))) + (\ (list.equivalence n.equivalence) = + expected+ + actual))))) (_.cover [/.between] (and (|> (list\map code.nat expected+) (/.run (/.between times variadic s.nat)) (match actual - (:: (list.equivalence n.equivalence) = - expected+ - actual))) + (\ (list.equivalence n.equivalence) = + expected+ + actual))) (|> (list\map code.nat (list.take times expected+)) (/.run (/.between times variadic s.nat)) (match actual - (:: (list.equivalence n.equivalence) = - (list.take times expected+) - actual))))) + (\ (list.equivalence n.equivalence) = + (list.take times expected+) + actual))))) (_.cover [/.sep-by] (|> (list.interpose (code.text separator) (list\map code.nat expected+)) (/.run (/.sep-by (s.this! (code.text separator)) s.nat)) (match actual - (:: (list.equivalence n.equivalence) = - expected+ - actual)))) + (\ (list.equivalence n.equivalence) = + expected+ + actual)))) (_.cover [/.remaining] (|> (list\map code.nat expected+) (/.run /.remaining) (match actual - (:: (list.equivalence code.equivalence) = - (list\map code.nat expected+) - actual)))) + (\ (list.equivalence code.equivalence) = + (list\map code.nat expected+) + actual)))) (_.cover [/.default] - (and (|> (/.run (/.default wrong (:: /.monad wrap expected)) (list)) + (and (|> (/.run (/.default wrong (\ /.monad wrap expected)) (list)) (match actual (n.= expected actual))) (|> (/.run (/.default expected (: (Parser (List Code) Nat) (/.fail "yolo"))) @@ -331,7 +331,7 @@ (def: injection (Injection (All [a i] (Parser i a))) - (:: /.monad wrap)) + (\ /.monad wrap)) (def: comparison (Comparison (All [a i] (Parser i a))) @@ -360,7 +360,7 @@ ($monad.spec ..injection ..comparison /.monad)) (_.cover [/.run] - (|> (/.run (:: /.monad wrap expected) (list)) + (|> (/.run (\ /.monad wrap expected) (list)) (match actual (n.= expected actual)))) (_.cover [/.fail] (|> (list) diff --git a/stdlib/source/test/lux/control/parser/analysis.lux b/stdlib/source/test/lux/control/parser/analysis.lux index f09967760..d4b4e533f 100644 --- a/stdlib/source/test/lux/control/parser/analysis.lux +++ b/stdlib/source/test/lux/control/parser/analysis.lux @@ -52,12 +52,12 @@ [] (`` ($_ _.and (do {! random.monad} - [expected (:: ! map (|>> analysis.bit) random.bit)] + [expected (\ ! map (|>> analysis.bit) random.bit)] (_.cover [/.run /.any] (|> (list expected) (/.run /.any) (case> (#try.Success actual) - (:: analysis.equivalence = expected actual) + (\ analysis.equivalence = expected actual) (#try.Failure _) false)))) diff --git a/stdlib/source/test/lux/control/parser/binary.lux b/stdlib/source/test/lux/control/parser/binary.lux index 9e4c06f18..94225be79 100644 --- a/stdlib/source/test/lux/control/parser/binary.lux +++ b/stdlib/source/test/lux/control/parser/binary.lux @@ -90,7 +90,7 @@ (random.rec (function (_ recur) (let [random-sequence (do {! random.monad} - [size (:: ! map (n.% 2) random.nat)] + [size (\ ! map (n.% 2) random.nat)] (random.list size recur))] ($_ random.and ..random-location @@ -107,7 +107,7 @@ random-sequence random-sequence (do {! random.monad} - [size (:: ! map (n.% 2) random.nat)] + [size (\ ! map (n.% 2) random.nat)] (random.list size (random.and recur recur))) ))))))) @@ -126,8 +126,8 @@ (`` ($_ _.and (~~ (template [<size> <parser> <format>] [(do {! random.monad} - [expected (:: ! map (i64.and (i64.mask <size>)) - random.nat)] + [expected (\ ! map (i64.and (i64.mask <size>)) + random.nat)] (_.cover [<size> <parser> <format>] (|> (format.run <format> expected) (/.run <parser>) @@ -146,12 +146,12 @@ (`` ($_ _.and (~~ (template [<parser> <format>] [(do {! random.monad} - [expected (:: ! map encoding.to-utf8 (random.ascii ..segment-size))] + [expected (\ ! map encoding.to-utf8 (random.ascii ..segment-size))] (_.cover [<parser> <format>] (|> (format.run <format> expected) (/.run <parser>) (!expect (^multi (#try.Success actual) - (:: binary.equivalence = expected actual))))))] + (\ binary.equivalence = expected actual))))))] [/.binary/8 format.binary/8] [/.binary/16 format.binary/16] @@ -169,7 +169,7 @@ (|> (format.run <format> expected) (/.run <parser>) (!expect (^multi (#try.Success actual) - (:: text.equivalence = expected actual))))))] + (\ text.equivalence = expected actual))))))] [/.utf8/8 format.utf8/8] [/.utf8/16 format.utf8/16] @@ -189,7 +189,7 @@ (format.run (<format> format.nat)) (/.run (<parser> /.nat)) (!expect (^multi (#try.Success actual) - (:: (row.equivalence n.equivalence) = expected actual))))))] + (\ (row.equivalence n.equivalence) = expected actual))))))] [/.row/8 format.row/8] [/.row/16 format.row/16] @@ -208,7 +208,7 @@ (format.run <format>) (/.run <parser>) (!expect (^multi (#try.Success actual) - (:: <equivalence> = expected actual))))))] + (\ <equivalence> = expected actual))))))] [/.bit format.bit random.bit bit.equivalence] [/.nat format.nat random.nat n.equivalence] @@ -221,13 +221,13 @@ (format.run format.frac) (/.run /.frac) (!expect (^multi (#try.Success actual) - (or (:: frac.equivalence = expected actual) + (or (\ frac.equivalence = expected actual) (and (frac.not-a-number? expected) (frac.not-a-number? actual)))))))) (do {! random.monad} - [expected (:: ! map (|>> (i64.and (i64.mask /.size/8)) - (n.max 2)) - random.nat)] + [expected (\ ! map (|>> (i64.and (i64.mask /.size/8)) + (n.max 2)) + random.nat)] (_.cover [/.not-a-bit] (|> expected (format.run format.bits/8) @@ -247,7 +247,7 @@ (format.run <format>) (/.run <parser>) (!expect (^multi (#try.Success actual) - (:: <equivalence> = expected actual))))))] + (\ <equivalence> = expected actual))))))] [/.location format.location random-location location-equivalence] [/.code format.code random-code code.equivalence] @@ -261,14 +261,14 @@ (format.run <format>) (/.run <parser>) (!expect (^multi (#try.Success actual) - (:: <equivalence> = expected actual))))))] + (\ <equivalence> = expected actual))))))] [/.maybe (/.maybe /.nat) format.maybe (format.maybe format.nat) (random.maybe random.nat) (maybe.equivalence n.equivalence)] [/.list (/.list /.nat) format.list (format.list format.nat) (random.list ..segment-size random.nat) (list.equivalence n.equivalence)] [/.set (/.set n.hash /.nat) format.set (format.set format.nat) (random.set n.hash ..segment-size random.nat) set.equivalence] [/.name /.name format.name format.name ..random-name name.equivalence])) (do {! random.monad} - [expected (:: ! map (list.repeat ..segment-size) random.nat)] + [expected (\ ! map (list.repeat ..segment-size) random.nat)] (_.cover [/.set-elements-are-not-unique] (|> expected (format.run (format.list format.nat)) @@ -283,13 +283,13 @@ (/.run (: (/.Parser (Either Bit Nat)) (/.or /.bit /.nat))) (!expect (^multi (#try.Success actual) - (:: (sum.equivalence bit.equivalence n.equivalence) = - expected - actual)))))) + (\ (sum.equivalence bit.equivalence n.equivalence) = + expected + actual)))))) (do {! random.monad} - [tag (:: ! map (|>> (i64.and (i64.mask /.size/8)) - (n.max 2)) - random.nat) + [tag (\ ! map (|>> (i64.and (i64.mask /.size/8)) + (n.max 2)) + random.nat) value random.bit] (_.cover [/.invalid-tag] (|> [tag value] @@ -311,9 +311,9 @@ (<>.and /.nat recur)))))) (!expect (^multi (#try.Success actual) - (:: (list.equivalence n.equivalence) = - expected - actual)))))) + (\ (list.equivalence n.equivalence) = + expected + actual)))))) ))) (def: #export test @@ -327,22 +327,22 @@ (/.run /.any) (!expect (#try.Success _)))) (do {! random.monad} - [data (:: ! map encoding.to-utf8 (random.ascii ..segment-size))] + [data (\ ! map encoding.to-utf8 (random.ascii ..segment-size))] (_.cover [/.binary-was-not-fully-read] (|> data (/.run /.any) (!expect (^multi (#try.Failure error) (exception.match? /.binary-was-not-fully-read error)))))) (do {! random.monad} - [expected (:: ! map encoding.to-utf8 (random.ascii ..segment-size))] + [expected (\ ! map encoding.to-utf8 (random.ascii ..segment-size))] (_.cover [/.segment format.segment format.run] (|> expected (format.run (format.segment ..segment-size)) (/.run (/.segment ..segment-size)) (!expect (^multi (#try.Success actual) - (:: binary.equivalence = expected actual)))))) + (\ binary.equivalence = expected actual)))))) (do {! random.monad} - [data (:: ! map encoding.to-utf8 (random.ascii ..segment-size))] + [data (\ ! map encoding.to-utf8 (random.ascii ..segment-size))] (_.cover [/.end?] (|> data (/.run (do <>.monad @@ -353,8 +353,8 @@ post)))) (!expect (#try.Success #1))))) (do {! random.monad} - [to-read (:: ! map (n.% (inc ..segment-size)) random.nat) - data (:: ! map encoding.to-utf8 (random.ascii ..segment-size))] + [to-read (\ ! map (n.% (inc ..segment-size)) random.nat) + data (\ ! map encoding.to-utf8 (random.ascii ..segment-size))] (_.cover [/.Offset /.offset] (|> data (/.run (do <>.monad @@ -368,8 +368,8 @@ (n.= ..segment-size nothing-left))))) (!expect (#try.Success #1))))) (do {! random.monad} - [to-read (:: ! map (n.% (inc ..segment-size)) random.nat) - data (:: ! map encoding.to-utf8 (random.ascii ..segment-size))] + [to-read (\ ! map (n.% (inc ..segment-size)) random.nat) + data (\ ! map encoding.to-utf8 (random.ascii ..segment-size))] (_.cover [/.remaining] (|> data (/.run (do <>.monad diff --git a/stdlib/source/test/lux/control/parser/cli.lux b/stdlib/source/test/lux/control/parser/cli.lux index 1222b9de1..6be78b640 100644 --- a/stdlib/source/test/lux/control/parser/cli.lux +++ b/stdlib/source/test/lux/control/parser/cli.lux @@ -30,7 +30,7 @@ (<| (_.covering /._) (_.with-cover [/.Parser]) (do {! random.monad} - [expected (:: ! map n\encode random.nat) + [expected (\ ! map n\encode random.nat) #let [random-dummy (random.filter (|>> (text\= expected) not) (random.unicode 5))] dummy random-dummy diff --git a/stdlib/source/test/lux/control/parser/code.lux b/stdlib/source/test/lux/control/parser/code.lux index 521704dec..3955d760f 100644 --- a/stdlib/source/test/lux/control/parser/code.lux +++ b/stdlib/source/test/lux/control/parser/code.lux @@ -44,7 +44,7 @@ (_.with-cover [/.Parser]) (`` ($_ _.and (do {! random.monad} - [expected (:: ! map code.bit random.bit)] + [expected (\ ! map code.bit random.bit)] (_.cover [/.run] (and (|> (/.run /.any (list expected)) (!expect (#try.Success _))) @@ -53,12 +53,12 @@ (~~ (template [<query> <check> <random> <code> <equivalence>] [(do {! random.monad} [expected <random> - dummy (|> <random> (random.filter (|>> (:: <equivalence> = expected) not)))] + dummy (|> <random> (random.filter (|>> (\ <equivalence> = expected) not)))] ($_ _.and (_.cover [<query>] (|> (/.run <query> (list (<code> expected))) (!expect (^multi (#try.Success actual) - (:: <equivalence> = expected actual))))) + (\ <equivalence> = expected actual))))) (_.cover [<check>] (and (|> (/.run (<check> expected) (list (<code> expected))) (!expect (#try.Success []))) @@ -66,7 +66,7 @@ (!expect (#try.Failure _))))) ))] - [/.any /.this! (:: ! map code.bit random.bit) function.identity code.equivalence] + [/.any /.this! (\ ! map code.bit random.bit) function.identity code.equivalence] [/.bit /.bit! random.bit code.bit bit.equivalence] [/.nat /.nat! random.nat code.nat nat.equivalence] [/.int /.int! random.int code.int int.equivalence] @@ -87,8 +87,8 @@ (list (<code> (list (code.nat expected-left) (code.int expected-right))))) (!expect (^multi (#try.Success [actual-left actual-right]) - (and (:: nat.equivalence = expected-left actual-left) - (:: int.equivalence = expected-right actual-right)))))))] + (and (\ nat.equivalence = expected-left actual-left) + (\ int.equivalence = expected-right actual-right)))))))] [/.form code.form] [/.tuple code.tuple] @@ -101,8 +101,8 @@ (list (code.record (list [(code.nat expected-left) (code.int expected-right)])))) (!expect (^multi (#try.Success [actual-left actual-right]) - (and (:: nat.equivalence = expected-left actual-left) - (:: int.equivalence = expected-right actual-right))))))) + (and (\ nat.equivalence = expected-left actual-left) + (\ int.equivalence = expected-right actual-right))))))) (do {! random.monad} [expected-local random.nat expected-global random.int] @@ -111,10 +111,10 @@ /.int) (list (code.int expected-global))) (!expect (^multi (#try.Success [actual-local actual-global]) - (and (:: nat.equivalence = expected-local actual-local) - (:: int.equivalence = expected-global actual-global))))))) + (and (\ nat.equivalence = expected-local actual-local) + (\ int.equivalence = expected-global actual-global))))))) (do {! random.monad} - [dummy (:: ! map code.bit random.bit)] + [dummy (\ ! map code.bit random.bit)] (_.cover [/.end?] (|> (/.run (do <>.monad [pre /.end? @@ -126,7 +126,7 @@ (!expect (^multi (#try.Success verdict) verdict))))) (do {! random.monad} - [dummy (:: ! map code.bit random.bit)] + [dummy (\ ! map code.bit random.bit)] (_.cover [/.end!] (and (|> (/.run /.end! (list)) (!expect (#try.Success []))) diff --git a/stdlib/source/test/lux/control/parser/environment.lux b/stdlib/source/test/lux/control/parser/environment.lux index 89b174b47..2c2263862 100644 --- a/stdlib/source/test/lux/control/parser/environment.lux +++ b/stdlib/source/test/lux/control/parser/environment.lux @@ -29,7 +29,7 @@ [expected random.nat] (_.cover [/.run] (|> (/.run (//\wrap expected) /.empty) - (:: try.functor map (n.= expected)) + (\ try.functor map (n.= expected)) (try.default false)))) (do random.monad [property (random.ascii/alpha 1) @@ -38,7 +38,7 @@ (|> /.empty (dictionary.put property expected) (/.run (/.property property)) - (:: try.functor map (text\= expected)) + (\ try.functor map (text\= expected)) (try.default false)))) (do random.monad [property (random.ascii/alpha 1)] diff --git a/stdlib/source/test/lux/control/parser/json.lux b/stdlib/source/test/lux/control/parser/json.lux index 27c508bd5..e9bd03ef6 100644 --- a/stdlib/source/test/lux/control/parser/json.lux +++ b/stdlib/source/test/lux/control/parser/json.lux @@ -45,23 +45,23 @@ (_.with-cover [/.Parser]) (`` ($_ _.and (do {! random.monad} - [expected (:: ! map (|>> #json.String) (random.unicode 1))] + [expected (\ ! map (|>> #json.String) (random.unicode 1))] (_.cover [/.run /.any] (|> (/.run /.any expected) (!expect (^multi (#try.Success actual) - (:: json.equivalence = expected actual)))))) + (\ json.equivalence = expected actual)))))) (_.cover [/.null] (|> (/.run /.null #json.Null) (!expect (#try.Success _)))) (~~ (template [<query> <test> <check> <random> <json> <equivalence>] [(do {! random.monad} [expected <random> - dummy (|> <random> (random.filter (|>> (:: <equivalence> = expected) not)))] + dummy (|> <random> (random.filter (|>> (\ <equivalence> = expected) not)))] ($_ _.and (_.cover [<query>] (|> (/.run <query> (<json> expected)) (!expect (^multi (#try.Success actual) - (:: <equivalence> = expected actual))))) + (\ <equivalence> = expected actual))))) (_.cover [<test>] (and (|> (/.run (<test> expected) (<json> expected)) (!expect (#try.Success #1))) @@ -86,7 +86,7 @@ (exception.match? /.unexpected-value error)))))) (do {! random.monad} [expected (random.unicode 1) - dummy (|> (random.unicode 1) (random.filter (|>> (:: text.equivalence = expected) not)))] + dummy (|> (random.unicode 1) (random.filter (|>> (\ text.equivalence = expected) not)))] (_.cover [/.value-mismatch] (|> (/.run (/.string! expected) (#json.String dummy)) (!expect (^multi (#try.Failure error) @@ -96,22 +96,22 @@ (_.cover [/.nullable] (and (|> (/.run (/.nullable /.string) #json.Null) (!expect (^multi (#try.Success actual) - (:: (maybe.equivalence text.equivalence) = #.None actual)))) + (\ (maybe.equivalence text.equivalence) = #.None actual)))) (|> (/.run (/.nullable /.string) (#json.String expected)) (!expect (^multi (#try.Success actual) - (:: (maybe.equivalence text.equivalence) = (#.Some expected) actual))))))) + (\ (maybe.equivalence text.equivalence) = (#.Some expected) actual))))))) (do {! random.monad} - [size (:: ! map (n.% 10) random.nat) + [size (\ ! map (n.% 10) random.nat) expected (|> (random.unicode 1) (random.list size) - (:: ! map row.from-list))] + (\ ! map row.from-list))] (_.cover [/.array] (|> (/.run (/.array (<>.some /.string)) (#json.Array (row\map (|>> #json.String) expected))) (!expect (^multi (#try.Success actual) - (:: (row.equivalence text.equivalence) = expected (row.from-list actual))))))) + (\ (row.equivalence text.equivalence) = expected (row.from-list actual))))))) (do {! random.monad} - [expected (:: ! map (|>> #json.String) (random.unicode 1))] + [expected (\ ! map (|>> #json.String) (random.unicode 1))] (_.cover [/.unconsumed-input] (|> (/.run (/.array /.any) (#json.Array (row expected expected))) (!expect (^multi (#try.Failure error) @@ -125,12 +125,12 @@ expected-number ..safe-frac expected-string (random.unicode 1) [boolean-field number-field string-field] (|> (random.set text.hash 3 (random.unicode 3)) - (:: ! map (|>> set.to-list - (case> (^ (list boolean-field number-field string-field)) - [boolean-field number-field string-field] + (\ ! map (|>> set.to-list + (case> (^ (list boolean-field number-field string-field)) + [boolean-field number-field string-field] - _ - (undefined)))))] + _ + (undefined)))))] (_.cover [/.object /.field] (|> (/.run (/.object ($_ <>.and (/.field boolean-field /.boolean) @@ -142,11 +142,11 @@ [number-field (#json.Number expected-number)] [string-field (#json.String expected-string)])))) (!expect (^multi (#try.Success [actual-boolean actual-number actual-string]) - (and (:: bit.equivalence = expected-boolean actual-boolean) - (:: frac.equivalence = expected-number actual-number) - (:: text.equivalence = expected-string actual-string))))))) + (and (\ bit.equivalence = expected-boolean actual-boolean) + (\ frac.equivalence = expected-number actual-number) + (\ text.equivalence = expected-string actual-string))))))) (do {! random.monad} - [size (:: ! map (n.% 10) random.nat) + [size (\ ! map (n.% 10) random.nat) keys (random.list size (random.unicode 1)) values (random.list size (random.unicode 1)) #let [expected (dictionary.from-list text.hash (list.zip/2 keys values))]] @@ -158,5 +158,5 @@ (list.zip/2 keys) (dictionary.from-list text.hash)))) (!expect (^multi (#try.Success actual) - (:: (dictionary.equivalence text.equivalence) = expected actual)))))) + (\ (dictionary.equivalence text.equivalence) = expected actual)))))) )))) diff --git a/stdlib/source/test/lux/control/parser/synthesis.lux b/stdlib/source/test/lux/control/parser/synthesis.lux index da6e3247f..d7709687f 100644 --- a/stdlib/source/test/lux/control/parser/synthesis.lux +++ b/stdlib/source/test/lux/control/parser/synthesis.lux @@ -52,9 +52,9 @@ (def: random-environment (Random (Environment Synthesis)) (do {! random.monad} - [size (:: ! map (n.% 5) random.nat)] + [size (\ ! map (n.% 5) random.nat)] (|> ..random-variable - (:: ! map (|>> synthesis.variable)) + (\ ! map (|>> synthesis.variable)) (random.list size)))) (def: simple @@ -63,12 +63,12 @@ (~~ (template [<query> <check> <random> <synthesis> <equivalence>] [(do {! random.monad} [expected <random> - dummy (|> <random> (random.filter (|>> (:: <equivalence> = expected) not)))] + dummy (|> <random> (random.filter (|>> (\ <equivalence> = expected) not)))] ($_ _.and (_.cover [<query>] (|> (/.run <query> (list (<synthesis> expected))) (!expect (^multi (#try.Success actual) - (:: <equivalence> = expected actual))))) + (\ <equivalence> = expected actual))))) (_.cover [<check>] (and (|> (/.run (<check> expected) (list (<synthesis> expected))) (!expect (#try.Success _))) @@ -77,7 +77,7 @@ (exception.match? /.cannot-parse error))))))))] [/.bit /.bit! random.bit synthesis.bit bit.equivalence] - [/.i64 /.i64! (:: ! map .i64 random.nat) synthesis.i64 i64.equivalence] + [/.i64 /.i64! (\ ! map .i64 random.nat) synthesis.i64 i64.equivalence] [/.f64 /.f64! random.safe-frac synthesis.f64 frac.equivalence] [/.text /.text! (random.unicode 1) synthesis.text text.equivalence] [/.local /.local! random.nat synthesis.variable/local n.equivalence] @@ -91,7 +91,7 @@ ($_ _.and (do {! random.monad} [expected-bit random.bit - expected-i64 (:: ! map .i64 random.nat) + expected-i64 (\ ! map .i64 random.nat) expected-f64 random.safe-frac expected-text (random.unicode 1)] (_.cover [/.tuple] @@ -101,10 +101,10 @@ (synthesis.f64 expected-f64) (synthesis.text expected-text))))) (!expect (^multi (#try.Success [actual-bit actual-i64 actual-f64 actual-text]) - (and (:: bit.equivalence = expected-bit actual-bit) - (:: i64.equivalence = expected-i64 actual-i64) - (:: frac.equivalence = expected-f64 actual-f64) - (:: text.equivalence = expected-text actual-text))))) + (and (\ bit.equivalence = expected-bit actual-bit) + (\ i64.equivalence = expected-i64 actual-i64) + (\ frac.equivalence = expected-f64 actual-f64) + (\ text.equivalence = expected-text actual-text))))) (|> (/.run (/.tuple ($_ <>.and /.bit /.i64 /.f64 /.text)) (list (synthesis.text expected-text))) (!expect (^multi (#try.Failure error) @@ -117,10 +117,10 @@ (and (|> (/.run (/.function arity /.text) (list (synthesis.function/abstraction [expected-environment arity (synthesis.text expected-body)]))) (!expect (^multi (#try.Success [actual-environment actual-body]) - (and (:: (list.equivalence synthesis.equivalence) = - expected-environment - actual-environment) - (:: text.equivalence = expected-body actual-body))))) + (and (\ (list.equivalence synthesis.equivalence) = + expected-environment + actual-environment) + (\ text.equivalence = expected-body actual-body))))) (|> (/.run (/.function arity /.text) (list (synthesis.text expected-body))) (!expect (^multi (#try.Failure error) @@ -135,7 +135,7 @@ (!expect (^multi (#try.Failure error) (exception.match? /.wrong-arity error)))))) (do {! random.monad} - [arity (:: ! map (|>> (n.% 10) inc) random.nat) + [arity (\ ! map (|>> (n.% 10) inc) random.nat) expected-offset random.nat expected-inits (random.list arity random.bit) expected-body (random.unicode 1)] @@ -145,11 +145,11 @@ (list\map (|>> synthesis.bit) expected-inits) (synthesis.text expected-body)]))) (!expect (^multi (#try.Success [actual-offset actual-inits actual-body]) - (and (:: n.equivalence = expected-offset actual-offset) - (:: (list.equivalence bit.equivalence) = - expected-inits - actual-inits) - (:: text.equivalence = expected-body actual-body))))) + (and (\ n.equivalence = expected-offset actual-offset) + (\ (list.equivalence bit.equivalence) = + expected-inits + actual-inits) + (\ text.equivalence = expected-body actual-body))))) (|> (/.run (/.loop (<>.many /.bit) /.text) (list (synthesis.text expected-body))) (!expect (^multi (#try.Failure error) @@ -162,23 +162,23 @@ (_.with-cover [/.Parser]) ($_ _.and (do {! random.monad} - [expected (:: ! map (|>> synthesis.i64) random.nat)] + [expected (\ ! map (|>> synthesis.i64) random.nat)] (_.cover [/.run /.any] (|> (/.run /.any (list expected)) (!expect (^multi (#try.Success actual) - (:: synthesis.equivalence = expected actual)))))) + (\ synthesis.equivalence = expected actual)))))) (_.cover [/.empty-input] (|> (/.run /.any (list)) (!expect (^multi (#try.Failure error) (exception.match? /.empty-input error))))) (do {! random.monad} - [expected (:: ! map (|>> synthesis.i64) random.nat)] + [expected (\ ! map (|>> synthesis.i64) random.nat)] (_.cover [/.unconsumed-input] (|> (/.run /.any (list expected expected)) (!expect (^multi (#try.Failure error) (exception.match? /.unconsumed-input error)))))) (do {! random.monad} - [dummy (:: ! map (|>> synthesis.i64) random.nat)] + [dummy (\ ! map (|>> synthesis.i64) random.nat)] (_.cover [/.end! /.expected-empty-input] (and (|> (/.run /.end! (list)) (!expect (#try.Success _))) @@ -186,7 +186,7 @@ (!expect (^multi (#try.Failure error) (exception.match? /.expected-empty-input error))))))) (do {! random.monad} - [dummy (:: ! map (|>> synthesis.i64) random.nat)] + [dummy (\ ! map (|>> synthesis.i64) random.nat)] (_.cover [/.end?] (and (|> (/.run /.end? (list)) (!expect (#try.Success #1))) diff --git a/stdlib/source/test/lux/control/parser/text.lux b/stdlib/source/test/lux/control/parser/text.lux index 2575509de..74fc6a8fd 100644 --- a/stdlib/source/test/lux/control/parser/text.lux +++ b/stdlib/source/test/lux/control/parser/text.lux @@ -58,7 +58,7 @@ (-> Text (/.Parser Text) Bit) (|> expected (/.run parser) - (:: try.functor map (text\= expected)) + (\ try.functor map (text\= expected)) (try.default false))) (def: (should-pass! expected parser) @@ -69,13 +69,13 @@ Test ($_ _.and (do {! random.monad} - [offset (:: ! map (n.% 50) random.nat) - range (:: ! map (|>> (n.% 50) (n.+ 10)) random.nat) + [offset (\ ! map (n.% 50) random.nat) + range (\ ! map (|>> (n.% 50) (n.+ 10)) random.nat) #let [limit (n.+ offset range)] - expected (:: ! map (|>> (n.% range) (n.+ offset) text.from-code) random.nat) + expected (\ ! map (|>> (n.% range) (n.+ offset) text.from-code) random.nat) out-of-range (case offset - 0 (:: ! map (|>> (n.% 10) inc (n.+ limit) text.from-code) random.nat) - _ (:: ! map (|>> (n.% offset) text.from-code) random.nat))] + 0 (\ ! map (|>> (n.% 10) inc (n.+ limit) text.from-code) random.nat) + _ (\ ! map (|>> (n.% offset) text.from-code) random.nat))] (_.cover [/.range] (and (..should-pass expected (/.range offset limit)) (..should-fail out-of-range (/.range offset limit))))) @@ -94,22 +94,22 @@ (and (..should-pass (text.from-code expected) /.lower) (..should-fail (text.from-code invalid) /.lower)))) (do {! random.monad} - [expected (:: ! map (n.% 10) random.nat) + [expected (\ ! map (n.% 10) random.nat) invalid (random.char (unicode.set [unicode.number-forms (list)]))] (_.cover [/.decimal] - (and (..should-pass (:: n.decimal encode expected) /.decimal) + (and (..should-pass (\ n.decimal encode expected) /.decimal) (..should-fail (text.from-code invalid) /.decimal)))) (do {! random.monad} - [expected (:: ! map (n.% 8) random.nat) + [expected (\ ! map (n.% 8) random.nat) invalid (random.char (unicode.set [unicode.number-forms (list)]))] (_.cover [/.octal] - (and (..should-pass (:: n.octal encode expected) /.octal) + (and (..should-pass (\ n.octal encode expected) /.octal) (..should-fail (text.from-code invalid) /.octal)))) (do {! random.monad} - [expected (:: ! map (n.% 16) random.nat) + [expected (\ ! map (n.% 16) random.nat) invalid (random.char (unicode.set [unicode.number-forms (list)]))] (_.cover [/.hexadecimal] - (and (..should-pass (:: n.hex encode expected) /.hexadecimal) + (and (..should-pass (\ n.hex encode expected) /.hexadecimal) (..should-fail (text.from-code invalid) /.hexadecimal)))) (do {! random.monad} [expected (random.char unicode.ascii/alpha) @@ -152,14 +152,14 @@ [#let [num-options 3] options (|> (random.char unicode.full) (random.set n.hash num-options) - (:: ! map (|>> set.to-list - (list\map text.from-code) - (text.join-with "")))) - expected (:: ! map (function (_ value) - (|> options - (text.nth (n.% num-options value)) - maybe.assume)) - random.nat) + (\ ! map (|>> set.to-list + (list\map text.from-code) + (text.join-with "")))) + expected (\ ! map (function (_ value) + (|> options + (text.nth (n.% num-options value)) + maybe.assume)) + random.nat) invalid (random.filter (|>> text.from-code (text.contains? options) not) @@ -178,14 +178,14 @@ [#let [num-options 3] options (|> (random.char unicode.full) (random.set n.hash num-options) - (:: ! map (|>> set.to-list - (list\map text.from-code) - (text.join-with "")))) - invalid (:: ! map (function (_ value) - (|> options - (text.nth (n.% num-options value)) - maybe.assume)) - random.nat) + (\ ! map (|>> set.to-list + (list\map text.from-code) + (text.join-with "")))) + invalid (\ ! map (function (_ value) + (|> options + (text.nth (n.% num-options value)) + maybe.assume)) + random.nat) expected (random.filter (|>> text.from-code (text.contains? options) not) @@ -207,26 +207,26 @@ (let [octal! (/.one-of! "01234567")] ($_ _.and (do {! random.monad} - [left (:: ! map (|>> (n.% 8) (:: n.octal encode)) random.nat) - right (:: ! map (|>> (n.% 8) (:: n.octal encode)) random.nat) + [left (\ ! map (|>> (n.% 8) (\ n.octal encode)) random.nat) + right (\ ! map (|>> (n.% 8) (\ n.octal encode)) random.nat) #let [expected (format left right)] invalid (|> random.nat - (:: ! map (n.% 16)) + (\ ! map (n.% 16)) (random.filter (n.>= 8)) - (:: ! map (:: n.hex encode)))] + (\ ! map (\ n.hex encode)))] (_.cover [/.many /.many!] (and (..should-pass expected (/.many /.octal)) (..should-fail invalid (/.many /.octal)) (..should-pass! expected (/.many! octal!))))) (do {! random.monad} - [left (:: ! map (|>> (n.% 8) (:: n.octal encode)) random.nat) - right (:: ! map (|>> (n.% 8) (:: n.octal encode)) random.nat) + [left (\ ! map (|>> (n.% 8) (\ n.octal encode)) random.nat) + right (\ ! map (|>> (n.% 8) (\ n.octal encode)) random.nat) #let [expected (format left right)] invalid (|> random.nat - (:: ! map (n.% 16)) + (\ ! map (n.% 16)) (random.filter (n.>= 8)) - (:: ! map (:: n.hex encode)))] + (\ ! map (\ n.hex encode)))] (_.cover [/.some /.some!] (and (..should-pass expected (/.some /.octal)) (..should-pass "" (/.some /.octal)) @@ -235,7 +235,7 @@ (..should-pass! expected (/.some! octal!)) (..should-pass! "" (/.some! octal!))))) (do {! random.monad} - [#let [octal (:: ! map (|>> (n.% 8) (:: n.octal encode)) random.nat)] + [#let [octal (\ ! map (|>> (n.% 8) (\ n.octal encode)) random.nat)] first octal second octal third octal] @@ -248,7 +248,7 @@ (..should-fail (format first second third) (/.exactly! 2 octal!)) (..should-fail (format first) (/.exactly! 2 octal!))))) (do {! random.monad} - [#let [octal (:: ! map (|>> (n.% 8) (:: n.octal encode)) random.nat)] + [#let [octal (\ ! map (|>> (n.% 8) (\ n.octal encode)) random.nat)] first octal second octal third octal] @@ -261,7 +261,7 @@ (..should-pass! (format first) (/.at-most! 2 octal!)) (..should-fail (format first second third) (/.at-most! 2 octal!))))) (do {! random.monad} - [#let [octal (:: ! map (|>> (n.% 8) (:: n.octal encode)) random.nat)] + [#let [octal (\ ! map (|>> (n.% 8) (\ n.octal encode)) random.nat)] first octal second octal third octal] @@ -274,7 +274,7 @@ (..should-pass! (format first second third) (/.at-least! 2 octal!)) (..should-fail (format first) (/.at-least! 2 octal!))))) (do {! random.monad} - [#let [octal (:: ! map (|>> (n.% 8) (:: n.octal encode)) random.nat)] + [#let [octal (\ ! map (|>> (n.% 8) (\ n.octal encode)) random.nat)] first octal second octal third octal] @@ -386,7 +386,7 @@ (/.this out))) (!expect (#try.Success _))))) (do {! random.monad} - [expected (:: ! map (|>> (n.% 8) (:: n.octal encode)) random.nat)] + [expected (\ ! map (|>> (n.% 8) (\ n.octal encode)) random.nat)] (_.cover [/.embed] (|> (list (code.text expected)) (<c>.run (/.embed /.octal <c>.text)) diff --git a/stdlib/source/test/lux/control/parser/type.lux b/stdlib/source/test/lux/control/parser/type.lux index 729551843..705c9ef24 100644 --- a/stdlib/source/test/lux/control/parser/type.lux +++ b/stdlib/source/test/lux/control/parser/type.lux @@ -28,8 +28,8 @@ (def: primitive (Random Type) (|> (random.ascii/alpha-num 1) - (:: random.monad map (function (_ name) - (#.Primitive name (list)))))) + (\ random.monad map (function (_ name) + (#.Primitive name (list)))))) (def: matches Test diff --git a/stdlib/source/test/lux/control/region.lux b/stdlib/source/test/lux/control/region.lux index d9f28e5db..088f3dc7c 100644 --- a/stdlib/source/test/lux/control/region.lux +++ b/stdlib/source/test/lux/control/region.lux @@ -79,7 +79,7 @@ (<| (_.covering /._) (_.with-cover [/.Region]) (do {! random.monad} - [expected-clean-ups (|> random.nat (:: ! map (|>> (n.% 100) (n.max 1))))] + [expected-clean-ups (|> random.nat (\ ! map (|>> (n.% 100) (n.max 1))))] ($_ _.and (_.with-cover [/.functor] ($functor.spec ..injection ..comparison (: (All [! r] diff --git a/stdlib/source/test/lux/control/security/policy.lux b/stdlib/source/test/lux/control/security/policy.lux index 6206206e3..bb5144fd1 100644 --- a/stdlib/source/test/lux/control/security/policy.lux +++ b/stdlib/source/test/lux/control/security/policy.lux @@ -60,7 +60,7 @@ (!.use %\can-downgrade sample))))) (def: hash (|>> (!.use %\can-downgrade) - (:: text.hash hash))))) + (\ text.hash hash))))) (def: password (!.use %\can-upgrade)) @@ -76,24 +76,24 @@ (do random.monad [#let [policy-0 (policy [])] raw-password (random.ascii 10) - #let [password (:: policy-0 password raw-password)]] + #let [password (\ policy-0 password raw-password)]] ($_ _.and (_.with-cover [/.Privacy /.Private /.Can-Conceal /.Can-Reveal /.Safety /.Safe /.Can-Trust /.Can-Distrust] ($_ _.and (_.with-cover [/.functor] - ($functor.spec (..injection (:: policy-0 can-upgrade)) (..comparison (:: policy-0 can-downgrade)) /.functor)) + ($functor.spec (..injection (\ policy-0 can-upgrade)) (..comparison (\ policy-0 can-downgrade)) /.functor)) (_.with-cover [/.apply] - ($apply.spec (..injection (:: policy-0 can-upgrade)) (..comparison (:: policy-0 can-downgrade)) /.apply)) + ($apply.spec (..injection (\ policy-0 can-upgrade)) (..comparison (\ policy-0 can-downgrade)) /.apply)) (_.with-cover [/.monad] - ($monad.spec (..injection (:: policy-0 can-upgrade)) (..comparison (:: policy-0 can-downgrade)) /.monad)))) + ($monad.spec (..injection (\ policy-0 can-upgrade)) (..comparison (\ policy-0 can-downgrade)) /.monad)))) (_.cover [/.Privilege /.Context /.with-policy] - (and (:: policy-0 = password password) - (n.= (:: text.hash hash raw-password) - (:: policy-0 hash password)))) + (and (\ policy-0 = password password) + (n.= (\ text.hash hash raw-password) + (\ policy-0 hash password)))) (let [policy-1 (policy []) - delegate (/.delegation (:: policy-0 can-downgrade) (:: policy-1 can-upgrade))] + delegate (/.delegation (\ policy-0 can-downgrade) (\ policy-1 can-upgrade))] (_.cover [/.Delegation /.delegation] - (:: policy-1 = (delegate password) (delegate password)))) + (\ policy-1 = (delegate password) (delegate password)))) )))) diff --git a/stdlib/source/test/lux/control/state.lux b/stdlib/source/test/lux/control/state.lux index 3e30afab0..60f06dbef 100644 --- a/stdlib/source/test/lux/control/state.lux +++ b/stdlib/source/test/lux/control/state.lux @@ -84,7 +84,7 @@ (def: loops Test (do {! random.monad} - [limit (|> random.nat (:: ! map (n.% 10))) + [limit (|> random.nat (\ ! map (n.% 10))) #let [condition (do /.monad [state /.get] (wrap (n.< limit state)))]] diff --git a/stdlib/source/test/lux/control/thread.lux b/stdlib/source/test/lux/control/thread.lux index aac2059f8..dfc5e7306 100644 --- a/stdlib/source/test/lux/control/thread.lux +++ b/stdlib/source/test/lux/control/thread.lux @@ -20,7 +20,7 @@ (def: (injection value) (Injection (All [a !] (Thread ! a))) - (:: /.monad wrap value)) + (\ /.monad wrap value)) (def: comparison (Comparison (All [a !] (Thread ! a))) @@ -39,12 +39,12 @@ (_.cover [/.run] (n.= sample (|> sample - (:: /.monad wrap) + (\ /.monad wrap) /.run))) (_.cover [/.io] (n.= sample (|> sample - (:: /.monad wrap) + (\ /.monad wrap) /.io io.run))) diff --git a/stdlib/source/test/lux/control/try.lux b/stdlib/source/test/lux/control/try.lux index f4eaec656..cc01b7337 100644 --- a/stdlib/source/test/lux/control/try.lux +++ b/stdlib/source/test/lux/control/try.lux @@ -28,7 +28,7 @@ (def: comparison (Comparison Try) (function (_ ==) - (:: (/.equivalence ==) =))) + (\ (/.equivalence ==) =))) (def: #export (try element) (All [a] (-> (Random a) (Random (Try a)))) diff --git a/stdlib/source/test/lux/control/writer.lux b/stdlib/source/test/lux/control/writer.lux index 070d51888..9bb471bf5 100644 --- a/stdlib/source/test/lux/control/writer.lux +++ b/stdlib/source/test/lux/control/writer.lux @@ -25,7 +25,7 @@ (def: (injection monoid value) (All [w] (-> (Monoid w) (Injection (Writer w)))) - [(:: monoid identity) value]) + [(\ monoid identity) value]) (def: comparison (All [w] (Comparison (Writer w))) diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux index d3bd06b58..b9fe6c207 100644 --- a/stdlib/source/test/lux/data/binary.lux +++ b/stdlib/source/test/lux/data/binary.lux @@ -40,7 +40,7 @@ [byte random.nat] (exec (try.assume (/.write/8 idx byte output)) (recur (inc idx)))) - (:: random.monad wrap output))))) + (\ random.monad wrap output))))) (def: (throws? exception try) (All [e a] (-> (Exception e) (Try a) Bit)) @@ -78,11 +78,11 @@ Test (<| (_.covering /._) (do {! random.monad} - [#let [gen-size (|> random.nat (:: ! map (|>> (n.% 100) (n.max 8))))] + [#let [gen-size (|> random.nat (\ ! map (|>> (n.% 100) (n.max 8))))] size gen-size sample (..random size) value random.nat - #let [gen-idx (|> random.nat (:: ! map (n.% size)))] + #let [gen-idx (|> random.nat (\ ! map (n.% size)))] [from to] (random.and gen-idx gen-idx) #let [[from to] [(n.min from to) (n.max from to)]]] (_.with-cover [/.Binary] @@ -92,13 +92,13 @@ (_.with-cover [/.monoid] ($monoid.spec /.equivalence /.monoid (..random size))) (_.cover [/.fold] - (n.= (:: list.fold fold n.+ 0 (..as-list sample)) + (n.= (\ list.fold fold n.+ 0 (..as-list sample)) (/.fold n.+ 0 sample))) (_.cover [/.create] - (:: /.equivalence = - (/.create size) - (/.create size))) + (\ /.equivalence = + (/.create size) + (/.create size))) (_.cover [/.size] (|> (/.create size) /.size (n.= size))) (_.with-cover [/.index-out-of-bounds] @@ -120,7 +120,7 @@ (case [(monad.map try.monad (reader random-slice) idxs) (monad.map try.monad (|>> (n.+ from) (reader sample)) idxs)] [(#try.Success slice-vals) (#try.Success binary-vals)] - (:: (list.equivalence n.equivalence) = slice-vals binary-vals) + (\ (list.equivalence n.equivalence) = slice-vals binary-vals) _ #0)))) @@ -131,8 +131,8 @@ (or (throws? /.inverted-slice (/.slice to from sample)) (n.= to from))) (_.cover [/.drop] - (and (:: /.equivalence = sample (/.drop 0 sample)) - (:: /.equivalence = (/.create 0) (/.drop size sample)) + (and (\ /.equivalence = sample (/.drop 0 sample)) + (\ /.equivalence = (/.create 0) (/.drop size sample)) (case (list.reverse (..as-list sample)) #.Nil false @@ -144,7 +144,7 @@ (and (case (/.copy size 0 sample 0 (/.create size)) (#try.Success output) (and (not (is? sample output)) - (:: /.equivalence = sample output)) + (\ /.equivalence = sample output)) (#try.Failure _) false) diff --git a/stdlib/source/test/lux/data/bit.lux b/stdlib/source/test/lux/data/bit.lux index 0be42e466..0b3eab351 100644 --- a/stdlib/source/test/lux/data/bit.lux +++ b/stdlib/source/test/lux/data/bit.lux @@ -31,6 +31,6 @@ ($codec.spec /.equivalence /.codec random.bit)) (_.cover [/.complement] - (and (not (:: /.equivalence = value ((/.complement function.identity) value))) - (:: /.equivalence = value ((/.complement not) value)))) + (and (not (\ /.equivalence = value ((/.complement function.identity) value))) + (\ /.equivalence = value ((/.complement not) value)))) )))) diff --git a/stdlib/source/test/lux/data/collection/array.lux b/stdlib/source/test/lux/data/collection/array.lux index 5a94f13b7..99ae8e06d 100644 --- a/stdlib/source/test/lux/data/collection/array.lux +++ b/stdlib/source/test/lux/data/collection/array.lux @@ -30,8 +30,8 @@ (def: bounded-size (Random Nat) - (:: random.monad map (|>> (n.% 100) (n.+ 1)) - random.nat)) + (\ random.monad map (|>> (n.% 100) (n.+ 1)) + random.nat)) (def: structures Test @@ -58,9 +58,9 @@ the-array (random.array size random.nat)] ($_ _.and (_.cover [/.find] - (:: (maybe.equivalence n.equivalence) = - (/.find n.even? the-array) - (list.find n.even? (/.to-list the-array)))) + (\ (maybe.equivalence n.equivalence) = + (/.find n.even? the-array) + (list.find n.even? (/.to-list the-array)))) (_.cover [/.find+] (case [(/.find n.even? the-array) (/.find+ (function (_ idx member) @@ -78,13 +78,13 @@ [#.None #.None] true)) (_.cover [/.every?] - (:: bit.equivalence = - (list.every? n.even? (/.to-list the-array)) - (/.every? n.even? the-array))) + (\ bit.equivalence = + (list.every? n.even? (/.to-list the-array)) + (/.every? n.even? the-array))) (_.cover [/.any?] - (:: bit.equivalence = - (list.any? n.even? (/.to-list the-array)) - (/.any? n.even? the-array))) + (\ bit.equivalence = + (list.any? n.even? (/.to-list the-array)) + (/.any? n.even? the-array))) ))) (def: #export test @@ -167,7 +167,7 @@ _ false))) (do ! - [occupancy (:: ! map (n.% (inc size)) random.nat)] + [occupancy (\ ! map (n.% (inc size)) random.nat)] (_.cover [/.occupancy /.vacancy] (let [the-array (loop [output (: (Array Nat) (/.new size)) @@ -183,22 +183,22 @@ [the-list (random.list size random.nat)] (_.cover [/.from-list /.to-list] (and (|> the-list /.from-list /.to-list - (:: (list.equivalence n.equivalence) = the-list)) + (\ (list.equivalence n.equivalence) = the-list)) (|> the-array /.to-list /.from-list - (:: (/.equivalence n.equivalence) = the-array))))) + (\ (/.equivalence n.equivalence) = the-array))))) (do ! - [amount (:: ! map (n.% (inc size)) random.nat)] + [amount (\ ! map (n.% (inc size)) random.nat)] (_.cover [/.copy!] (let [copy (: (Array Nat) (/.new size))] (exec (/.copy! amount 0 the-array 0 copy) - (:: (list.equivalence n.equivalence) = - (list.take amount (/.to-list the-array)) - (/.to-list copy)))))) + (\ (list.equivalence n.equivalence) = + (list.take amount (/.to-list the-array)) + (/.to-list copy)))))) (_.cover [/.clone] (let [clone (/.clone the-array)] (and (not (is? the-array clone)) - (:: (/.equivalence n.equivalence) = the-array clone)))) + (\ (/.equivalence n.equivalence) = the-array clone)))) (let [the-array (/.clone the-array) evens (|> the-array /.to-list (list.filter n.even?)) odds (|> the-array /.to-list (list.filter n.odd?))] @@ -206,7 +206,7 @@ (exec (/.filter! n.even? the-array) (and (n.= (list.size evens) (/.occupancy the-array)) (n.= (list.size odds) (/.vacancy the-array)) - (|> the-array /.to-list (:: (list.equivalence n.equivalence) = evens)))))) + (|> the-array /.to-list (\ (list.equivalence n.equivalence) = evens)))))) (do ! [#let [the-array (/.clone the-array) members (|> the-array /.to-list (set.from-list n.hash))] diff --git a/stdlib/source/test/lux/data/collection/bits.lux b/stdlib/source/test/lux/data/collection/bits.lux index a31fec37c..cb5ecf681 100644 --- a/stdlib/source/test/lux/data/collection/bits.lux +++ b/stdlib/source/test/lux/data/collection/bits.lux @@ -18,16 +18,16 @@ (def: (size min max) (-> Nat Nat (Random Nat)) (|> random.nat - (:: random.monad map (|>> (n.% (inc max)) (n.max min))))) + (\ random.monad map (|>> (n.% (inc max)) (n.max min))))) (def: #export random (Random Bits) (do {! random.monad} - [size (:: ! map (n.% 1,000) random.nat)] + [size (\ ! map (n.% 1,000) random.nat)] (case size 0 (wrap /.empty) _ (do {! random.monad} - [idx (|> random.nat (:: ! map (n.% size)))] + [idx (|> random.nat (\ ! map (n.% size)))] (wrap (/.set idx /.empty)))))) (def: #export test @@ -48,8 +48,8 @@ (/.empty? /.empty)) (do {! random.monad} - [size (:: ! map (|>> (n.% 1,000) inc) random.nat) - idx (:: ! map (n.% size) random.nat) + [size (\ ! map (|>> (n.% 1,000) inc) random.nat) + idx (\ ! map (n.% size) random.nat) sample ..random] ($_ _.and (_.cover [/.get /.set] @@ -80,17 +80,17 @@ (_.cover [/.not] (and (is? /.empty (/.not /.empty)) (or (is? /.empty sample) - (and (not (:: /.equivalence = sample (/.not sample))) - (:: /.equivalence = sample (/.not (/.not sample))))))) + (and (not (\ /.equivalence = sample (/.not sample))) + (\ /.equivalence = sample (/.not (/.not sample))))))) (_.cover [/.xor] (and (is? /.empty (/.xor sample sample)) (n.= (/.size (/.xor sample (/.not sample))) (/.capacity sample)))) (_.cover [/.or] - (and (:: /.equivalence = sample (/.or sample sample)) + (and (\ /.equivalence = sample (/.or sample sample)) (n.= (/.size (/.or sample (/.not sample))) (/.capacity sample)))) (_.cover [/.and] - (and (:: /.equivalence = sample (/.and sample sample)) + (and (\ /.equivalence = sample (/.and sample sample)) (is? /.empty (/.and sample (/.not sample))))) ))))) diff --git a/stdlib/source/test/lux/data/collection/dictionary.lux b/stdlib/source/test/lux/data/collection/dictionary.lux index 6d35fd15b..718c9f0c9 100644 --- a/stdlib/source/test/lux/data/collection/dictionary.lux +++ b/stdlib/source/test/lux/data/collection/dictionary.lux @@ -29,7 +29,7 @@ (def: for-dictionaries Test (do random.monad - [#let [capped-nat (:: random.monad map (n.% 100) random.nat)] + [#let [capped-nat (\ random.monad map (n.% 100) random.nat)] size capped-nat dict (random.dictionary n.hash size random.nat capped-nat) non-key (|> random.nat (random.filter (function (_ key) (not (/.contains? key dict))))) @@ -49,10 +49,10 @@ (/.empty? sample)))) (_.cover [/.entries /.keys /.values] - (:: (list.equivalence (equivalence.product n.equivalence n.equivalence)) = - (/.entries dict) - (list.zip/2 (/.keys dict) - (/.values dict)))) + (\ (list.equivalence (equivalence.product n.equivalence n.equivalence)) = + (/.entries dict) + (list.zip/2 (/.keys dict) + (/.values dict)))) (_.cover [/.merge] (let [merging-with-oneself (let [(^open ".") (/.equivalence n.equivalence)] @@ -79,7 +79,7 @@ (def: for-entries Test (do random.monad - [#let [capped-nat (:: random.monad map (n.% 100) random.nat)] + [#let [capped-nat (\ random.monad map (n.% 100) random.nat)] size capped-nat dict (random.dictionary n.hash size random.nat capped-nat) non-key (|> random.nat (random.filter (function (_ key) (not (/.contains? key dict))))) @@ -197,7 +197,7 @@ (<| (_.covering /._) (_.with-cover [/.Dictionary]) (do random.monad - [#let [capped-nat (:: random.monad map (n.% 100) random.nat)] + [#let [capped-nat (\ random.monad map (n.% 100) random.nat)] size capped-nat dict (random.dictionary n.hash size random.nat capped-nat) non-key (|> random.nat (random.filter (function (_ key) (not (/.contains? key dict))))) diff --git a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux index a1d776d10..c34f3e3cf 100644 --- a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux +++ b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux @@ -43,7 +43,7 @@ (<| (_.covering /._) (_.with-cover [/.Dictionary]) (do {! random.monad} - [size (:: ! map (n.% 100) random.nat) + [size (\ ! map (n.% 100) random.nat) keys (random.set n.hash size random.nat) values (random.set n.hash size random.nat) extra-key (random.filter (|>> (set.member? keys) not) diff --git a/stdlib/source/test/lux/data/collection/dictionary/plist.lux b/stdlib/source/test/lux/data/collection/dictionary/plist.lux index 3ffcc816c..7d8d3a662 100644 --- a/stdlib/source/test/lux/data/collection/dictionary/plist.lux +++ b/stdlib/source/test/lux/data/collection/dictionary/plist.lux @@ -34,7 +34,7 @@ (_.with-cover [/.PList]) (do {! random.monad} [#let [gen-key (random.ascii/alpha 10)] - size (:: ! map (n.% 100) random.nat) + size (\ ! map (n.% 100) random.nat) sample (..random size gen-key random.nat) #let [keys (|> sample /.keys (set.from-list text.hash))] @@ -55,10 +55,10 @@ (_.cover [/.empty] (/.empty? /.empty)) (_.cover [/.keys /.values] - (:: (/.equivalence n.equivalence) = - sample - (list.zip/2 (/.keys sample) - (/.values sample)))) + (\ (/.equivalence n.equivalence) = + sample + (list.zip/2 (/.keys sample) + (/.values sample)))) (_.cover [/.contains?] (and (list.every? (function (_ key) (/.contains? key sample)) @@ -87,5 +87,5 @@ (|> sample (/.put extra-key extra-value) (/.remove extra-key) - (:: (/.equivalence n.equivalence) = sample))) + (\ (/.equivalence n.equivalence) = sample))) )))) diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux index ca432bcb4..7f3ed62e6 100644 --- a/stdlib/source/test/lux/data/collection/list.lux +++ b/stdlib/source/test/lux/data/collection/list.lux @@ -34,8 +34,8 @@ (def: bounded-size (Random Nat) - (:: random.monad map (n.% 100) - random.nat)) + (\ random.monad map (n.% 100) + random.nat)) (def: random (Random (List Nat)) @@ -43,7 +43,7 @@ [size ..bounded-size] (|> random.nat (random.set n.hash size) - (:: ! map set.to-list)))) + (\ ! map set.to-list)))) (def: signatures Test @@ -84,14 +84,14 @@ (do {! random.monad} [size ..bounded-size #let [(^open "/\.") (/.equivalence n.equivalence)] - sample (:: ! map set.to-list (random.set n.hash size random.nat))] + sample (\ ! map set.to-list (random.set n.hash size random.nat))] ($_ _.and (_.cover [/.size] (n.= size (/.size sample))) (_.cover [/.empty?] - (:: bit.equivalence = - (/.empty? sample) - (n.= 0 (/.size sample)))) + (\ bit.equivalence = + (/.empty? sample) + (n.= 0 (/.size sample)))) (_.cover [/.repeat] (n.= size (/.size (/.repeat size [])))) (_.cover [/.reverse] @@ -180,8 +180,8 @@ [sample (random.filter (|>> /.size (n.> 0)) ..random) #let [size (/.size sample)] - idx (:: ! map (n.% size) random.nat) - chunk-size (:: ! map (|>> (n.% size) inc) random.nat)] + idx (\ ! map (n.% size) random.nat) + chunk-size (\ ! map (|>> (n.% size) inc) random.nat)] ($_ _.and (_.cover [/.filter] (let [positives (/.filter n.even? sample) @@ -315,12 +315,12 @@ (and size-of-smaller-list! can-extract-values!))) (_.cover [/.zip] - (and (:: (/.equivalence (equivalence.product n.equivalence n.equivalence)) = - (/.zip/2 sample/0 sample/1) - ((/.zip 2) sample/0 sample/1)) - (:: (/.equivalence ($_ equivalence.product n.equivalence n.equivalence n.equivalence)) = - (/.zip/3 sample/0 sample/1 sample/2) - ((/.zip 3) sample/0 sample/1 sample/2)))) + (and (\ (/.equivalence (equivalence.product n.equivalence n.equivalence)) = + (/.zip/2 sample/0 sample/1) + ((/.zip 2) sample/0 sample/1)) + (\ (/.equivalence ($_ equivalence.product n.equivalence n.equivalence n.equivalence)) = + (/.zip/3 sample/0 sample/1 sample/2) + ((/.zip 3) sample/0 sample/1 sample/2)))) (_.cover [/.zip-with/2] (/\= (/\map (function (_ [left right]) @@ -351,7 +351,7 @@ choose (: (-> Nat (Maybe Text)) (function (_ value) (if (n.even? value) - (#.Some (:: n.decimal encode value)) + (#.Some (\ n.decimal encode value)) #.None)))] (do {! random.monad} [sample ..random] @@ -359,7 +359,7 @@ (_.cover [/.one] (case [(|> sample (/.filter n.even?) - (/\map (:: n.decimal encode)) + (/\map (\ n.decimal encode)) /.head) (/.one choose sample)] [(#.Some expected) (#.Some actual)] @@ -371,11 +371,11 @@ _ false)) (_.cover [/.all] - (:: (/.equivalence text.equivalence) = - (|> sample - (/.filter n.even?) - (/\map (:: n.decimal encode))) - (/.all choose sample))) + (\ (/.equivalence text.equivalence) = + (|> sample + (/.filter n.even?) + (/\map (\ n.decimal encode))) + (/.all choose sample))) (_.cover [/.find] (case (/.find n.even? sample) (#.Some found) @@ -420,7 +420,7 @@ 0))))) (_.cover [/.folds] (/\= (/\map (function (_ index) - (:: /.fold fold n.+ 0 (/.take index sample))) + (\ /.fold fold n.+ 0 (/.take index sample))) (/.indices (inc (/.size sample)))) (/.folds n.+ 0 sample))) ))))) diff --git a/stdlib/source/test/lux/data/collection/queue.lux b/stdlib/source/test/lux/data/collection/queue.lux index 3cd4d6db2..1eb6efe1b 100644 --- a/stdlib/source/test/lux/data/collection/queue.lux +++ b/stdlib/source/test/lux/data/collection/queue.lux @@ -29,7 +29,7 @@ (<| (_.covering /._) (_.with-cover [/.Queue]) (do {! random.monad} - [size (:: ! map (n.% 100) random.nat) + [size (\ ! map (n.% 100) random.nat) members (random.set n.hash size random.nat) non-member (random.filter (|>> (set.member? members) not) random.nat) @@ -43,7 +43,7 @@ (_.cover [/.from-list /.to-list] (|> members /.from-list /.to-list - (:: (list.equivalence n.equivalence) = members))) + (\ (list.equivalence n.equivalence) = members))) (_.cover [/.size] (n.= size (/.size sample))) (_.cover [/.empty?] @@ -54,9 +54,9 @@ all-empty-queues-look-the-same! (bit\= (/.empty? sample) - (:: (/.equivalence n.equivalence) = - sample - /.empty))] + (\ (/.equivalence n.equivalence) = + sample + /.empty))] (and empty-is-empty! all-empty-queues-look-the-same!))) (_.cover [/.peek] @@ -88,9 +88,9 @@ (/.member? n.equivalence pushed non-member) has-expected-order! - (:: (list.equivalence n.equivalence) = - (list\compose (/.to-list sample) (list non-member)) - (/.to-list pushed))] + (\ (list.equivalence n.equivalence) = + (list\compose (/.to-list sample) (list non-member)) + (/.to-list pushed))] (and size-increases! new-member-is-identified! has-expected-order!))) @@ -107,9 +107,9 @@ (not (/.member? n.equivalence popped target)) has-expected-order! - (:: (list.equivalence n.equivalence) = - expected - (/.to-list popped))] + (\ (list.equivalence n.equivalence) = + expected + (/.to-list popped))] (and size-decreases! popped-member-is-not-identified! has-expected-order!)) diff --git a/stdlib/source/test/lux/data/collection/queue/priority.lux b/stdlib/source/test/lux/data/collection/queue/priority.lux index 37e52d598..545c1e2a1 100644 --- a/stdlib/source/test/lux/data/collection/queue/priority.lux +++ b/stdlib/source/test/lux/data/collection/queue/priority.lux @@ -29,7 +29,7 @@ (<| (_.covering /._) (_.with-cover [/.Queue]) (do {! random.monad} - [size (:: ! map (n.% 100) random.nat) + [size (\ ! map (n.% 100) random.nat) sample (..random size) non-member-priority random.nat non-member (random.filter (|>> (/.member? n.equivalence sample) not) diff --git a/stdlib/source/test/lux/data/collection/row.lux b/stdlib/source/test/lux/data/collection/row.lux index 7a51ff797..17dae6904 100644 --- a/stdlib/source/test/lux/data/collection/row.lux +++ b/stdlib/source/test/lux/data/collection/row.lux @@ -29,7 +29,7 @@ (def: signatures Test (do {! random.monad} - [size (:: ! map (n.% 100) random.nat)] + [size (\ ! map (n.% 100) random.nat)] ($_ _.and (_.with-cover [/.equivalence] ($equivalence.spec (/.equivalence n.equivalence) (random.row size random.nat))) @@ -48,7 +48,7 @@ (def: whole Test (do {! random.monad} - [size (:: ! map (n.% 100) random.nat) + [size (\ ! map (n.% 100) random.nat) sample (random.set n.hash size random.nat) #let [sample (|> sample set.to-list /.from-list)] #let [(^open "/\.") (/.equivalence n.equivalence)]] @@ -81,10 +81,10 @@ (def: index-based Test (do {! random.monad} - [size (:: ! map (|>> (n.% 100) inc) random.nat)] + [size (\ ! map (|>> (n.% 100) inc) random.nat)] ($_ _.and (do ! - [good-index (|> random.nat (:: ! map (n.% size))) + [good-index (|> random.nat (\ ! map (n.% size))) #let [bad-index (n.+ size good-index)] sample (random.set n.hash size random.nat) non-member (random.filter (|>> (set.member? sample) not) @@ -134,7 +134,7 @@ (<| (_.covering /._) (_.with-cover [/.Row]) (do {! random.monad} - [size (:: ! map (|>> (n.% 100) inc) random.nat)] + [size (\ ! map (|>> (n.% 100) inc) random.nat)] ($_ _.and ..signatures ..whole diff --git a/stdlib/source/test/lux/data/collection/sequence.lux b/stdlib/source/test/lux/data/collection/sequence.lux index e255fd5f5..7ffadccad 100644 --- a/stdlib/source/test/lux/data/collection/sequence.lux +++ b/stdlib/source/test/lux/data/collection/sequence.lux @@ -27,9 +27,9 @@ (All [a] (-> (Equivalence a) (Equivalence (/.Sequence a)))) (def: (= reference subject) - (:: (list.equivalence super) = - (/.take 100 reference) - (/.take 100 subject)))) + (\ (list.equivalence super) = + (/.take 100 reference) + (/.take 100 subject)))) (def: #export test Test @@ -38,9 +38,9 @@ (let [(^open "list\.") (list.equivalence n.equivalence)]) (do {! random.monad} [repeated random.nat - index (:: ! map (n.% 100) random.nat) - size (:: ! map (|>> (n.% 10) inc) random.nat) - offset (:: ! map (n.% 100) random.nat) + index (\ ! map (n.% 100) random.nat) + size (\ ! map (|>> (n.% 10) inc) random.nat) + offset (\ ! map (n.% 100) random.nat) cycle-start random.nat cycle-next (random.list size random.nat)] ($_ _.and diff --git a/stdlib/source/test/lux/data/collection/set.lux b/stdlib/source/test/lux/data/collection/set.lux index 83cfe60fb..147fe6beb 100644 --- a/stdlib/source/test/lux/data/collection/set.lux +++ b/stdlib/source/test/lux/data/collection/set.lux @@ -21,8 +21,8 @@ (def: gen-nat (Random Nat) - (:: random.monad map (n.% 100) - random.nat)) + (\ random.monad map (n.% 100) + random.nat)) (def: #export test Test @@ -47,14 +47,14 @@ (_.cover [/.new] (/.empty? (/.new n.hash))) (do ! - [hash (:: ! map (function (_ constant) - (: (Hash Nat) - (structure - (def: &equivalence n.equivalence) - - (def: (hash _) - constant)))) - random.nat)] + [hash (\ ! map (function (_ constant) + (: (Hash Nat) + (structure + (def: &equivalence n.equivalence) + + (def: (hash _) + constant)))) + random.nat)] (_.cover [/.member-hash] (is? hash (/.member-hash (/.new hash))))) (_.cover [/.size] diff --git a/stdlib/source/test/lux/data/collection/set/multi.lux b/stdlib/source/test/lux/data/collection/set/multi.lux index 8e376ba17..e49c325ba 100644 --- a/stdlib/source/test/lux/data/collection/set/multi.lux +++ b/stdlib/source/test/lux/data/collection/set/multi.lux @@ -22,7 +22,7 @@ (def: count (Random Nat) - (:: random.monad map (|>> (n.% 10) inc) random.nat)) + (\ random.monad map (|>> (n.% 10) inc) random.nat)) (def: #export (random size hash count element) (All [a] (-> Nat (Hash a) (Random Nat) (Random a) (Random (/.Set a)))) @@ -40,12 +40,12 @@ (<| (_.covering /._) (_.with-cover [/.Set]) (do {! random.monad} - [diversity (:: ! map (n.% 10) random.nat) + [diversity (\ ! map (n.% 10) random.nat) sample (..random diversity n.hash ..count random.nat) non-member (random.filter (predicate.complement (set.member? (/.support sample))) random.nat) addition-count ..count - partial-removal-count (:: ! map (n.% addition-count) random.nat) + partial-removal-count (\ ! map (n.% addition-count) random.nat) another (..random diversity n.hash ..count random.nat)] (`` ($_ _.and (_.with-cover [/.equivalence] @@ -55,7 +55,7 @@ (|> sample /.to-list (/.from-list n.hash) - (:: /.equivalence = sample))) + (\ /.equivalence = sample))) (_.cover [/.size] (n.= (list.size (/.to-list sample)) (/.size sample))) @@ -89,7 +89,7 @@ (let [null-scenario! (|> sample (/.add 0 non-member) - (:: /.equivalence = sample)) + (\ /.equivalence = sample)) normal-scenario! (let [sample+ (/.add addition-count non-member sample)] @@ -100,12 +100,12 @@ normal-scenario!))) (_.cover [/.remove] (let [null-scenario! - (:: /.equivalence = - (|> sample - (/.add addition-count non-member)) - (|> sample - (/.add addition-count non-member) - (/.remove 0 non-member))) + (\ /.equivalence = + (|> sample + (/.add addition-count non-member)) + (|> sample + (/.add addition-count non-member) + (/.remove 0 non-member))) partial-scenario! (let [sample* (|> sample @@ -120,7 +120,7 @@ (|> sample (/.add addition-count non-member) (/.remove addition-count non-member) - (:: /.equivalence = sample))] + (\ /.equivalence = sample))] (and null-scenario! partial-scenario! total-scenario!))) @@ -132,12 +132,12 @@ (let [unary (|> sample /.support /.from-set)] (and (/.sub? sample unary) (or (not (/.sub? unary sample)) - (:: /.equivalence = sample unary))))) + (\ /.equivalence = sample unary))))) (_.cover [/.super?] (let [unary (|> sample /.support /.from-set)] (and (/.super? unary sample) (or (not (/.super? sample unary)) - (:: /.equivalence = sample unary))))) + (\ /.equivalence = sample unary))))) (~~ (template [<name> <composition>] [(_.cover [<name>] (let [|sample| (/.support sample) diff --git a/stdlib/source/test/lux/data/collection/set/ordered.lux b/stdlib/source/test/lux/data/collection/set/ordered.lux index 1734d80c4..eaa8bab4b 100644 --- a/stdlib/source/test/lux/data/collection/set/ordered.lux +++ b/stdlib/source/test/lux/data/collection/set/ordered.lux @@ -21,7 +21,7 @@ (def: size (random.Random Nat) - (:: random.monad map (n.% 100) random.nat)) + (\ random.monad map (n.% 100) random.nat)) (def: #export (random size &order gen-value) (All [a] (-> Nat (Order a) (Random a) (Random (Set a)))) @@ -47,7 +47,7 @@ non-memberL (random.filter (|>> (//.member? usetL) not) random.nat) #let [listL (//.to-list usetL)] - listR (|> (random.set n.hash sizeR random.nat) (:: ! map //.to-list)) + listR (|> (random.set n.hash sizeR random.nat) (\ ! map //.to-list)) #let [(^open "/\.") /.equivalence setL (/.from-list n.order listL) setR (/.from-list n.order listR) @@ -64,9 +64,9 @@ (_.cover [/.new] (/.empty? (/.new n.order))) (_.cover [/.to-list] - (:: (list.equivalence n.equivalence) = - (/.to-list (/.from-list n.order listL)) - (list.sort (:: n.order <) listL))) + (\ (list.equivalence n.equivalence) = + (/.to-list (/.from-list n.order listL)) + (list.sort (\ n.order <) listL))) (_.cover [/.from-list] (|> setL /.to-list (/.from-list n.order) @@ -101,7 +101,7 @@ (|> setL (/.add non-memberL) (/.remove non-memberL) - (:: /.equivalence = setL))) + (\ /.equivalence = setL))) (_.cover [/.sub?] (let [self! (/.sub? setL setL) @@ -126,23 +126,23 @@ (~~ (template [<coverage> <relation> <empty?>] [(_.cover [<coverage>] (let [self! - (:: /.equivalence = - setL - (<coverage> setL setL)) + (\ /.equivalence = + setL + (<coverage> setL setL)) super! (and (<relation> (<coverage> setL setR) setL) (<relation> (<coverage> setL setR) setR)) empty! - (:: /.equivalence = - (if <empty?> empty setL) - (<coverage> setL empty)) + (\ /.equivalence = + (if <empty?> empty setL) + (<coverage> setL empty)) idempotence! - (:: /.equivalence = - (<coverage> setL (<coverage> setL setR)) - (<coverage> setR (<coverage> setL setR)))] + (\ /.equivalence = + (<coverage> setL (<coverage> setL setR)) + (<coverage> setR (<coverage> setL setR)))] (and self! super! empty! @@ -155,21 +155,21 @@ (let [self! (|> setL (/.difference setL) - (:: /.equivalence = empty)) + (\ /.equivalence = empty)) empty! (|> setL (/.difference empty) - (:: /.equivalence = setL)) + (\ /.equivalence = setL)) difference! (not (list.any? (/.member? (/.difference setL setR)) (/.to-list setL))) idempotence! - (:: /.equivalence = - (/.difference setL setR) - (/.difference setL (/.difference setL setR)))] + (\ /.equivalence = + (/.difference setL setR) + (/.difference setL (/.difference setL setR)))] (and self! empty! difference! diff --git a/stdlib/source/test/lux/data/collection/stack.lux b/stdlib/source/test/lux/data/collection/stack.lux index bc2082846..6cc4c5b10 100644 --- a/stdlib/source/test/lux/data/collection/stack.lux +++ b/stdlib/source/test/lux/data/collection/stack.lux @@ -26,7 +26,7 @@ (<| (_.covering /._) (_.with-cover [/.Stack]) (do random.monad - [size (:: random.monad map (n.% 100) random.nat) + [size (\ random.monad map (n.% 100) random.nat) sample (random.stack size random.nat) expected-top random.nat] ($_ _.and @@ -55,9 +55,9 @@ (/.empty? sample) (#.Some [top remaining]) - (:: (/.equivalence n.equivalence) = - sample - (/.push top remaining)))) + (\ (/.equivalence n.equivalence) = + sample + (/.push top remaining)))) (_.cover [/.push] (case (/.pop (/.push expected-top sample)) (#.Some [actual-top actual-sample]) diff --git a/stdlib/source/test/lux/data/collection/tree.lux b/stdlib/source/test/lux/data/collection/tree.lux index 9224e5654..ad5766525 100644 --- a/stdlib/source/test/lux/data/collection/tree.lux +++ b/stdlib/source/test/lux/data/collection/tree.lux @@ -23,7 +23,7 @@ (All [a] (-> (Random a) (Random [Nat (Tree a)]))) (do {! random.monad} [value gen-value - num-children (:: ! map (n.% 2) random.nat) + num-children (\ ! map (n.% 2) random.nat) children (random.list num-children (tree gen-value))] (wrap [(|> children (list\map product.left) @@ -38,7 +38,7 @@ ($_ _.and (_.with-cover [/.equivalence] (|> (..tree random.nat) - (:: random.monad map product.right) + (\ random.monad map product.right) ($equivalence.spec (/.equivalence n.equivalence)))) (_.with-cover [/.fold] ($fold.spec /.leaf /.equivalence /.fold)) @@ -53,17 +53,17 @@ (do random.monad [expected random.nat] (_.cover [/.leaf] - (:: (list.equivalence n.equivalence) = - (list expected) - (/.flatten (/.leaf expected))))) + (\ (list.equivalence n.equivalence) = + (list expected) + (/.flatten (/.leaf expected))))) (do {! random.monad} [value random.nat - num-children (:: ! map (n.% 3) random.nat) + num-children (\ ! map (n.% 3) random.nat) children (random.list num-children random.nat)] (_.cover [/.branch] - (:: (list.equivalence n.equivalence) = - (list& value children) - (/.flatten (/.branch value (list\map /.leaf children)))))) + (\ (list.equivalence n.equivalence) = + (list& value children) + (/.flatten (/.branch value (list\map /.leaf children)))))) (do random.monad [expected/0 random.nat expected/1 random.nat @@ -72,20 +72,20 @@ expected/4 random.nat expected/5 random.nat] (_.cover [/.tree] - (and (:: (list.equivalence n.equivalence) = - (list expected/0) - (/.flatten (/.tree expected/0))) - (:: (list.equivalence n.equivalence) = - (list expected/0 expected/1 expected/2) - (/.flatten (/.tree expected/0 - {expected/1 {} - expected/2 {}}))) - (:: (list.equivalence n.equivalence) = - (list expected/0 expected/1 expected/2 - expected/3 expected/4 expected/5) - (/.flatten (/.tree expected/0 - {expected/1 {} - expected/2 {expected/3 {} - expected/4 {expected/5 {}}}}))) + (and (\ (list.equivalence n.equivalence) = + (list expected/0) + (/.flatten (/.tree expected/0))) + (\ (list.equivalence n.equivalence) = + (list expected/0 expected/1 expected/2) + (/.flatten (/.tree expected/0 + {expected/1 {} + expected/2 {}}))) + (\ (list.equivalence n.equivalence) = + (list expected/0 expected/1 expected/2 + expected/3 expected/4 expected/5) + (/.flatten (/.tree expected/0 + {expected/1 {} + expected/2 {expected/3 {} + expected/4 {expected/5 {}}}}))) ))) ))) diff --git a/stdlib/source/test/lux/data/collection/tree/finger.lux b/stdlib/source/test/lux/data/collection/tree/finger.lux index 7c93fb0c1..d5f4dba52 100644 --- a/stdlib/source/test/lux/data/collection/tree/finger.lux +++ b/stdlib/source/test/lux/data/collection/tree/finger.lux @@ -39,21 +39,21 @@ true)) (_.cover [/.tag] (and (text\= tag-left - (/.tag (:: ..builder leaf tag-left expected-left))) + (/.tag (\ ..builder leaf tag-left expected-left))) (text\= (text\compose tag-left tag-right) - (/.tag (:: ..builder branch - (:: ..builder leaf tag-left expected-left) - (:: ..builder leaf tag-right expected-right)))))) + (/.tag (\ ..builder branch + (\ ..builder leaf tag-left expected-left) + (\ ..builder leaf tag-right expected-right)))))) (_.cover [/.root] - (and (case (/.root (:: ..builder leaf tag-left expected-left)) + (and (case (/.root (\ ..builder leaf tag-left expected-left)) (#.Left actual) (n.= expected-left actual) (#.Right _) false) - (case (/.root (:: ..builder branch - (:: ..builder leaf tag-left expected-left) - (:: ..builder leaf tag-right expected-right))) + (case (/.root (\ ..builder branch + (\ ..builder leaf tag-left expected-left) + (\ ..builder leaf tag-right expected-right))) (#.Left _) false @@ -68,37 +68,37 @@ false)))) (_.cover [/.value] (and (n.= expected-left - (/.value (:: ..builder leaf tag-left expected-left))) + (/.value (\ ..builder leaf tag-left expected-left))) (n.= expected-left - (/.value (:: ..builder branch - (:: ..builder leaf tag-left expected-left) - (:: ..builder leaf tag-right expected-right)))))) + (/.value (\ ..builder branch + (\ ..builder leaf tag-left expected-left) + (\ ..builder leaf tag-right expected-right)))))) (_.cover [/.search] (let [can-find-correct-one! - (|> (:: ..builder leaf tag-left expected-left) + (|> (\ ..builder leaf tag-left expected-left) (/.search (text.contains? tag-left)) (maybe\map (n.= expected-left)) (maybe.default false)) cannot-find-incorrect-one! - (|> (:: ..builder leaf tag-right expected-right) + (|> (\ ..builder leaf tag-right expected-right) (/.search (text.contains? tag-left)) (maybe\map (n.= expected-left)) (maybe.default false) not) can-find-left! - (|> (:: ..builder branch - (:: ..builder leaf tag-left expected-left) - (:: ..builder leaf tag-right expected-right)) + (|> (\ ..builder branch + (\ ..builder leaf tag-left expected-left) + (\ ..builder leaf tag-right expected-right)) (/.search (text.contains? tag-left)) (maybe\map (n.= expected-left)) (maybe.default false)) can-find-right! - (|> (:: ..builder branch - (:: ..builder leaf tag-left expected-left) - (:: ..builder leaf tag-right expected-right)) + (|> (\ ..builder branch + (\ ..builder leaf tag-left expected-left) + (\ ..builder leaf tag-right expected-right)) (/.search (text.contains? tag-right)) (maybe\map (n.= expected-right)) (maybe.default false))] @@ -109,23 +109,23 @@ (_.cover [/.found?] (let [can-find-correct-one! (/.found? (text.contains? tag-left) - (:: ..builder leaf tag-left expected-left)) + (\ ..builder leaf tag-left expected-left)) cannot-find-incorrect-one! (not (/.found? (text.contains? tag-left) - (:: ..builder leaf tag-right expected-right))) + (\ ..builder leaf tag-right expected-right))) can-find-left! (/.found? (text.contains? tag-left) - (:: ..builder branch - (:: ..builder leaf tag-left expected-left) - (:: ..builder leaf tag-right expected-right))) + (\ ..builder branch + (\ ..builder leaf tag-left expected-left) + (\ ..builder leaf tag-right expected-right))) can-find-right! (/.found? (text.contains? tag-right) - (:: ..builder branch - (:: ..builder leaf tag-left expected-left) - (:: ..builder leaf tag-right expected-right)))] + (\ ..builder branch + (\ ..builder leaf tag-left expected-left) + (\ ..builder leaf tag-right expected-right)))] (and can-find-correct-one! cannot-find-incorrect-one! can-find-left! diff --git a/stdlib/source/test/lux/data/collection/tree/zipper.lux b/stdlib/source/test/lux/data/collection/tree/zipper.lux index f934879ee..b32ddecc2 100644 --- a/stdlib/source/test/lux/data/collection/tree/zipper.lux +++ b/stdlib/source/test/lux/data/collection/tree/zipper.lux @@ -163,7 +163,7 @@ (^open "list\.") (list.equivalence n.equivalence)]] ($_ _.and (_.with-cover [/.equivalence] - ($equivalence.spec (/.equivalence n.equivalence) (:: ! map (|>> product.right /.zip) (//.tree random.nat)))) + ($equivalence.spec (/.equivalence n.equivalence) (\ ! map (|>> product.right /.zip) (//.tree random.nat)))) (_.with-cover [/.functor] ($functor.spec (|>> tree.leaf /.zip) /.equivalence /.functor)) (_.with-cover [/.comonad] diff --git a/stdlib/source/test/lux/data/color.lux b/stdlib/source/test/lux/data/color.lux index 77b3652a1..3b84f1b68 100644 --- a/stdlib/source/test/lux/data/color.lux +++ b/stdlib/source/test/lux/data/color.lux @@ -25,7 +25,7 @@ (def: #export color (Random Color) (|> ($_ random.and random.nat random.nat random.nat) - (:: random.monad map /.from-rgb))) + (\ random.monad map /.from-rgb))) (def: scale (-> Nat Frac) @@ -67,7 +67,7 @@ ($_ _.and (_.cover [/.RGB /.to-rgb /.from-rgb] (|> expected /.to-rgb /.from-rgb - (:: /.equivalence = expected))) + (\ /.equivalence = expected))) (_.cover [/.HSL /.to-hsl /.from-hsl] (|> expected /.to-hsl /.from-hsl (distance/3 expected) @@ -125,16 +125,16 @@ Test (_.with-cover [/.Spread /.Palette] (do {! random.monad} - [eH (:: ! map (|>> f.abs (f.% +0.9) (f.+ +0.05)) - random.safe-frac) + [eH (\ ! map (|>> f.abs (f.% +0.9) (f.+ +0.05)) + random.safe-frac) #let [eS +0.5] - variations (:: ! map (|>> (n.% 3) (n.+ 2)) random.nat) + variations (\ ! map (|>> (n.% 3) (n.+ 2)) random.nat) #let [max-spread (f./ (|> variations inc .int int.frac) +1.0) min-spread (f./ +2.0 max-spread) spread-space (f.- min-spread max-spread)] - spread (:: ! map (|>> f.abs (f.% spread-space) (f.+ min-spread)) - random.safe-frac)] + spread (\ ! map (|>> f.abs (f.% spread-space) (f.+ min-spread)) + random.safe-frac)] (`` ($_ _.and (~~ (template [<brightness> <palette>] [(_.cover [<palette>] @@ -142,7 +142,7 @@ expected (/.from-hsb [eH eS eB]) palette (<palette> spread variations expected)] (and (n.= variations (list.size palette)) - (not (list.any? (:: /.equivalence = expected) palette)))))] + (not (list.any? (\ /.equivalence = expected) palette)))))] [+1.0 /.analogous] [+0.5 /.monochromatic] )) @@ -150,9 +150,9 @@ [(_.cover [<palette>] (let [expected (/.from-hsb [eH eS +0.5]) [c0 c1 c2] (<palette> expected)] - (and (:: /.equivalence = expected c0) - (not (:: /.equivalence = expected c1)) - (not (:: /.equivalence = expected c2)))))] + (and (\ /.equivalence = expected c0) + (not (\ /.equivalence = expected c1)) + (not (\ /.equivalence = expected c2)))))] [/.triad] [/.clash] @@ -161,10 +161,10 @@ [(_.cover [<palette>] (let [expected (/.from-hsb [eH eS +0.5]) [c0 c1 c2 c3] (<palette> expected)] - (and (:: /.equivalence = expected c0) - (not (:: /.equivalence = expected c1)) - (not (:: /.equivalence = expected c2)) - (not (:: /.equivalence = expected c3)))))] + (and (\ /.equivalence = expected c0) + (not (\ /.equivalence = expected c1)) + (not (\ /.equivalence = expected c2)) + (not (\ /.equivalence = expected c3)))))] [/.square] [/.tetradic])) @@ -191,8 +191,8 @@ (and (not (/\= expected ~expected)) (/\= expected (/.complement ~expected))))) (_.cover [/.black /.white] - (and (:: /.equivalence = /.white (/.complement /.black)) - (:: /.equivalence = /.black (/.complement /.white)))) + (and (\ /.equivalence = /.white (/.complement /.black)) + (\ /.equivalence = /.black (/.complement /.white)))) ..transformation ..palette (_.with-cover [/.Alpha /.Pigment] diff --git a/stdlib/source/test/lux/data/color/named.lux b/stdlib/source/test/lux/data/color/named.lux index 609c847cf..fce2e0d90 100644 --- a/stdlib/source/test/lux/data/color/named.lux +++ b/stdlib/source/test/lux/data/color/named.lux @@ -233,8 +233,8 @@ <colors>)) (_.cover [/.aqua] - (:: //.equivalence = /.cyan /.aqua)) + (\ //.equivalence = /.cyan /.aqua)) (_.cover [/.fuchsia] - (:: //.equivalence = /.magenta /.fuchsia)) + (\ //.equivalence = /.magenta /.fuchsia)) )))) ) diff --git a/stdlib/source/test/lux/data/format/binary.lux b/stdlib/source/test/lux/data/format/binary.lux index 9b00113f0..5c819299f 100644 --- a/stdlib/source/test/lux/data/format/binary.lux +++ b/stdlib/source/test/lux/data/format/binary.lux @@ -23,7 +23,7 @@ (def: random (Random /.Specification) - (:: random.monad map /.nat random.nat)) + (\ random.monad map /.nat random.nat)) (def: #export test Test diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux index 22834745d..ebfc6a4d5 100644 --- a/stdlib/source/test/lux/data/format/json.lux +++ b/stdlib/source/test/lux/data/format/json.lux @@ -36,9 +36,9 @@ (random.rec (function (_ recur) (do {! random.monad} - [size (:: ! map (n.% 2) random.nat)] + [size (\ ! map (n.% 2) random.nat)] ($_ random.or - (:: ! wrap []) + (\ ! wrap []) random.bit random.safe-frac (random.unicode size) @@ -74,17 +74,17 @@ (do random.monad [sample ..json] (_.cover [/.Null /.null?] - (:: bit.equivalence = - (/.null? sample) - (case sample - #/.Null true - _ false)))) + (\ bit.equivalence = + (/.null? sample) + (case sample + #/.Null true + _ false)))) (do random.monad [expected ..json] (_.cover [/.format] (|> expected /.format - (:: /.codec decode) + (\ /.codec decode) (try\map (\= expected)) (try.default false)))) (do random.monad @@ -97,9 +97,9 @@ (_.cover [/.object /.fields] (case (/.fields object) (#try.Success actual) - (:: (list.equivalence text.equivalence) = - (list\map product.left expected) - actual) + (\ (list.equivalence text.equivalence) = + (list\map product.left expected) + actual) (#try.Failure error) false)) @@ -112,7 +112,7 @@ )) (do random.monad [key (random.ascii/alpha 1) - unknown (random.filter (|>> (:: text.equivalence = key) not) + unknown (random.filter (|>> (\ text.equivalence = key) not) (random.ascii/alpha 1)) expected random.safe-frac] (_.cover [/.set] @@ -141,7 +141,7 @@ (_.cover [<type> <get>] (|> (/.object (list [key (<tag> value)])) (<get> key) - (try\map (:: <equivalence> = value)) + (try\map (\ <equivalence> = value)) (try.default false))))] [/.Boolean /.get-boolean #/.Boolean random.bit bit.equivalence] diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux index 9c83040fa..374c068a8 100644 --- a/stdlib/source/test/lux/data/format/tar.lux +++ b/stdlib/source/test/lux/data/format/tar.lux @@ -102,8 +102,8 @@ Test (_.with-cover [/.Small] (do {! random.monad} - [expected (|> random.nat (:: ! map (n.% /.small-limit))) - invalid (|> random.nat (:: ! map (n.max /.small-limit)))] + [expected (|> random.nat (\ ! map (n.% /.small-limit))) + invalid (|> random.nat (\ ! map (n.max /.small-limit)))] (`` ($_ _.and (_.cover [/.small /.from-small] (case (/.small expected) @@ -126,8 +126,8 @@ Test (_.with-cover [/.Big] (do {! random.monad} - [expected (|> random.nat (:: ! map (n.% /.big-limit))) - invalid (|> random.nat (:: ! map (n.max /.big-limit)))] + [expected (|> random.nat (\ ! map (n.% /.big-limit))) + invalid (|> random.nat (\ ! map (n.max /.big-limit)))] (`` ($_ _.and (_.cover [/.big /.from-big] (case (/.big expected) @@ -152,10 +152,10 @@ Test (do {! random.monad} [expected-path (random.ascii/lower-alpha (dec /.path-size)) - expected-moment (:: ! map (|>> (n.% 1,0,00,00,00,00,000) .int instant.from-millis) - random.nat) + expected-moment (\ ! map (|>> (n.% 1,0,00,00,00,00,000) .int instant.from-millis) + random.nat) chunk (random.ascii/lower-alpha chunk-size) - chunks (:: ! map (n.% 100) random.nat) + chunks (\ ! map (n.% 100) random.nat) #let [content (|> chunk (list.repeat chunks) (text.join-with "") @@ -394,7 +394,7 @@ (|> row.empty (format.run /.writer) (<b>.run /.parser) - (:: try.monad map row.empty?) + (\ try.monad map row.empty?) (try.default false))) ..path ..name diff --git a/stdlib/source/test/lux/data/format/xml.lux b/stdlib/source/test/lux/data/format/xml.lux index 9798625d5..7ac52ef02 100644 --- a/stdlib/source/test/lux/data/format/xml.lux +++ b/stdlib/source/test/lux/data/format/xml.lux @@ -36,7 +36,7 @@ (def: char (Random Nat) (do {! random.monad} - [idx (|> random.nat (:: ! map (n.% (text.size char-range))))] + [idx (|> random.nat (\ ! map (n.% (text.size char-range))))] (wrap (maybe.assume (text.nth idx char-range))))) (def: (size bottom top) diff --git a/stdlib/source/test/lux/data/lazy.lux b/stdlib/source/test/lux/data/lazy.lux index 440aa0316..dc305ae33 100644 --- a/stdlib/source/test/lux/data/lazy.lux +++ b/stdlib/source/test/lux/data/lazy.lux @@ -24,11 +24,11 @@ (def: comparison (Comparison Lazy) (function (_ ==) - (:: (/.equivalence ==) =))) + (\ (/.equivalence ==) =))) (def: #export lazy (All [a] (-> (Random a) (Random (Lazy a)))) - (:: random.functor map (|>> /.freeze))) + (\ random.functor map (|>> /.freeze))) (def: #export test Test diff --git a/stdlib/source/test/lux/data/maybe.lux b/stdlib/source/test/lux/data/maybe.lux index 139c63e4c..fa863cdae 100644 --- a/stdlib/source/test/lux/data/maybe.lux +++ b/stdlib/source/test/lux/data/maybe.lux @@ -71,7 +71,7 @@ (do random.monad [value random.nat] (_.cover [/.to-list] - (:: (list.equivalence n.equivalence) = - (list value) - (/.to-list (#.Some value))))) + (\ (list.equivalence n.equivalence) = + (list value) + (/.to-list (#.Some value))))) )))) diff --git a/stdlib/source/test/lux/data/name.lux b/stdlib/source/test/lux/data/name.lux index e3778202c..fd6f5b546 100644 --- a/stdlib/source/test/lux/data/name.lux +++ b/stdlib/source/test/lux/data/name.lux @@ -34,12 +34,12 @@ (<| (_.covering /._) (do {! random.monad} [## First Name - sizeM1 (|> random.nat (:: ! map (n.% 100))) - sizeS1 (|> random.nat (:: ! map (|>> (n.% 100) (n.max 1)))) + sizeM1 (|> random.nat (\ ! map (n.% 100))) + sizeS1 (|> random.nat (\ ! map (|>> (n.% 100) (n.max 1)))) (^@ name1 [module1 short1]) (..name sizeM1 sizeS1) ## Second Name - sizeM2 (|> random.nat (:: ! map (n.% 100))) - sizeS2 (|> random.nat (:: ! map (|>> (n.% 100) (n.max 1)))) + sizeM2 (|> random.nat (\ ! map (n.% 100))) + sizeS2 (|> random.nat (\ ! map (|>> (n.% 100) (n.max 1)))) (^@ name2 [module2 short2]) (..name sizeM2 sizeS2)] (_.with-cover [.Name] ($_ _.and diff --git a/stdlib/source/test/lux/data/number.lux b/stdlib/source/test/lux/data/number.lux index 9458bb12c..d1d812aa9 100644 --- a/stdlib/source/test/lux/data/number.lux +++ b/stdlib/source/test/lux/data/number.lux @@ -35,7 +35,7 @@ ($_ _.and (_.cover [/.bin] (`` (and (~~ (template [<=> <codec> <number>] - [(case (:: <codec> decode (..clean-commas <number>)) + [(case (\ <codec> decode (..clean-commas <number>)) (#try.Success actual) (<=> (/.bin <number>) actual) @@ -56,7 +56,7 @@ ))))) (_.cover [/.oct] (`` (and (~~ (template [<=> <codec> <number>] - [(case (:: <codec> decode (..clean-commas <number>)) + [(case (\ <codec> decode (..clean-commas <number>)) (#try.Success actual) (<=> (/.oct <number>) actual) @@ -77,7 +77,7 @@ ))))) (_.cover [/.hex] (`` (and (~~ (template [<=> <codec> <number>] - [(case (:: <codec> decode (..clean-commas <number>)) + [(case (\ <codec> decode (..clean-commas <number>)) (#try.Success actual) (<=> (/.hex <number>) actual) diff --git a/stdlib/source/test/lux/data/number/complex.lux b/stdlib/source/test/lux/data/number/complex.lux index 6b623388c..0a3866371 100644 --- a/stdlib/source/test/lux/data/number/complex.lux +++ b/stdlib/source/test/lux/data/number/complex.lux @@ -27,7 +27,7 @@ (def: dimension (Random Frac) (do {! random.monad} - [factor (|> random.nat (:: ! map (|>> (n.% 1000) (n.max 1)))) + [factor (|> random.nat (\ ! map (|>> (n.% 1000) (n.max 1)))) measure (|> random.safe-frac (random.filter (f.> +0.0)))] (wrap (f.* (|> factor .int int.frac) measure)))) @@ -41,10 +41,10 @@ (def: angle (Random /.Complex) - (:: random.monad map - (|>> (update@ #/.real (f.% +1.0)) - (update@ #/.imaginary (f.% +1.0))) - ..random)) + (\ random.monad map + (|>> (update@ #/.real (f.% +1.0)) + (update@ #/.imaginary (f.% +1.0))) + ..random)) (def: construction Test @@ -259,7 +259,7 @@ Test (do {! random.monad} [sample ..random - degree (|> random.nat (:: ! map (|>> (n.max 1) (n.% 5))))] + degree (|> random.nat (\ ! map (|>> (n.max 1) (n.% 5))))] (_.cover [/.roots] (|> sample (/.roots degree) diff --git a/stdlib/source/test/lux/data/number/frac.lux b/stdlib/source/test/lux/data/number/frac.lux index fcffb7c45..ca3d4d21c 100644 --- a/stdlib/source/test/lux/data/number/frac.lux +++ b/stdlib/source/test/lux/data/number/frac.lux @@ -23,7 +23,7 @@ (def: random (Random Frac) - (:: random.monad map (|>> (i.% +1,000,000) i.frac) random.int)) + (\ random.monad map (|>> (i.% +1,000,000) i.frac) random.int)) (def: signature Test @@ -73,7 +73,7 @@ Test (do {! random.monad} [sample ..random - shift (:: ! map /.abs ..random)] + shift (\ ! map /.abs ..random)] ($_ _.and (_.cover [/.negative?] (bit\= (/.negative? sample) @@ -98,16 +98,16 @@ Test ($_ _.and (do {! random.monad} - [expected (:: ! map (n.% 1,000,000) random.nat)] + [expected (\ ! map (n.% 1,000,000) random.nat)] (_.cover [/.nat] (|> expected n.frac /.nat (n.= expected)))) (do {! random.monad} - [expected (:: ! map (i.% +1,000,000) random.int)] + [expected (\ ! map (i.% +1,000,000) random.int)] (_.cover [/.int] (|> expected i.frac /.int (i.= expected)))) (do {! random.monad} - [expected (:: ! map (|>> (i64.left-shift 32) .rev) - random.nat)] + [expected (\ ! map (|>> (i64.left-shift 32) .rev) + random.nat)] (_.cover [/.rev] (|> expected r.frac /.rev (r.= expected)))) )) diff --git a/stdlib/source/test/lux/data/number/i16.lux b/stdlib/source/test/lux/data/number/i16.lux index edfadf62d..f3d8030c0 100644 --- a/stdlib/source/test/lux/data/number/i16.lux +++ b/stdlib/source/test/lux/data/number/i16.lux @@ -18,7 +18,7 @@ (def: #export i16 (Random /.I16) - (:: r.functor map /.i16 r.i64)) + (\ r.functor map /.i16 r.i64)) (def: mask Mask @@ -29,11 +29,11 @@ Test (<| (_.context (name.module (name-of /._))) (do {! r.monad} - [expected (:: ! map (|>> (//i64.and ..mask) (: I64)) r.i64)] + [expected (\ ! map (|>> (//i64.and ..mask) (: I64)) r.i64)] ($_ _.and ($equivalence.spec /.equivalence ..i16) (_.test "Can convert between I64 and I16" (let [actual (|> expected /.i16 /.i64)] - (:: //i64.equivalence = expected actual))) + (\ //i64.equivalence = expected actual))) )))) diff --git a/stdlib/source/test/lux/data/number/i32.lux b/stdlib/source/test/lux/data/number/i32.lux index f5d32ba21..1bf6bfee7 100644 --- a/stdlib/source/test/lux/data/number/i32.lux +++ b/stdlib/source/test/lux/data/number/i32.lux @@ -18,7 +18,7 @@ (def: #export i32 (Random /.I32) - (:: r.functor map /.i32 r.i64)) + (\ r.functor map /.i32 r.i64)) (def: mask Mask @@ -29,11 +29,11 @@ Test (<| (_.context (name.module (name-of /._))) (do {! r.monad} - [expected (:: ! map (|>> (//i64.and ..mask) (: I64)) r.i64)] + [expected (\ ! map (|>> (//i64.and ..mask) (: I64)) r.i64)] ($_ _.and ($equivalence.spec /.equivalence ..i32) (_.test "Can convert between I64 and I32" (let [actual (|> expected /.i32 /.i64)] - (:: //i64.equivalence = expected actual))) + (\ //i64.equivalence = expected actual))) )))) diff --git a/stdlib/source/test/lux/data/number/i64.lux b/stdlib/source/test/lux/data/number/i64.lux index 6834f6276..4d9b9f468 100644 --- a/stdlib/source/test/lux/data/number/i64.lux +++ b/stdlib/source/test/lux/data/number/i64.lux @@ -24,7 +24,7 @@ (<| (_.context (name.module (name-of /._))) (do {! r.monad} [pattern r.nat - idx (:: ! map (//nat.% /.width) r.nat)] + idx (\ ! map (//nat.% /.width) r.nat)] ($_ _.and ($equivalence.spec /.equivalence r.i64) ($monoid.spec //nat.equivalence /.disjunction r.nat) @@ -89,9 +89,9 @@ (i.>= +0 (/.arithmetic-right-shift idx value))))) (_.cover [/.mask] (let [mask (/.mask idx) - idempotent? (:: /.equivalence = - (/.and mask pattern) - (/.and mask (/.and mask pattern))) + idempotent? (\ /.equivalence = + (/.and mask pattern) + (/.and mask (/.and mask pattern))) limit (inc (.nat mask)) below-limit? (if (//nat.< limit pattern) diff --git a/stdlib/source/test/lux/data/number/i8.lux b/stdlib/source/test/lux/data/number/i8.lux index 53b196e41..88f456bca 100644 --- a/stdlib/source/test/lux/data/number/i8.lux +++ b/stdlib/source/test/lux/data/number/i8.lux @@ -18,7 +18,7 @@ (def: #export i8 (Random /.I8) - (:: r.functor map /.i8 r.i64)) + (\ r.functor map /.i8 r.i64)) (def: mask Mask @@ -29,11 +29,11 @@ Test (<| (_.context (name.module (name-of /._))) (do {! r.monad} - [expected (:: ! map (|>> (//i64.and ..mask) (: I64)) r.i64)] + [expected (\ ! map (|>> (//i64.and ..mask) (: I64)) r.i64)] ($_ _.and ($equivalence.spec /.equivalence ..i8) (_.test "Can convert between I64 and I8" (let [actual (|> expected /.i8 /.i64)] - (:: //i64.equivalence = expected actual))) + (\ //i64.equivalence = expected actual))) )))) diff --git a/stdlib/source/test/lux/data/number/ratio.lux b/stdlib/source/test/lux/data/number/ratio.lux index a774b5e81..38a3ab9f3 100644 --- a/stdlib/source/test/lux/data/number/ratio.lux +++ b/stdlib/source/test/lux/data/number/ratio.lux @@ -20,7 +20,7 @@ (def: part (Random Nat) - (|> r.nat (:: r.monad map (|>> (n.% 1,000,000) (n.max 1))))) + (|> r.nat (\ r.monad map (|>> (n.% 1,000,000) (n.max 1))))) (def: #export ratio (Random Ratio) diff --git a/stdlib/source/test/lux/data/sum.lux b/stdlib/source/test/lux/data/sum.lux index 3ae126887..7484eac15 100644 --- a/stdlib/source/test/lux/data/sum.lux +++ b/stdlib/source/test/lux/data/sum.lux @@ -60,27 +60,27 @@ (/.each (n.+ shift) (n.- shift)) (case> (0 #1 actual) (n.= (n.- shift expected) actual) _ false)))) (do ! - [size (:: ! map (n.% 5) random.nat) + [size (\ ! map (n.% 5) random.nat) expected (random.list size random.nat)] ($_ _.and (_.cover [/.lefts] (let [actual (: (List (| Nat Nat)) (list\map /.left expected))] - (and (:: (list.equivalence n.equivalence) = - expected - (/.lefts actual)) - (:: (list.equivalence n.equivalence) = - (list) - (/.rights actual))))) + (and (\ (list.equivalence n.equivalence) = + expected + (/.lefts actual)) + (\ (list.equivalence n.equivalence) = + (list) + (/.rights actual))))) (_.cover [/.rights] (let [actual (: (List (| Nat Nat)) (list\map /.right expected))] - (and (:: (list.equivalence n.equivalence) = - expected - (/.rights actual)) - (:: (list.equivalence n.equivalence) = - (list) - (/.lefts actual))))) + (and (\ (list.equivalence n.equivalence) = + expected + (/.rights actual)) + (\ (list.equivalence n.equivalence) = + (list) + (/.lefts actual))))) (_.cover [/.partition] (let [[lefts rights] (|> expected (list\map (function (_ value) @@ -89,11 +89,11 @@ (/.right value)))) (: (List (| Nat Nat))) /.partition)] - (and (:: (list.equivalence n.equivalence) = - (list.filter n.even? expected) - lefts) - (:: (list.equivalence n.equivalence) = - (list.filter (|>> n.even? not) expected) - rights)))) + (and (\ (list.equivalence n.equivalence) = + (list.filter n.even? expected) + lefts) + (\ (list.equivalence n.equivalence) = + (list.filter (|>> n.even? not) expected) + rights)))) )) ))) diff --git a/stdlib/source/test/lux/data/text.lux b/stdlib/source/test/lux/data/text.lux index 7849ee04a..ce645f46e 100644 --- a/stdlib/source/test/lux/data/text.lux +++ b/stdlib/source/test/lux/data/text.lux @@ -25,12 +25,12 @@ (def: bounded-size (random.Random Nat) (|> random.nat - (:: random.monad map (|>> (n.% 20) (n.+ 1))))) + (\ random.monad map (|>> (n.% 20) (n.+ 1))))) (def: size Test (do {! random.monad} - [size (:: ! map (n.% 10) random.nat) + [size (\ ! map (n.% 10) random.nat) sample (random.unicode size)] ($_ _.and (_.cover [/.size] @@ -43,11 +43,11 @@ Test (do {! random.monad} [inner (random.unicode 1) - outer (random.filter (|>> (:: /.equivalence = inner) not) + outer (random.filter (|>> (\ /.equivalence = inner) not) (random.unicode 1)) left (random.unicode 1) right (random.unicode 1) - #let [full (:: /.monoid compose inner outer) + #let [full (\ /.monoid compose inner outer) fake-index (.nat -1)]] (`` ($_ _.and (~~ (template [<affix> <predicate>] @@ -72,23 +72,23 @@ Test (do {! random.monad} [inner (random.unicode 1) - outer (random.filter (|>> (:: /.equivalence = inner) not) + outer (random.filter (|>> (\ /.equivalence = inner) not) (random.unicode 1)) #let [fake-index (.nat -1)]] ($_ _.and (_.cover [/.contains?] - (let [full (:: /.monoid compose inner outer)] + (let [full (\ /.monoid compose inner outer)] (and (/.contains? inner full) (/.contains? outer full)))) (_.cover [/.index-of] - (and (|> (/.index-of inner (:: /.monoid compose inner outer)) + (and (|> (/.index-of inner (\ /.monoid compose inner outer)) (maybe.default fake-index) (n.= 0)) - (|> (/.index-of outer (:: /.monoid compose inner outer)) + (|> (/.index-of outer (\ /.monoid compose inner outer)) (maybe.default fake-index) (n.= 1)))) (_.cover [/.index-of'] - (let [full (:: /.monoid compose inner outer)] + (let [full (\ /.monoid compose inner outer)] (and (|> (/.index-of' inner 0 full) (maybe.default fake-index) (n.= 0)) @@ -106,7 +106,7 @@ (maybe.default fake-index) (n.= fake-index))))) (_.cover [/.last-index-of] - (let [full ($_ (:: /.monoid compose) outer inner outer)] + (let [full ($_ (\ /.monoid compose) outer inner outer)] (and (|> (/.last-index-of inner full) (maybe.default fake-index) (n.= 1)) @@ -114,7 +114,7 @@ (maybe.default fake-index) (n.= 2))))) (_.cover [/.last-index-of'] - (let [full ($_ (:: /.monoid compose) outer inner outer)] + (let [full ($_ (\ /.monoid compose) outer inner outer)] (and (|> (/.last-index-of' inner 0 full) (maybe.default fake-index) (n.= 1)) @@ -140,7 +140,7 @@ (`` ($_ _.and (~~ (template [<short> <long>] [(_.cover [<short> <long>] - (:: /.equivalence = <short> <long>))] + (\ /.equivalence = <short> <long>))] [/.\0 /.null] [/.\a /.alarm] @@ -152,13 +152,13 @@ [/.\r /.carriage-return] [/.\'' /.double-quote])) (_.cover [/.line-feed] - (:: /.equivalence = /.new-line /.line-feed)) + (\ /.equivalence = /.new-line /.line-feed)) ))) (do {! random.monad} - [size (:: ! map (|>> (n.% 10) inc) random.nat) + [size (\ ! map (|>> (n.% 10) inc) random.nat) characters (random.set /.hash size (random.ascii/alpha 1)) #let [sample (|> characters set.to-list /.concat)] - expected (:: ! map (n.% size) random.nat)] + expected (\ ! map (n.% size) random.nat)] (_.cover [/.nth] (case (/.nth expected sample) (#.Some char) @@ -187,13 +187,13 @@ (def: manipulation Test (do {! random.monad} - [size (:: ! map (|>> (n.% 10) (n.+ 2)) random.nat) + [size (\ ! map (|>> (n.% 10) (n.+ 2)) random.nat) characters (random.set /.hash size (random.ascii/alpha 1)) separator (random.filter (|>> (set.member? characters) not) (random.ascii/alpha 1)) #let [with-no-separator (|> characters set.to-list /.concat)] static (random.ascii/alpha 1) - #let [dynamic (random.filter (|>> (:: /.equivalence = static) not) + #let [dynamic (random.filter (|>> (\ /.equivalence = static) not) (random.ascii/alpha 1))] pre dynamic post dynamic] @@ -206,19 +206,19 @@ (/.join-with separator) (/.split-all-with separator) (set.from-list /.hash) - (:: set.equivalence = characters)) - (:: /.equivalence = - (/.concat (set.to-list characters)) - (/.join-with "" (set.to-list characters))))) + (\ set.equivalence = characters)) + (\ /.equivalence = + (/.concat (set.to-list characters)) + (/.join-with "" (set.to-list characters))))) (_.cover [/.replace-once] - (:: /.equivalence = - (:: /.monoid compose post static) - (/.replace-once pre post (:: /.monoid compose pre static)))) + (\ /.equivalence = + (\ /.monoid compose post static) + (/.replace-once pre post (\ /.monoid compose pre static)))) (_.cover [/.split-with] - (case (/.split-with static ($_ (:: /.monoid compose) pre static post)) + (case (/.split-with static ($_ (\ /.monoid compose) pre static post)) (#.Some [left right]) - (and (:: /.equivalence = pre left) - (:: /.equivalence = post right)) + (and (\ /.equivalence = pre left) + (\ /.equivalence = post right)) #.None false)) @@ -280,7 +280,7 @@ #let [## The wider unicode charset includes control characters that ## can make text replacement work improperly. ## Because of that, I restrict the charset. - normal-char-gen (|> random.nat (:: ! map (|>> (n.% 128) (n.max 1))))] + normal-char-gen (|> random.nat (\ ! map (|>> (n.% 128) (n.max 1))))] sep1 (random.text normal-char-gen 1) sep2 (random.text normal-char-gen 1) #let [part-gen (|> (random.text normal-char-gen sizeP) diff --git a/stdlib/source/test/lux/host.js.lux b/stdlib/source/test/lux/host.js.lux index 6e42fc363..f27b9554c 100644 --- a/stdlib/source/test/lux/host.js.lux +++ b/stdlib/source/test/lux/host.js.lux @@ -40,12 +40,12 @@ Test (do {! random.monad} [boolean random.bit - number (:: ! map (|>> (nat.% 100) nat.frac) random.nat) + number (\ ! map (|>> (nat.% 100) nat.frac) random.nat) string (random.ascii 5) - function (:: ! map (function (_ shift) - (: (-> Nat Nat) - (nat.+ shift))) - random.nat) + function (\ ! map (function (_ shift) + (: (-> Nat Nat) + (nat.+ shift))) + random.nat) ## I64s get compiled as JavaScript objects with a specific structure. object random.nat] (<| (_.covering /._) diff --git a/stdlib/source/test/lux/host.jvm.lux b/stdlib/source/test/lux/host.jvm.lux index bda13403b..3a55a232d 100644 --- a/stdlib/source/test/lux/host.jvm.lux +++ b/stdlib/source/test/lux/host.jvm.lux @@ -94,8 +94,8 @@ (def: miscellaneous Test (do {! r.monad} - [sample (:: ! map (|>> (:coerce java/lang/Object)) - (r.ascii 1))] + [sample (\ ! map (|>> (:coerce java/lang/Object)) + (r.ascii 1))] ($_ _.and (_.test "Can check if an object is of a certain class." (and (case (/.check java/lang/String sample) (#.Some _) true #.None false) @@ -125,9 +125,9 @@ (def: arrays Test (do {! r.monad} - [size (|> r.nat (:: ! map (|>> (n.% 100) (n.max 1)))) - idx (|> r.nat (:: ! map (n.% size))) - value (:: ! map (|>> (:coerce java/lang/Long)) r.int)] + [size (|> r.nat (\ ! map (|>> (n.% 100) (n.max 1)))) + idx (|> r.nat (\ ! map (n.% size))) + value (\ ! map (|>> (:coerce java/lang/Long)) r.int)] ($_ _.and (_.test "Can create arrays of some length." (n.= size (/.array-length (/.array java/lang/Long size)))) diff --git a/stdlib/source/test/lux/host.old.lux b/stdlib/source/test/lux/host.old.lux index fa0ad409e..179a8a3b7 100644 --- a/stdlib/source/test/lux/host.old.lux +++ b/stdlib/source/test/lux/host.old.lux @@ -121,8 +121,8 @@ (def: arrays Test (do {! r.monad} - [size (|> r.nat (:: ! map (|>> (n.% 100) (n.max 1)))) - idx (|> r.nat (:: ! map (n.% size))) + [size (|> r.nat (\ ! map (|>> (n.% 100) (n.max 1)))) + idx (|> r.nat (\ ! map (n.% size))) value r.int] ($_ _.and (_.test "Can create arrays of some length." diff --git a/stdlib/source/test/lux/locale/language.lux b/stdlib/source/test/lux/locale/language.lux index 9ffff2f1f..3ba8e7567 100644 --- a/stdlib/source/test/lux/locale/language.lux +++ b/stdlib/source/test/lux/locale/language.lux @@ -207,7 +207,7 @@ (template: (!aliases <reference> <aliases>) (_.cover <aliases> - (list.every? (:: /.equivalence = <reference>) + (list.every? (\ /.equivalence = <reference>) (`` (list (~~ (template.splice <aliases>))))))) (def: aliases-test diff --git a/stdlib/source/test/lux/locale/territory.lux b/stdlib/source/test/lux/locale/territory.lux index 12fa402af..485cd7efc 100644 --- a/stdlib/source/test/lux/locale/territory.lux +++ b/stdlib/source/test/lux/locale/territory.lux @@ -166,7 +166,7 @@ (template: (!aliases <reference> <aliases>) (_.cover <aliases> - (list.every? (:: /.equivalence = <reference>) + (list.every? (\ /.equivalence = <reference>) (`` (list (~~ (template.splice <aliases>))))))) (def: aliases-test diff --git a/stdlib/source/test/lux/macro/code.lux b/stdlib/source/test/lux/macro/code.lux index 96f653a11..8ba65a181 100644 --- a/stdlib/source/test/lux/macro/code.lux +++ b/stdlib/source/test/lux/macro/code.lux @@ -38,13 +38,13 @@ (def: (random-sequence random) (All [a] (-> (Random a) (Random (List a)))) (do {! random.monad} - [size (|> random.nat (:: ! map (n.% 3)))] + [size (|> random.nat (\ ! map (n.% 3)))] (random.list size random))) (def: (random-record random) (All [a] (-> (Random a) (Random (List [a a])))) (do {! random.monad} - [size (|> random.nat (:: ! map (n.% 3)))] + [size (|> random.nat (\ ! map (n.% 3)))] (random.list size (random.and random random)))) (def: #export random @@ -92,7 +92,7 @@ ($_ random.either (random\wrap [original substitute]) (do {! random.monad} - [sample (random.filter (|>> (:: /.equivalence = original) not) + [sample (random.filter (|>> (\ /.equivalence = original) not) ($_ random.either (random\map /.bit random.bit) (random\map /.nat random.nat) @@ -127,15 +127,15 @@ (_.cover [<coverage>] (and (case (..read (/.format (<coverage> expected))) (#try.Success actual) - (:: /.equivalence = - actual - (<coverage> expected)) + (\ /.equivalence = + actual + (<coverage> expected)) (#try.Failure error) false) - (:: /.equivalence = - [location.dummy (<tag> expected)] - (<coverage> expected)))))] + (\ /.equivalence = + [location.dummy (<tag> expected)] + (<coverage> expected)))))] [/.bit random.bit #.Bit] [/.nat random.nat #.Nat] @@ -154,15 +154,15 @@ (_.cover [<coverage>] (and (case (..read (/.format (<coverage> expected))) (#try.Success actual) - (:: /.equivalence = - actual - (<coverage> expected)) + (\ /.equivalence = + actual + (<coverage> expected)) (#try.Failure error) false) - (:: /.equivalence = - [location.dummy (<tag> ["" expected])] - (<coverage> expected))) + (\ /.equivalence = + [location.dummy (<tag> ["" expected])] + (<coverage> expected))) ))] [/.local-tag ..random-text #.Tag] @@ -172,7 +172,7 @@ [[original substitute] (random.and ..random ..random) [sample expected] (..replace-simulation [original substitute])] (_.cover [/.replace] - (:: /.equivalence = - expected - (/.replace original substitute sample)))) + (\ /.equivalence = + expected + (/.replace original substitute sample)))) ))) diff --git a/stdlib/source/test/lux/macro/poly/equivalence.lux b/stdlib/source/test/lux/macro/poly/equivalence.lux index fcc12c61b..16903ebc2 100644 --- a/stdlib/source/test/lux/macro/poly/equivalence.lux +++ b/stdlib/source/test/lux/macro/poly/equivalence.lux @@ -51,8 +51,8 @@ (def: gen-record (Random Record) (do {! random.monad} - [size (:: ! map (n.% 2) random.nat) - #let [gen-int (|> random.int (:: ! map (|>> i.abs (i.% +1,000,000))))]] + [size (\ ! map (n.% 2) random.nat) + #let [gen-int (|> random.int (\ ! map (|>> i.abs (i.% +1,000,000))))]] ($_ random.and random.bit gen-int diff --git a/stdlib/source/test/lux/macro/poly/json.lux b/stdlib/source/test/lux/macro/poly/json.lux index f052cdf0f..6988adb4a 100644 --- a/stdlib/source/test/lux/macro/poly/json.lux +++ b/stdlib/source/test/lux/macro/poly/json.lux @@ -85,12 +85,12 @@ (def: qty (All [unit] (Random (unit.Qty unit))) - (|> random.int (:: random.monad map unit.in))) + (|> random.int (\ random.monad map unit.in))) (def: gen-record (Random Record) (do {! random.monad} - [size (:: ! map (n.% 2) random.nat)] + [size (\ ! map (n.% 2) random.nat)] ($_ random.and random.bit random.safe-frac diff --git a/stdlib/source/test/lux/macro/syntax.lux b/stdlib/source/test/lux/macro/syntax.lux index 77ede35f3..90efa671f 100644 --- a/stdlib/source/test/lux/macro/syntax.lux +++ b/stdlib/source/test/lux/macro/syntax.lux @@ -46,7 +46,7 @@ (All [a] (-> (Equivalence a) a (Parser a) (List Code) Bit)) (case (p.run parser input) (#.Right [_ output]) - (:: Equivalence<a> = reference output) + (\ Equivalence<a> = reference output) _ #0)) diff --git a/stdlib/source/test/lux/macro/syntax/common.lux b/stdlib/source/test/lux/macro/syntax/common.lux index b470ca574..ab29448d7 100644 --- a/stdlib/source/test/lux/macro/syntax/common.lux +++ b/stdlib/source/test/lux/macro/syntax/common.lux @@ -45,7 +45,7 @@ (def: random-annotations (Random /.Annotations) (do {! random.monad} - [size (:: ! map (|>> (n.% 3)) random.nat)] + [size (\ ! map (|>> (n.% 3)) random.nat)] (random.list size (random.and random-name ///code.random)))) @@ -75,7 +75,7 @@ /writer.annotations list (<c>.run /reader.annotations) (case> (#try.Success actual) - (:: ..annotations-equivalence = expected actual) + (\ ..annotations-equivalence = expected actual) (#try.Failure error) false)))) @@ -84,25 +84,25 @@ /writer.annotations list (<c>.run /reader.annotations) (case> (#try.Success actual) - (:: ..annotations-equivalence = /.empty-annotations actual) + (\ ..annotations-equivalence = /.empty-annotations actual) (#try.Failure error) false))) )) (do {! random.monad} - [size (:: ! map (|>> (n.% 3)) random.nat) + [size (\ ! map (|>> (n.% 3)) random.nat) expected (random.list size ..random-text)] (_.cover [/.Type-Var /reader.type-variables /writer.type-variables] (|> expected /writer.type-variables (<c>.run /reader.type-variables) (case> (#try.Success actual) - (:: (list.equivalence text.equivalence) = expected actual) + (\ (list.equivalence text.equivalence) = expected actual) (#try.Failure error) false)))) (do {! random.monad} - [size (:: ! map (|>> (n.% 3)) random.nat) + [size (\ ! map (|>> (n.% 3)) random.nat) expected (: (Random /.Declaration) (random.and ..random-text (random.list size ..random-text)))] @@ -113,7 +113,7 @@ (case> (#try.Success actual) (let [equivalence (equivalence.product text.equivalence (list.equivalence text.equivalence))] - (:: equivalence = expected actual)) + (\ equivalence = expected actual)) (#try.Failure error) false)))) @@ -127,7 +127,7 @@ (<c>.run /reader.typed-input) (case> (#try.Success actual) (let [equivalence (equivalence.product code.equivalence code.equivalence)] - (:: equivalence = expected actual)) + (\ equivalence = expected actual)) (#try.Failure error) false)))) diff --git a/stdlib/source/test/lux/macro/template.lux b/stdlib/source/test/lux/macro/template.lux index 8dff75251..8fa6a00ca 100644 --- a/stdlib/source/test/lux/macro/template.lux +++ b/stdlib/source/test/lux/macro/template.lux @@ -26,9 +26,9 @@ <short>' "abc#0#12+3-4.5+6.7-8.9"] ($_ _.and (_.cover [/.splice] - (:: (list.equivalence nat.equivalence) = - (list left mid right) - (`` (list (~~ (/.splice [left mid right])))))) + (\ (list.equivalence nat.equivalence) = + (list left mid right) + (`` (list (~~ (/.splice [left mid right])))))) (_.cover [/.count] (case (/.count [left mid right]) 3 true diff --git a/stdlib/source/test/lux/math.lux b/stdlib/source/test/lux/math.lux index 2c34e8ed5..11f826ce4 100644 --- a/stdlib/source/test/lux/math.lux +++ b/stdlib/source/test/lux/math.lux @@ -36,7 +36,7 @@ ($_ _.and (<| (_.context "Trigonometry") (do {! r.monad} - [angle (|> r.safe-frac (:: ! map (f.* /.tau)))] + [angle (|> r.safe-frac (\ ! map (f.* /.tau)))] ($_ _.and (_.test "Sine and arc-sine are inverse functions." (trigonometric-symmetry /.sin /.asin angle)) @@ -47,7 +47,7 @@ ))) (<| (_.context "Rounding") (do {! r.monad} - [sample (|> r.safe-frac (:: ! map (f.* +1000.0)))] + [sample (|> r.safe-frac (\ ! map (f.* +1000.0)))] ($_ _.and (_.test "The ceiling will be an integer value, and will be >= the original." (let [ceil'd (/.ceil sample)] @@ -66,12 +66,12 @@ ))) (<| (_.context "Exponentials and logarithms") (do {! r.monad} - [sample (|> r.safe-frac (:: ! map (f.* +10.0)))] + [sample (|> r.safe-frac (\ ! map (f.* +10.0)))] (_.test "Logarithm is the inverse of exponential." (|> sample /.exp /.log (within? +0.000000000000001 sample))))) (<| (_.context "Greatest-Common-Divisor and Least-Common-Multiple") (do {! r.monad} - [#let [gen-nat (|> r.nat (:: ! map (|>> (n.% 1000) (n.max 1))))] + [#let [gen-nat (|> r.nat (\ ! map (|>> (n.% 1000) (n.max 1))))] x gen-nat y gen-nat] ($_ _.and diff --git a/stdlib/source/test/lux/math/logic/fuzzy.lux b/stdlib/source/test/lux/math/logic/fuzzy.lux index 56e03277a..731ee6865 100644 --- a/stdlib/source/test/lux/math/logic/fuzzy.lux +++ b/stdlib/source/test/lux/math/logic/fuzzy.lux @@ -145,7 +145,7 @@ Test (do {! random.monad} [#let [set-10 (set.from-list n.hash (enum.range n.enum 0 10))] - sample (|> random.nat (:: ! map (n.% 20)))] + sample (|> random.nat (\ ! map (n.% 20)))] ($_ _.and (_.test (%.name (name-of /.from-predicate)) (bit\= (r.= //.true (/.membership sample (/.from-predicate n.even?))) diff --git a/stdlib/source/test/lux/math/modular.lux b/stdlib/source/test/lux/math/modular.lux index 27cb63f68..283acdddd 100644 --- a/stdlib/source/test/lux/math/modular.lux +++ b/stdlib/source/test/lux/math/modular.lux @@ -21,12 +21,12 @@ (def: modulusR (r.Random Int) (|> r.int - (:: r.monad map (i.% +1000)) + (\ r.monad map (i.% +1000)) (r.filter (|>> (i.= +0) not)))) (def: valueR (r.Random Int) - (|> r.int (:: r.monad map (i.% +1000)))) + (|> r.int (\ r.monad map (i.% +1000)))) (def: (modR modulus) (All [m] (-> (/.Modulus m) (r.Random [Int (/.Mod m)]))) diff --git a/stdlib/source/test/lux/meta.lux b/stdlib/source/test/lux/meta.lux index 0f6b13629..25e3b3f94 100644 --- a/stdlib/source/test/lux/meta.lux +++ b/stdlib/source/test/lux/meta.lux @@ -63,12 +63,12 @@ #.host []}]] ($_ _.and (_.cover [/.run] - (|> (:: /.monad wrap expected) + (|> (\ /.monad wrap expected) (/.run expected-lux) (!expect (^multi (#try.Success actual) (n.= expected actual))))) (_.cover [/.run'] - (|> (:: /.monad wrap expected) + (|> (\ /.monad wrap expected) (/.run' expected-lux) (!expect (^multi (#try.Success [actual-lux actual]) (and (is? expected-lux actual-lux) @@ -125,7 +125,7 @@ (!expect (^multi (#try.Failure actual-error) (text\= expected-error actual-error)))))) (_.cover [/.either] - (and (|> (/.either (:: /.monad wrap expected) + (and (|> (/.either (\ /.monad wrap expected) (: (Meta Nat) (/.fail expected-error))) (/.run expected-lux) @@ -133,7 +133,7 @@ (n.= expected actual)))) (|> (/.either (: (Meta Nat) (/.fail expected-error)) - (:: /.monad wrap expected)) + (\ /.monad wrap expected)) (/.run expected-lux) (!expect (^multi (#try.Success actual) (n.= expected actual)))) @@ -144,8 +144,8 @@ (/.run expected-lux) (!expect (^multi (#try.Failure actual-error) (text\= expected-error actual-error)))) - (|> (/.either (:: /.monad wrap expected) - (:: /.monad wrap dummy)) + (|> (/.either (\ /.monad wrap expected) + (\ /.monad wrap dummy)) (/.run expected-lux) (!expect (^multi (#try.Success actual) (n.= expected actual)))))) @@ -210,7 +210,7 @@ (def: injection (Injection Meta) - (:: /.monad wrap)) + (\ /.monad wrap)) (def: (comparison init) (-> Lux (Comparison Meta)) @@ -232,9 +232,9 @@ version (random.ascii/upper-alpha 1) source-code (random.ascii/upper-alpha 1) expected-current-module (random.ascii/upper-alpha 1) - expected-type (:: ! map (function (_ name) - (#.Primitive name (list))) - (random.ascii/upper-alpha 1)) + expected-type (\ ! map (function (_ name) + (#.Primitive name (list))) + (random.ascii/upper-alpha 1)) expected-seed random.nat expected random.nat dummy (random.filter (|>> (n.= expected) not) random.nat) @@ -282,7 +282,7 @@ (n.= (inc expected-seed) actual-post)))))) (_.cover [/.gensym] (|> (/.gensym expected-gensym) - (:: /.monad map %.code) + (\ /.monad map %.code) (/.run expected-lux) (!expect (^multi (#try.Success actual-gensym) (and (text.contains? expected-gensym actual-gensym) diff --git a/stdlib/source/test/lux/meta/annotation.lux b/stdlib/source/test/lux/meta/annotation.lux index 8ed76090c..3b5b4d635 100644 --- a/stdlib/source/test/lux/meta/annotation.lux +++ b/stdlib/source/test/lux/meta/annotation.lux @@ -36,13 +36,13 @@ (def: (random-sequence random) (All [a] (-> (Random a) (Random (List a)))) (do {! random.monad} - [size (|> random.nat (:: ! map (nat.% 3)))] + [size (|> random.nat (\ ! map (nat.% 3)))] (random.list size random))) (def: (random-record random) (All [a] (-> (Random a) (Random (List [a a])))) (do {! random.monad} - [size (|> random.nat (:: ! map (nat.% 3)))] + [size (|> random.nat (\ ! map (nat.% 3)))] (random.list size (random.and random random)))) (template: (!expect <pattern> <value>) @@ -68,7 +68,7 @@ (..annotation key) (<definition> key) (!expect (^multi (#.Some actual) - (:: <equivalence> = expected actual))))))] + (\ <equivalence> = expected actual))))))] [/.bit random.bit code.bit bit.equivalence] [/.nat random.nat code.nat nat.equivalence] @@ -97,7 +97,7 @@ (and (|> expected code.bit (..annotation key) (/.flagged? key) - (:: bit.equivalence = expected)) + (\ bit.equivalence = expected)) (not (|> expected code.bit (..annotation dummy) (/.flagged? key)))))) @@ -108,7 +108,7 @@ (and (|> expected code.bit (..annotation (name-of <tag>)) <definition> - (:: bit.equivalence = expected)) + (\ bit.equivalence = expected)) (not (|> expected code.bit (..annotation key) <definition>)))))] @@ -131,11 +131,11 @@ (and (|> expected (list\map code.text) code.tuple (..annotation (name-of <tag>)) <definition> - (:: (list.equivalence text.equivalence) = expected)) + (\ (list.equivalence text.equivalence) = expected)) (|> expected (list\map code.text) code.tuple (..annotation key) <definition> - (:: (list.equivalence text.equivalence) = (list))))))] + (\ (list.equivalence text.equivalence) = (list))))))] [/.function-arguments #.func-args] [/.type-arguments #.type-args] @@ -167,12 +167,12 @@ (..annotation key) /.documentation (!expect (^multi (#.Some actual) - (:: text.equivalence = expected actual))))) + (\ text.equivalence = expected actual))))) (|> expected code.text (..annotation (name-of #.doc)) /.documentation (!expect (^multi (#.Some actual) - (:: text.equivalence = expected actual))))))) + (\ text.equivalence = expected actual))))))) ..flag ..arguments diff --git a/stdlib/source/test/lux/target/jvm.lux b/stdlib/source/test/lux/target/jvm.lux index be11f3f6e..cb3398720 100644 --- a/stdlib/source/test/lux/target/jvm.lux +++ b/stdlib/source/test/lux/target/jvm.lux @@ -165,7 +165,7 @@ (/.invokestatic ..$Byte "valueOf" (/type.method [(list /type.byte) ..$Byte (list)]))) (def: $Byte::random (Random java/lang/Byte) - (:: random.monad map (|>> (:coerce java/lang/Long) host.long-to-byte) random.int)) + (\ random.monad map (|>> (:coerce java/lang/Long) host.long-to-byte) random.int)) (def: $Byte::literal (-> java/lang/Byte (Bytecode Any)) (|>> host.byte-to-long (:coerce I64) i32.i32 /.int)) @@ -183,7 +183,7 @@ (/.invokestatic ..$Short "valueOf" (/type.method [(list /type.short) ..$Short (list)]))) (def: $Short::random (Random java/lang/Short) - (:: random.monad map (|>> (:coerce java/lang/Long) host.long-to-short) random.int)) + (\ random.monad map (|>> (:coerce java/lang/Long) host.long-to-short) random.int)) (def: $Short::literal (-> java/lang/Short (Bytecode Any)) (|>> host.short-to-long (:coerce I64) i32.i32 /.int)) @@ -201,7 +201,7 @@ (/.invokestatic ..$Integer "valueOf" (/type.method [(list /type.int) ..$Integer (list)]))) (def: $Integer::random (Random java/lang/Integer) - (:: random.monad map (|>> (:coerce java/lang/Long) host.long-to-int) random.int)) + (\ random.monad map (|>> (:coerce java/lang/Long) host.long-to-int) random.int)) (def: $Integer::literal (-> java/lang/Integer (Bytecode Any)) (|>> host.int-to-long (:coerce I64) i32.i32 /.int)) @@ -229,9 +229,9 @@ (def: $Float::wrap (/.invokestatic ..$Float "valueOf" (/type.method [(list /type.float) ..$Float (list)]))) (def: $Float::random (Random java/lang/Float) - (:: random.monad map - (|>> (:coerce java/lang/Double) host.double-to-float) - random.frac)) + (\ random.monad map + (|>> (:coerce java/lang/Double) host.double-to-float) + random.frac)) (def: $Float::literal /.float) (def: valid-float (Random java/lang/Float) @@ -269,7 +269,7 @@ (/.invokestatic ..$Character "valueOf" (/type.method [(list /type.char) ..$Character (list)]))) (def: $Character::random (Random java/lang/Character) - (:: random.monad map (|>> (:coerce java/lang/Long) host.long-to-int host.int-to-char) random.int)) + (\ random.monad map (|>> (:coerce java/lang/Long) host.long-to-int host.int-to-char) random.int)) (def: $Character::literal (-> java/lang/Character (Bytecode Any)) (|>> host.char-to-long (:coerce I64) i32.i32 /.int)) @@ -304,7 +304,7 @@ [(def: <name> Test (do {! random.monad} - [expected (:: ! map (i64.and (i64.mask <bits>)) random.nat)] + [expected (\ ! map (i64.and (i64.mask <bits>)) random.nat)] (<| (_.lift <message>) (..bytecode (for {@.old (|>> (:coerce <type>) <to-long> ("jvm leq" expected)) @@ -382,7 +382,7 @@ shift (: (-> (-> java/lang/Integer java/lang/Integer java/lang/Integer) (Bytecode Any) (Random Bit)) (function (_ reference instruction) (do {! random.monad} - [parameter (:: ! map (|>> (n.% 32) .int (:coerce java/lang/Long) host.long-to-int) random.nat) + [parameter (\ ! map (|>> (n.% 32) .int (:coerce java/lang/Long) host.long-to-int) random.nat) subject ..$Integer::random] (int (reference parameter subject) (do /.monad @@ -461,7 +461,7 @@ shift (: (-> (-> java/lang/Integer java/lang/Long java/lang/Long) (Bytecode Any) (Random Bit)) (function (_ reference instruction) (do {! random.monad} - [parameter (:: ! map (|>> (n.% 64) (:coerce java/lang/Long)) random.nat) + [parameter (\ ! map (|>> (n.% 64) (:coerce java/lang/Long)) random.nat) subject ..$Long::random] (long (reference (host.long-to-int parameter) subject) (do /.monad @@ -942,7 +942,7 @@ Test)) (function (_ constructor random literal [*store *load *wrap] test) (do {! random.monad} - [size (:: ! map (|>> (n.% 1024) (n.max 1)) random.nat) + [size (\ ! map (|>> (n.% 1024) (n.max 1)) random.nat) value random] ($_ _.and (<| (_.lift "length") @@ -1014,8 +1014,8 @@ (function (_ expected) (|>> (:coerce Text) (text\= (:coerce Text expected)))))) (<| (_.context "multi") (do {! random.monad} - [#let [size (:: ! map (|>> (n.% 5) (n.+ 1)) - random.nat)] + [#let [size (\ ! map (|>> (n.% 5) (n.+ 1)) + random.nat)] dimensions size sizesH size sizesT (random.list (dec dimensions) size) @@ -1127,7 +1127,7 @@ (function (_ random-value literal *wrap [store load] test) (do {! random.monad} [expected random-value - register (:: ! map (n.% 128) random.nat)] + register (\ ! map (n.% 128) random.nat)] (<| (..bytecode (test expected)) (do /.monad [_ (literal expected) @@ -1151,8 +1151,8 @@ (_.lift "IINC" (do {! random.monad} [base ..$Byte::random - increment (:: ! map (|>> (n.% 100) /unsigned.u1 try.assume) - random.nat) + increment (\ ! map (|>> (n.% 100) /unsigned.u1 try.assume) + random.nat) #let [expected (: java/lang/Long (for {@.old ("jvm ladd" @@ -1475,9 +1475,9 @@ (do {! random.monad} [expected ..$Long::random dummy ..$Long::random - minimum (:: ! map (|>> (n.% 100) .int /signed.s4 try.assume) - random.nat) - afterwards (:: ! map (n.% 10) random.nat)]) + minimum (\ ! map (|>> (n.% 100) .int /signed.s4 try.assume) + random.nat) + afterwards (\ ! map (n.% 10) random.nat)]) (..bytecode ((!::= java/lang/Long "jvm leq" "jvm long =") expected)) (do /.monad [@right /.new-label @@ -1494,13 +1494,13 @@ ..$Long::wrap)) (<| (_.lift "LOOKUPSWITCH") (do {! random.monad} - [options (:: ! map (|>> (n.% 10) (n.+ 1)) - random.nat) - choice (:: ! map (n.% options) random.nat) + [options (\ ! map (|>> (n.% 10) (n.+ 1)) + random.nat) + choice (\ ! map (n.% options) random.nat) options (|> random.int - (:: ! map (|>> (:coerce java/lang/Long) host.long-to-int host.int-to-long (:coerce Int))) + (\ ! map (|>> (:coerce java/lang/Long) host.long-to-int host.int-to-long (:coerce Int))) (random.set i.hash options) - (:: ! map set.to-list)) + (\ ! map set.to-list)) #let [choice (maybe.assume (list.nth choice options))] expected ..$Long::random dummy ..$Long::random]) diff --git a/stdlib/source/test/lux/time/date.lux b/stdlib/source/test/lux/time/date.lux index fd17f3075..574bed8d6 100644 --- a/stdlib/source/test/lux/time/date.lux +++ b/stdlib/source/test/lux/time/date.lux @@ -22,8 +22,8 @@ (def: #export date (Random Date) - (:: random.monad map //instant.date - _instant.instant)) + (\ random.monad map //instant.date + _instant.instant)) (def: #export test Test diff --git a/stdlib/source/test/lux/time/duration.lux b/stdlib/source/test/lux/time/duration.lux index 52454eae6..bd7756f06 100644 --- a/stdlib/source/test/lux/time/duration.lux +++ b/stdlib/source/test/lux/time/duration.lux @@ -21,7 +21,7 @@ (def: #export duration (Random Duration) - (:: random.monad map /.from-millis random.int)) + (\ random.monad map /.from-millis random.int)) (def: #export test Test @@ -37,9 +37,9 @@ (_.test "Can convert from/to milliseconds." (|> millis /.from-millis /.to-millis (i.= millis)))) (do {! random.monad} - [sample (|> duration (:: ! map (/.frame /.day))) + [sample (|> duration (\ ! map (/.frame /.day))) frame duration - factor (|> random.nat (:: ! map (|>> (n.% 10) (n.max 1)))) + factor (|> random.nat (\ ! map (|>> (n.% 10) (n.max 1)))) #let [(^open "/\.") /.order]] ($_ _.and (_.test "Can scale a duration." diff --git a/stdlib/source/test/lux/time/instant.lux b/stdlib/source/test/lux/time/instant.lux index 3849c7b67..d24a4438d 100644 --- a/stdlib/source/test/lux/time/instant.lux +++ b/stdlib/source/test/lux/time/instant.lux @@ -28,7 +28,7 @@ (def: #export instant (Random Instant) - (:: random.monad map /.from-millis random.int)) + (\ random.monad map /.from-millis random.int)) (def: #export test Test diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux index c866acf41..b280591fe 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux @@ -122,12 +122,12 @@ ($_ r.either (r\map product.right _primitive.primitive) (do {! r.monad} - [choice (|> r.nat (:: ! map (n.% (list.size variant-tags)))) + [choice (|> r.nat (\ ! map (n.% (list.size variant-tags)))) #let [choiceT (maybe.assume (list.nth choice variant-tags)) choiceC (maybe.assume (list.nth choice primitivesC))]] (wrap (` ((~ choiceT) (~ choiceC))))) (do {! r.monad} - [size (|> r.nat (:: ! map (n.% 3))) + [size (|> r.nat (\ ! map (n.% 3))) elems (r.list size input)] (wrap (code.tuple elems))) (r\wrap (code.record (list.zip/2 record-tags primitivesC))) @@ -143,9 +143,9 @@ [module-name (r.unicode 5) variant-name (r.unicode 5) record-name (|> (r.unicode 5) (r.filter (|>> (text\= variant-name) not))) - size (|> r.nat (:: ! map (|>> (n.% 10) (n.max 2)))) - variant-tags (|> (r.set text.hash size (r.unicode 5)) (:: ! map set.to-list)) - record-tags (|> (r.set text.hash size (r.unicode 5)) (:: ! map set.to-list)) + size (|> r.nat (\ ! map (|>> (n.% 10) (n.max 2)))) + variant-tags (|> (r.set text.hash size (r.unicode 5)) (\ ! map set.to-list)) + record-tags (|> (r.set text.hash size (r.unicode 5)) (\ ! map set.to-list)) primitivesTC (r.list size _primitive.primitive) #let [primitivesT (list\map product.left primitivesTC) primitivesC (list\map product.right primitivesTC) @@ -185,7 +185,7 @@ _structure.check-fails))) (do ! [redundant-patterns (exhaustive-branches false variantTC inputC) - redundancy-idx (|> r.nat (:: ! map (n.% (list.size redundant-patterns)))) + redundancy-idx (|> r.nat (\ ! map (n.% (list.size redundant-patterns)))) #let [redundant-branchesC (<| (list!map (branch outputC)) list.concat (list (list.take redundancy-idx redundant-patterns) @@ -197,7 +197,7 @@ (do ! [[heterogeneousT heterogeneousC] (r.filter (|>> product.left (check.checks? outputT) not) _primitive.primitive) - heterogeneous-idx (|> r.nat (:: ! map (n.% (list.size exhaustive-patterns)))) + heterogeneous-idx (|> r.nat (\ ! map (n.% (list.size exhaustive-patterns)))) #let [heterogeneous-branchesC (list.concat (list (list.take heterogeneous-idx exhaustive-branchesC) (list (let [[_pattern _body] (maybe.assume (list.nth heterogeneous-idx exhaustive-branchesC))] [_pattern heterogeneousC])) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux index 67c02f142..8bc1173f6 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux @@ -81,9 +81,9 @@ (def: apply (do {! r.monad} - [full-args (|> r.nat (:: ! map (|>> (n.% 10) (n.max 2)))) - partial-args (|> r.nat (:: ! map (n.% full-args))) - var-idx (|> r.nat (:: ! map (|>> (n.% full-args) (n.max 1)))) + [full-args (|> r.nat (\ ! map (|>> (n.% 10) (n.max 2)))) + partial-args (|> r.nat (\ ! map (n.% full-args))) + var-idx (|> r.nat (\ ! map (|>> (n.% full-args) (n.max 1)))) inputsTC (r.list full-args _primitive.primitive) #let [inputsT (list\map product.left inputsTC) inputsC (list\map product.right inputsTC)] diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux index 5ef40f052..f96c8045a 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux @@ -118,10 +118,10 @@ (def: sum (do {! r.monad} - [size (|> r.nat (:: ! map (|>> (n.% 10) (n.max 2)))) - choice (|> r.nat (:: ! map (n.% size))) + [size (|> r.nat (\ ! map (|>> (n.% 10) (n.max 2)))) + choice (|> r.nat (\ ! map (n.% size))) primitives (r.list size _primitive.primitive) - +choice (|> r.nat (:: ! map (n.% (inc size)))) + +choice (|> r.nat (\ ! map (n.% (inc size)))) [_ +valueC] _primitive.primitive #let [variantT (type.variant (list\map product.left primitives)) [valueT valueC] (maybe.assume (list.nth choice primitives)) @@ -170,9 +170,9 @@ (def: product (do {! r.monad} - [size (|> r.nat (:: ! map (|>> (n.% 10) (n.max 2)))) + [size (|> r.nat (\ ! map (|>> (n.% 10) (n.max 2)))) primitives (r.list size _primitive.primitive) - choice (|> r.nat (:: ! map (n.% size))) + choice (|> r.nat (\ ! map (n.% size))) [_ +valueC] _primitive.primitive #let [tupleT (type.tuple (list\map product.left primitives)) [singletonT singletonC] (|> primitives (list.nth choice) maybe.assume) @@ -230,10 +230,10 @@ (def: variant (do {! r.monad} - [size (|> r.nat (:: ! map (|>> (n.% 10) (n.max 2)))) - tags (|> (r.set text.hash size (r.unicode 5)) (:: ! map set.to-list)) - choice (|> r.nat (:: ! map (n.% size))) - other-choice (|> r.nat (:: ! map (n.% size)) (r.filter (|>> (n.= choice) not))) + [size (|> r.nat (\ ! map (|>> (n.% 10) (n.max 2)))) + tags (|> (r.set text.hash size (r.unicode 5)) (\ ! map set.to-list)) + choice (|> r.nat (\ ! map (n.% size))) + other-choice (|> r.nat (\ ! map (n.% size)) (r.filter (|>> (n.= choice) not))) primitives (r.list size _primitive.primitive) module-name (r.unicode 5) type-name (r.unicode 5) @@ -276,12 +276,12 @@ (def: record (do {! r.monad} - [size (|> r.nat (:: ! map (|>> (n.% 10) (n.max 2)))) - tags (|> (r.set text.hash size (r.unicode 5)) (:: ! map set.to-list)) + [size (|> r.nat (\ ! map (|>> (n.% 10) (n.max 2)))) + tags (|> (r.set text.hash size (r.unicode 5)) (\ ! map set.to-list)) primitives (r.list size _primitive.primitive) module-name (r.unicode 5) type-name (r.unicode 5) - choice (|> r.nat (:: ! map (n.% size))) + choice (|> r.nat (\ ! map (n.% size))) #let [varT (#.Parameter 1) tagsC (list\map (|>> [module-name] code.tag) tags) primitivesT (list\map product.left primitives) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux index b479b523a..dccabcea7 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux @@ -73,9 +73,9 @@ (def: i64 Test (do {! r.monad} - [subjectC (|> r.nat (:: ! map code.nat)) - signedC (|> r.int (:: ! map code.int)) - paramC (|> r.nat (:: ! map code.nat))] + [subjectC (|> r.nat (\ ! map code.nat)) + signedC (|> r.int (\ ! map code.int)) + paramC (|> r.nat (\ ! map code.nat))] ($_ _.and (_.test "i64 'and'." (check-success+ "lux i64 and" (list paramC subjectC) Nat)) @@ -100,8 +100,8 @@ (def: int Test (do {! r.monad} - [subjectC (|> r.int (:: ! map code.int)) - paramC (|> r.int (:: ! map code.int))] + [subjectC (|> r.int (\ ! map code.int)) + paramC (|> r.int (\ ! map code.int))] ($_ _.and (_.test "Can multiply integers." (check-success+ "lux i64 *" (list paramC subjectC) Int)) @@ -120,9 +120,9 @@ (def: frac Test (do {! r.monad} - [subjectC (|> r.safe-frac (:: ! map code.frac)) - paramC (|> r.safe-frac (:: ! map code.frac)) - encodedC (|> r.safe-frac (:: ! map (|>> %.frac code.text)))] + [subjectC (|> r.safe-frac (\ ! map code.frac)) + paramC (|> r.safe-frac (\ ! map code.frac)) + encodedC (|> r.safe-frac (\ ! map (|>> %.frac code.text)))] ($_ _.and (_.test "Can add frac numbers." (check-success+ "lux f64 +" (list paramC subjectC) Frac)) @@ -155,11 +155,11 @@ (def: text Test (do {! r.monad} - [subjectC (|> (r.unicode 5) (:: ! map code.text)) - paramC (|> (r.unicode 5) (:: ! map code.text)) - replacementC (|> (r.unicode 5) (:: ! map code.text)) - fromC (|> r.nat (:: ! map code.nat)) - toC (|> r.nat (:: ! map code.nat))] + [subjectC (|> (r.unicode 5) (\ ! map code.text)) + paramC (|> (r.unicode 5) (\ ! map code.text)) + replacementC (|> (r.unicode 5) (\ ! map code.text)) + fromC (|> r.nat (\ ! map code.nat)) + toC (|> r.nat (\ ! map code.nat))] ($_ _.and (_.test "Can test text equivalence." (check-success+ "lux text =" (list paramC subjectC) Bit)) @@ -180,8 +180,8 @@ (def: io Test (do {! r.monad} - [logC (|> (r.unicode 5) (:: ! map code.text)) - exitC (|> r.int (:: ! map code.int))] + [logC (|> (r.unicode 5) (\ ! map code.text)) + exitC (|> r.int (\ ! map code.int))] ($_ _.and (_.test "Can log messages to standard output." (check-success+ "lux io log" (list logC) Any)) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux index 16ef89258..9735eda42 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux @@ -43,7 +43,7 @@ Test (do {! random.monad} [maskedA //primitive.primitive - temp (|> random.nat (:: ! map (n.% 100))) + temp (|> random.nat (\ ! map (n.% 100))) #let [maskA (analysis.control/case [maskedA [[(#analysis.Bind temp) @@ -110,7 +110,7 @@ (def: random-member (Random synthesis.Member) (do {! random.monad} - [lefts (|> random.nat (:: ! map (n.% 10))) + [lefts (|> random.nat (\ ! map (n.% 10))) right? random.bit] (wrap (if right? (#.Right lefts) @@ -119,7 +119,7 @@ (def: random-path (Random (analysis.Tuple synthesis.Member)) (do {! random.monad} - [size-1 (|> random.nat (:: ! map (|>> (n.% 10) inc)))] + [size-1 (|> random.nat (\ ! map (|>> (n.% 10) inc)))] (random.list size-1 ..random-member))) (def: (get-pattern path) @@ -146,9 +146,9 @@ Test (do {! random.monad} [recordA (|> random.nat - (:: ! map (|>> analysis.nat)) + (\ ! map (|>> analysis.nat)) (random.list 10) - (:: ! map (|>> analysis.tuple))) + (\ ! map (|>> analysis.tuple))) pathA ..random-path [pattern @member] (get-pattern pathA) #let [getA (analysis.control/case [recordA [[pattern @@ -159,7 +159,7 @@ (//.phase archive.empty) (phase.run [///bundle.empty synthesis.init]) (case> (^ (#try.Success (synthesis.branch/get [pathS recordS]))) - (and (:: (list.equivalence (sum.equivalence n.= n.=)) = pathA pathS) + (and (\ (list.equivalence (sum.equivalence n.= n.=)) = pathA pathS) (//primitive.corresponds? recordA recordS)) _ @@ -184,12 +184,12 @@ (All [a] (-> (Hash a) (Random a) (Random [a a a a a]))) (|> random-element (random.set hash 5) - (:: random.monad map (|>> set.to-list - (case> (^ (list s0 s1 s2 s3 s4)) - [s0 s1 s2 s3 s4] + (\ random.monad map (|>> set.to-list + (case> (^ (list s0 s1 s2 s3 s4)) + [s0 s1 s2 s3 s4] - _ - (undefined)))))) + _ + (undefined)))))) (template [<name> <hash> <random> <path> <synthesis> <pattern> <analysis>] [(def: <name> @@ -262,7 +262,7 @@ (def: random-tuple (Random [Path Match]) (do {! random.monad} - [mid-size (:: ! map (n.% 4) random.nat) + [mid-size (\ ! map (n.% 4) random.nat) value/first (random.unicode 1) value/mid (random.list mid-size (random.unicode 1)) @@ -328,14 +328,14 @@ (def: case-test Test (do {! random.monad} - [expected-input (:: ! map (|>> .i64 synthesis.i64) random.nat) + [expected-input (\ ! map (|>> .i64 synthesis.i64) random.nat) [expected-path match] ..random-case] (_.cover [/.synthesize-case] (|> (/.synthesize-case //.phase archive.empty expected-input match) (phase.run [///bundle.empty synthesis.init]) (case> (^ (#try.Success (synthesis.branch/case [actual-input actual-path]))) - (and (:: synthesis.equivalence = expected-input actual-input) - (:: synthesis.path-equivalence = expected-path actual-path)) + (and (\ synthesis.equivalence = expected-input actual-input) + (\ synthesis.path-equivalence = expected-path actual-path)) _ false))))) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux index ffb04e31b..d5bffc3c1 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux @@ -80,10 +80,10 @@ (def: (random-unit output?) Scenario - (:: random.monad wrap - [true - (synthesis.text synthesis.unit) - (analysis.unit)])) + (\ random.monad wrap + [true + (synthesis.text synthesis.unit) + (analysis.unit)])) (template [<name> <random> <synthesis> <analysis>] [(def: (<name> output?) @@ -147,7 +147,7 @@ (def: (random-variable arity output?) (-> Arity Scenario) (do {! random.monad} - [register (:: ! map (|>> (n.% arity) inc) random.nat)] + [register (\ ! map (|>> (n.% arity) inc) random.nat)] (wrap [(not (n.= 0 register)) (synthesis.variable/local register) (if (n.= arity register) @@ -177,7 +177,7 @@ text-test (random.unicode 1) [loop?-input expected-input actual-input] (random-value false) [loop?-output expected-output actual-output] (random-value output?) - lefts (|> random.nat (:: ! map (n.% 10))) + lefts (|> random.nat (\ ! map (n.% 10))) right? random.bit #let [side|member (if right? (#.Right lefts) @@ -279,7 +279,7 @@ (def: (random-get random-value output?) (-> Scenario Scenario) (do {! random.monad} - [lefts (|> random.nat (:: ! map (n.% 10))) + [lefts (|> random.nat (\ ! map (n.% 10))) right? random.bit [loop?-record expected-record actual-record] (random-value false)] (wrap [loop?-record @@ -343,7 +343,7 @@ Scenario (do {! random.monad} [[loop?-output expected-output actual-output] (..random-nat output?) - arity (|> random.nat (:: ! map (|>> (n.% 5) inc))) + arity (|> random.nat (\ ! map (|>> (n.% 5) inc))) #let [environment ($_ list\compose (list\map (|>> #variable.Foreign) (list.indices arity)) @@ -363,7 +363,7 @@ (-> Scenario Scenario) (do {! random.monad} [[loop?-abstraction expected-abstraction actual-abstraction] (..random-nat output?) - arity (|> random.nat (:: ! map (|>> (n.% 5) inc))) + arity (|> random.nat (\ ! map (|>> (n.% 5) inc))) inputs (random.list arity (random-value false))] (wrap [(list\fold (function (_ new old) (and new old)) @@ -419,7 +419,7 @@ (def: random-abstraction (Random [Synthesis Analysis]) (do {! random.monad} - [arity (|> random.nat (:: ! map (|>> (n.% 5) inc))) + [arity (|> random.nat (\ ! map (|>> (n.% 5) inc))) [loop? expected-body actual-body] (random-body arity true)] (wrap [(..n-function loop? arity expected-body) (..n-abstraction arity actual-body)]))) @@ -433,12 +433,12 @@ (//.phase archive.empty) (phase.run [///bundle.empty synthesis.init]) (!expect (^multi (#try.Success actual) - (:: synthesis.equivalence = expected actual))))))) + (\ synthesis.equivalence = expected actual))))))) (def: application Test (do {! random.monad} - [arity (|> random.nat (:: ! map (|>> (n.% 10) (n.max 1)))) + [arity (|> random.nat (\ ! map (|>> (n.% 10) (n.max 1)))) funcA //primitive.primitive argsA (random.list arity //primitive.primitive)] (_.cover [/.apply] diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux index 05a6095bb..edf3e6fcb 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux @@ -31,13 +31,13 @@ (`` ($_ random.either (~~ (template [<synthesis> <random>] [(do {! random.monad} - [example (:: ! map (|>> <synthesis>) <random>)] + [example (\ ! map (|>> <synthesis>) <random>)] (wrap [next [example example]]))] [//.bit random.bit] - [//.i64 (:: ! map .i64 random.nat)] + [//.i64 (\ ! map .i64 random.nat)] [//.f64 random.frac] [//.text (random.unicode 1)] )) @@ -55,7 +55,7 @@ (def: (variable offset arity next) (Scenario Variable) (let [local (do {! random.monad} - [register (:: ! map (|>> (n.% arity) inc) random.nat)] + [register (\ ! map (|>> (n.% arity) inc) random.nat)] (wrap [next [(#variable.Local (/.register-optimization offset register)) (#variable.Local register)]]))] @@ -64,7 +64,7 @@ _ ($_ random.either local (do {! random.monad} - [foreign (:: ! map (n.% offset) random.nat)] + [foreign (\ ! map (n.% offset) random.nat)] (wrap [next [(#variable.Local foreign) (#variable.Foreign foreign)]])))))) @@ -117,21 +117,21 @@ //.path/pop]]) (~~ (template [<path> <random>] [(do {! random.monad} - [example (:: ! map (|>> <path>) <random>)] + [example (\ ! map (|>> <path>) <random>)] (wrap [next [example example]]))] [//.path/bit random.bit] - [//.path/i64 (:: ! map .i64 random.nat)] + [//.path/i64 (\ ! map .i64 random.nat)] [//.path/f64 random.frac] [//.path/text (random.unicode 1)] )) (~~ (template [<path>] [(do {! random.monad} - [example (:: ! map (|>> <path>) - (random.or random.nat - random.nat))] + [example (\ ! map (|>> <path>) + (random.or random.nat + random.nat))] (wrap [next [example example]]))] @@ -182,7 +182,7 @@ ($_ random.either (do {! random.monad} [[next [recordE recordA]] (..reference offset arity next) - path-length (:: ! map (|>> (n.% 5) inc) random.nat) + path-length (\ ! map (|>> (n.% 5) inc) random.nat) path (random.list path-length random-member)] (wrap [next [(//.branch/get [path recordE]) @@ -219,7 +219,7 @@ (do {! random.monad} [[next [firstE firstA]] (..variable offset arity next) [next [secondE secondA]] (..variable offset arity next) - arity (:: ! map (n.max 1) random.nat) + arity (\ ! map (n.max 1) random.nat) [next [bodyE bodyA]] (..primitive 0 arity next)] (wrap [next [(//.function/abstraction @@ -266,10 +266,10 @@ (<| (_.covering /._) ($_ _.and (do {! random.monad} - [expected-offset (:: ! map (|>> (n.% 5) (n.+ 2)) random.nat) - arity (:: ! map (|>> (n.% 5) inc) random.nat) + [expected-offset (\ ! map (|>> (n.% 5) (n.+ 2)) random.nat) + arity (\ ! map (|>> (n.% 5) inc) random.nat) expected-inits (|> random.nat - (:: ! map (|>> .i64 //.i64)) + (\ ! map (|>> .i64 //.i64)) (random.list arity)) [_ [expected iteration]] (..scenario expected-offset arity 0)] (_.cover [/.Transform /.optimization /.register-optimization] @@ -283,10 +283,10 @@ actual]))) (and (n.= expected-offset actual-offset) - (:: (list.equivalence //.equivalence) = - expected-inits - actual-inits) - (:: //.equivalence = expected actual)) + (\ (list.equivalence //.equivalence) = + expected-inits + actual-inits) + (\ //.equivalence = expected actual)) _ false))) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux index b51a196f0..f109acd9c 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux @@ -35,8 +35,8 @@ (def: variant Test (do {! r.monad} - [size (|> r.nat (:: ! map (|>> (n.% 10) (n.+ 2)))) - tagA (|> r.nat (:: ! map (n.% size))) + [size (|> r.nat (\ ! map (|>> (n.% 10) (n.+ 2)))) + tagA (|> r.nat (\ ! map (n.% size))) #let [right? (n.= (dec size) tagA) lefts (if right? (dec tagA) @@ -58,7 +58,7 @@ (def: tuple Test (do {! r.monad} - [size (|> r.nat (:: ! map (|>> (n.% 10) (n.max 2)))) + [size (|> r.nat (\ ! map (|>> (n.% 10) (n.max 2)))) membersA (r.list size //primitive.primitive)] (_.test "Can synthesize tuple." (|> (////analysis.tuple membersA) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux index 437d721cd..225578071 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux @@ -50,7 +50,7 @@ (<synthesis> value)])))] [bit-scenario synthesis.bit random.bit] - [i64-scenario synthesis.i64 (:: ! map .i64 random.nat)] + [i64-scenario synthesis.i64 (\ ! map .i64 random.nat)] [f64-scenario synthesis.f64 random.frac] [text-scenario synthesis.text (random.unicode 1)] ) @@ -96,9 +96,9 @@ (def: (tuple-scenario context) (Scenario Synthesis) (let [registers (dictionary.entries (get@ #necessary context))] - (:: random.monad wrap - [(synthesis.tuple (list\map (|>> product.left synthesis.variable/local) registers)) - (synthesis.tuple (list\map (|>> product.right synthesis.variable/local) registers))]))) + (\ random.monad wrap + [(synthesis.tuple (list\map (|>> product.left synthesis.variable/local) registers)) + (synthesis.tuple (list\map (|>> product.right synthesis.variable/local) registers))]))) (def: (structure-scenario context) (Scenario Synthesis) @@ -143,7 +143,7 @@ (def: (get-scenario scenario context) (-> (Scenario Synthesis) (Scenario Synthesis)) (do {! random.monad} - [length (:: ! map (|>> (n.% 5) inc) random.nat) + [length (\ ! map (|>> (n.% 5) inc) random.nat) path (random.list length ..random-member) [expected-record actual-record] (scenario context)] (wrap [(synthesis.branch/get [path expected-record]) @@ -187,7 +187,7 @@ (#synthesis.Then actual-then))]))] [#synthesis.Bit random.bit] - [#synthesis.I64 (:: ! map .i64 random.nat)] + [#synthesis.I64 (\ ! map .i64 random.nat)] [#synthesis.F64 random.frac] [#synthesis.Text (random.unicode 1)] ))) @@ -283,9 +283,9 @@ (def: (apply-scenario scenario context) (-> (Scenario Synthesis) (Scenario Synthesis)) (do {! random.monad} - [abstraction (:: ! map (|>> synthesis.constant) - (random.and (random.unicode 1) - (random.unicode 1))) + [abstraction (\ ! map (|>> synthesis.constant) + (random.and (random.unicode 1) + (random.unicode 1))) inputs (random.list ..scope-arity (scenario context))] (wrap [(synthesis.function/apply [abstraction (list\map product.left inputs)]) (synthesis.function/apply [abstraction (list\map product.right inputs)])]))) @@ -331,5 +331,5 @@ (_.cover [/.optimization] (|> (/.optimization input) (!expect (^multi (#try.Success actual) - (:: synthesis.equivalence = expected actual)))))) + (\ synthesis.equivalence = expected actual)))))) ))) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux b/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux index c93eae5f9..a95bb9292 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux @@ -27,7 +27,7 @@ (def: name-part^ (Random Text) (do {! r.monad} - [size (|> r.nat (:: ! map (|>> (n.% 20) (n.max 1))))] + [size (|> r.nat (\ ! map (|>> (n.% 20) (n.max 1))))] (r.ascii/lower-alpha size))) (def: name^ @@ -84,7 +84,7 @@ false (#.Right [_ parsed]) - (:: code.equivalence = parsed sample))) + (\ code.equivalence = parsed sample))) (do ! [other code^] (_.test "Can parse multiple Lux code nodes." @@ -102,8 +102,8 @@ false (#.Right [_ =other]) - (and (:: code.equivalence = sample =sample) - (:: code.equivalence = other =other))))))) + (and (\ code.equivalence = sample =sample) + (\ code.equivalence = other =other))))))) ))) (def: comment-text^ @@ -134,7 +134,7 @@ false (#.Right [_ parsed]) - (:: code.equivalence = parsed sample))) + (\ code.equivalence = parsed sample))) ))) (def: #export test diff --git a/stdlib/source/test/lux/type.lux b/stdlib/source/test/lux/type.lux index c6a141be8..08a4033c5 100644 --- a/stdlib/source/test/lux/type.lux +++ b/stdlib/source/test/lux/type.lux @@ -23,7 +23,7 @@ (def: short (r.Random Text) (do {! r.monad} - [size (|> r.nat (:: ! map (n.% 10)))] + [size (|> r.nat (\ ! map (n.% 10)))] (r.unicode size))) (def: name @@ -58,13 +58,13 @@ (do r.monad [sample ..type] (_.test "Every type is equal to itself." - (:: /.equivalence = sample sample))) + (\ /.equivalence = sample sample))) (_.test "Can apply quantified types (universal and existential quantification)." (and (maybe.default #0 (do maybe.monad [partial (/.apply (list Bit) Ann) full (/.apply (list Int) partial)] - (wrap (:: /.equivalence = full (#.Product Bit Int))))) + (wrap (\ /.equivalence = full (#.Product Bit Int))))) (|> (/.apply (list Bit) Text) (case> #.None #1 _ #0)))) (let [base (#.Named ["" "a"] (#.Product Bit Int)) @@ -73,18 +73,18 @@ base))] ($_ _.and (_.test "Can remove aliases from an already-named type." - (:: /.equivalence = - base - (/.un-alias aliased))) + (\ /.equivalence = + base + (/.un-alias aliased))) (_.test "Can remove all names from a type." - (and (not (:: /.equivalence = - base - (/.un-name aliased))) - (:: /.equivalence = - (/.un-name base) - (/.un-name aliased)))))) + (and (not (\ /.equivalence = + base + (/.un-name aliased))) + (\ /.equivalence = + (/.un-name base) + (/.un-name aliased)))))) (do {! r.monad} - [size (|> r.nat (:: ! map (n.% 3))) + [size (|> r.nat (\ ! map (n.% 3))) members (|> ..type (r.filter (function (_ type) (case type @@ -110,7 +110,7 @@ )) ))) (do {! r.monad} - [size (|> r.nat (:: ! map (n.% 3))) + [size (|> r.nat (\ ! map (n.% 3))) members (M.seq ! (list.repeat size ..type)) extra (|> ..type (r.filter (function (_ type) @@ -133,7 +133,7 @@ (n.= (list.size members) (list.size tparams)))) )) (do {! r.monad} - [size (|> r.nat (:: ! map (n.% 3))) + [size (|> r.nat (\ ! map (n.% 3))) extra (|> ..type (r.filter (function (_ type) (case type diff --git a/stdlib/source/test/lux/type/check.lux b/stdlib/source/test/lux/type/check.lux index 46749652e..dad107b5e 100644 --- a/stdlib/source/test/lux/type/check.lux +++ b/stdlib/source/test/lux/type/check.lux @@ -199,7 +199,7 @@ (/.check .Bit var)))) ) (do {! r.monad} - [num-connections (|> r.nat (:: ! map (n.% 100))) + [num-connections (|> r.nat (\ ! map (n.% 100))) boundT (|> ..type (r.filter (|>> (case> (#.Var _) #0 _ #1)))) pick-pcg (r.and r.nat r.nat)] ($_ _.and @@ -210,11 +210,11 @@ headR (/.ring head-id) tailR (/.ring tail-id)] (/.assert "" - (let [same-rings? (:: set.equivalence = headR tailR) + (let [same-rings? (\ set.equivalence = headR tailR) expected-size? (n.= (inc num-connections) (set.size headR)) same-vars? (|> (set.to-list headR) (list.sort n.<) - (:: (list.equivalence n.equivalence) = (list.sort n.< (#.Cons head-id ids))))] + (\ (list.equivalence n.equivalence) = (list.sort n.< (#.Cons head-id ids))))] (and same-rings? expected-size? same-vars?)))))) @@ -246,10 +246,10 @@ headRL-post (/.ring head-idL) headRR-post (/.ring head-idR)] (/.assert "" - (let [same-rings? (:: set.equivalence = headRL-post headRR-post) + (let [same-rings? (\ set.equivalence = headRL-post headRR-post) expected-size? (n.= (n.* 2 (inc num-connections)) (set.size headRL-post)) - union? (:: set.equivalence = headRL-post (set.union headRL-pre headRR-pre))] + union? (\ set.equivalence = headRL-post (set.union headRL-pre headRR-pre))] (and same-rings? expected-size? union?)))))) diff --git a/stdlib/source/test/lux/type/implicit.lux b/stdlib/source/test/lux/type/implicit.lux index 203aad478..99e0c64ae 100644 --- a/stdlib/source/test/lux/type/implicit.lux +++ b/stdlib/source/test/lux/type/implicit.lux @@ -22,7 +22,7 @@ Test (<| (_.context (%.name (name-of /._))) (do {! random.monad} - [#let [digit (:: ! map (n.% 10) random.nat)] + [#let [digit (\ ! map (n.% 10) random.nat)] left digit right digit #let [start (n.min left right) @@ -30,16 +30,16 @@ ($_ _.and (_.test "Can automatically select first-order structures." (let [(^open "list\.") (list.equivalence n.equivalence)] - (and (bit\= (:: n.equivalence = left right) - (/.::: = left right)) - (list\= (:: list.functor map inc (enum.range n.enum start end)) - (/.::: map inc (enum.range n.enum start end)))))) + (and (bit\= (\ n.equivalence = left right) + (/.\\ = left right)) + (list\= (\ list.functor map inc (enum.range n.enum start end)) + (/.\\ map inc (enum.range n.enum start end)))))) (_.test "Can automatically select second-order structures." - (/.::: = - (enum.range n.enum start end) - (enum.range n.enum start end))) + (/.\\ = + (enum.range n.enum start end) + (enum.range n.enum start end))) (_.test "Can automatically select third-order structures." - (let [lln (/.::: map (enum.range n.enum start) - (enum.range n.enum start end))] - (/.::: = lln lln))) + (let [lln (/.\\ map (enum.range n.enum start) + (enum.range n.enum start end))] + (/.\\ = lln lln))) )))) diff --git a/stdlib/source/test/lux/world/file.lux b/stdlib/source/test/lux/world/file.lux index 5c633a048..d1d1d175b 100644 --- a/stdlib/source/test/lux/world/file.lux +++ b/stdlib/source/test/lux/world/file.lux @@ -43,9 +43,9 @@ [#let [check-existence! (: (IO (Try Bit)) (try.lift io.monad (/.exists? io.monad /.default path)))] pre! check-existence! - file (!.use (:: /.default create-file) path) + file (!.use (\ /.default create-file) path) post! check-existence! - _ (!.use (:: file delete) []) + _ (!.use (\ file delete) []) remains? check-existence!] (wrap (and (not pre!) post! @@ -59,11 +59,11 @@ [#let [path (format "temp_file_" (%.nat number))] result (promise.future (do (try.with io.monad) - [file (!.use (:: /.default create-file) path) - _ (!.use (:: file over-write) data) - content (!.use (:: file content) []) - _ (!.use (:: file delete) [])] - (wrap (:: binary.equivalence = data content))))] + [file (!.use (\ /.default create-file) path) + _ (!.use (\ file over-write) data) + content (!.use (\ file content) []) + _ (!.use (\ file delete) [])] + (wrap (\ binary.equivalence = data content))))] (_.assert "Can write/read files." (try.default #0 result))))) @@ -71,14 +71,14 @@ Test (<| (_.context (%.name (name-of /._))) (do {! r.monad} - [file-size (|> r.nat (:: ! map (|>> (n.% 100) (n.max 10)))) + [file-size (|> r.nat (\ ! map (|>> (n.% 100) (n.max 10)))) dataL (_binary.random file-size) dataR (_binary.random file-size) - new-modified (|> r.int (:: ! map (|>> i.abs - (i.% +10,000,000,000,000) - truncate-millis - duration.from-millis - instant.absolute)))] + new-modified (|> r.int (\ ! map (|>> i.abs + (i.% +10,000,000,000,000) + truncate-millis + duration.from-millis + instant.absolute)))] ($_ _.and (..creation-and-deletion 0) (..read-and-write 1 dataL) @@ -87,10 +87,10 @@ [#let [path "temp_file_2"] result (promise.future (do (try.with io.monad) - [file (!.use (:: /.default create-file) path) - _ (!.use (:: file over-write) dataL) - read-size (!.use (:: file size) []) - _ (!.use (:: file delete) [])] + [file (!.use (\ /.default create-file) path) + _ (!.use (\ file over-write) dataL) + read-size (!.use (\ file size) []) + _ (!.use (\ file delete) [])] (wrap (n.= file-size read-size))))] (_.assert "Can read file size." (try.default #0 result)))) @@ -98,19 +98,19 @@ [#let [path "temp_file_3"] result (promise.future (do (try.with io.monad) - [file (!.use (:: /.default create-file) path) - _ (!.use (:: file over-write) dataL) - _ (!.use (:: file append) dataR) - content (!.use (:: file content) []) - read-size (!.use (:: file size) []) - _ (!.use (:: file delete) [])] + [file (!.use (\ /.default create-file) path) + _ (!.use (\ file over-write) dataL) + _ (!.use (\ file append) dataR) + content (!.use (\ file content) []) + read-size (!.use (\ file size) []) + _ (!.use (\ file delete) [])] (wrap (and (n.= (n.* 2 file-size) read-size) - (:: binary.equivalence = - dataL - (try.assume (binary.slice 0 (dec file-size) content))) - (:: binary.equivalence = - dataR - (try.assume (binary.slice file-size (dec read-size) content)))))))] + (\ binary.equivalence = + dataL + (try.assume (binary.slice 0 (dec file-size) content))) + (\ binary.equivalence = + dataR + (try.assume (binary.slice file-size (dec read-size) content)))))))] (_.assert "Can append to files." (try.default #0 result)))) (wrap (do promise.monad @@ -120,9 +120,9 @@ [#let [check-existence! (: (IO (Try Bit)) (try.lift io.monad (/.exists? io.monad /.default path)))] pre! check-existence! - dir (!.use (:: /.default create-directory) path) + dir (!.use (\ /.default create-directory) path) post! check-existence! - _ (!.use (:: dir discard) []) + _ (!.use (\ dir discard) []) remains? check-existence!] (wrap (and (not pre!) post! @@ -134,12 +134,12 @@ dir-path "temp_dir_5"] result (promise.future (do (try.with io.monad) - [dir (!.use (:: /.default create-directory) dir-path) - file (!.use (:: /.default create-file) (format dir-path "/" file-path)) - _ (!.use (:: file over-write) dataL) - read-size (!.use (:: file size) []) - _ (!.use (:: file delete) []) - _ (!.use (:: dir discard) [])] + [dir (!.use (\ /.default create-directory) dir-path) + file (!.use (\ /.default create-file) (format dir-path "/" file-path)) + _ (!.use (\ file over-write) dataL) + read-size (!.use (\ file size) []) + _ (!.use (\ file delete) []) + _ (!.use (\ dir discard) [])] (wrap (n.= file-size read-size))))] (_.assert "Can create files inside of directories." (try.default #0 result)))) @@ -149,18 +149,18 @@ inner-dir-path "inner_temp_dir_6"] result (promise.future (do (try.with io.monad) - [dir (!.use (:: /.default create-directory) dir-path) - pre-files (!.use (:: dir files) []) - pre-directories (!.use (:: dir directories) []) + [dir (!.use (\ /.default create-directory) dir-path) + pre-files (!.use (\ dir files) []) + pre-directories (!.use (\ dir directories) []) - file (!.use (:: /.default create-file) (format dir-path "/" file-path)) - inner-dir (!.use (:: /.default create-directory) (format dir-path "/" inner-dir-path)) - post-files (!.use (:: dir files) []) - post-directories (!.use (:: dir directories) []) + file (!.use (\ /.default create-file) (format dir-path "/" file-path)) + inner-dir (!.use (\ /.default create-directory) (format dir-path "/" inner-dir-path)) + post-files (!.use (\ dir files) []) + post-directories (!.use (\ dir directories) []) - _ (!.use (:: file delete) []) - _ (!.use (:: inner-dir discard) []) - _ (!.use (:: dir discard) [])] + _ (!.use (\ file delete) []) + _ (!.use (\ inner-dir discard) []) + _ (!.use (\ dir discard) [])] (wrap (and (and (n.= 0 (list.size pre-files)) (n.= 0 (list.size pre-directories))) (and (n.= 1 (list.size post-files)) @@ -171,12 +171,12 @@ [#let [path "temp_file_7"] result (promise.future (do (try.with io.monad) - [file (!.use (:: /.default create-file) path) - _ (!.use (:: file over-write) dataL) - _ (!.use (:: file modify) new-modified) - current-modified (!.use (:: file last-modified) []) - _ (!.use (:: file delete) [])] - (wrap (:: instant.equivalence = new-modified current-modified))))] + [file (!.use (\ /.default create-file) path) + _ (!.use (\ file over-write) dataL) + _ (!.use (\ file modify) new-modified) + current-modified (!.use (\ file last-modified) []) + _ (!.use (\ file delete) [])] + (wrap (\ instant.equivalence = new-modified current-modified))))] (_.assert "Can change the time of last modification." (try.default #0 result)))) (wrap (do promise.monad @@ -187,14 +187,14 @@ [#let [check-existence! (: (-> Path (IO (Try Bit))) (|>> (/.exists? io.monad /.default) (try.lift io.monad)))] - file0 (!.use (:: /.default create-file) path0) - _ (!.use (:: file0 over-write) dataL) + file0 (!.use (\ /.default create-file) path0) + _ (!.use (\ file0 over-write) dataL) pre! (check-existence! path0) file1 (: (IO (Try (File IO))) ## TODO: Remove : - (!.use (:: file0 move) path1)) + (!.use (\ file0 move) path1)) post! (check-existence! path0) confirmed? (check-existence! path1) - _ (!.use (:: file1 delete) [])] + _ (!.use (\ file1 delete) [])] (wrap (and pre! (not post!) confirmed?))))] diff --git a/stdlib/source/test/lux/world/file/watch.lux b/stdlib/source/test/lux/world/file/watch.lux index 5f55825e4..8b1c22697 100644 --- a/stdlib/source/test/lux/world/file/watch.lux +++ b/stdlib/source/test/lux/world/file/watch.lux @@ -72,8 +72,8 @@ #let [[fs watcher] (/.mock "/")]] ($_ _.and (wrap (do promise.monad - [?concern (:: watcher concern directory) - ?stop (:: watcher stop directory)] + [?concern (\ watcher concern directory) + ?stop (\ watcher stop directory)] (_.cover' [/.not-being-watched] (and (case ?concern (#try.Failure error) @@ -101,19 +101,19 @@ [directory (random.ascii/alpha 5) #let [/ "/" [fs watcher] (/.mock /)] - expected-path (:: ! map (|>> (format directory /)) - (random.ascii/alpha 5)) + expected-path (\ ! map (|>> (format directory /)) + (random.ascii/alpha 5)) data (_binary.random 10)] (wrap (do {! promise.monad} [verdict (do (try.with !) - [_ (!.use (:: fs create-directory) [directory]) - _ (:: watcher start /.all directory) - poll/0 (:: watcher poll []) + [_ (!.use (\ fs create-directory) [directory]) + _ (\ watcher start /.all directory) + poll/0 (\ watcher poll []) #let [no-events-prior-to-creation! (list.empty? poll/0)] - file (!.use (:: fs create-file) [expected-path]) - poll/1 (:: watcher poll []) - poll/1' (:: watcher poll []) + file (!.use (\ fs create-file) [expected-path]) + poll/1 (\ watcher poll []) + poll/1' (\ watcher poll []) #let [after-creation! (and (case poll/1 (^ (list [actual-path concern])) @@ -126,9 +126,9 @@ false) (list.empty? poll/1'))] _ (promise.delay 1 (#try.Success "Delay to make sure the over-write time-stamp always changes.")) - _ (!.use (:: file over-write) data) - poll/2 (:: watcher poll []) - poll/2' (:: watcher poll []) + _ (!.use (\ file over-write) data) + poll/2 (\ watcher poll []) + poll/2' (\ watcher poll []) #let [after-modification! (and (case poll/2 (^ (list [actual-path concern])) @@ -140,9 +140,9 @@ _ false) (list.empty? poll/2'))] - _ (!.use (:: file delete) []) - poll/3 (:: watcher poll []) - poll/3' (:: watcher poll []) + _ (!.use (\ file delete) []) + poll/3 (\ watcher poll []) + poll/3' (\ watcher poll []) #let [after-deletion! (and (case poll/3 (^ (list [actual-path concern])) diff --git a/stdlib/source/test/lux/world/shell.lux b/stdlib/source/test/lux/world/shell.lux index b7848cba4..e9d844141 100644 --- a/stdlib/source/test/lux/world/shell.lux +++ b/stdlib/source/test/lux/world/shell.lux @@ -113,11 +113,11 @@ #let [shell (/.async (..io-shell command oops input destruction exit))]] (wrap (do {! promise.monad} [verdict (do (try.with !) - [process (!.use (:: shell execute) [environment.empty "~" command (list)]) - read (!.use (:: process read) []) - error (!.use (:: process error) []) + [process (!.use (\ shell execute) [environment.empty "~" command (list)]) + read (!.use (\ process read) []) + error (!.use (\ process error) []) wrote! (do ! - [write (!.use (:: process write) [input])] + [write (!.use (\ process write) [input])] (wrap (#try.Success (case write (#try.Success _) false @@ -125,14 +125,14 @@ (#try.Failure write) (text\= input write))))) destroyed! (do ! - [destroy (!.use (:: process destroy) [])] + [destroy (!.use (\ process destroy) [])] (wrap (#try.Success (case destroy (#try.Success _) false (#try.Failure destroy) (text\= destruction destroy))))) - await (!.use (:: process await) [])] + await (!.use (\ process await) [])] (wrap (and (text\= command read) (text\= oops error) wrote! |