Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- pfromJust :: forall (a :: PType) (s :: S). Term s (PMaybe a :--> a)
- ptraceIfNothing :: forall (a :: PType) (s :: S). Term s PString -> Term s (PMaybe a) -> Term s a
- pisJust :: forall (a :: PType) (s :: S). Term s (PMaybe a :--> PBool)
- pmaybe :: forall (b :: PType) (a :: PType) (s :: S). Term s (b :--> ((a :--> b) :--> (PMaybe a :--> b)))
- pfromMaybe :: forall (a :: PType) (s :: S). Term s (a :--> (PMaybe a :--> a))
- pjust :: forall (a :: PType) (s :: S). Term s (a :--> PMaybe a)
- pnothing :: forall (a :: PType) (s :: S). Term s (PMaybe a)
- pfromDJust :: forall (a :: PType) (s :: S). PIsData a => Term s (PMaybeData a :--> a)
- pisDJust :: forall (a :: PType) (s :: S). Term s (PMaybeData a :--> PBool)
- pmaybeData :: forall (a :: PType) (b :: PType) (s :: S). PIsData a => Term s (b :--> ((a :--> b) :--> (PMaybeData a :--> b)))
- pdjust :: forall (a :: PType) (s :: S). PIsData a => Term s (a :--> PMaybeData a)
- pdnothing :: forall (a :: PType) (s :: S). Term s (PMaybeData a)
- pmaybeToMaybeData :: forall (a :: PType) (s :: S). PIsData a => Term s (PMaybe a :--> PMaybeData a)
- pexpectJustC :: forall (a :: PType) (r :: PType) (s :: S). Term s r -> Term s (PMaybe a) -> TermCont @r s (Term s a)
- passertPJust :: forall (a :: PType) (s :: S). Term s (PString :--> (PMaybe a :--> a))
- passertPDJust :: forall (a :: PType) (s :: S). PIsData a => Term s (PString :--> (PMaybeData a :--> a))
Utility functions for working with PMaybe
pmaybe :: forall (b :: PType) (a :: PType) (s :: S). Term s (b :--> ((a :--> b) :--> (PMaybe a :--> b))) Source #
Utility functions for working with PMaybeData
pfromDJust :: forall (a :: PType) (s :: S). PIsData a => Term s (PMaybeData a :--> a) Source #
pisDJust :: forall (a :: PType) (s :: S). Term s (PMaybeData a :--> PBool) Source #
Yield True if a given PMaybeData
is of form
.PDJust
_
pmaybeData :: forall (a :: PType) (b :: PType) (s :: S). PIsData a => Term s (b :--> ((a :--> b) :--> (PMaybeData a :--> b))) Source #
Special version of pmaybe
that works with PMaybeData
pdjust :: forall (a :: PType) (s :: S). PIsData a => Term s (a :--> PMaybeData a) Source #
Construct a PDJust
value
pdnothing :: forall (a :: PType) (s :: S). Term s (PMaybeData a) Source #
Construct a PDNothing
value
Conversion between PMaybe
and PMaybeData
pmaybeToMaybeData :: forall (a :: PType) (s :: S). PIsData a => Term s (PMaybe a :--> PMaybeData a) Source #
Copnsturct a PMaybeData
given a PMaybe
. Could be useful if you want to "lift" from PMaybe
to Maybe
.
TermCont-based combinators
pexpectJustC :: forall (a :: PType) (r :: PType) (s :: S). Term s r -> Term s (PMaybe a) -> TermCont @r s (Term s a) Source #
Escape with a particular value on expecting Just
. For use in monadic context.