From 34e310622bdeb1d0588c0664c0e78cbaa84f837c Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 2 Dec 2020 06:42:20 -0400 Subject: Re-named "::" and ":::" macros to "\" and "\\", to be consistent with the convention that only macros that deal with types may start with a colon. --- stdlib/source/spec/compositor/generation/case.lux | 8 ++++---- stdlib/source/spec/compositor/generation/common.lux | 6 +++--- stdlib/source/spec/compositor/generation/function.lux | 2 +- stdlib/source/spec/compositor/generation/reference.lux | 2 +- stdlib/source/spec/compositor/generation/structure.lux | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'stdlib/source/spec/compositor/generation') 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)) -- cgit v1.2.3