Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Definition analysis for Plutus Core.
Synopsis
- type UniqueInfos ann = UniqueMap Unique (UniqueInfo ann)
- data ScopeType
- termDefs :: (Ord ann, HasUnique name TermUnique, HasUnique tyname TypeUnique, MonadState (UniqueInfos ann) m, MonadWriter [UniqueError ann] m) => Term tyname name uni fun ann -> m ()
- handleType :: (Ord ann, HasUnique tyname TypeUnique, MonadState (UniqueInfos ann) m, MonadWriter [UniqueError ann] m) => Type tyname uni ann -> m ()
- runTermDefs :: (Ord ann, HasUnique name TermUnique, HasUnique tyname TypeUnique, Monad m) => Term tyname name uni fun ann -> m (UniqueInfos ann, [UniqueError ann])
- addDef :: (Ord ann, HasUnique n unique, MonadState (UniqueInfos ann) m, MonadWriter [UniqueError ann] m) => n -> ann -> ScopeType -> m ()
- addUsage :: (Ord ann, HasUnique n unique, MonadState (UniqueInfos ann) m, MonadWriter [UniqueError ann] m) => n -> ann -> ScopeType -> m ()
Documentation
type UniqueInfos ann = UniqueMap Unique (UniqueInfo ann) Source #
Tag for distinguishing between whether we are talking about the term scope for variables or the type scope for variables.
Instances
Eq ScopeType Source # | |
Ord ScopeType Source # | |
Defined in PlutusCore.Analysis.Definitions |
termDefs :: (Ord ann, HasUnique name TermUnique, HasUnique tyname TypeUnique, MonadState (UniqueInfos ann) m, MonadWriter [UniqueError ann] m) => Term tyname name uni fun ann -> m () Source #
Given a PLC term, add all of its term and type definitions and usages, including its subterms and subtypes, to a global map.
handleType :: (Ord ann, HasUnique tyname TypeUnique, MonadState (UniqueInfos ann) m, MonadWriter [UniqueError ann] m) => Type tyname uni ann -> m () Source #
Given a type, add its type definition/usage, including its subtypes, to a global map.
runTermDefs :: (Ord ann, HasUnique name TermUnique, HasUnique tyname TypeUnique, Monad m) => Term tyname name uni fun ann -> m (UniqueInfos ann, [UniqueError ann]) Source #
:: (Ord ann, HasUnique n unique, MonadState (UniqueInfos ann) m, MonadWriter [UniqueError ann] m) | |
=> n | The variable |
-> ann | The annotation of the variable |
-> ScopeType | The scope type |
-> m () |
:: (Ord ann, HasUnique n unique, MonadState (UniqueInfos ann) m, MonadWriter [UniqueError ann] m) | |
=> n | The variable |
-> ann | The annotation of the variable |
-> ScopeType | The scope type |
-> m () |