From c75e8aa8bc84af3b598292f3261354384b3cc80f Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 3 Jul 2018 20:01:54 -0400 Subject: - Re-named "Ref" to "Refined". --- stdlib/source/lux/type/refinement.lux | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'stdlib/source') 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 [ ] [(def: #export ( refined) - (All [t r] (-> (Ref t r) )) + (All [t r] (-> (Refined t r) )) (|> refined :representation (get@ )))] [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 @ -- cgit v1.2.3