Distribution.Text

Cabal-1.24.0.0: A framework for packaging Haskell software

Copyright | Duncan Coutts 2007
Maintainer | cabal-devel@haskell.org
Portability | portable
Safe Haskell | Safe
Language | Haskell98

Distribution.Text

Description

This defines a `Text` class which is a bit like the `Read` and `Show` classes. The difference is that is uses a modern pretty printer and parser system and the format is not expected to be Haskell concrete syntax but rather the external human readable representation used by Cabal.

Synopsis

- class Text a where
- defaultStyle :: Style
- display :: Text a => a -> String
- simpleParse :: Text a => String -> Maybe a

# Documentation

class Text a where #

Minimal complete definition

disp, parse

Methods

disp :: a -> Doc #

parse :: ReadP r a #

Instances

Text Bool # |
Methods disp :: Bool -> Doc # parse :: ReadP r Bool #
Text Int # |
Methods disp :: Int -> Doc # parse :: ReadP r Int #
Text Version # |
Methods disp :: Version -> Doc # parse :: ReadP r Version #
Text ModuleName # |
Methods disp :: ModuleName -> Doc # parse :: ReadP r ModuleName #
Text Platform # |
Methods disp :: Platform -> Doc # parse :: ReadP r Platform #
Text Arch # |
Methods disp :: Arch -> Doc # parse :: ReadP r Arch #
Text OS # |
Methods disp :: OS -> Doc # parse :: ReadP r OS #
Text VersionRange # |
Methods disp :: VersionRange -> Doc # parse :: ReadP r VersionRange #
Text License # |
Methods disp :: License -> Doc # parse :: ReadP r License #
Text AbiHash # |
Methods disp :: AbiHash -> Doc # parse :: ReadP r AbiHash #
Text Dependency # |
Methods disp :: Dependency -> Doc # parse :: ReadP r Dependency #
Text UnitId # |
Methods disp :: UnitId -> Doc # parse :: ReadP r UnitId #
Text ComponentId # |
Methods disp :: ComponentId -> Doc # parse :: ReadP r ComponentId #
Text PackageIdentifier # |
Methods disp :: PackageIdentifier -> Doc # parse :: ReadP r PackageIdentifier #
Text PackageName # |
Methods disp :: PackageName -> Doc # parse :: ReadP r PackageName #
Text KnownExtension # |
Methods disp :: KnownExtension -> Doc # parse :: ReadP r KnownExtension #
Text Extension # |
Methods disp :: Extension -> Doc # parse :: ReadP r Extension #
Text Language # |
Methods disp :: Language -> Doc # parse :: ReadP r Language #
Text AbiTag # |
Methods disp :: AbiTag -> Doc # parse :: ReadP r AbiTag #
Text CompilerId # |
Methods disp :: CompilerId -> Doc # parse :: ReadP r CompilerId #
Text CompilerFlavor # |
Methods disp :: CompilerFlavor -> Doc # parse :: ReadP r CompilerFlavor #
Text RepoType # |
Methods disp :: RepoType -> Doc # parse :: ReadP r RepoType #
Text RepoKind # |
Methods disp :: RepoKind -> Doc # parse :: ReadP r RepoKind #
Text BenchmarkType # |
Methods disp :: BenchmarkType -> Doc # parse :: ReadP r BenchmarkType #
Text TestType # |
Methods disp :: TestType -> Doc # parse :: ReadP r TestType #
Text ModuleReexport # |
Methods disp :: ModuleReexport -> Doc # parse :: ReadP r ModuleReexport #
Text ModuleRenaming # |
Methods disp :: ModuleRenaming -> Doc # parse :: ReadP r ModuleRenaming #
Text BuildType # |
Methods disp :: BuildType -> Doc # parse :: ReadP r BuildType #
Text ExposedModule # |
Methods disp :: ExposedModule -> Doc # parse :: ReadP r ExposedModule #
Text OriginalModule # |
Methods disp :: OriginalModule -> Doc # parse :: ReadP r OriginalModule #
Text TestShowDetails # |
Methods disp :: TestShowDetails -> Doc # parse :: ReadP r TestShowDetails #
Text AllowNewerDep # |
Methods disp :: AllowNewerDep -> Doc # parse :: ReadP r AllowNewerDep #

defaultStyle :: Style #

The default rendering style used in Cabal for console output.

display :: Text a => a -> String #

simpleParse :: Text a => String -> Maybe a #