Cabal-2.2.0.1: 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 it 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 #

Note: this class will soon be deprecated. It's not yet, so that we are -Wall clean.

Methods

disp :: a -> Doc #

disp :: Pretty a => a -> Doc #

parse :: ReadP r a #

parse :: Parsec a => ReadP r a #

Instances
Text Bool # 
Instance details

Methods

disp :: Bool -> Doc #

parse :: ReadP r Bool #

Text Int # 
Instance details

Methods

disp :: Int -> Doc #

parse :: ReadP r Int #

Text Version # 
Instance details

Methods

disp :: Version -> Doc #

parse :: ReadP r Version #

Text Version # 
Instance details

Methods

disp :: Version -> Doc #

parse :: ReadP r Version #

Text VersionRange # 
Instance details
Text RepoType # 
Instance details

Methods

disp :: RepoType -> Doc #

parse :: ReadP r RepoType #

Text RepoKind # 
Instance details

Methods

disp :: RepoKind -> Doc #

parse :: ReadP r RepoKind #

Text PkgconfigName # 
Instance details
Text ForeignLibType # 
Instance details
Text ForeignLibOption # 
Instance details
Text ExecutableScope # 
Instance details
Text ComponentId # 
Instance details
Text BuildType # 
Instance details
Text AbiHash # 
Instance details

Methods

disp :: AbiHash -> Doc #

parse :: ReadP r AbiHash #

Text Platform # 
Instance details

Methods

disp :: Platform -> Doc #

parse :: ReadP r Platform #

Text Arch # 
Instance details

Methods

disp :: Arch -> Doc #

parse :: ReadP r Arch #

Text OS # 
Instance details

Methods

disp :: OS -> Doc #

parse :: ReadP r OS #

Text ModuleName # 
Instance details
Text ModuleRenaming # 
Instance details
Text IncludeRenaming # 
Instance details
Text TestType # 
Instance details

Methods

disp :: TestType -> Doc #

parse :: ReadP r TestType #

Text PkgconfigDependency # 
Instance details
Text BenchmarkType # 
Instance details
Text License # 
Instance details

Methods

disp :: License -> Doc #

parse :: ReadP r License #

Text KnownExtension # 
Instance details
Text Extension # 
Instance details
Text Language # 
Instance details

Methods

disp :: Language -> Doc #

parse :: ReadP r Language #

Text AbiTag # 
Instance details

Methods

disp :: AbiTag -> Doc #

parse :: ReadP r AbiTag #

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

Methods

disp :: UnitId -> Doc #

parse :: ReadP r UnitId #

Text Module # 
Instance details

Methods

disp :: Module -> Doc #

parse :: ReadP r Module #

Text OpenModule # 
Instance details
Text OpenUnitId # 
Instance details
Text ModuleReexport # 
Instance details
Text Mixin # 
Instance details

Methods

disp :: Mixin -> Doc #

parse :: ReadP r Mixin #

Text ExeDependency # 
Instance details
Text Dependency # 
Instance details
Text MungedPackageName # 
Instance details
Text MungedPackageId # 
Instance details
Text AbiDependency # 
Instance details
Text LegacyExeDependency # 
Instance details
Text LibVersionInfo # 
Instance details
Text FlagName # 
Instance details

Methods

disp :: FlagName -> Doc #

parse :: ReadP r FlagName #

Text ExposedModule # 
Instance details
Text TestShowDetails # 
Instance details
Text HaddockTarget # 
Instance details
Text a => Text (Identity a) # 
Instance details

Methods

disp :: Identity a -> Doc #

parse :: ReadP r (Identity a) #

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 #