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

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

Methods

disp :: a -> Doc Source #

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

parse :: ReadP r a Source #

parse :: Parsec a => ReadP r a Source #

Instances
Text Bool # 
Instance details

Methods

disp :: Bool -> Doc Source #

parse :: ReadP r Bool Source #

Text Int # 
Instance details

Methods

disp :: Int -> Doc Source #

parse :: ReadP r Int Source #

Text Version # 
Instance details
Text BuildType # 
Instance details
Text ExecutableScope # 
Instance details
Text ForeignLibOption # 
Instance details
Text ForeignLibType # 
Instance details
Text Version # 
Instance details
Text VersionRange # 
Instance details
Text PkgconfigName # 
Instance details
Text ComponentId # 
Instance details
Text AbiHash # 
Instance details
Text ModuleName # 
Instance details
Text ModuleRenaming # 
Instance details
Text IncludeRenaming # 
Instance details
Text RepoType # 
Instance details
Text RepoKind # 
Instance details
Text Platform # 
Instance details
Text Arch # 
Instance details

Methods

disp :: Arch -> Doc Source #

parse :: ReadP r Arch Source #

Text OS # 
Instance details

Methods

disp :: OS -> Doc Source #

parse :: ReadP r OS Source #

Text TestType # 
Instance details
Text PkgconfigDependency # 
Instance details
Text BenchmarkType # 
Instance details
Text License # 
Instance details
Text KnownExtension # 
Instance details
Text Extension # 
Instance details
Text Language # 
Instance details
Text AbiTag # 
Instance details
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
Text Module # 
Instance details
Text OpenModule # 
Instance details
Text OpenUnitId # 
Instance details
Text ModuleReexport # 
Instance details
Text Mixin # 
Instance details
Text ExeDependency # 
Instance details
Text Dependency # 
Instance details
Text MungedPackageName # 
Instance details
Text MungedPackageId # 
Instance details
Text LegacyExeDependency # 
Instance details
Text LibVersionInfo # 
Instance details
Text FlagName # 
Instance details
Text AbiDependency # 
Instance details
Text ExposedModule # 
Instance details
Text TestShowDetails # 
Instance details
Text HaddockTarget # 
Instance details
Text a => Text (Identity a) # 
Instance details

Methods

disp :: Identity a -> Doc Source #

parse :: ReadP r (Identity a) Source #

defaultStyle :: Style Source #

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

Pretty-prints with the default style.

flatStyle :: Style Source #

A style for rendering all on one line.

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