refined v0.3.0.0 Release Notes

Release Date: 2018-09-26 // about 4 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 prove Q x given any P x. The second parameter should also be nominal because of interactions with something like GreaterThan and Data.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.