tagstream-conduit 0.3.1 → 0.3.2
raw patch · 2 files changed
+10/−1 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Text.HTML.TagStream.Types: instance Functor Token'
Files
Text/HTML/TagStream/Types.hs view
@@ -5,6 +5,7 @@ import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as S import Blaze.ByteString.Builder (Builder, fromByteString, toByteString)+import Control.Arrow ((***)) type Attr' s = (s, s) type Attr = Attr' ByteString@@ -47,3 +48,11 @@ encodeHL :: (ByteString -> ByteString) -> [Token] -> ByteString encodeHL hl = toByteString . mconcat . map (showToken hl)++instance Functor Token' where+ fmap f (TagOpen x pairs b) = TagOpen (f x) (map (f *** f) pairs) b+ fmap f (TagClose x) = TagClose (f x)+ fmap f (Text x) = Text (f x)+ fmap f (Comment x) = Comment (f x)+ fmap f (Special x y) = Special (f x) (f y)+ fmap f (Incomplete x) = Incomplete (f x)
tagstream-conduit.cabal view
@@ -1,5 +1,5 @@ Name: tagstream-conduit-Version: 0.3.1+Version: 0.3.2 Synopsis: streamlined html tag parser Description: Tag-stream is a library for parsing HTML//XML to a token stream.