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

Minimal complete definition

disp, parse

Methods

disp :: a -> Doc Source #

parse :: 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 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 BuildType Source # 
Text ExecutableScope Source # 
Text ForeignLibOption Source # 
Text ForeignLibType Source # 
Text RepoType Source # 
Text RepoKind Source # 
Text ModuleName Source # 
Text ModuleRenaming Source # 
Text IncludeRenaming Source # 
Text AbiHash Source # 
Text ComponentId Source # 
Text PkgconfigName Source # 
Text VersionRange Source # 
Text Version Source # 
Text License Source # 
Text BenchmarkType Source # 
Text PkgconfigDependency Source # 
Text TestType Source # 
Text KnownExtension Source # 
Text Extension Source # 
Text Language Source # 
Text AbiTag Source # 
Text CompilerId Source # 
Text CompilerFlavor Source # 
Text LegacyExeDependency Source # 
Text PackageName Source # 
Text Mixin Source # 
Text ModuleReexport Source # 
Text PackageIdentifier Source # 
Text Dependency Source # 
Text DefUnitId Source # 
Text UnitId Source #

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

Text Module Source # 
Text UnqualComponentName Source # 
Text ComponentName Source # 
Text ExeDependency Source # 
Text MungedPackageName Source # 
Text MungedPackageId Source # 
Text LibVersionInfo Source # 
Text TestShowDetails Source # 
Text RelaxedDep Source # 
Text OpenModule Source # 
Text OpenUnitId Source # 
Text AbiDependency Source # 
Text ExposedModule 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 #