Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data PEither (a :: S -> Type) (b :: S -> Type) (s :: S)
- data PEitherData (a :: S -> Type) (b :: S -> Type) (s :: S)
- pdleft :: forall (a :: S -> Type) (b :: S -> Type) (s :: S). PIsData a => Term s (a :--> PEitherData a b)
- pdright :: forall (a :: S -> Type) (b :: S -> Type) (s :: S). PIsData b => Term s (b :--> PEitherData a b)
- peitherData :: forall (a :: S -> Type) (b :: S -> Type) (r :: S -> Type) (s :: S). (PIsData a, PIsData b) => Term s ((a :--> r) :--> ((b :--> r) :--> (PEitherData a b :--> r)))
- pdisLeft :: forall (a :: S -> Type) (b :: S -> Type) (s :: S). Term s (PEitherData a b :--> PBool)
- pdisRight :: forall (a :: S -> Type) (b :: S -> Type) (s :: S). Term s (PEitherData a b :--> PBool)
- pdfromLeft :: forall (a :: S -> Type) (b :: S -> Type) (s :: S). PIsData a => Term s (PEitherData a b :--> a)
- pdfromRight :: forall (a :: S -> Type) (b :: S -> Type) (s :: S). PIsData b => Term s (PEitherData a b :--> b)
Types
data PEither (a :: S -> Type) (b :: S -> Type) (s :: S) Source #
Scott-encoded Either
.
Instances
data PEitherData (a :: S -> Type) (b :: S -> Type) (s :: S) Source #
Data
-encoded Either
.
@since WIP
Instances
Functions
PEitherData
Construction
pdleft :: forall (a :: S -> Type) (b :: S -> Type) (s :: S). PIsData a => Term s (a :--> PEitherData a b) Source #
Make a Data
-encoded Left
.
@since WIP
pdright :: forall (a :: S -> Type) (b :: S -> Type) (s :: S). PIsData b => Term s (b :--> PEitherData a b) Source #
Make a Data
-encoded Right
.
@since WIP
Elimination
peitherData :: forall (a :: S -> Type) (b :: S -> Type) (r :: S -> Type) (s :: S). (PIsData a, PIsData b) => Term s ((a :--> r) :--> ((b :--> r) :--> (PEitherData a b :--> r))) Source #
Eliminator for PEitherData
.
@since WIP
pdisLeft :: forall (a :: S -> Type) (b :: S -> Type) (s :: S). Term s (PEitherData a b :--> PBool) Source #
Verifies if a PEitherData
is a PDLeft
. Less code than using
peitherData
, as it doesn't need to inspect the contents.
@since WIP
pdisRight :: forall (a :: S -> Type) (b :: S -> Type) (s :: S). Term s (PEitherData a b :--> PBool) Source #
pdfromLeft :: forall (a :: S -> Type) (b :: S -> Type) (s :: S). PIsData a => Term s (PEitherData a b :--> a) Source #
Return the value inside a PDEither
if it's a PDLeft
, error otherwise.
@since WIP
pdfromRight :: forall (a :: S -> Type) (b :: S -> Type) (s :: S). PIsData b => Term s (PEitherData a b :--> b) Source #
As pdfromLeft
, but yields a value if given a PDRight
instead.
@since WIP