Cabal-1.24.2.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 Source #

Minimal complete definition

disp, parse

Methods

disp :: a -> Doc Source #

parse :: ReadP r a Source #

Instances

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

defaultStyle :: Style Source #

The default rendering style used in Cabal for console output.

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

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