xmlbf-xeno 0.2.1 → 0.2.2
raw patch · 3 files changed
+10/−8 lines, 3 filesdep ~xmlbf
Dependency ranges changed: xmlbf
Files
- ChangeLog.md +4/−0
- lib/Xmlbf/Xeno.hs +4/−6
- xmlbf-xeno.cabal +2/−2
ChangeLog.md view
@@ -1,3 +1,7 @@+# 0.2.2++* Updated to work with `xmlbf-0.7`.+ # 0.2.1 * Added benchmark.
lib/Xmlbf/Xeno.hs view
@@ -1,6 +1,8 @@ {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -Wno-unused-imports #-}+ module Xmlbf.Xeno ( fromXenoNode , fromRawXml@@ -32,8 +34,8 @@ (,) <$> decodeUtf8 k <*> unescapeXmlUtf8 v cs <- for (Xeno.contents x) $ \case Xeno.Element n1 -> fromXenoNode n1- Xeno.Text bs -> Xmlbf.text' =<< unescapeXmlUtf8Lazy bs- Xeno.CData bs -> Xmlbf.text' =<< decodeUtf8Lazy bs+ Xeno.Text bs -> Xmlbf.textLazy' =<< unescapeXmlUtf8Lazy bs+ Xeno.CData bs -> Xmlbf.text' =<< decodeUtf8 bs Xmlbf.element' n (HM.fromList as) cs -- | Parses a given UTF8-encoded raw XML fragment into @a@, using the @xeno@@@ -61,10 +63,6 @@ decodeUtf8 :: B.ByteString -> Either String T.Text {-# INLINE decodeUtf8 #-} decodeUtf8 bs = Bif.first show (T.decodeUtf8' bs)--decodeUtf8Lazy :: B.ByteString -> Either String TL.Text-{-# INLINE decodeUtf8Lazy #-}-decodeUtf8Lazy bs = fmap TL.fromStrict (decodeUtf8 bs) unescapeXmlUtf8 :: B.ByteString -> Either String T.Text {-# INLINE unescapeXmlUtf8 #-}
xmlbf-xeno.cabal view
@@ -1,5 +1,5 @@ name: xmlbf-xeno-version: 0.2.1+version: 0.2.2 synopsis: xeno backend support for the xmlbf library. homepage: https://gitlab.com/k0001/xmlbf bug-reports: https://gitlab.com/k0001/xmlbf/issues@@ -30,7 +30,7 @@ text, unordered-containers, xeno,- xmlbf >=0.5+ xmlbf >=0.7 test-suite test default-language: Haskell2010