plutarch
Safe HaskellNone
LanguageGHC2021

Plutarch.Internal.TermCont

Synopsis

Documentation

hashOpenTerm :: forall {r :: S -> Type} (s :: S) (a :: S -> Type). Term s a -> TermCont s (Hashed RawTerm) Source #

newtype TermCont (a :: S) b where Source #

Constructors

TermCont :: forall (r :: S -> Type) (a :: S) b. ((b -> Term a r) -> Term a r) -> TermCont a b 

Instances

Instances details
MonadFail (TermCont s) Source # 
Instance details

Defined in Plutarch.Internal.TermCont

Methods

fail :: String -> TermCont s a Source #

Applicative (TermCont s) Source # 
Instance details

Defined in Plutarch.Internal.TermCont

Methods

pure :: a -> TermCont s a Source #

(<*>) :: TermCont s (a -> b) -> TermCont s a -> TermCont s b Source #

liftA2 :: (a -> b -> c) -> TermCont s a -> TermCont s b -> TermCont s c Source #

(*>) :: TermCont s a -> TermCont s b -> TermCont s b Source #

(<*) :: TermCont s a -> TermCont s b -> TermCont s a Source #

Functor (TermCont s) Source # 
Instance details

Defined in Plutarch.Internal.TermCont

Methods

fmap :: (a -> b) -> TermCont s a -> TermCont s b Source #

(<$) :: a -> TermCont s b -> TermCont s a Source #

Monad (TermCont s) Source # 
Instance details

Defined in Plutarch.Internal.TermCont

Methods

(>>=) :: TermCont s a -> (a -> TermCont s b) -> TermCont s b Source #

(>>) :: TermCont s a -> TermCont s b -> TermCont s b Source #

return :: a -> TermCont s a Source #

runTermCont :: TermCont a b -> (b -> Term a r) -> Term a r Source #

unTermCont :: forall (a :: S -> Type) (s :: S). TermCont s (Term s a) -> Term s a Source #

tcont :: forall a (s :: S) (r :: S -> Type). ((a -> Term s r) -> Term s r) -> TermCont s a Source #

pfindPlaceholder :: forall {r :: S -> Type} (s :: S) (a :: S -> Type). Integer -> Term s a -> TermCont s Bool Source #

Given a term, and an integer tag, this function checks if the term holds and PPlaceholder with the given integer tag.

pfindAllPlaceholders :: forall {r :: S -> Type} (s :: S) (a :: S -> Type). Term s a -> TermCont s [Integer] Source #

Finds all placeholder ids and returns it