| |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| Description | |||||||||||||||||||||||||||||||||||
An imported and simplified version of GHC module GHCs documentation follows | |||||||||||||||||||||||||||||||||||
| Synopsis | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| The document type | |||||||||||||||||||||||||||||||||||
| data SDoc | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| Primitive SDocuments | |||||||||||||||||||||||||||||||||||
| empty :: SDoc | |||||||||||||||||||||||||||||||||||
| An empty document | |||||||||||||||||||||||||||||||||||
| comma :: SDoc | |||||||||||||||||||||||||||||||||||
| A ',' character | |||||||||||||||||||||||||||||||||||
| Converting values into documents | |||||||||||||||||||||||||||||||||||
| text :: String -> SDoc | |||||||||||||||||||||||||||||||||||
| char :: Char -> SDoc | |||||||||||||||||||||||||||||||||||
| integer :: Integer -> SDoc | |||||||||||||||||||||||||||||||||||
| Wrapping documents in delimiters | |||||||||||||||||||||||||||||||||||
| parens :: SDoc -> SDoc | |||||||||||||||||||||||||||||||||||
| Wrap document in (...) | |||||||||||||||||||||||||||||||||||
| brackets :: SDoc -> SDoc | |||||||||||||||||||||||||||||||||||
| Wrap document in [...] | |||||||||||||||||||||||||||||||||||
| braces :: SDoc -> SDoc | |||||||||||||||||||||||||||||||||||
| Wrap document in {...} | |||||||||||||||||||||||||||||||||||
| Combining documents | |||||||||||||||||||||||||||||||||||
| (<>) :: SDoc -> SDoc -> SDoc | |||||||||||||||||||||||||||||||||||
| Beside | |||||||||||||||||||||||||||||||||||
| punctuate :: SDoc -> [SDoc] -> [SDoc] | |||||||||||||||||||||||||||||||||||
punctuate p [d1, ... dn] = [d1 <> p, d2 <> p, ... dn-1 <> p, dn] | |||||||||||||||||||||||||||||||||||
| Predicates on documents | |||||||||||||||||||||||||||||||||||
| isEmpty :: SDoc -> Bool | |||||||||||||||||||||||||||||||||||
| Returns True if the document is empty | |||||||||||||||||||||||||||||||||||
| Rendering documents | |||||||||||||||||||||||||||||||||||
| render :: SDoc -> String | |||||||||||||||||||||||||||||||||||
| Renders the document as a string using the default style | |||||||||||||||||||||||||||||||||||
| fullRender | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| writeFileSDoc :: FilePath -> SDoc -> IO () | |||||||||||||||||||||||||||||||||||
| data TextDetails | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| Produced by Haddock version 0.6 |