genPokeUnion' :: Int -> String -> [((String,Bool),String)] -> String
genPokeUnion' ix name types_names = concat [fst_line, snd_line, concat middle_lines, last_line] 
    where fst_line = concat ["void poke",name,s_ix ix,"(", args, "){\n"]
          args     = concat $ intersperse ", " $(concat [name, "* un"]) :cstructArguments' types_names
          snd_line = concat ["    un->tag = ", show $ ix - 1, ";\n"]
          middle_lines = zipWith (\n1 n2 -> concat ["    un->val.",union_val,".",n1," = ", n2, ";\n"]) (map snd types_names) (map accessAsPointer types_names)
          last_line = "}\n\n"
          union_val = (map return ['a'..'z']) !! (ix - 1)
genPokeUnion' :: Int -> String -> [((String,Bool),String)] -> String
genPokeUnion' ix name types_names = concat [fst_line, snd_line, concat middle_lines, last_line] 
    where fst_line = concat ["void poke",name,s_ix ix,"(", args, "){\n"]
          args     = concat $ intersperse ", " $(concat [name, "* un"]) :cstructArguments' types_names
          snd_line = concat ["    un->tag = ", show $ ix - 1, ";\n"]
          middle_lines = zipWith (\n1 n2 -> concat ["    un->val.",union_val,".",n1," = ", n2, ";\n"]) (map snd types_names) (map accessAsPointer types_names)
          last_line = "}\n\n"
          union_val = (map return ['a'..'z']) !! (ix - 1)
genPokeUnion' ix name types_names = concat [fst_line, snd_line, concat middle_lines, last_line] 
    where fst_line = concat ["void poke",name,s_ix ix,"(", args, "){\n"]
          args     = concat $ intersperse ", " $(concat [name, "* un"]) :cstructArguments' types_names
          snd_line = concat ["    un->tag = ", show $ ix - 1, ";\n"]
          middle_lines = zipWith (\n1 n2 -> concat ["    un->val.",union_val,".",n1," = ", n2, ";\n"]) (map snd types_names) (map accessAsPointer types_names)
          last_line = "}\n\n"
          union_val = (map return ['a'..'z']) !! (ix - 1)