Skip to content

0.8.6

Compare
Choose a tag to compare
@fthomas fthomas released this 30 Dec 21:28
· 1960 commits to master since this release
v0.8.6
0a48129

New features

  • Add the validate method to companions of refined types to accumulate
    errors with cats.data.ValidatedNel. To use this method, syntax._
    from the refined-cats module needs to be imported like this:
    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)
    Thanks to Howy Perrin!
    (#382, #384)
  • Add the validate method using scalaz.ValidationNel also to the
    refined-scalaz module.
    Thanks to kusamakura! (#385)

New predicates

string

  • ValidInt: checks if a String is a parsable Int
  • ValidLong: checks if a String is a parsable Long
  • ValidDouble: checks if a String is a parsable Double
  • ValidBigInt: checks if a String is a parsable BigInt
  • ValidBigDecimal: checks if a String is a parsable BigDecimal

Thanks to kusamakura! (#379)

Performance improvements

  • Apply the optimization done in #334 also to macro calls that
    use RefineMacro.implApplyRef. Before this change, compilation time
    of e.g. PosInt(1) was one order of magnitude slower than 1: 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