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

Note: this class will soon be deprecated. It's not yet, so that 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 Source # 

Methods

disp :: Bool -> Doc Source #

parse :: ReadP r Bool Source #

Text Int Source # 

Methods

disp :: Int -> Doc Source #

parse :: ReadP r Int Source #

Text Version Source # 
Text Version Source # 
Text VersionRange Source # 
Text RepoType Source # 
Text RepoKind Source # 
Text PkgconfigName Source # 
Text ForeignLibType Source # 
Text ForeignLibOption Source # 
Text ExecutableScope Source # 
Text ComponentId Source # 
Text BuildType Source # 
Text AbiHash Source # 
Text Platform Source # 
Text Arch Source # 

Methods

disp :: Arch -> Doc Source #

parse :: ReadP r Arch Source #

Text OS Source # 

Methods

disp :: OS -> Doc Source #

parse :: ReadP r OS Source #

Text ModuleName Source # 
Text ModuleRenaming Source # 
Text IncludeRenaming Source # 
Text TestType Source # 
Text PkgconfigDependency Source # 
Text BenchmarkType Source # 
Text License Source # 
Text KnownExtension Source # 
Text Extension Source # 
Text Language Source # 
Text AbiTag Source # 
Text CompilerId Source # 
Text CompilerFlavor Source # 
Text PackageName Source # 
Text UnqualComponentName Source # 
Text ComponentName Source # 
Text PackageIdentifier Source # 
Text DefUnitId Source # 
Text UnitId Source # 
Text Module Source # 
Text OpenModule Source # 
Text OpenUnitId Source # 
Text ModuleReexport Source # 
Text Mixin Source # 
Text ExeDependency Source # 
Text Dependency Source # 
Text MungedPackageName Source # 
Text MungedPackageId Source # 
Text AbiDependency Source # 
Text LegacyExeDependency Source # 
Text LibVersionInfo Source # 
Text FlagName Source # 
Text ExposedModule Source # 
Text TestShowDetails Source # 
Text HaddockTarget Source # 
Text a => Text (Identity a) Source # 

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 #