Safe Haskell | None |
---|
Ivory backend targeting language-c-quote.
- data Visibility
- compile :: Def a -> Compile
- compileExtern :: Extern -> Compile
- compileStruct :: Visibility -> Struct -> Compile
- mkFieldGroup :: Typed String -> FieldGroup
- compileAreaImport :: AreaImport -> Compile
- extractAreaProto :: Visibility -> Area -> Compile
- compileArea :: Visibility -> Area -> Compile
- compileUnit :: Proc -> Compile
- extractProto :: Visibility -> Proc -> Compile
- toArgs :: [Typed Var] -> [Param]
- toParam :: Type -> Param
- toType :: Type -> Type
- toTypeAssign :: Type -> Type
- toTypeCxt :: (Type -> Type) -> 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
- 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
compileExtern :: Extern -> CompileSource
Compile an extern declaration
compileStruct :: Visibility -> Struct -> CompileSource
Compile a struct.
compileAreaImport :: AreaImport -> CompileSource
Compile an external memory area reference.
extractAreaProto :: Visibility -> Area -> CompileSource
Get prototypes for memory areas.
compileArea :: Visibility -> Area -> CompileSource
Compile a memory area definition into an extern in the header, and a structure in the source.
compileUnit :: Proc -> CompileSource
Compile a definition unit.
extractProto :: Visibility -> Proc -> CompileSource
Get the prototypes.
Type conversion outside of an assignment context. This converts arrays to arrays, and carrays to pointers.
toTypeAssign :: Type -> TypeSource
Type conversion in the context of an assignment. This converts all arrays/carrays to pointers.
toTypeCxt :: (Type -> Type) -> Type -> TypeSource
C type conversion, with a special case for references and pointers.
toInit :: Init -> InitializerSource
fieldDes :: String -> DesignationSource
floatingSym :: Type -> String -> StringSource
absSym :: Type -> StringSource
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.