Changes
-
Overwrite
Refined#toString
by delegating it to thetoString
method of the wrapped value. (#141) -
Add
RefType.applyRefM
, the the macro variant ofRefType.applyRef
.
applyRefM
is useful when working with type aliases for refined
types and without any implicits, for example:scala> type Natural = Long Refined NonNegative defined type alias Natural scala> RefType.applyRefM[Natural](42L) res0: Natural = 42
-
Fix the return type of
RefType.applyRef
. (#137) -
Use
Refined
instead of@@
inutil.string
for refined types. -
Remove the notion of "constant"
Validate
instances that allowed to
refine non-literal values at compile-time. This feature hasn't proven
to be useful after all. (#148) -
Eval
RefType
during macro expansion again to minimize the runtime
overhead of refinement types. (#149, #120) -
Remove the deprecated
implicits
object. (#152)
New predicates
Nand[A, B]
: negated conjunction of the predicatesA
andB
. (#140)Nor[A, B]
: negated disjunction of the predicatesA
andB
. (#143)
Init[P]
: checks if the predicateP
holds for all but the last element of aTraversable
. (#150)Tail[P]
: checks if the predicateP
holds for all but the first element of aTraversable
. (#150)
Thanks to Shohei Shimomura for all new predicates!
Updates
Released on 2016-04-10