Cabal-2.2.0.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 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 # 

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 Version # 

Methods

disp :: Version -> Doc #

parse :: ReadP r Version #

Text VersionRange # 
Text RepoType # 

Methods

disp :: RepoType -> Doc #

parse :: ReadP r RepoType #

Text RepoKind # 

Methods

disp :: RepoKind -> Doc #

parse :: ReadP r RepoKind #

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

Methods

disp :: AbiHash -> Doc #

parse :: ReadP r AbiHash #

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 ModuleName # 
Text ModuleRenaming # 
Text IncludeRenaming # 
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 # 

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 AbiDependency # 
Text LegacyExeDependency # 
Text LibVersionInfo # 
Text FlagName # 

Methods

disp :: FlagName -> Doc #

parse :: ReadP r FlagName #

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

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 #