Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Ann = Ann {}
- data SrcSpan = SrcSpan {}
- newtype SrcSpans = SrcSpans {}
- newtype InlineHints name a = InlineHints {
- shouldInline ∷ a → name → Bool
- data Inline
- annAlwaysInline ∷ Ann
- annMayInline ∷ Ann
- data SourcePos = SourcePos {}
- data Pos
- addSrcSpan ∷ SrcSpan → Ann → Ann
- lineInSrcSpan ∷ Pos → SrcSpan → Bool
Documentation
An annotation type used during the compilation.
Instances
Generic Ann Source # | |
Show Ann Source # | |
Eq Ann Source # | |
Ord Ann Source # | |
Hashable Ann Source # | |
Pretty Ann Source # | |
type Rep Ann Source # | |
Defined in PlutusCore.Annotation type Rep Ann = D1 ('MetaData "Ann" "PlutusCore.Annotation" "plutus-core-1.39.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))) |
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
).
SrcSpan | |
|
Instances
Instances
newtype InlineHints name a Source #
InlineHints | |
|
Instances
Monoid (InlineHints name a) Source # | |
Defined in PlutusCore.Annotation mempty ∷ InlineHints name a Source # mappend ∷ InlineHints name a → InlineHints name a → InlineHints name a Source # mconcat ∷ [InlineHints name a] → InlineHints name a Source # | |
Semigroup (InlineHints name a) Source # | |
Defined in PlutusCore.Annotation (<>) ∷ InlineHints name a → InlineHints name a → InlineHints name a Source # sconcat ∷ NonEmpty (InlineHints name a) → InlineHints name a Source # stimes ∷ Integral b ⇒ b → InlineHints name a → InlineHints name a Source # | |
Show (InlineHints name a) Source # | |
Defined in PlutusCore.Annotation |
AlwaysInline | When calling This is currently used to ensure builtin functions such as |
MayInline |
annAlwaysInline ∷ Ann Source #
Create an Ann
with AlwaysInline
.
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.
SourcePos | |
|
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 Pos
es
together.
Since: megaparsec-5.0.0
Instances
Data Pos | |
Defined in Text.Megaparsec.Pos 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 |