github fthomas/refined v0.4.0
0.4.0

latest releases: v0.11.1, v0.11.0, v0.10.3...
8 years ago

Changes

  • Overwrite Refined#toString by delegating it to the toString
    method of the wrapped value. (#141)

  • Add RefType.applyRefM, the the macro variant of RefType.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

    (#112, #138)

  • Fix the return type of RefType.applyRef. (#137)

  • Use Refined instead of @@ in util.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

boolean

  • Nand[A, B]: negated conjunction of the predicates A and B. (#140)
  • Nor[A, B]: negated disjunction of the predicates A and B. (#143)

collection

  • Init[P]: checks if the predicate P holds for all but the last element of a Traversable. (#150)
  • Tail[P]: checks if the predicate P holds for all but the first element of a Traversable. (#150)

Thanks to Shohei Shimomura for all new predicates!

Updates

  • Update to Scala.js 0.6.8. (#136)
  • Update refined-scalaz to Scalaz 7.2.2. (#147)

Released on 2016-04-10

Don't miss a new refined release

NewReleases is sending notifications on new releases.