github fthomas/refined v0.9.0
0.9.0

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

New features

  • Type class derivation for refined types via Contravariant or
    MonadError instances of the respective type class. This allows,
    for example, to derive encoders and decoders for refined types
    via encoders and decoders of their base types.
    (#447 by @fommil for Scalaz and
    #449 by @fthomas for Cats)
  • Add Arbitrary instances for List, Vector, and String refined
    with any Size[P]. (#455, #471
    by @matthedude and @fthomas)
  • Add Arbitrary instance for NonEmptyString. (#415)
  • Add predicates package which allows to import all predicates
    with a single import eu.timepit.refined.predicates.all._.
    (#433)
  • Cross build the refined, refined-scalaz, and refined-shapeless
    modules for Scala Native. (#301, #478)
  • Add inference rules for Greater[N] ==> GreaterEqual[N] and
    Less[N] ==> LessEqual[N]. (#452 by @zainab-ali)
  • Add new refined-shapeless module that provides Typeable instances
    for refined types. (#456 by @umbreak)
  • Add new refined-scopt module for integration of refined types
    with scopt.
    (#457 by @nrinaudo)
  • Add HexString, MD5, SHA1, SHA224, SHA256, SHA384,
    and SHA512 types. (#453 by @NeQuissimus)
  • Add FiniteString[N] type for Strings with length less than or
    equal to N. (#437, #479)

Changes

  • Change layout of the types package to create fewer instances and to
    support "auto import" in IntelliJ. (#416, #431)
  • Move Validate instances into the companions of their respective
    predicate instead of a prefix because in a future Scala version
    prefixes might not be searched for implicits, see
    scala-dev/#446. (#438)
  • Update documentation to solve "exception during macro expansion" errors.
    (#451 by @umbreak)
  • Change the definition of MaxSize[N] from Size[LessEqual[N]] to
    Size[Interval.Closed[_0, N]] and introduce the WitnessAs type class
    which unifies numeric type class instances that were split to work with
    literal singleton types and shapeless.Nat.
    (#473, #483)

Deprecations and removals

  • Deprecate Subtype and Supertype predicates because they lack
    practical relevance. (#432)
  • Deprecate ConstructorNames and FieldNames predicates because they
    operate on types instead of values (i.e. the result of a validation
    only depends on the type of a value) and the library focuses on
    refining values. (#435)
  • Remove deprecated util.time module which has been replaced by
    the types.time module. (#425)
  • Remove deprecated Refined#get method which has been replaced by
    Refined#value. (#426)
  • Deprecate scalacheck.util.Adjacent in favor of internal.Adjacent
    in the core module. (#475)
  • Deprecate scalacheck.util.Bounded in favor of api.{Min, Max}
    in the core module. (#482)

Updates and build

  • Update refined-cats to Cats 1.1.0. (#467)
  • Update refined-scalaz to Scalaz 7.2.21. (#434, #468
    by @fthomas and @fommil)
  • Update to the latest travis_setup.sh for Scala Native.
    (#458 by @densh)

Released on 2018-04-22

Don't miss a new refined release

NewReleases is sending notifications on new releases.