Safe Haskell | None |
---|---|
Language | Haskell2010 |
Support for generating PIR with global definitions with dependencies between them.
Synopsis
- data DefT key uni fun ann m a
- class ( Monad m, Ord key) => MonadDefs key uni fun ann m | m -> key uni fun ann where
- type TermDefWithStrictness uni fun ann = Def ( VarDecl TyName Name uni fun ann) ( Term TyName Name uni fun ann, Strictness )
- runDefT :: ( Monad m, Ord key) => ann -> DefT key uni fun ann m ( Term TyName Name uni fun ann) -> m ( Term TyName Name uni fun ann)
- defineTerm :: MonadDefs key uni fun ann m => key -> TermDefWithStrictness uni fun ann -> Set key -> m ()
- modifyTermDef :: MonadDefs key uni fun ann m => key -> ( TermDefWithStrictness uni fun ann -> TermDefWithStrictness uni fun ann) -> m ()
- defineType :: MonadDefs key uni fun ann m => key -> TypeDef TyName uni ann -> Set key -> m ()
- modifyTypeDef :: MonadDefs key uni fun ann m => key -> ( TypeDef TyName uni ann -> TypeDef TyName uni ann) -> m ()
- defineDatatype :: forall key uni fun ann m. MonadDefs key uni fun ann m => key -> DatatypeDef TyName Name uni fun ann -> Set key -> m ()
- modifyDatatypeDef :: MonadDefs key uni fun ann m => key -> ( DatatypeDef TyName Name uni fun ann -> DatatypeDef TyName Name uni fun ann) -> m ()
- modifyDeps :: MonadDefs key uni fun ann m => key -> ( Set key -> Set key) -> m ()
- recordAlias :: forall key uni fun ann m. MonadDefs key uni fun ann m => key -> m ()
- lookupTerm :: MonadDefs key uni fun ann m => ann -> key -> m ( Maybe ( Term TyName Name uni fun ann))
- lookupOrDefineTerm :: MonadDefs key uni fun ann m => ann -> key -> m ( TermDefWithStrictness uni fun ann, Set key) -> m ( Term TyName Name uni fun ann)
- lookupType :: MonadDefs key uni fun ann m => ann -> key -> m ( Maybe ( Type TyName uni ann))
- lookupOrDefineType :: MonadDefs key uni fun ann m => ann -> key -> m ( TypeDef TyName uni ann, Set key) -> m ( Type TyName uni ann)
- lookupConstructors :: MonadDefs key uni fun ann m => ann -> key -> m ( Maybe [ Term TyName Name uni fun ann])
- lookupDestructor :: forall key uni fun ann m. MonadDefs key uni fun ann m => ann -> key -> m ( Maybe ( Term TyName Name uni fun ann))
Documentation
data DefT key uni fun ann m a Source #
Instances
( Ord key, Monad m) => MonadDefs key uni fun ann ( DefT key uni fun ann m) Source # | |
MonadReader r m => MonadReader r ( DefT key uni fun ann m) Source # | |
MonadState s m => MonadState s ( DefT key uni fun ann m) Source # | |
MonadError e m => MonadError e ( DefT key uni fun ann m) Source # | |
Defined in PlutusIR.Compiler.Definitions throwError :: e -> DefT key uni fun ann m a Source # catchError :: DefT key uni fun ann m a -> (e -> DefT key uni fun ann m a) -> DefT key uni fun ann m a Source # |
|
MonadWriter w m => MonadWriter w ( DefT key uni fun ann m) Source # | |
MFunctor ( DefT key uni fun ann :: ( Type -> Type ) -> Type -> Type ) Source # | |
MonadTrans ( DefT key uni fun ann) Source # | |
Monad m => Monad ( DefT key uni fun ann m) Source # | |
Functor m => Functor ( DefT key uni fun ann m) Source # | |
Monad m => Applicative ( DefT key uni fun ann m) Source # | |
Defined in PlutusIR.Compiler.Definitions pure :: a -> DefT key uni fun ann m a Source # (<*>) :: DefT key uni fun ann m (a -> b) -> DefT key uni fun ann m a -> DefT key uni fun ann m b Source # liftA2 :: (a -> b -> c) -> DefT key uni fun ann m a -> DefT key uni fun ann m b -> DefT key uni fun ann m c Source # (*>) :: DefT key uni fun ann m a -> DefT key uni fun ann m b -> DefT key uni fun ann m b Source # (<*) :: DefT key uni fun ann m a -> DefT key uni fun ann m b -> DefT key uni fun ann m a Source # |
|
MonadQuote m => MonadQuote ( DefT key uni fun ann m) Source # | |
class ( Monad m, Ord key) => MonadDefs key uni fun ann m | m -> key uni fun ann where Source #
Nothing
Instances
MonadDefs key uni fun ann m => MonadDefs key uni fun ann ( ReaderT r m) Source # | |
MonadDefs key uni fun ann m => MonadDefs key uni fun ann ( ExceptT e m) Source # | |
MonadDefs key uni fun ann m => MonadDefs key uni fun ann ( StateT s m) Source # | |
( Ord key, Monad m) => MonadDefs key uni fun ann ( DefT key uni fun ann m) Source # | |
type TermDefWithStrictness uni fun ann = Def ( VarDecl TyName Name uni fun ann) ( Term TyName Name uni fun ann, Strictness ) Source #
runDefT :: ( Monad m, Ord key) => ann -> DefT key uni fun ann m ( Term TyName Name uni fun ann) -> m ( Term TyName Name uni fun ann) Source #
defineTerm :: MonadDefs key uni fun ann m => key -> TermDefWithStrictness uni fun ann -> Set key -> m () Source #
modifyTermDef :: MonadDefs key uni fun ann m => key -> ( TermDefWithStrictness uni fun ann -> TermDefWithStrictness uni fun ann) -> m () Source #
defineType :: MonadDefs key uni fun ann m => key -> TypeDef TyName uni ann -> Set key -> m () Source #
modifyTypeDef :: MonadDefs key uni fun ann m => key -> ( TypeDef TyName uni ann -> TypeDef TyName uni ann) -> m () Source #
defineDatatype :: forall key uni fun ann m. MonadDefs key uni fun ann m => key -> DatatypeDef TyName Name uni fun ann -> Set key -> m () Source #
modifyDatatypeDef :: MonadDefs key uni fun ann m => key -> ( DatatypeDef TyName Name uni fun ann -> DatatypeDef TyName Name uni fun ann) -> m () Source #
modifyDeps :: MonadDefs key uni fun ann m => key -> ( Set key -> Set key) -> m () Source #
Modifies the dependency set of a key.
recordAlias :: forall key uni fun ann m. MonadDefs key uni fun ann m => key -> m () Source #
lookupTerm :: MonadDefs key uni fun ann m => ann -> key -> m ( Maybe ( Term TyName Name uni fun ann)) Source #
lookupOrDefineTerm :: MonadDefs key uni fun ann m => ann -> key -> m ( TermDefWithStrictness uni fun ann, Set key) -> m ( Term TyName Name uni fun ann) Source #
lookupType :: MonadDefs key uni fun ann m => ann -> key -> m ( Maybe ( Type TyName uni ann)) Source #
lookupOrDefineType :: MonadDefs key uni fun ann m => ann -> key -> m ( TypeDef TyName uni ann, Set key) -> m ( Type TyName uni ann) Source #