copilot-c99-3.2: A compiler for Copilot targeting C99.
Safe HaskellNone
LanguageHaskell2010

Copilot.Compile.C99.Translate

Synopsis

Documentation

transexpr :: Expr a -> State FunEnv Expr Source #

Translates a Copilot expression into a C99 expression.

transop1 :: Op1 a b -> Expr -> Expr Source #

Translates a Copilot unary operator and arguments into a C99 expression.

transop2 :: Op2 a b c -> Expr -> Expr -> Expr Source #

Translates a Copilot binary operator and arguments into a C99 expression.

transop3 :: Op3 a b c d -> Expr -> Expr -> Expr -> Expr Source #

Translates a Copilot ternaty operator and arguments into a C99 expression.

constty :: Type a -> a -> Expr Source #

Give a C99 literal expression based on a value and a type.

transtype :: Type a -> Type Source #

Translate a Copilot type to a C99 type.

transtypename :: Type a -> TypeName Source #

Translate a Copilot type intro a C typename