| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
PlutusCore.Annotation
Synopsis
- data Ann = Ann {}
- data SrcSpan = SrcSpan {}
- newtype SrcSpans = SrcSpans {}
- newtype InlineHints name a = InlineHints {
- shouldInline ∷ a → name → Inline
- data Inline
- class AnnInline a where
- annAlwaysInline ∷ a
- annSafeToInline ∷ a
- annMayInline ∷ a
- data SourcePos = SourcePos {}
- data Pos
- addSrcSpan ∷ SrcSpan → Ann → Ann
- lineInSrcSpan ∷ Pos → SrcSpan → Bool
Documentation
An annotation type used during the compilation.
Constructors
| Ann | |
Fields | |
Instances
| Generic Ann Source # | |
| Show Ann Source # | |
| Default Ann Source # | |
Defined in PlutusCore.Annotation | |
| Eq Ann Source # | |
| Ord Ann Source # | |
| Hashable Ann Source # | |
| AnnInline Ann Source # | |
Defined in PlutusCore.Annotation | |
| Pretty Ann Source # | |
| type Rep Ann Source # | |
Defined in PlutusCore.Annotation type Rep Ann = D1 ('MetaData "Ann" "PlutusCore.Annotation" "plutus-core-1.54.0.0-inplace" 'False) (C1 ('MetaCons "Ann" 'PrefixI 'True) (S1 ('MetaSel ('Just "annInline") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Inline) :*: (S1 ('MetaSel ('Just "annSrcSpans") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SrcSpans) :*: S1 ('MetaSel ('Just "annIsAsDataMatcher") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) | |
The span between two source locations.
This corresponds roughly to the SrcSpan used by GHC,
but we define our own version so we don't have to depend on ghc to use it.
The line and column numbers are 1-based, and the unit is Unicode code point (or Char).
Constructors
| SrcSpan | |
Fields
| |
Instances
Constructors
| SrcSpans | |
Fields | |
Instances
newtype InlineHints name a Source #
Constructors
| InlineHints | |
Fields
| |
Instances
| Show (InlineHints name a) Source # | |
Defined in PlutusCore.Annotation | |
| Default (InlineHints name a) Source # | |
Defined in PlutusCore.Annotation Methods def ∷ InlineHints name a # | |
Constructors
| AlwaysInline | When calling This is currently used to ensure builtin functions such as |
| SafeToInline | Signaling to the compiler that a binding is safe to inline. This is useful for annotating strict bindings that aren't obviously safe to inline. |
| MayInline |
Instances
| Generic Inline Source # | |
| Show Inline Source # | |
| Eq Inline Source # | |
| Ord Inline Source # | |
Defined in PlutusCore.Annotation | |
| Hashable Inline Source # | |
| type Rep Inline Source # | |
Defined in PlutusCore.Annotation type Rep Inline = D1 ('MetaData "Inline" "PlutusCore.Annotation" "plutus-core-1.54.0.0-inplace" 'False) (C1 ('MetaCons "AlwaysInline" 'PrefixI 'False) (U1 ∷ Type → Type) :+: (C1 ('MetaCons "SafeToInline" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "MayInline" 'PrefixI 'False) (U1 ∷ Type → Type))) | |
class AnnInline a where Source #
Methods
annAlwaysInline ∷ a Source #
An annotation instructing the inliner to always inline a binding.
annSafeToInline ∷ a Source #
An annotation signaling to the inliner that a binding is safe to inline. The inlining decision is left to the inliner. This is useful for annotating strict bindings that aren't obviously safe to inline.
annMayInline ∷ a Source #
An annotation that leaves the inlining decision to the inliner.
Instances
| AnnInline Ann Source # | |
Defined in PlutusCore.Annotation | |
| AnnInline () Source # | |
Defined in PlutusCore.Annotation | |
The data type SourcePos represents source positions. It contains the
name of the source file, a line number, and a column number. Source line
and column positions change intensively during parsing, so we need to
make them strict to avoid memory leaks.
Constructors
| SourcePos | |
Fields
| |
Instances
Pos is the type for positive integers. This is used to represent line
number, column number, and similar things like indentation level.
Semigroup instance can be used to safely and efficiently add Poses
together.
Since: megaparsec-5.0.0
Instances
| Data Pos | |
Defined in Text.Megaparsec.Pos Methods gfoldl ∷ (∀ d b. Data d ⇒ c (d → b) → d → c b) → (∀ g. g → c g) → Pos → c Pos Source # gunfold ∷ (∀ b r. Data b ⇒ c (b → r) → c r) → (∀ r. r → c r) → Constr → c Pos Source # toConstr ∷ Pos → Constr Source # dataTypeOf ∷ Pos → DataType Source # dataCast1 ∷ Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c Pos) Source # dataCast2 ∷ Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c Pos) Source # gmapT ∷ (∀ b. Data b ⇒ b → b) → Pos → Pos Source # gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → Pos → r Source # gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → Pos → r Source # gmapQ ∷ (∀ d. Data d ⇒ d → u) → Pos → [u] Source # gmapQi ∷ Int → (∀ d. Data d ⇒ d → u) → Pos → u Source # gmapM ∷ Monad m ⇒ (∀ d. Data d ⇒ d → m d) → Pos → m Pos Source # gmapMp ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Pos → m Pos Source # gmapMo ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Pos → m Pos Source # | |
| Semigroup Pos | |
| Generic Pos | |
| Read Pos | |
| Show Pos | |
| NFData Pos | |
Defined in Text.Megaparsec.Pos | |
| Eq Pos | |
| Ord Pos | |
| type Rep Pos | |
Defined in Text.Megaparsec.Pos | |