Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- shapeBody :: (HasScope lore m, MonadFreshNames m, BinderOps lore, Bindable lore) => [VName] -> [Type] -> Body lore -> m (Body lore)
- annotateArrayShape :: ArrayShape shape => TypeBase shape u -> [Int] -> TypeBase Shape u
- argShapes :: [VName] -> [TypeBase Shape u0] -> [TypeBase Shape u1] -> [SubExp]
- ensureResultShape :: MonadBinder m => (m Certificates -> m Certificates) -> ErrorMsg SubExp -> SrcLoc -> [Type] -> Body (Lore m) -> m (Body (Lore m))
- ensureResultExtShape :: MonadBinder m => (m Certificates -> m Certificates) -> ErrorMsg SubExp -> SrcLoc -> [ExtType] -> Body (Lore m) -> m (Body (Lore m))
- ensureResultExtShapeNoCtx :: MonadBinder m => (m Certificates -> m Certificates) -> ErrorMsg SubExp -> SrcLoc -> [ExtType] -> Body (Lore m) -> m (Body (Lore m))
- ensureExtShape :: MonadBinder m => (m Certificates -> m Certificates) -> ErrorMsg SubExp -> SrcLoc -> ExtType -> String -> SubExp -> m SubExp
- ensureShape :: MonadBinder m => (m Certificates -> m Certificates) -> ErrorMsg SubExp -> SrcLoc -> Type -> String -> SubExp -> m SubExp
- ensureArgShapes :: (MonadBinder m, Typed (TypeBase Shape u)) => (m Certificates -> m Certificates) -> ErrorMsg SubExp -> SrcLoc -> [VName] -> [TypeBase Shape u] -> [SubExp] -> m [SubExp]
Documentation
shapeBody :: (HasScope lore m, MonadFreshNames m, BinderOps lore, Bindable lore) => [VName] -> [Type] -> Body lore -> m (Body lore) Source #
annotateArrayShape :: ArrayShape shape => TypeBase shape u -> [Int] -> TypeBase Shape u Source #
ensureResultShape :: MonadBinder m => (m Certificates -> m Certificates) -> ErrorMsg SubExp -> SrcLoc -> [Type] -> Body (Lore m) -> m (Body (Lore m)) Source #
ensureResultExtShape :: MonadBinder m => (m Certificates -> m Certificates) -> ErrorMsg SubExp -> SrcLoc -> [ExtType] -> Body (Lore m) -> m (Body (Lore m)) Source #
ensureResultExtShapeNoCtx :: MonadBinder m => (m Certificates -> m Certificates) -> ErrorMsg SubExp -> SrcLoc -> [ExtType] -> Body (Lore m) -> m (Body (Lore m)) Source #
ensureExtShape :: MonadBinder m => (m Certificates -> m Certificates) -> ErrorMsg SubExp -> SrcLoc -> ExtType -> String -> SubExp -> m SubExp Source #
ensureShape :: MonadBinder m => (m Certificates -> m Certificates) -> ErrorMsg SubExp -> SrcLoc -> Type -> String -> SubExp -> m SubExp Source #
ensureArgShapes :: (MonadBinder m, Typed (TypeBase Shape u)) => (m Certificates -> m Certificates) -> ErrorMsg SubExp -> SrcLoc -> [VName] -> [TypeBase Shape u] -> [SubExp] -> m [SubExp] Source #
Reshape the arguments to a function so that they fit the expected shape declarations. Not used to change rank of arguments. Assumes everything is otherwise type-correct.