Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data InternaliseM a
- runInternaliseM :: MonadFreshNames m => Bool -> InternaliseM () -> m (OpaqueTypes, Stms SOACS, [FunDef SOACS])
- throwError :: MonadError e m => e -> m a
- type VarSubsts = Map VName [SubExp]
- data InternaliseEnv = InternaliseEnv {}
- type FunInfo = ([VName], [DeclType], [FParam SOACS], [(SubExp, Type)] -> Maybe [(DeclExtType, RetAls)])
- substitutingVars :: VarSubsts -> InternaliseM a -> InternaliseM a
- lookupSubst :: VName -> InternaliseM (Maybe [SubExp])
- addOpaques :: OpaqueTypes -> InternaliseM ()
- addFunDef :: FunDef SOACS -> InternaliseM ()
- lookupFunction :: VName -> InternaliseM FunInfo
- lookupConst :: VName -> InternaliseM (Maybe [SubExp])
- bindFunction :: VName -> FunDef SOACS -> FunInfo -> InternaliseM ()
- bindConstant :: VName -> FunDef SOACS -> InternaliseM ()
- assert :: String -> SubExp -> ErrorMsg SubExp -> SrcLoc -> InternaliseM Certs
- module Futhark.Tools
Documentation
data InternaliseM a Source #
Instances
runInternaliseM :: MonadFreshNames m => Bool -> InternaliseM () -> m (OpaqueTypes, Stms SOACS, [FunDef SOACS]) Source #
throwError :: MonadError e m => e -> m a #
Is used within a monadic computation to begin exception processing.
type VarSubsts = Map VName [SubExp] Source #
A mapping from external variable names to the corresponding internalised subexpressions.
data InternaliseEnv Source #
Instances
MonadReader InternaliseEnv InternaliseM Source # | |
Defined in Futhark.Internalise.Monad ask :: InternaliseM InternaliseEnv # local :: (InternaliseEnv -> InternaliseEnv) -> InternaliseM a -> InternaliseM a # reader :: (InternaliseEnv -> a) -> InternaliseM a # |
type FunInfo = ([VName], [DeclType], [FParam SOACS], [(SubExp, Type)] -> Maybe [(DeclExtType, RetAls)]) Source #
substitutingVars :: VarSubsts -> InternaliseM a -> InternaliseM a Source #
lookupSubst :: VName -> InternaliseM (Maybe [SubExp]) Source #
addOpaques :: OpaqueTypes -> InternaliseM () Source #
Add opaque types. If the types are already known, they will not be added.
addFunDef :: FunDef SOACS -> InternaliseM () Source #
Add a function definition to the program being constructed.
lookupConst :: VName -> InternaliseM (Maybe [SubExp]) Source #
bindFunction :: VName -> FunDef SOACS -> FunInfo -> InternaliseM () Source #
bindConstant :: VName -> FunDef SOACS -> InternaliseM () Source #
Convenient reexports
module Futhark.Tools