0.8.6
New features
- Add the
validate
method to companions of refined types to accumulate
errors withcats.data.ValidatedNel
. To use this method,syntax._
from therefined-cats
module needs to be imported like this:Thanks to Howy Perrin!scala> import eu.timepit.refined.types.numeric.PosInt scala> import eu.timepit.refined.cats.syntax._ scala> PosInt.validate(1) res0: cats.data.ValidatedNel[String,PosInt] = Valid(1)
(#382, #384) - Add the
validate
method usingscalaz.ValidationNel
also to the
refined-scalaz
module.
Thanks to kusamakura! (#385)
New predicates
ValidInt
: checks if aString
is a parsableInt
ValidLong
: checks if aString
is a parsableLong
ValidDouble
: checks if aString
is a parsableDouble
ValidBigInt
: checks if aString
is a parsableBigInt
ValidBigDecimal
: checks if aString
is a parsableBigDecimal
Thanks to kusamakura! (#379)
Performance improvements
- Apply the optimization done in #334 also to macro calls that
useRefineMacro.implApplyRef
. Before this change, compilation time
of e.g.PosInt(1)
was one order of magnitude slower than1: PosInt
.
With this change there is no difference in compilation times between
these two calls. (#388)
Updates
- Update
refined-cats
to Cats 1.0.0. (#390)
Released on 2017-12-27