plutus-core-1.30.0.0: Language library for Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

UntypedPlutusCore.Evaluation.Machine.SteppableCek.DebugDriver

Synopsis

Documentation

class Breakpointable ann bps | ann → bps where Source #

Leave abstract the types of annotation and breakpoints. The only thing the driver requires is an inclusion relation of breakpoints into the Annotation

Methods

hasBreakpoints ∷ ann → bps → Bool Source #

data CekState uni fun ann Source #

Instances

Instances details
Pretty (CekState uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.SteppableCek.Internal

Methods

prettyCekState uni fun ann → Doc ann0 #

prettyList ∷ [CekState uni fun ann] → Doc ann0 #

data Cmd bps Source #

The commands that the driver may receive from the client (tui,cli,test,etc)

Constructors

Step

Instruct the driver to a *SINGLE* step. Note: No need to pass breakpoints here because the stepping granularity is *minimal*.

Continue bps

Instruct to multi-step until end-of-program or until breakpoint reached

Next bps

Instruct to multi-step over the function call at point or until breakpoint reached

Finish bps

Instruct to multi-step to end of current function or until breakpoint reached

Instances

Instances details
Read bps ⇒ Read (Cmd bps) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.SteppableCek.DebugDriver

Show bps ⇒ Show (Cmd bps) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.SteppableCek.DebugDriver

Methods

showsPrecIntCmd bps → ShowS Source #

showCmd bps → String Source #

showList ∷ [Cmd bps] → ShowS Source #

runDriverT ∷ ∀ uni fun ann bps m. (Breakpointable ann bps, MonadFree (DebugF uni fun ann bps) m) ⇒ NTerm uni fun ann → m () Source #

Entrypoint of the driver

data DebugF uni fun ann bps a Source #

The drivers's suspension functor

Constructors

InputF (Cmd bps → a)

Await for the client (e.g. TUI) to tell what to do next (Cmd).

DriverLogF Text a

The debug driver wants to log something

StepF

An enumeratee of Driver State (generator+iteratee): Yield a state before doing a step, then await for a state to resume after the step. See Note [Stepping the driver].

Fields

  • (CekState uni fun ann)

    yield with the current driver's state before running a step

  • (CekState uni fun ann → a)

    resume back with a state after the step interpretation | A generator of CekState to yield to client (e.g. TUI)

UpdateClientF (CekState uni fun ann) a 

Instances

Instances details
Functor (DebugF uni fun ann bps) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.SteppableCek.DebugDriver

Methods

fmap ∷ (a → b) → DebugF uni fun ann bps a → DebugF uni fun ann bps b Source #

(<$) ∷ a → DebugF uni fun ann bps b → DebugF uni fun ann bps a Source #

Reexport some functions for convenience

mkCekTrans ∷ ∀ cost uni fun ann m s. (ThrowableBuiltins uni fun, PrimMonad m, s ~ PrimState m) ⇒ MachineParameters CekMachineCosts fun (CekValue uni fun ann) → ExBudgetMode cost uni fun → EmitterMode uni fun → Slippage → m (CekTrans uni fun ann s, ExBudgetInfo cost uni fun s) Source #

Based on the supplied arguments, initialize the CEK environment and construct a state transition function. Returns the constructed transition function paired with the methods to live access the running budget.

type CekTrans uni fun ann s = Trans (CekM uni fun s) (CekState uni fun ann) Source #

class Monad m ⇒ MonadFree (f ∷ TypeType) (m ∷ TypeType) | m → f #

Instances

Instances details
Functor f ⇒ MonadFree f (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

wrap ∷ f (Free f a) → Free f a

(Functor f, MonadFree f m) ⇒ MonadFree f (Yoneda m) 
Instance details

Defined in Data.Functor.Yoneda

Methods

wrap ∷ f (Yoneda m a) → Yoneda m a

(Functor f, MonadFree f m) ⇒ MonadFree f (MaybeT m) 
Instance details

Defined in Control.Monad.Free.Class

Methods

wrap ∷ f (MaybeT m a) → MaybeT m a

(Functor f, Monad m) ⇒ MonadFree f (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

wrap ∷ f (FreeT f m a) → FreeT f m a

(Functor f, MonadFree f m) ⇒ MonadFree f (ExceptT e m) 
Instance details

Defined in Control.Monad.Free.Class

Methods

wrap ∷ f (ExceptT e m a) → ExceptT e m a

(Functor f, MonadFree f m) ⇒ MonadFree f (IdentityT m) 
Instance details

Defined in Control.Monad.Free.Class

Methods

wrap ∷ f (IdentityT m a) → IdentityT m a

(Functor f, MonadFree f m) ⇒ MonadFree f (ReaderT e m) 
Instance details

Defined in Control.Monad.Free.Class

Methods

wrap ∷ f (ReaderT e m a) → ReaderT e m a

(Functor f, MonadFree f m) ⇒ MonadFree f (StateT s m) 
Instance details

Defined in Control.Monad.Free.Class

Methods

wrap ∷ f (StateT s m a) → StateT s m a

(Functor f, MonadFree f m) ⇒ MonadFree f (StateT s m) 
Instance details

Defined in Control.Monad.Free.Class

Methods

wrap ∷ f (StateT s m a) → StateT s m a

(Functor f, MonadFree f m, Monoid w) ⇒ MonadFree f (WriterT w m) 
Instance details

Defined in Control.Monad.Free.Class

Methods

wrap ∷ f (WriterT w m a) → WriterT w m a

(Functor f, MonadFree f m, Monoid w) ⇒ MonadFree f (WriterT w m) 
Instance details

Defined in Control.Monad.Free.Class

Methods

wrap ∷ f (WriterT w m a) → WriterT w m a

(Functor f, MonadFree f m) ⇒ MonadFree f (ContT r m) 
Instance details

Defined in Control.Monad.Free.Class

Methods

wrap ∷ f (ContT r m a) → ContT r m a

(Functor f, MonadFree f m, Monoid w) ⇒ MonadFree f (RWST r w s m) 
Instance details

Defined in Control.Monad.Free.Class

Methods

wrap ∷ f (RWST r w s m a) → RWST r w s m a

(Functor f, MonadFree f m, Monoid w) ⇒ MonadFree f (RWST r w s m) 
Instance details

Defined in Control.Monad.Free.Class

Methods

wrap ∷ f (RWST r w s m a) → RWST r w s m a

iterM ∷ (Functor f, Monad m) ⇒ (f (m a) → m a) → Free f a → m a #

iterTM ∷ ∀ f (m ∷ TypeType) t a. (Functor f, Monad m, MonadTrans t, Monad (t m)) ⇒ (f (t m a) → t m a) → FreeT f m a → t m a #

partialIterTMonad m ⇒ Integer → (∀ a. f a → m a) → FreeT f m b → FreeT f m b #

cutoff ∷ ∀ (f ∷ TypeType) (m ∷ TypeType) a. (Functor f, Monad m) ⇒ IntegerFreeT f m a → FreeT f m (Maybe a) #

data FreeT (f ∷ TypeType) (m ∷ TypeType) a #

Instances

Instances details
(Functor f, Monad m) ⇒ MonadFree f (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

wrap ∷ f (FreeT f m a) → FreeT f m a

(Functor f, MonadError e m) ⇒ MonadError e (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

throwError ∷ e → FreeT f m a

catchErrorFreeT f m a → (e → FreeT f m a) → FreeT f m a

(Functor f, MonadReader r m) ⇒ MonadReader r (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

askFreeT f m r

local ∷ (r → r) → FreeT f m a → FreeT f m a

reader ∷ (r → a) → FreeT f m a

(Functor f, MonadState s m) ⇒ MonadState s (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

getFreeT f m s

put ∷ s → FreeT f m ()

state ∷ (s → (a, s)) → FreeT f m a

(Functor f, MonadWriter w m) ⇒ MonadWriter w (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

writer ∷ (a, w) → FreeT f m a

tell ∷ w → FreeT f m ()

listenFreeT f m a → FreeT f m (a, w)

passFreeT f m (a, w → w) → FreeT f m a

(Functor f, MonadBase b m) ⇒ MonadBase b (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftBase ∷ b α → FreeT f m α

Functor f ⇒ MonadTrans (FreeT f) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftMonad m ⇒ m a → FreeT f m a

(Functor f, MonadFail m) ⇒ MonadFail (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

failStringFreeT f m a Source #

(Functor f, MonadIO m) ⇒ MonadIO (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftIOIO a → FreeT f m a Source #

(Foldable m, Foldable f) ⇒ Foldable (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

foldMonoid m0 ⇒ FreeT f m m0 → m0 Source #

foldMapMonoid m0 ⇒ (a → m0) → FreeT f m a → m0 Source #

foldMap'Monoid m0 ⇒ (a → m0) → FreeT f m a → m0 Source #

foldr ∷ (a → b → b) → b → FreeT f m a → b Source #

foldr' ∷ (a → b → b) → b → FreeT f m a → b Source #

foldl ∷ (b → a → b) → b → FreeT f m a → b Source #

foldl' ∷ (b → a → b) → b → FreeT f m a → b Source #

foldr1 ∷ (a → a → a) → FreeT f m a → a Source #

foldl1 ∷ (a → a → a) → FreeT f m a → a Source #

toListFreeT f m a → [a] Source #

nullFreeT f m a → Bool Source #

lengthFreeT f m a → Int Source #

elemEq a ⇒ a → FreeT f m a → Bool Source #

maximumOrd a ⇒ FreeT f m a → a Source #

minimumOrd a ⇒ FreeT f m a → a Source #

sumNum a ⇒ FreeT f m a → a Source #

productNum a ⇒ FreeT f m a → a Source #

(Eq1 f, Eq1 m) ⇒ Eq1 (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftEq ∷ (a → b → Bool) → FreeT f m a → FreeT f m b → Bool Source #

(Ord1 f, Ord1 m) ⇒ Ord1 (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftCompare ∷ (a → b → Ordering) → FreeT f m a → FreeT f m b → Ordering Source #

(Read1 f, Read1 m) ⇒ Read1 (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftReadsPrec ∷ (IntReadS a) → ReadS [a] → IntReadS (FreeT f m a) Source #

liftReadList ∷ (IntReadS a) → ReadS [a] → ReadS [FreeT f m a] Source #

liftReadPrecReadPrec a → ReadPrec [a] → ReadPrec (FreeT f m a) Source #

liftReadListPrecReadPrec a → ReadPrec [a] → ReadPrec [FreeT f m a] Source #

(Show1 f, Show1 m) ⇒ Show1 (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftShowsPrec ∷ (Int → a → ShowS) → ([a] → ShowS) → IntFreeT f m a → ShowS Source #

liftShowList ∷ (Int → a → ShowS) → ([a] → ShowS) → [FreeT f m a] → ShowS Source #

(Monad m, Traversable m, Traversable f) ⇒ Traversable (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

traverseApplicative f0 ⇒ (a → f0 b) → FreeT f m a → f0 (FreeT f m b) Source #

sequenceAApplicative f0 ⇒ FreeT f m (f0 a) → f0 (FreeT f m a) Source #

mapMMonad m0 ⇒ (a → m0 b) → FreeT f m a → m0 (FreeT f m b) Source #

sequenceMonad m0 ⇒ FreeT f m (m0 a) → m0 (FreeT f m a) Source #

(Functor f, MonadPlus m) ⇒ Alternative (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

emptyFreeT f m a Source #

(<|>)FreeT f m a → FreeT f m a → FreeT f m a Source #

someFreeT f m a → FreeT f m [a] Source #

manyFreeT f m a → FreeT f m [a] Source #

(Functor f, Monad m) ⇒ Applicative (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

pure ∷ a → FreeT f m a Source #

(<*>)FreeT f m (a → b) → FreeT f m a → FreeT f m b Source #

liftA2 ∷ (a → b → c) → FreeT f m a → FreeT f m b → FreeT f m c Source #

(*>)FreeT f m a → FreeT f m b → FreeT f m b Source #

(<*)FreeT f m a → FreeT f m b → FreeT f m a Source #

(Functor f, Functor m) ⇒ Functor (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

fmap ∷ (a → b) → FreeT f m a → FreeT f m b Source #

(<$) ∷ a → FreeT f m b → FreeT f m a Source #

(Functor f, Monad m) ⇒ Monad (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

(>>=)FreeT f m a → (a → FreeT f m b) → FreeT f m b Source #

(>>)FreeT f m a → FreeT f m b → FreeT f m b Source #

return ∷ a → FreeT f m a Source #

(Functor f, MonadPlus m) ⇒ MonadPlus (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

mzeroFreeT f m a Source #

mplusFreeT f m a → FreeT f m a → FreeT f m a Source #

(Functor f, MonadCatch m) ⇒ MonadCatch (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

catch ∷ (HasCallStack, Exception e) ⇒ FreeT f m a → (e → FreeT f m a) → FreeT f m a

(Functor f, MonadThrow m) ⇒ MonadThrow (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

throwM ∷ (HasCallStack, Exception e) ⇒ e → FreeT f m a

(Functor f, MonadCont m) ⇒ MonadCont (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

callCC ∷ ((a → FreeT f m b) → FreeT f m a) → FreeT f m a

(Functor f, Monad m) ⇒ Apply (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

(<.>)FreeT f m (a → b) → FreeT f m a → FreeT f m b

(.>)FreeT f m a → FreeT f m b → FreeT f m b

(<.)FreeT f m a → FreeT f m b → FreeT f m a

liftF2 ∷ (a → b → c) → FreeT f m a → FreeT f m b → FreeT f m c

(Functor f, Monad m) ⇒ Bind (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

(>>-)FreeT f m a → (a → FreeT f m b) → FreeT f m b

joinFreeT f m (FreeT f m a) → FreeT f m a

(Functor f, Zoom m n s t) ⇒ Zoom (FreeT f m) (FreeT f n) s t 
Instance details

Defined in Control.Lens.Zoom

Methods

zoom ∷ LensLike' (Zoomed (FreeT f m) c) t s → FreeT f m c → FreeT f n c

(Read1 f, Read1 m, Read a) ⇒ Read (FreeT f m a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

readsPrecIntReadS (FreeT f m a) Source #

readListReadS [FreeT f m a] Source #

readPrecReadPrec (FreeT f m a) Source #

readListPrecReadPrec [FreeT f m a] Source #

(Show1 f, Show1 m, Show a) ⇒ Show (FreeT f m a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

showsPrecIntFreeT f m a → ShowS Source #

showFreeT f m a → String Source #

showList ∷ [FreeT f m a] → ShowS Source #

(Eq1 f, Eq1 m, Eq a) ⇒ Eq (FreeT f m a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

(==)FreeT f m a → FreeT f m a → Bool Source #

(/=)FreeT f m a → FreeT f m a → Bool Source #

(Ord1 f, Ord1 m, Ord a) ⇒ Ord (FreeT f m a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

compareFreeT f m a → FreeT f m a → Ordering Source #

(<)FreeT f m a → FreeT f m a → Bool Source #

(<=)FreeT f m a → FreeT f m a → Bool Source #

(>)FreeT f m a → FreeT f m a → Bool Source #

(>=)FreeT f m a → FreeT f m a → Bool Source #

maxFreeT f m a → FreeT f m a → FreeT f m a Source #

minFreeT f m a → FreeT f m a → FreeT f m a Source #

(Traversable f, Traversable m) ⇒ Plated (FreeT f m a) 
Instance details

Defined in Control.Lens.Plated

Methods

plate ∷ Traversal' (FreeT f m a) (FreeT f m a)

Wrapped (FreeT f m a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (FreeT f m a)

Methods

_Wrapped' ∷ Iso' (FreeT f m a) (Unwrapped (FreeT f m a))

(Functor m, Functor f) ⇒ Corecursive (FreeT f m a) 
Instance details

Defined in Data.Functor.Foldable

Methods

embed ∷ Base (FreeT f m a) (FreeT f m a) → FreeT f m a

ana ∷ (a0 → Base (FreeT f m a) a0) → a0 → FreeT f m a

apo ∷ (a0 → Base (FreeT f m a) (Either (FreeT f m a) a0)) → a0 → FreeT f m a

postpro ∷ Recursive (FreeT f m a) ⇒ (∀ b. Base (FreeT f m a) b → Base (FreeT f m a) b) → (a0 → Base (FreeT f m a) a0) → a0 → FreeT f m a

gpostpro ∷ (Recursive (FreeT f m a), Monad m0) ⇒ (∀ b. m0 (Base (FreeT f m a) b) → Base (FreeT f m a) (m0 b)) → (∀ c. Base (FreeT f m a) c → Base (FreeT f m a) c) → (a0 → Base (FreeT f m a) (m0 a0)) → a0 → FreeT f m a

(Functor m, Functor f) ⇒ Recursive (FreeT f m a) 
Instance details

Defined in Data.Functor.Foldable

Methods

projectFreeT f m a → Base (FreeT f m a) (FreeT f m a)

cata ∷ (Base (FreeT f m a) a0 → a0) → FreeT f m a → a0

para ∷ (Base (FreeT f m a) (FreeT f m a, a0) → a0) → FreeT f m a → a0

gpara ∷ (Corecursive (FreeT f m a), Comonad w) ⇒ (∀ b. Base (FreeT f m a) (w b) → w (Base (FreeT f m a) b)) → (Base (FreeT f m a) (EnvT (FreeT f m a) w a0) → a0) → FreeT f m a → a0

prepro ∷ Corecursive (FreeT f m a) ⇒ (∀ b. Base (FreeT f m a) b → Base (FreeT f m a) b) → (Base (FreeT f m a) a0 → a0) → FreeT f m a → a0

gprepro ∷ (Corecursive (FreeT f m a), Comonad w) ⇒ (∀ b. Base (FreeT f m a) (w b) → w (Base (FreeT f m a) b)) → (∀ c. Base (FreeT f m a) c → Base (FreeT f m a) c) → (Base (FreeT f m a) (w a0) → a0) → FreeT f m a → a0

t ~ FreeT f' m' a' ⇒ Rewrapped (FreeT f m a) t 
Instance details

Defined in Control.Lens.Wrapped

type Zoomed (FreeT f m) 
Instance details

Defined in Control.Lens.Zoom

type Zoomed (FreeT f m) = FocusingFree f m (Zoomed m)
type Unwrapped (FreeT f m a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (FreeT f m a) = m (FreeF f a (FreeT f m a))
type Base (FreeT f m a) 
Instance details

Defined in Data.Functor.Foldable

type Base (FreeT f m a) = Compose m (FreeF f a)