Cabal-2.0.1.0: A framework for packaging Haskell software

CopyrightDuncan Coutts 2007
Maintainer[email protected]
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 #

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 # 
Text Platform # 
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 BuildType # 
Text ExecutableScope # 
Text ForeignLibOption # 
Text ForeignLibType # 
Text RepoType # 
Text RepoKind # 
Text PkgconfigName # 
Text ComponentId # 
Text AbiHash # 
Text ModuleName # 
Text ModuleRenaming # 
Text IncludeRenaming # 
Text VersionRange # 
Text Version # 
Text TestType # 
Text PkgconfigDependency # 
Text BenchmarkType # 
Text License # 
Text KnownExtension # 
Text Extension # 
Text Language # 
Text 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.

Text Module # 
Text OpenModule # 
Text OpenUnitId # 
Text ModuleReexport # 
Text Mixin # 
Text ExeDependency # 
Text Dependency # 
Text MungedPackageName # 
Text MungedPackageId # 
Text LegacyExeDependency # 
Text LibVersionInfo # 
Text AbiDependency # 
Text ExposedModule # 
Text TestShowDetails # 
Text RelaxedDep # 

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 #