[commit: base] encoding: Make Foreign.C.String.*CString use the locale encoding (c133a05)

Max Bolingbroke batterseapower at hotmail.com
Tue Apr 5 10:05:17 CEST 2011


Repository : ssh://darcs.haskell.org//srv/darcs/packages/base

On branch  : encoding

http://hackage.haskell.org/trac/ghc/changeset/c133a05811546c329f8caed6bcec404fe190f3cd

>---------------------------------------------------------------

commit c133a05811546c329f8caed6bcec404fe190f3cd
Author: Max Bolingbroke <batterseapower at hotmail.com>
Date:   Mon Apr 4 15:52:56 2011 +0100

    Make Foreign.C.String.*CString use the locale encoding
    
    This change follows the FFI specification in Haskell 98, which
    has never actually been implemented before.
    
    The functions exported from Foreign.C.String are partially-applied
    versions of those from GHC.Foreign, which allows the user to supply
    their own TextEncoding.
    
    We also introduce foreignEncoding as the name of the text encoding
    that follows the FFI appendix in that it transliterates encoding
    errors.

 Control/Exception/Base.hs |    2 +-
 Foreign/C/String.hs       |   45 ++++++++++
 GHC/Foreign.hs            |  213 +++++++++++++++++++++++++++++++++++++++++++++
 GHC/IO.hs                 |   14 +++-
 GHC/IO/Encoding.hs        |   11 ++-
 GHC/IO/Encoding.hs-boot   |    6 ++
 System/IO.hs              |    2 +-
 base.cabal                |    1 +
 8 files changed, 289 insertions(+), 5 deletions(-)


Diff suppressed because of size. To see it, use:

    git show c133a05811546c329f8caed6bcec404fe190f3cd



More information about the Cvs-libraries mailing list