Bot releases are hidden (Show)
Published by fthomas about 5 years ago
refiend-cats
and refined-scalacheck_1.13
Released on 2019-07-27
Published by fthomas over 5 years ago
validateNec
and validateNel
to cats.syntax
.Released on 2019-06-10
Published by fthomas over 5 years ago
Released on 2019-05-25
Published by fthomas over 5 years ago
auto.autoUnwrap
inReleased on 2019-04-16
Published by fthomas over 5 years ago
RefType
into new cats.derivation
scalaz.derivation
modules to fix "diverging implicit expansion"cats._
and scalaz._
.Released on 2019-01-18
Published by fthomas almost 6 years ago
Trimmed
predicate and use it to implement TrimmedString
.TrimmedString.trim
to create a TrimmedString
fromString
and an Arbitrary
instance for TrimmedString
.Arbitrary
instances for NonEmpty
List
s and Vector
s.ValidByte
, ValidShort
, and ValidFloat
that checkString
is a parsable Byte
, Short
, or Float
.RefinedType#unsafeFrom
.String
containing line terminators is a valid TrimmedString
.refined-scalaz
to Scalaz 7.2.22.refined-scalacheck
to ScalaCheck 1.14.0.Released on 2018-06-27
Published by fthomas almost 6 years ago
refinedSize
as extension method to cats.data.NonEmptyList
NonEmptyList
as a PosInt
.Byte
, Short
, BigInt
, and BigDecimal
,PosByte
, NonNegByte
, NegByte
, etc.refined-scalacheck_1.13
module which depends on ScalaCheckrefined-scalacheck
.HexStringSpec
into the module for String
predicates.String
predicates in the README.Released on 2018-11-01
Published by fthomas over 6 years ago
Contravariant
orMonadError
instances of the respective type class. This allows,Arbitrary
instances for List
, Vector
, and String
refinedSize[P]
. (#455, #471Arbitrary
instance for NonEmptyString
. (#415)predicates
package which allows to import all predicatesimport eu.timepit.refined.predicates.all._
.refined
, refined-scalaz
, and refined-shapeless
Greater[N] ==> GreaterEqual[N]
andLess[N] ==> LessEqual[N]
. (#452 by @zainab-ali)refined-shapeless
module that provides Typeable
instancesrefined-scopt
module for integration of refined typesHexString
, MD5
, SHA1
, SHA224
, SHA256
, SHA384
,SHA512
types. (#453 by @NeQuissimus)FiniteString[N]
type for String
s with length less than orN
. (#437, #479)types
package to create fewer instances and toValidate
instances into the companions of their respectiveMaxSize[N]
from Size[LessEqual[N]]
toSize[Interval.Closed[_0, N]]
and introduce the WitnessAs
type classshapeless.Nat
.Subtype
and Supertype
predicates because they lackConstructorNames
and FieldNames
predicates because theyutil.time
module which has been replaced bytypes.time
module. (#425)Refined#get
method which has been replaced byRefined#value
. (#426)scalacheck.util.Adjacent
in favor of internal.Adjacent
scalacheck.util.Bounded
in favor of api.{Min, Max}
refined-cats
to Cats 1.1.0. (#467)refined-scalaz
to Scalaz 7.2.21. (#434, #468travis_setup.sh
for Scala Native.Released on 2018-04-22
Published by fthomas over 6 years ago
MinValue
and MaxValue
to companions of numeric refined typesMin
and Max
type classes:
scala> PosInt.MinValue
res0: eu.timepit.refined.types.all.PosInt = 1
scala> PosInt.MaxValue
res1: eu.timepit.refined.types.all.PosInt = 2147483647
Thanks to Howy Perrin! (#383)Divisible[N]
if N
is a literal integral type. (#413)PosDouble
, NegDouble
, and moreeu.timepit.refined.types.numeric
module.IPv6
predicate for String
s.Modulo
predicate for large Long
values by avoiding toDouble
Validate
instance. This also restricts the predicate to typesIntegral
instance.refined-cats
to Cats 1.0.1. (#399)refined-pureconfig
to PureConfig 0.9.0.Released on 2018-01-28
Published by fthomas almost 7 years ago
validate
method to companions of refined types to accumulatecats.data.ValidatedNel
. To use this method, syntax._
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!validate
method using scalaz.ValidationNel
also to therefined-scalaz
module.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)
RefineMacro.implApplyRef
. Before this change, compilation timePosInt(1)
was one order of magnitude slower than 1: PosInt
.refined-cats
to Cats 1.0.0. (#390)Released on 2017-12-27
Published by fthomas almost 7 years ago
RefinedTypeOps
to simplify the definition of a refined type'sRefinedType
type class which combinesRefType
and Validate
instances for a refined type. With the// definition of the refined type `PosInt`
scala> type PosInt = Int Refined Positive
// definition of the companion object for `PosInt`
scala> object PosInt extends RefinedTypeOps[PosInt, Int]
scala> PosInt(1) // create `PosInt`s from literals
res0: PosInt = 1
scala> PosInt.from(2) // create `PosInt`s from runtime values
res1: Either[String, PosInt] = Right(2)
This change also adds companion objects for the refined types ineu.timepit.refined.types
package which simplifies creatingBigInt
and BigDecimal
literals in compile-time checks.scala> val x: BigDecimal Refined Positive = BigDecimal("2E+500")
x: BigDecimal Refined Positive = 2E+500
scala> val x: BigDecimal Refined Positive = BigDecimal("-2E+500")
<console>:50: error: Predicate failed: (-2E+500 > 0).
val x: BigDecimal Refined Positive = BigDecimal("-2E+500")
^
Thanks to kusamakura!IPv4
predicate for String
s and refined types for private IPv4cats.Order
instance for any refined type whose base type hasOrder
instance.Validate[ByteVector, Size[P]]
instance to the refined-scodec
ByteVector
s with the Size
predicate,scala> refineV[Size[Equal[W.`2L`.T]]](ByteVector.fromValidHex("0xabcd"))
res0: Either[String, ByteVector Refined Size[Equal[Long(2L)]]] = Right(ByteVector(2 bytes, 0xabcd))
(#365)TrimmedString
refined type for String
s without leading orrefined-scalacheck
into traits and objects forrefined-cats
to Cats 1.0.0-RC2. (#375, #350)refined-scalaz
to Scalaz 7.2.17. (#360)Released on 2017-12-19
Published by fthomas about 7 years ago
eval
in refine and infer macros for known RefType
eval
in refine macros for a few Validate
instances.Validate.instance
in the definition of Validate.fromPredicate
.refineV[Positive](x)
for instance 25% faster. (#335)Validate
instances that are built with Validate.fromPartial
.Released on 2017-10-04
Published by fthomas about 7 years ago
eu.timepit.refined.types.net
likeSystemPortNumber
and NonSystemPortNumber
.refined-jsonpath
subproject which provides the JSONPath
String
is a valid JSONPath.Validate
instance for UUID
by allowing only String
s ofrefined-cats
to Cats 1.0.0-MF.refined-scalaz
to Scalaz 7.2.15. (#312)refined-pureconfig
to PureConfig 0.8.0. (#323)Also many thanks to ronanM,
Leif Wickland, and
Richard Gomes for various improvements.
Released on 2017-09-06
Published by fthomas about 7 years ago
refined-cats
subproject which adds Eq
and Show
refined-pureconfig
to PureConfig 0.7.2.refined-scalaz
to Scalaz 7.2.13. (#288)Released on 2017-06-02
Published by fthomas about 7 years ago
Modulo[N, O]
: checks if a numeric value modulo N
is O
. (#278)Divisible[N]
: checks if a numeric value is evenly divisible by N
. (#278)NonDivisible[N]
: checks if a numeric value is not evenly divisible by N
. (#278)Even
: checks if a numeric value is evenly divisible by 2. (#278)Odd
: checks if a numeric value is not evenly divisible by 2. (#278)Thanks to Viktor Lövgren for these predicates!
refined-pureconfig
to PureConfig 0.7.0.refined-scalaz
to Scalaz 7.2.12. (#281)Released on 2017-05-08
Published by fthomas over 7 years ago
MacroUtils.eval
by calling duplicate
before untypecheckingrefined-pureconfig
to PureConfig 0.6.0.refined-scalaz
to Scalaz 7.2.10.Released on 2017-03-17
Published by fthomas over 7 years ago
Move the Eval
predicate into the new refined-eval
module
because it requires a runtime dependency on the Scala compiler.
Consequently the dependency on the Scala compiler in the core
module is changed to a "provided" dependency.
Thanks to Chris Hodapp!
(#207, #251)
Note that if you are using refined's macros, you need to add
"org.scala-lang" % "scala-compiler" % scalaVersion.value % Provided
now to your libraryDependencies
.
refined-pureconfig
to PureConfig 0.5.1.Released on 2017-01-24
Published by fthomas almost 8 years ago
type PosInt = Int Refined Positive
ortype NegInt = Int Refined Negative
to theeu.timepit.refined.types
package. The date and time related typeutil.time
to the types.time
package.Cogen
instance for any refined type to refined-scalacheck
.refined-pureconfig
to PureConfig 0.5.0.Released on 2017-01-12