Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides a more pleasant way to write C ASTs for language-c As a simple example,
{-# LANGUAGE OverloadedStrings #-} import Language.C.DSL example :: CFunDef example = fun [intTy] "foo"[int "a", int "b"] $ block [ creturn $ "a" + "b" ]
And when loaded into GHCi
Main*> pretty example int foo(int a, int b) { return a + b; }
This module also exports Language.C for simplicity.
Documentation
module Language.C.DSL.StringLike
module Language.C.DSL.Exp
module Language.C.DSL.Stat
module Language.C.DSL.Decl
module Language.C