Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module exports the Refined
type with its
constructor. This is very risky! In particular, the Coercible
instances will be visible throughout the importing module.
It is usually better to build the necessary coercions locally
using the utilities in Refined.Unsafe, but in some cases
it may be more convenient to write a separate module that
imports this one and exports some large coercion.
Documentation
newtype Refined (p :: k) x Source #
A refinement type, which wraps a value of type x
.
Since: 0.1.0.0
Refined x | Since: 0.1.0.0 |
Instances
newtype Refined1 (p :: k) f x Source #
A refinement type, which wraps a value of type f x
.
The predicate is applied over the functor f
. Thus, we may safely recover
various Functor
y instances, because no matter what you do to the
values inside the functor, the predicate may not be invalidated.
Refined1 (f x) |