futhark-0.25.32: An optimising compiler for a functional, array-oriented language.

Safe Haskell | Safe-Inferred
Language | GHC2021

Futhark.CodeGen.Backends.GenericC.Fun

Description

C code generation for functions.

Synopsis

- compileFun :: [BlockItem] -> [Param] -> (Name, Function op) -> CompilerM op s (Definition, Func)
- compileVoidFun :: [BlockItem] -> (Name, Function op) -> CompilerM op s (Definition, Func)
- module Futhark.CodeGen.Backends.GenericC.Monad
- module Futhark.CodeGen.Backends.GenericC.Code

# Documentation

compileFun :: [BlockItem] -> [Param] -> (Name, Function op) -> CompilerM op s (Definition, Func) Source #

compileVoidFun :: [BlockItem] -> (Name, Function op) -> CompilerM op s (Definition, Func) Source #

Generate code for a function that returns void (meaning it cannot fail) and has no extra parameters (meaning it cannot allocate memory non-lexxical or do anything fancy).

module Futhark.CodeGen.Backends.GenericC.Monad

module Futhark.CodeGen.Backends.GenericC.Code