[commit: base] master: Document invariants on mkText{Decoder, Encoder} (54a0b49)
Max Bolingbroke
batterseapower at hotmail.com
Mon Apr 4 15:48:23 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/54a0b4928967a350be687e17ff3576f2af6e21fb
>---------------------------------------------------------------
commit 54a0b4928967a350be687e17ff3576f2af6e21fb
Author: Max Bolingbroke <batterseapower at hotmail.com>
Date: Mon Apr 4 14:45:13 2011 +0100
Document invariants on mkText{Decoder,Encoder}
>---------------------------------------------------------------
GHC/IO/Encoding/Types.hs | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/GHC/IO/Encoding/Types.hs b/GHC/IO/Encoding/Types.hs
index caffa24..ac9147a 100644
--- a/GHC/IO/Encoding/Types.hs
+++ b/GHC/IO/Encoding/Types.hs
@@ -90,8 +90,12 @@ data TextEncoding
textEncodingName :: String,
-- ^ a string that can be passed to 'mkTextEncoding' to
-- create an equivalent 'TextEncoding'.
- mkTextDecoder :: IO (TextDecoder dstate),
- mkTextEncoder :: IO (TextEncoder estate)
+ mkTextDecoder :: IO (TextDecoder dstate),
+ -- ^ Creates a means of decoding bytes into characters: the result must not
+ -- be shared between several byte sequences or simultaneously across threads
+ mkTextEncoder :: IO (TextEncoder estate)
+ -- ^ Creates a means of encode characters into bytes: the result must not
+ -- be shared between several character sequences or simultaneously across threads
}
instance Show TextEncoding where
More information about the Libraries
mailing list