Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ivory backend targeting language-c-quote.
- data Visibility
- compile :: Def a -> Compile
- compileStruct :: Visibility -> Struct -> Compile
- mkFieldGroup :: Typed String -> FieldGroup
- compileAreaImport :: AreaImport -> Compile
- extractAreaProto :: Visibility -> Area -> Compile
- compileArea :: Visibility -> Area -> Compile
- compileUnit :: Proc -> Compile
- collapseComment :: BlockItem -> [BlockItem] -> [BlockItem]
- extractProto :: Visibility -> Proc -> Compile
- toArgs :: [Typed Var] -> [Param]
- toParam :: Type -> Param
- toTypeDecay :: Type -> Type
- toType :: Type -> Type
- toType' :: Bool -> Type -> Type
- intSize :: IntSize -> Type
- wordSize :: WordSize -> Type
- toName :: Name -> String
- toVar :: Var -> String
- toBody :: [Cond] -> Stmt -> [BlockItem]
- typedRet :: Typed Expr -> Exp
- toInit :: Init -> Initializer
- fieldDes :: String -> Designation
- derefExp :: Exp -> Exp
- labelExp :: Exp -> String -> Exp
- toExpr :: Type -> Expr -> Exp
- exp0 :: [Exp] -> Exp
- exp1 :: [Exp] -> Exp
- exp2 :: [Exp] -> Exp
- mkArgs :: Type -> [Expr] -> [Exp]
- toExpOp :: Type -> ExpOp -> [Expr] -> Exp
- floatingSym :: Type -> String -> String
- floatingBinary :: Type -> String -> [Expr] -> Exp
- floatingUnary :: Type -> String -> [Expr] -> Exp
- toLogBase :: Type -> [Expr] -> Exp
- toMod :: Type -> [Expr] -> Exp
- absSym :: Type -> String
- signumSym :: Type -> String
- showInt :: IntSize -> String
- showWord :: WordSize -> String
- toRequire :: Cond -> BlockItem
- toEnsure :: Expr -> Cond -> BlockItem
- toAssertion :: (Expr -> Expr) -> String -> Cond -> BlockItem
Documentation
compileStruct :: Visibility -> Struct -> Compile Source #
Compile a struct.
mkFieldGroup :: Typed String -> FieldGroup Source #
compileAreaImport :: AreaImport -> Compile Source #
Compile an external memory area reference.
extractAreaProto :: Visibility -> Area -> Compile Source #
Get prototypes for memory areas.
compileArea :: Visibility -> Area -> Compile Source #
Compile a memory area definition into an extern in the header, and a structure in the source.
compileUnit :: Proc -> Compile Source #
Compile a definition unit.
extractProto :: Visibility -> Proc -> Compile Source #
Get the prototypes.
toTypeDecay :: Type -> Type Source #
Make C type, and decay array types into pointers (e.g., `x[2][3]` decays into `(*x)[3]`).
toType' :: Bool -> Type -> Type Source #
C type conversion, with a special case for references and pointers.
toInit :: Init -> Initializer Source #
fieldDes :: String -> Designation Source #
absSym :: Type -> String Source #
Emit the function name for a call to abs. This doesn't include any symbol for unsigned things, as they should be optimized out by the front end.