+ intLitTys = prefixes ["Int", "Word", "Addr", "Char"]
+ ratLitTys = prefixes ["Float", "Double"]
+ charLitTys = prefixes ["Char"]
+ stringLitTys = prefixes ["Addr"]
+ prefixes ps = filter (\ t ->
+ case t of
+ (PrimTypeSpec {ty=(TyApp tc _args)}) ->
+ any (\ p -> p `isPrefixOf` tc) ps
+ _ -> False)
+
+ parens n ty' = " (zEncodeString \"" ++ n ++ "\", " ++ ty' ++ ")"