0.9.0
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 forList
,Vector
, andString
refined
with anySize[P]
. (#455, #471
by @matthedude and @fthomas) - Add
Arbitrary
instance forNonEmptyString
. (#415) - Add
predicates
package which allows to import all predicates
with a singleimport eu.timepit.refined.predicates.all._
.
(#433) - Cross build the
refined
,refined-scalaz
, andrefined-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 providesTypeable
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
,
andSHA512
types. (#453 by @NeQuissimus) - Add
FiniteString[N]
type forString
s with length less than or
equal toN
. (#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]
fromSize[LessEqual[N]]
to
Size[Interval.Closed[_0, N]]
and introduce theWitnessAs
type class
which unifies numeric type class instances that were split to work with
literal singleton types andshapeless.Nat
.
(#473, #483)
Deprecations and removals
- Deprecate
Subtype
andSupertype
predicates because they lack
practical relevance. (#432) - Deprecate
ConstructorNames
andFieldNames
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
thetypes.time
module. (#425) - Remove deprecated
Refined#get
method which has been replaced by
Refined#value
. (#426) - Deprecate
scalacheck.util.Adjacent
in favor ofinternal.Adjacent
in the core module. (#475) - Deprecate
scalacheck.util.Bounded
in favor ofapi.{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