definition module uFPL.C from Data.Maybe import :: Maybe from uFPL.Arduino import :: Button from uFPL.Util import class print :: Signedness = Sig | Unsig :: CType = CTChar Signedness | CTBool | CTInt Signedness | CTLong Signedness | CTVoid | CTArray CType | CTStruct String :: CExpr = CEButton Button | CEGlobal String | CEInfix String CExpr CExpr | CEApp String [CExpr] | CEBool Bool | CEInt Int | CEChar Char | CEBArray Int [Bool] | CEIArray Int [Int] | CEIf CExpr CExpr CExpr | CERef CExpr | CEDeref CExpr | CEStruct [(String, CExpr)] :: CBody = CBReturn (Maybe CExpr) | CBIf CExpr CBody CBody | CBWhile CExpr CBody | CBAssign String CExpr | CBSeq CBody CBody | CBEmpty | CBExpr CExpr (`seq`) infix 0 :: CBody CBody -> CBody :: CVar = { name :: String , type :: CType , value :: CExpr } :: CFun = { params :: [(Int, CType)] , body :: CBody , fresh :: Int , type :: CType , name :: String } :: CProg = { bootstrap :: String , globals :: [CVar] , funs :: [CFun] } instance print Signedness instance print CType instance print CExpr instance print CBody instance print CVar instance print CFun instance print CProg combinePrograms :: CProg CProg -> CProg