From: michaelt Date: Wed, 5 Feb 2014 10:00:39 +0000 (-0500) Subject: rearranged internal modules to placate haddock X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=b23136b1aed02febbe0fa539c2b74edbecd9e1e0;hp=02bc50d59d3312f8848f6aa3a2535828516eb135;p=github%2Ffretlink%2Ftext-pipes.git rearranged internal modules to placate haddock --- diff --git a/.DS_Store b/.DS_Store index 5008ddf..a67b8b2 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Pipes/Text/Internal.hs b/Pipes/Text/Internal.hs index 2530b23..582ef14 100644 --- a/Pipes/Text/Internal.hs +++ b/Pipes/Text/Internal.hs @@ -1,15 +1,7 @@ module Pipes.Text.Internal - ( Decoding(..) - , streamDecodeUtf8 - , decodeSomeUtf8 - , Codec(..) - , TextException(..) - , utf8 - , utf16_le - , utf16_be - , utf32_le - , utf32_be + (module Pipes.Text.Internal.Codec + , module Pipes.Text.Internal.Decoding ) where -import Pipes.Text.Internal.Decoding -import Pipes.Text.Internal.Codec \ No newline at end of file +import Pipes.Text.Internal.Codec +import Pipes.Text.Internal.Decoding \ No newline at end of file diff --git a/Pipes/Text/Internal/Codec.hs b/Pipes/Text/Internal/Codec.hs index 63cbd74..075a152 100644 --- a/Pipes/Text/Internal/Codec.hs +++ b/Pipes/Text/Internal/Codec.hs @@ -4,17 +4,15 @@ -- Copyright: 2014 Michael Thompson, 2011 Michael Snoyman, 2010-2011 John Millikin -- License: MIT -- This Parts of this code were taken from enumerator and conduits, and adapted for pipes -{- | This module follows the model of the enumerator and conduits libraries, and defines - 'Codec' s for various encodings. Note that we do not export a 'Codec' for ascii and - iso8859_1. A 'Lens' in the sense of the pipes library cannot be defined for these, so - special functions appear in @Pipes.Text@ --} + +-- This module follows the model of the enumerator and conduits libraries, and defines +-- 'Codec' s for various encodings. Note that we do not export a 'Codec' for ascii and +-- iso8859_1. A 'Lens' in the sense of the pipes library cannot be defined for these, so +-- special functions appear in @Pipes.Text@ + module Pipes.Text.Internal.Codec - ( Decoding(..) - , streamDecodeUtf8 - , decodeSomeUtf8 - , Codec(..) + ( Codec(..) , TextException(..) , utf8 , utf16_le diff --git a/Pipes/Text/Internal/Decoding.hs b/Pipes/Text/Internal/Decoding.hs index 4b4bbe6..b5d928a 100644 --- a/Pipes/Text/Internal/Decoding.hs +++ b/Pipes/Text/Internal/Decoding.hs @@ -2,11 +2,10 @@ {-# LANGUAGE GeneralizedNewtypeDeriving, MagicHash, UnliftedFFITypes #-} {-# LANGUAGE DeriveDataTypeable, RankNTypes #-} -{- | -This module lifts assorted materials from Brian O'Sullivan's text package -especially @Data.Text.Encoding@ in order to define a pipes-appropriate -'streamDecodeUtf8' --} +-- This module lifts assorted materials from Brian O'Sullivan's text package +-- especially @Data.Text.Encoding@ in order to define a pipes-appropriate +-- 'streamDecodeUtf8' + module Pipes.Text.Internal.Decoding ( Decoding(..) , streamDecodeUtf8 @@ -43,9 +42,13 @@ import Data.Maybe (catMaybes) --- | A stream oriented decoding result. Distinct from the similar type in @Data.Text.Encoding@ -data Decoding = Some Text ByteString (ByteString -> Decoding) -- | Text, continuation and any undecoded fragment. - | Other Text ByteString -- | Text followed by an undecodable ByteString +-- A stream oriented decoding result. Distinct from the similar type in Data.Text.Encoding + +data Decoding = Some Text ByteString (ByteString -> Decoding) + -- Text, continuation and any undecoded fragment. + | Other Text ByteString + -- Text followed by an undecodable ByteString + instance Show Decoding where showsPrec d (Some t bs _) = showParen (d > prec) $ showString "Some " . showsPrec prec' t . @@ -61,7 +64,7 @@ instance Show Decoding where newtype CodePoint = CodePoint Word32 deriving (Eq, Show, Num, Storable) newtype DecoderState = DecoderState Word32 deriving (Eq, Show, Num, Storable) --- | Resolve a 'ByteString' into 'Text' and a continuation that can handle further 'ByteStrings'. +-- Resolve a 'ByteString' into 'Text' and a continuation that can handle further 'ByteStrings'. streamDecodeUtf8 :: ByteString -> Decoding streamDecodeUtf8 = decodeChunkUtf8 B.empty 0 0 where @@ -95,7 +98,7 @@ streamDecodeUtf8 = decodeChunkUtf8 B.empty 0 0 {-# INLINE decodeChunkUtf8 #-} {-# INLINE streamDecodeUtf8 #-} --- | Resolve a ByteString into an initial segment of intelligible 'Text' and whatever is unintelligble +-- Resolve a ByteString into an initial segment of intelligible 'Text' and whatever is unintelligble decodeSomeUtf8 :: ByteString -> (Text, ByteString) decodeSomeUtf8 bs@(PS fp off len) = runST $ do dest <- A.new (len+1) diff --git a/changelog b/changelog index 631aed3..6569002 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,18 @@ + # Version 0.0.0.5 + + * Rearranged internal modules + + + # Version 0.0.0.4 + + * Altered bad haddock markup + + + # Version 0.0.0.3 + + * Actually added changelog + + # Version 0.0.0.2 * Omit `stdinLn` as likely to be dangerous through misunderstanding. diff --git a/pipes-text.cabal b/pipes-text.cabal index cb828a7..c5b47d0 100644 --- a/pipes-text.cabal +++ b/pipes-text.cabal @@ -1,5 +1,5 @@ name: pipes-text -version: 0.0.0.2 +version: 0.0.0.4 synopsis: Text pipes. description: Many of the pipes and other operations defined here mirror those in the `pipes-bytestring` library. Folds like `length` and grouping @@ -31,7 +31,7 @@ category: Text, Pipes build-type: Simple cabal-version: >=1.10 -extra-source-files: README.md include/*.h +extra-source-files: README.md include/*.h changelog source-repository head type: git location: https://github.com/michaelt/text-pipes