Cabal-2.0.1.0: A framework for packaging Haskell software

CopyrightDuncan Coutts 2007
Maintainercabal-devel@haskell.org
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

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

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 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 BuildType # 
Text ExecutableScope # 
Text ForeignLibOption # 
Text ForeignLibType # 
Text RepoType # 

Methods

disp :: RepoType -> Doc #

parse :: ReadP r RepoType #

Text RepoKind # 

Methods

disp :: RepoKind -> Doc #

parse :: ReadP r RepoKind #

Text PkgconfigName # 
Text ComponentId # 
Text AbiHash # 

Methods

disp :: AbiHash -> Doc #

parse :: ReadP r AbiHash #

Text ModuleName # 
Text ModuleRenaming # 
Text IncludeRenaming # 
Text VersionRange # 
Text Version # 

Methods

disp :: Version -> Doc #

parse :: ReadP r Version #

Text TestType # 

Methods

disp :: TestType -> Doc #

parse :: ReadP r TestType #

Text PkgconfigDependency # 
Text BenchmarkType # 
Text License # 

Methods

disp :: License -> Doc #

parse :: ReadP r License #

Text KnownExtension # 
Text Extension # 
Text Language # 

Methods

disp :: Language -> Doc #

parse :: ReadP r Language #

Text AbiTag # 

Methods

disp :: AbiTag -> Doc #

parse :: ReadP r AbiTag #

Text CompilerId # 
Text CompilerFlavor # 
Text PackageName # 
Text UnqualComponentName # 
Text ComponentName # 
Text PackageIdentifier # 
Text DefUnitId # 
Text UnitId #

The textual format for UnitId coincides with the format GHC accepts for -package-id.

Methods

disp :: UnitId -> Doc #

parse :: ReadP r UnitId #

Text Module # 

Methods

disp :: Module -> Doc #

parse :: ReadP r Module #

Text OpenModule # 
Text OpenUnitId # 
Text ModuleReexport # 
Text Mixin # 

Methods

disp :: Mixin -> Doc #

parse :: ReadP r Mixin #

Text ExeDependency # 
Text Dependency # 
Text MungedPackageName # 
Text MungedPackageId # 
Text LegacyExeDependency # 
Text LibVersionInfo # 
Text AbiDependency # 
Text ExposedModule # 
Text TestShowDetails # 
Text RelaxedDep # 

defaultStyle :: Style #

The default rendering style used in Cabal for console output. It has a fixed page width and adds line breaks automatically.

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

Pretty-prints with the default style.

flatStyle :: Style #

A style for rendering all on one line.

stdParse :: Text ver => (ver -> String -> res) -> ReadP r res #