Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Isomorphisms in Lorentz.
Synopsis
- data LIso a b = LIso {}
- invertIso :: LIso a b -> LIso b a
- involutedIso :: Fn a a -> LIso a a
- checkedCoerceIso :: Coercible_ a b => LIso a b
- forcedCoerceIso :: MichelsonCoercible a b => LIso a b
- namedIso :: Label n -> LIso a (n :! a)
- nonIso :: (NiceConstant a, NiceComparable a) => a -> LIso (Maybe a) a
- nonDefIso :: (LDefault a, NiceConstant a) => LIso (Maybe a) a
Documentation
Lorentz version of Control.Lens.Iso.
involutedIso :: Fn a a -> LIso a a Source #
Given a function that is its own inverse, make an LIso
using it
in both directions.
checkedCoerceIso :: Coercible_ a b => LIso a b Source #
The isomorphism between two values with identical representation and semantics.
forcedCoerceIso :: MichelsonCoercible a b => LIso a b Source #
The isomorphism between two values with identical representation.
The same precautions as for forcedCoerce
apply here.
nonIso :: (NiceConstant a, NiceComparable a) => a -> LIso (Maybe a) a Source #
Absence of value on the left hand side is associated with the given value on the right hand side.