Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Codegen.ExprGen.Cast
Synopsis
- generateCast :: (MonadCodegen m, ExprGen Expr) => Expr -> m Operand
- llvmCast :: MonadCodegen m => SrcLoc -> Operand -> Type -> Type -> m Operand
- ensureMatchingType :: MonadCodegen m => SrcLoc -> Operand -> Type -> m Operand
- toBool :: MonadCodegen m => SrcLoc -> Operand -> m Operand
Documentation
generateCast :: (MonadCodegen m, ExprGen Expr) => Expr -> m Operand Source #
Generate LLVM code for type casts.
llvmCast :: MonadCodegen m => SrcLoc -> Operand -> Type -> Type -> m Operand Source #
Cast an operand to match a desired LLVM type.
ensureMatchingType :: MonadCodegen m => SrcLoc -> Operand -> Type -> m Operand Source #
Convert an operand to match a desired LLVM type if needed.