Cabal-2.0.0.0: A framework for packaging Haskell software

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

Distribution.Text (signature[?])

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 ForeignLibOption # 
Text ForeignLibType # 
Text RepoType # 
Text RepoKind # 
Text ModuleName # 
Text ModuleRenaming # 
Text IncludeRenaming # 
Text VersionRange # 
Text Version # 
Text TestType # 
Text BenchmarkType # 
Text License # 
Text KnownExtension # 
Text Extension # 
Text Language # 
Text AbiTag # 
Text CompilerId # 
Text CompilerFlavor # 
Text LegacyExeDependency # 
Text AbiHash # 
Text DefUnitId # 
Text UnitId #

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

Text ComponentId # 
Text Module # 
Text PackageIdentifier # 
Text PkgconfigName # 
Text PackageName # 
Text UnqualComponentName # 
Text ComponentName # 
Text PkgconfigDependency # 
Text ModuleReexport # 
Text Mixin # 
Text ExeDependency # 
Text Dependency # 
Text LibVersionInfo # 
Text OpenModule # 
Text OpenUnitId # 
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 #