HaXml-1.25.14: Utilities for manipulating XML documents

Safe Haskell | Safe-Inferred
Language | Haskell98

Text.XML.HaXml.Schema.PrettyHaskell

Description

Pretty-print the internal Haskell model of XSD datatypes to a real Haskell module containing type declarations, and instances for parsing (and printing - though not yet implemented) values of those datatypes from(/to) XML.

Synopsis

- ppComment :: CommentPosition -> Comment -> Doc
- ppModule :: NameConverter -> Module -> Doc
- ppHighLevelDecl :: NameConverter -> Decl -> Doc
- ppHighLevelDecls :: NameConverter -> [Decl] -> Doc
- ppvList :: String -> String -> String -> (a -> Doc) -> [a] -> Doc

# Documentation

ppComment :: CommentPosition -> Comment -> Doc Source #

Generate aligned haddock-style documentation. (but without escapes in comment text yet)

ppModule :: NameConverter -> Module -> Doc Source #

Convert a whole document from HaskellTypeModel to Haskell source text.

ppHighLevelDecl :: NameConverter -> Decl -> Doc Source #

Convert a single Haskell Decl into Haskell source text.

ppHighLevelDecls :: NameConverter -> [Decl] -> Doc Source #

Convert multiple HaskellTypeModel Decls to Haskell source text.

ppvList :: String -> String -> String -> (a -> Doc) -> [a] -> Doc Source #

Vertically pretty-print a list of things, with open and close brackets, and separators.