Safe Haskell | None |
---|---|
Language | GHC2021 |
Strongweak.Weaken
Synopsis
- class Weaken a where
- type family WeakenedN (n :: Natural) a where ...
- liftWeakF :: Weaken a => (Weakened a -> b) -> a -> b
- newtype SWCoercibly a = SWCoercibly {
- unSWCoercibly :: a
Documentation
Weaken some a
, relaxing certain invariants.
See Strongweak for class design notes and laws.
Instances
liftWeakF :: Weaken a => (Weakened a -> b) -> a -> b Source #
Lift a function on a weak type to the associated strong type by weakening first.
newtype SWCoercibly a Source #
A "via type" newtype for defining strongweak instances for zero-invariant, coercible newtypes.
Use like so:
deriving viaSWCoercibly
a instanceWeaken
(Identity
a)
Constructors
SWCoercibly | |
Fields
|
Instances
Strengthen (SWCoercibly a) Source # | |||||
Defined in Strongweak.Strengthen Methods strengthen :: Weakened (SWCoercibly a) -> Either StrengthenFailure' (SWCoercibly a) Source # | |||||
UnsafeStrengthen (SWCoercibly a) Source # | |||||
Defined in Strongweak.Strengthen.Unsafe Methods unsafeStrengthen :: Weakened (SWCoercibly a) -> SWCoercibly a Source # | |||||
Weaken (SWCoercibly a) Source # | |||||
Defined in Strongweak.Weaken Associated Types
Methods weaken :: SWCoercibly a -> Weakened (SWCoercibly a) Source # | |||||
type Weakened (SWCoercibly a) Source # | |||||
Defined in Strongweak.Weaken |