ppUDP :: UDP -> Doc
ppUDP (UDP name output_var input_vars decls maybe_initial table_definition)
  = text "primitive" <+> ppIdent name <+>
    parens (ppIdents (output_var : input_vars)) <> semi $$
    nest 2 ( vcat (map ppUDPDecl decls) $$
             maybe empty ppUDPInitialStatement maybe_initial $$
             ppTableDefinition table_definition
           ) $$
    text "endprimitive"
ppUDP :: UDP -> Doc
ppUDP (UDP name output_var input_vars decls maybe_initial table_definition)
  = text "primitive" <+> ppIdent name <+>
    parens (ppIdents (output_var : input_vars)) <> semi $$
    nest 2 ( vcat (map ppUDPDecl decls) $$
             maybe empty ppUDPInitialStatement maybe_initial $$
             ppTableDefinition table_definition
           ) $$
    text "endprimitive"
ppUDP (UDP name output_var input_vars decls maybe_initial table_definition)
  = text "primitive" <+> ppIdent name <+>
    parens (ppIdents (output_var : input_vars)) <> semi $$
    nest 2 ( vcat (map ppUDPDecl decls) $$
             maybe empty ppUDPInitialStatement maybe_initial $$
             ppTableDefinition table_definition
           ) $$
    text "endprimitive"