Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data InternaliseM a
- runInternaliseM :: MonadFreshNames m => Bool -> InternaliseM () -> m (Either String [FunDef])
- throwError :: MonadError e m => e -> m a
- type VarSubstitutions = Map VName [SubExp]
- data InternaliseEnv = InternaliseEnv {}
- type ConstParams = [(Name, VName)]
- type Closure = [VName]
- type FunInfo = (Name, ConstParams, Closure, [VName], [DeclType], [FParam], [(SubExp, Type)] -> Maybe [DeclExtType])
- substitutingVars :: VarSubstitutions -> InternaliseM a -> InternaliseM a
- addFunction :: FunDef -> InternaliseM ()
- lookupFunction :: VName -> InternaliseM FunInfo
- lookupFunction' :: VName -> InternaliseM (Maybe FunInfo)
- bindFunction :: VName -> FunInfo -> InternaliseM ()
- asserting :: InternaliseM Certificates -> InternaliseM Certificates
- assertingOne :: InternaliseM VName -> InternaliseM Certificates
- data InternaliseTypeM a
- liftInternaliseM :: InternaliseM a -> InternaliseTypeM a
- runInternaliseTypeM :: InternaliseTypeM a -> InternaliseM (a, ConstParams)
- lookupDim :: VName -> InternaliseTypeM (Maybe ExtSize)
- withDims :: DimTable -> InternaliseTypeM a -> InternaliseTypeM a
- type DimTable = Map VName ExtSize
- module Futhark.Tools
Documentation
data InternaliseM a Source #
Instances
runInternaliseM :: MonadFreshNames m => Bool -> InternaliseM () -> m (Either String [FunDef]) Source #
throwError :: MonadError e m => e -> m a #
Is used within a monadic computation to begin exception processing.
type VarSubstitutions = 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 ConstParams = [(Name, VName)] Source #
type Closure = [VName] Source #
Extra parameters to pass when calling this function. This corresponds to the closure of a locally defined function.
type FunInfo = (Name, ConstParams, Closure, [VName], [DeclType], [FParam], [(SubExp, Type)] -> Maybe [DeclExtType]) Source #
substitutingVars :: VarSubstitutions -> InternaliseM a -> InternaliseM a Source #
addFunction :: FunDef -> InternaliseM () Source #
Add a function definition to the program being constructed.
lookupFunction' :: VName -> InternaliseM (Maybe FunInfo) Source #
bindFunction :: VName -> FunInfo -> InternaliseM () Source #
asserting :: InternaliseM Certificates -> InternaliseM Certificates Source #
Execute the given action if envDoBoundsChecks
is true, otherwise
just return an empty list.
assertingOne :: InternaliseM VName -> InternaliseM Certificates Source #
Execute the given action if envDoBoundsChecks
is true, otherwise
just return an empty list.
Type Handling
data InternaliseTypeM a Source #
Instances
liftInternaliseM :: InternaliseM a -> InternaliseTypeM a Source #
runInternaliseTypeM :: InternaliseTypeM a -> InternaliseM (a, ConstParams) Source #
withDims :: DimTable -> InternaliseTypeM a -> InternaliseTypeM a Source #
Convenient reexports
module Futhark.Tools