cgType (AST _ (App (AST _ (Ref (AST.Global "func"))) (ret:args))) = FunctionType (cgType ret) (map cgType args) False
cgType (AST _ (App (AST _ (Ref (AST.Global "func"))) (ret:args))) = FunctionType (cgType ret) (map cgType args) False
cgType (AST _ (App (AST _ (Ref (AST.Global "func"))) (ret:args))) = FunctionType (cgType ret) (map cgType args) False