| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
PlutusCore.Annotation
Synopsis
- data Ann = Ann {}
- data SrcSpan = SrcSpan {
- srcSpanFile :: FilePath
- srcSpanSLine :: Int
- srcSpanSCol :: Int
- srcSpanELine :: Int
- srcSpanECol :: Int
- newtype SrcSpans = SrcSpans {
- unSrcSpans :: Set SrcSpan
- newtype InlineHints name a = InlineHints {
- shouldInline :: a -> name -> Inline
- data Inline
- class AnnInline a where
- annAlwaysInline :: a
- annSafeToInline :: a
- annMayInline :: a
- data SourcePos = SourcePos {
- sourceName :: FilePath
- sourceLine :: !Pos
- sourceColumn :: !Pos
- data Pos
- addSrcSpan :: SrcSpan -> Ann -> Ann
- lineInSrcSpan :: Pos -> SrcSpan -> Bool
Documentation
An annotation type used during the compilation.
Constructors
| Ann | |
Fields
| |
Instances
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
| Generic SrcSpan Source # | |||||
Defined in PlutusCore.Annotation Associated Types
| |||||
| Show SrcSpan Source # | |||||
| NFData SrcSpan Source # | |||||
Defined in PlutusCore.Annotation | |||||
| Eq SrcSpan Source # | |||||
| Ord SrcSpan Source # | |||||
Defined in PlutusCore.Annotation | |||||
| Hashable SrcSpan Source # | |||||
Defined in PlutusCore.Annotation | |||||
| Flat SrcSpan Source # | |||||
| Pretty SrcSpan Source # | |||||
Defined in PlutusCore.Annotation | |||||
| Exception (UniqueError SrcSpan) Source # | |||||
Defined in PlutusCore.Error Methods toException :: UniqueError SrcSpan -> SomeException Source # fromException :: SomeException -> Maybe (UniqueError SrcSpan) Source # | |||||
| type Rep SrcSpan Source # | |||||
Defined in PlutusCore.Annotation type Rep SrcSpan = D1 ('MetaData "SrcSpan" "PlutusCore.Annotation" "plutus-core-1.60.0.0-LXFqBsoUlXsJIEqLytHte7" 'False) (C1 ('MetaCons "SrcSpan" 'PrefixI 'True) ((S1 ('MetaSel ('Just "srcSpanFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "srcSpanSLine") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "srcSpanSCol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "srcSpanELine") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "srcSpanECol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))) | |||||
Constructors
| SrcSpans | |
Fields
| |
Instances
| Monoid SrcSpans Source # | |||||
| Semigroup SrcSpans Source # | |||||
| Generic SrcSpans Source # | |||||
Defined in PlutusCore.Annotation Associated Types
| |||||
| Show SrcSpans Source # | |||||
| NFData SrcSpans Source # | |||||
Defined in PlutusCore.Annotation | |||||
| Eq SrcSpans Source # | |||||
| Ord SrcSpans Source # | |||||
Defined in PlutusCore.Annotation | |||||
| Hashable SrcSpans Source # | |||||
Defined in PlutusCore.Annotation | |||||
| MonoFoldable SrcSpans Source # | |||||
Defined in PlutusCore.Annotation Methods ofoldMap :: Monoid m => (Element SrcSpans -> m) -> SrcSpans -> m ofoldr :: (Element SrcSpans -> b -> b) -> b -> SrcSpans -> b ofoldl' :: (a -> Element SrcSpans -> a) -> a -> SrcSpans -> a otoList :: SrcSpans -> [Element SrcSpans] oall :: (Element SrcSpans -> Bool) -> SrcSpans -> Bool oany :: (Element SrcSpans -> Bool) -> SrcSpans -> Bool olength64 :: SrcSpans -> Int64 ocompareLength :: Integral i => SrcSpans -> i -> Ordering otraverse_ :: Applicative f => (Element SrcSpans -> f b) -> SrcSpans -> f () ofor_ :: Applicative f => SrcSpans -> (Element SrcSpans -> f b) -> f () omapM_ :: Applicative m => (Element SrcSpans -> m ()) -> SrcSpans -> m () oforM_ :: Applicative m => SrcSpans -> (Element SrcSpans -> m ()) -> m () ofoldlM :: Monad m => (a -> Element SrcSpans -> m a) -> a -> SrcSpans -> m a ofoldMap1Ex :: Semigroup m => (Element SrcSpans -> m) -> SrcSpans -> m ofoldr1Ex :: (Element SrcSpans -> Element SrcSpans -> Element SrcSpans) -> SrcSpans -> Element SrcSpans ofoldl1Ex' :: (Element SrcSpans -> Element SrcSpans -> Element SrcSpans) -> SrcSpans -> Element SrcSpans headEx :: SrcSpans -> Element SrcSpans lastEx :: SrcSpans -> Element SrcSpans unsafeHead :: SrcSpans -> Element SrcSpans unsafeLast :: SrcSpans -> Element SrcSpans maximumByEx :: (Element SrcSpans -> Element SrcSpans -> Ordering) -> SrcSpans -> Element SrcSpans minimumByEx :: (Element SrcSpans -> Element SrcSpans -> Ordering) -> SrcSpans -> Element SrcSpans | |||||
| Flat SrcSpans Source # | |||||
| Pretty SrcSpans Source # | |||||
Defined in PlutusCore.Annotation | |||||
| type Rep SrcSpans Source # | |||||
Defined in PlutusCore.Annotation | |||||
| type Element SrcSpans Source # | |||||
Defined in PlutusCore.Annotation | |||||
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 # | |||||
Defined in PlutusCore.Annotation Associated Types
| |||||
| Show Inline Source # | |||||
| Eq Inline Source # | |||||
| Ord Inline Source # | |||||
| Hashable Inline Source # | |||||
Defined in PlutusCore.Annotation | |||||
| type Rep Inline Source # | |||||
Defined in PlutusCore.Annotation type Rep Inline = D1 ('MetaData "Inline" "PlutusCore.Annotation" "plutus-core-1.60.0.0-LXFqBsoUlXsJIEqLytHte7" '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 | |
Constructors
| SourcePos | |
Fields
| |
Instances
| Data SourcePos | |||||
Defined in Text.Megaparsec.Pos Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourcePos -> c SourcePos Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourcePos Source # toConstr :: SourcePos -> Constr Source # dataTypeOf :: SourcePos -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourcePos) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourcePos) Source # gmapT :: (forall b. Data b => b -> b) -> SourcePos -> SourcePos Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourcePos -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourcePos -> r Source # gmapQ :: (forall d. Data d => d -> u) -> SourcePos -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> SourcePos -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourcePos -> m SourcePos Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourcePos -> m SourcePos Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourcePos -> m SourcePos Source # | |||||
| Generic SourcePos | |||||
Defined in Text.Megaparsec.Pos Associated Types
| |||||
| Read SourcePos | |||||
| Show SourcePos | |||||
| NFData SourcePos | |||||
Defined in Text.Megaparsec.Pos | |||||
| Eq SourcePos | |||||
| Ord SourcePos | |||||
Defined in Text.Megaparsec.Pos | |||||
| Pretty SourcePos Source # | |||||
Defined in PlutusCore.Error | |||||
| type Rep SourcePos | |||||
Defined in Text.Megaparsec.Pos type Rep SourcePos = D1 ('MetaData "SourcePos" "Text.Megaparsec.Pos" "megaparsec-9.7.0-D1TuX5dPgfP2v9mQdsSy5z" 'False) (C1 ('MetaCons "SourcePos" 'PrefixI 'True) (S1 ('MetaSel ('Just "sourceName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: (S1 ('MetaSel ('Just "sourceLine") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Pos) :*: S1 ('MetaSel ('Just "sourceColumn") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Pos)))) | |||||
Instances
| Data Pos | |||||
Defined in Text.Megaparsec.Pos Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Pos -> c Pos Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Pos Source # toConstr :: Pos -> Constr Source # dataTypeOf :: Pos -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Pos) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Pos) Source # gmapT :: (forall b. Data b => b -> b) -> Pos -> Pos Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Pos -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Pos -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Pos -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Pos -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Pos -> m Pos Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Pos -> m Pos Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Pos -> m Pos Source # | |||||
| Semigroup Pos | |||||
| Generic Pos | |||||
Defined in Text.Megaparsec.Pos Associated Types
| |||||
| Read Pos | |||||
| Show Pos | |||||
| NFData Pos | |||||
Defined in Text.Megaparsec.Pos | |||||
| Eq Pos | |||||
| Ord Pos | |||||
| type Rep Pos | |||||
Defined in Text.Megaparsec.Pos | |||||