plutus-tx-plugin-1.30.0.0: The Plutus Tx compiler and GHC plugin
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusTx.Compiler.Types

Synopsis

Documentation

type Compiling uni fun m ann = (MonadError (CompileError uni fun ann) m, MonadQuote m, MonadReader (CompileContext uni fun) m, MonadState CompileState m, MonadDefs LexName uni fun Ann m, MonadWriter CoverageIndex m) Source #

data Scope uni Source #

Constructors

Scope (Map Name (PLCVar uni)) (Map Name PLCTyVar) 

type NameInfo = Map Name TyThing Source #

data CompileOptions Source #

Compilation options.

data ProfileOpts Source #

Profiling options. All profiles everything. None is the default.

Constructors

All 
None 

Instances

Instances details
Show ProfileOpts Source # 
Instance details

Defined in PlutusTx.Compiler.Types

Eq ProfileOpts Source # 
Instance details

Defined in PlutusTx.Compiler.Types

Pretty ProfileOpts Source # 
Instance details

Defined in PlutusTx.Compiler.Types

Methods

prettyProfileOptsDoc ann #

prettyList ∷ [ProfileOpts] → Doc ann #

data CoverageOpts Source #

Coverage options See Note [Coverage annotations]

Constructors

CoverageOpts 

data CompileContext uni fun Source #

Constructors

CompileContext 

Fields

newtype LexName Source #

A wrapper around Name with a stable Ord instance. Use this where the ordering will affect the output of the compiler, i.e. when sorting or so on. It's fine to use Name if we're just putting them in a Set, for example.

The Eq instance we derive - it's also not stable across builds, but I believe this is only a problem if you compare things from different builds, which we don't do.

Constructors

LexName Name 

Instances

Instances details
Show LexName Source # 
Instance details

Defined in PlutusTx.Compiler.Types

Eq LexName Source # 
Instance details

Defined in PlutusTx.Compiler.Types

Methods

(==)LexNameLexNameBool Source #

(/=)LexNameLexNameBool Source #

Ord LexName Source # 
Instance details

Defined in PlutusTx.Compiler.Types

data CompileState Source #

Constructors

CompileState 

Fields

  • csNextStepInt

    The ID of the next step to be taken by the PlutusTx compiler. This is used when generating debug traces.

  • csPreviousSteps ∷ [Int]

    The IDs of the previous steps taken by the PlutusTx compiler leading up to the current point. This is used when generating debug traces.

data Verbosity Source #

Verbosity level of the Plutus Tx compiler.

Constructors

Quiet 
Verbose 
Debug 

Instances

Instances details
Show Verbosity Source # 
Instance details

Defined in PlutusTx.Compiler.Types

Eq Verbosity Source # 
Instance details

Defined in PlutusTx.Compiler.Types

Pretty Verbosity Source # 
Instance details

Defined in PlutusTx.Compiler.Types

Methods

prettyVerbosityDoc ann #

prettyList ∷ [Verbosity] → Doc ann #

data CoverageType Source #

Option `{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:coverage-all #-}` enables all these See Note [Adding more coverage annotations]. See Note [Coverage order]

Constructors

LocationCoverage

Check that all source locations that we can identify in GHC Core have been covered. For this to work at all we need `{-# OPTIONS_GHC -g #-}` turn on with `{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:coverage-location #-}`

BooleanCoverage

Check that every boolean valued expression that isn't True or False for which we know the source location have been covered. For this to work at all we need `{-# OPTIONS_GHC -g #-}` turn on with `{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:coverage-boolean #-}`

Instances

Instances details
Bounded CoverageType Source # 
Instance details

Defined in PlutusTx.Compiler.Types

Enum CoverageType Source # 
Instance details

Defined in PlutusTx.Compiler.Types

Show CoverageType Source # 
Instance details

Defined in PlutusTx.Compiler.Types

Eq CoverageType Source # 
Instance details

Defined in PlutusTx.Compiler.Types

Ord CoverageType Source # 
Instance details

Defined in PlutusTx.Compiler.Types

type CompilingDefault uni fun m ann = (uni ~ DefaultUni, fun ~ DefaultFun, Compiling uni fun m ann) Source #

activeCoverageTypesCompileOptions → Set CoverageType Source #

Get the coverage types we are using

stableNameCmp ∷ Name → Name → Ordering Source #

Our own version of stableNameCmp.

stableModuleCmp ∷ Module → Module → Ordering Source #

Our own version of stableModuleCmp.

blackhole ∷ MonadReader (CompileContext uni fun) m ⇒ Name → m a → m a Source #

blackholed ∷ MonadReader (CompileContext uni fun) m ⇒ Name → m Bool Source #

withCurDefCompiling uni fun m ann ⇒ LexName → m a → m a Source #

modifyCurDepsCompiling uni fun m ann ⇒ (Set LexName → Set LexName) → m () Source #