Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data PluginOptions = PluginOptions {
- _posPlcTargetVersion ∷ Version
- _posDoTypecheck ∷ Bool
- _posDeferErrors ∷ Bool
- _posConservativeOpts ∷ Bool
- _posContextLevel ∷ Int
- _posDumpPir ∷ Bool
- _posDumpPlc ∷ Bool
- _posDumpUPlc ∷ Bool
- _posOptimize ∷ Bool
- _posPedantic ∷ Bool
- _posVerbosity ∷ Verbosity
- _posMaxSimplifierIterationsPir ∷ Int
- _posMaxSimplifierIterationsUPlc ∷ Int
- _posMaxCseIterations ∷ Int
- _posDoSimplifierUnwrapCancel ∷ Bool
- _posDoSimplifierBeta ∷ Bool
- _posDoSimplifierInline ∷ Bool
- _posDoSimplifierEvaluateBuiltins ∷ Bool
- _posDoSimplifierStrictifyBindings ∷ Bool
- _posDoSimplifierRemoveDeadBindings ∷ Bool
- _posProfile ∷ ProfileOpts
- _posCoverageAll ∷ Bool
- _posCoverageLocation ∷ Bool
- _posCoverageBoolean ∷ Bool
- _posRelaxedFloatin ∷ Bool
- _posCaseOfCaseConservative ∷ Bool
- _posInlineConstants ∷ Bool
- _posPreserveLogging ∷ Bool
- _posRemoveTrace ∷ Bool
- _posDumpCompilationTrace ∷ Bool
- posVerbosity ∷ Lens' PluginOptions Verbosity
- posRemoveTrace ∷ Lens' PluginOptions Bool
- posRelaxedFloatin ∷ Lens' PluginOptions Bool
- posProfile ∷ Lens' PluginOptions ProfileOpts
- posPreserveLogging ∷ Lens' PluginOptions Bool
- posPlcTargetVersion ∷ Lens' PluginOptions Version
- posPedantic ∷ Lens' PluginOptions Bool
- posOptimize ∷ Lens' PluginOptions Bool
- posMaxSimplifierIterationsUPlc ∷ Lens' PluginOptions Int
- posMaxSimplifierIterationsPir ∷ Lens' PluginOptions Int
- posMaxCseIterations ∷ Lens' PluginOptions Int
- posInlineConstants ∷ Lens' PluginOptions Bool
- posDumpUPlc ∷ Lens' PluginOptions Bool
- posDumpPlc ∷ Lens' PluginOptions Bool
- posDumpPir ∷ Lens' PluginOptions Bool
- posDumpCompilationTrace ∷ Lens' PluginOptions Bool
- posDoTypecheck ∷ Lens' PluginOptions Bool
- posDoSimplifierUnwrapCancel ∷ Lens' PluginOptions Bool
- posDoSimplifierStrictifyBindings ∷ Lens' PluginOptions Bool
- posDoSimplifierRemoveDeadBindings ∷ Lens' PluginOptions Bool
- posDoSimplifierInline ∷ Lens' PluginOptions Bool
- posDoSimplifierEvaluateBuiltins ∷ Lens' PluginOptions Bool
- posDoSimplifierBeta ∷ Lens' PluginOptions Bool
- posDeferErrors ∷ Lens' PluginOptions Bool
- posCoverageLocation ∷ Lens' PluginOptions Bool
- posCoverageBoolean ∷ Lens' PluginOptions Bool
- posCoverageAll ∷ Lens' PluginOptions Bool
- posContextLevel ∷ Lens' PluginOptions Int
- posConservativeOpts ∷ Lens' PluginOptions Bool
- posCaseOfCaseConservative ∷ Lens' PluginOptions Bool
- type OptionKey = Text
- type OptionValue = Text
- data Implication a = ∀ b. Implication (a → Bool) (Lens' PluginOptions b) b
- data PluginOption = ∀ a.Pretty a ⇒ PluginOption {
- poTypeRep ∷ TypeRep a
- poFun ∷ Maybe OptionValue → Validation ParseError (a → a)
- poLens ∷ Lens' PluginOptions a
- poDescription ∷ Text
- poImplications ∷ [Implication a]
- data ParseError
- newtype ParseErrors = ParseErrors (NonEmpty ParseError)
- renderParseError ∷ ParseError → Text
- pluginOptions ∷ Map OptionKey PluginOption
- flag ∷ (a → a) → OptionKey → Maybe OptionValue → Validation ParseError (a → a)
- setTrue ∷ OptionKey → Maybe OptionValue → Validation ParseError (Bool → Bool)
- plcParserOption ∷ Parser a → OptionKey → Maybe OptionValue → Validation ParseError (a → a)
- readOption ∷ Read a ⇒ OptionKey → Maybe OptionValue → Validation ParseError (a → a)
- fromReadOption ∷ Read a ⇒ OptionKey → (a → Validation ParseError b) → Maybe OptionValue → Validation ParseError (b → b)
- defaultPluginOptions ∷ PluginOptions
- processOne ∷ OptionKey → Maybe OptionValue → Validation ParseError (PluginOptions → PluginOptions)
- applyImplications ∷ Lens' PluginOptions a → [Implication a] → PluginOptions → PluginOptions
- processAll ∷ [(OptionKey, Maybe OptionValue)] → Validation ParseErrors [PluginOptions → PluginOptions]
- toKeyValue ∷ CommandLineOption → (OptionKey, Maybe OptionValue)
- parsePluginOptions ∷ [CommandLineOption] → Validation ParseErrors PluginOptions
Documentation
data PluginOptions Source #
type OptionValue = Text Source #
data Implication a Source #
A data type representing option a
implying option b
.
∀ b. Implication (a → Bool) (Lens' PluginOptions b) b |
data PluginOption Source #
A plugin option definition for a PluginOptions
field of type a
.
∀ a.Pretty a ⇒ PluginOption | |
|
data ParseError Source #
CannotParseValue !OptionKey !OptionValue !SomeTypeRep | |
UnexpectedValue !OptionKey !OptionValue | |
MissingValue !OptionKey | |
UnrecognisedOption !OptionKey ![OptionKey] |
Instances
Show ParseError Source # | |
Defined in PlutusTx.Options |
newtype ParseErrors Source #
Instances
Semigroup ParseErrors Source # | |
Defined in PlutusTx.Options (<>) ∷ ParseErrors → ParseErrors → ParseErrors Source # sconcat ∷ NonEmpty ParseErrors → ParseErrors Source # stimes ∷ Integral b ⇒ b → ParseErrors → ParseErrors Source # | |
Exception ParseErrors Source # | |
Defined in PlutusTx.Options | |
Show ParseErrors Source # | |
Defined in PlutusTx.Options |
pluginOptions ∷ Map OptionKey PluginOption Source #
Definition of plugin options.
flag ∷ (a → a) → OptionKey → Maybe OptionValue → Validation ParseError (a → a) Source #
setTrue ∷ OptionKey → Maybe OptionValue → Validation ParseError (Bool → Bool) Source #
plcParserOption ∷ Parser a → OptionKey → Maybe OptionValue → Validation ParseError (a → a) Source #
readOption ∷ Read a ⇒ OptionKey → Maybe OptionValue → Validation ParseError (a → a) Source #
fromReadOption ∷ Read a ⇒ OptionKey → (a → Validation ParseError b) → Maybe OptionValue → Validation ParseError (b → b) Source #
Obtain an option value of type a
from an Int
.
processOne ∷ OptionKey → Maybe OptionValue → Validation ParseError (PluginOptions → PluginOptions) Source #
applyImplications ∷ Lens' PluginOptions a → [Implication a] → PluginOptions → PluginOptions Source #
processAll ∷ [(OptionKey, Maybe OptionValue)] → Validation ParseErrors [PluginOptions → PluginOptions] Source #
parsePluginOptions ∷ [CommandLineOption] → Validation ParseErrors PluginOptions Source #
Parses the arguments that were given to ghc at commandline as "-fplugin-opt PlutusTx.Plugin:opt" or "-fplugin-opt PlutusTx.Plugin:opt=val"