refined v0.3.0.0 Release Notes
Release Date: 2018-09-26 // over 5 years ago-
โ Added
- Internal module, and Unsafe modules, making sure to take care w.r.t. the scope of coercions related to the use of the 'Refined' constructor.
- 'IdPred' predicate, predicate that never fails.
- Generic instances for all predicates.
reallyUnsafeRefine
,reallyUnsafeUnderlyingRefined
,reallyUnsafeAllUnderlyingRefined
, functions that allow one to use 'Coercion's to manually prove things about 'Refined' values. ### ๐ Changed- Type role of Refined from 'phantom Representational' to 'nominal nominal'.
With the old type role, one can use
coerce
to proveQ x
given anyP x
. The second parameter should also be nominal because of interactions with something likeGreaterThan
andData.Ord.Down
. Thanks to David Feuer for pointing this out. - ๐ Change docs to point users to 'Refined.Unsafe' module instead of recommending 'Unsafe.Coerce.unsafeCoerce'.
- 'Ascending' and 'Descending' predicates now use 'Foldable' instead of 'IsList'.
- ๐ Lowered the lower bound on 'exceptions'; it was too strict for the support window. ### โ Removed
- ๐ฆ Dependency of the 'these' package. It brings in some very
heavy transitive dependencies, even though the datatype
in
refined
is used to the most minimal extent. This is a breaking change because this change is exposed to the end user via 'RefineAndException'. It is exported from a module called 'Refined.These'. Users wishing to interact with such exceptions can either just use the datatype constituting a minimal API there, or depend on the 'these' package.