patch applied (cabal): Add Text class for displaying and parsing values

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Fri Mar 21 14:02:01 EDT 2008


Thu Mar 20 18:54:14 PDT 2008  Duncan Coutts <duncan at haskell.org>
  * Add Text class for displaying and parsing values
  This is intended to replace all these showFoo read/parseFoo functions
  we have all over the place. It's like the Read/Show classes but uses
  a half decent parser and pretty printer:
  class Text a where
    disp  :: a -> Doc
    parse :: ReadP a
  This patch just adds the class and an instance for Bool, replacing
  the parseBool function used in a few places. More to follow...

    M ./Cabal.cabal +1
    M ./Distribution/PackageDescription/Parse.hs -4 +6
    M ./Distribution/ParseUtils.hs -5 +1
    M ./Distribution/Simple/Command.hs -1 +3
    A ./Distribution/Text.hs

View patch online:

  http://darcs.haskell.org/cabal/_darcs/patches/20080321015414-adfee-8cbac296771a4d782aea2afe218dd4b72f421b41.gz



More information about the cabal-devel mailing list