Changes
- Add a refined-scalaz subproject which provides a
RefType
instance
forscalaz.@@
(Scalaz' tag type). (#84) - Add a refined-scodec subproject which provides
scodec.Codec
instances for refined types. (#92) - Add
RefType.applyRef
function that refines a value according to a
refined type. This makes working with type aliases like
type Minute = Int Refined Interval[W.
0.T, W.
59.T]
more
convenient because one can useMinute
as parameter forapplyRef
,
e.g.applyRef[Minute](45)
. (#78) - Add an
any
module which providesArbitrary
instances for any
refined type by using anArbitrary
of the base type and aValidate
of the refinement's predicate to pick only valid values. - Add
Arbitrary
instances forLessEqual
,GreaterEqual
, and
Whitespace
. - Add
checkArbitraryRefType
function to thescalacheck
package
object which can be used the checkArbitrary
instances of refined
types. (#87) - Remove the
Arbitrary
suffix from modules providingArbitrary
instances. - Rename
Interval
toInterval.Closed
. (#80)
New predicates
Eval[S]
: checks if a value applied to the predicateS
yieldstrue
(#82)
Interval.Open[L, H]
: checks if a numeric value is in the interval (L
,H
)Interval.OpenClosed[L, H]
: checks if a numeric value is in the interval (L
,H
]Interval.ClosedOpen[L, H]
: checks if a numeric value is in the interval [L
,H
)Interval.Closed[L, H]
: checks if a numeric value is in the interval [L
,H
]
Released on 2015-11-18