Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Scope uni = Scope (Map Name (PLCVar uni)) (Map Name PLCTyVar)
- data Verbosity
- 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)
- type NameInfo = Map Name TyThing
- data CompileOptions = CompileOptions {}
- data ProfileOpts
- data CoverageOpts = CoverageOpts {}
- data CompileContext uni fun = CompileContext {
- ccOpts ∷ CompileOptions
- ccFlags ∷ DynFlags
- ccFamInstEnvs ∷ FamInstEnvs
- ccNameInfo ∷ NameInfo
- ccScope ∷ Scope uni
- ccBlackholed ∷ Set Name
- ccCurDef ∷ Maybe LexName
- ccModBreaks ∷ Maybe ModBreaks
- ccBuiltinsInfo ∷ BuiltinsInfo uni fun
- ccBuiltinCostModel ∷ CostingPart uni fun
- ccDebugTraceOn ∷ Bool
- ccRewriteRules ∷ RewriteRules uni fun
- newtype LexName = LexName Name
- data CompileState = CompileState {
- csNextStep ∷ Int
- csPreviousSteps ∷ [Int]
- data CoverageType
- type CompilingDefault uni fun m ann = (uni ~ DefaultUni, fun ~ DefaultFun, Compiling uni fun m ann)
- stableModuleCmp ∷ Module → Module → Ordering
- stableNameCmp ∷ Name → Name → Ordering
- activeCoverageTypes ∷ CompileOptions → Set CoverageType
- blackhole ∷ MonadReader (CompileContext uni fun) m ⇒ Name → m a → m a
- blackholed ∷ MonadReader (CompileContext uni fun) m ⇒ Name → m Bool
- initialScope ∷ Scope uni
- withCurDef ∷ Compiling uni fun m ann ⇒ LexName → m a → m a
- modifyCurDeps ∷ Compiling uni fun m ann ⇒ (Set LexName → Set LexName) → m ()
- module PlutusCore.Annotation
Documentation
Verbosity level of the Plutus Tx compiler.
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 CompileOptions Source #
Compilation options.
data ProfileOpts Source #
Profiling options. All
profiles everything. None
is the default.
Instances
Show ProfileOpts Source # | |
Defined in PlutusTx.Compiler.Types | |
Eq ProfileOpts Source # | |
Defined in PlutusTx.Compiler.Types (==) ∷ ProfileOpts → ProfileOpts → Bool Source # (/=) ∷ ProfileOpts → ProfileOpts → Bool Source # | |
Pretty ProfileOpts Source # | |
Defined in PlutusTx.Compiler.Types pretty ∷ ProfileOpts → Doc ann Source # prettyList ∷ [ProfileOpts] → Doc ann Source # |
data CoverageOpts Source #
Coverage options See Note [Coverage annotations]
data CompileContext uni fun Source #
CompileContext | |
|
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.
data CompileState Source #
CompileState | |
|
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]
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 |
Instances
type CompilingDefault uni fun m ann = (uni ~ DefaultUni, fun ~ DefaultFun, Compiling uni fun m ann) Source #
stableModuleCmp ∷ Module → Module → Ordering Source #
Our own version of stableModuleCmp
.
stableNameCmp ∷ Name → Name → Ordering Source #
Our own version of stableNameCmp
.
activeCoverageTypes ∷ CompileOptions → Set CoverageType Source #
Get the coverage types we are using
blackhole ∷ MonadReader (CompileContext uni fun) m ⇒ Name → m a → m a Source #
blackholed ∷ MonadReader (CompileContext uni fun) m ⇒ Name → m Bool Source #
initialScope ∷ Scope uni Source #
withCurDef ∷ Compiling uni fun m ann ⇒ LexName → m a → m a Source #
module PlutusCore.Annotation