diff options
author | Eduardo Julian | 2018-07-03 20:01:54 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-07-03 20:01:54 -0400 |
commit | c75e8aa8bc84af3b598292f3261354384b3cc80f (patch) | |
tree | 6cc75dc05da0fda3fe113fc70bb09d749dfed876 /stdlib | |
parent | 56b20b2c3e96f983490c0dbde95634e06fbdf73c (diff) |
- Re-named "Ref" to "Refined".
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/type/refinement.lux | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/lux/type/refinement.lux b/stdlib/source/lux/type/refinement.lux index 3abcf2a1c..2d05d5882 100644 --- a/stdlib/source/lux/type/refinement.lux +++ b/stdlib/source/lux/type/refinement.lux @@ -1,5 +1,5 @@ (.module: - [lux #- Ref type] + [lux #- type] (lux (control [predicate #+ Pred] [monad #+ do] ["p" parser]) @@ -10,14 +10,14 @@ (macro ["s" syntax #+ syntax:] [poly]))) -(abstract: #export (Ref t r) - {#.doc "A refinement 'r' on type 't' based on a predicate."} +(abstract: #export (Refined t r) + {#.doc "A refined type 'r' of base type 't' using a predicate."} {#value t #predicate (Pred t)} (type: #export (Refiner t r) - (-> t (Maybe (Ref t r)))) + (-> t (Maybe (Refined t r)))) (def: #export (refinement predicate) (All [t] @@ -31,7 +31,7 @@ (do-template [<name> <output> <slot>] [(def: #export (<name> refined) - (All [t r] (-> (Ref t r) <output>)) + (All [t r] (-> (Refined t r) <output>)) (|> refined :representation (get@ <slot>)))] [un-refine t #value] @@ -41,7 +41,7 @@ (def: #export (lift transform) (All [t r] (-> (-> t t) - (-> (Ref t r) (Maybe (Ref t r))))) + (-> (Refined t r) (Maybe (Refined t r))))) (function (_ refined) (let [[value predicate] (:representation refined) value' (transform value)] @@ -52,7 +52,7 @@ ) (def: #export (filter refiner values) - (All [t r] (-> (Refiner t r) (List t) (List (Ref t r)))) + (All [t r] (-> (Refiner t r) (List t) (List (Refined t r)))) (case values #.Nil #.Nil @@ -66,7 +66,7 @@ (filter refiner tail)))) (def: #export (partition refiner values) - (All [t r] (-> (Refiner t r) (List t) [(List (Ref t r)) (List t)])) + (All [t r] (-> (Refiner t r) (List t) [(List (Refined t r)) (List t)])) (case values #.Nil [#.Nil #.Nil] @@ -89,10 +89,10 @@ [[un-refinedT outputT] (poly.function poly.any poly.any) refined-ex (<| (poly.local (list outputT)) poly.apply (p.after (poly.this .Maybe)) - poly.apply (p.after (poly.this ..Ref)) + poly.apply (p.after (poly.this ..Refined)) (p.after (poly.this un-refinedT)) poly.existential)] - (wrap (.type (..Ref un-refinedT (#.Ex refined-ex))))))) + (wrap (.type (..Refined un-refinedT (#.Ex refined-ex))))))) (syntax: #export (type {refinement s.symbol}) (do @ |