xmlbf-xeno 0.1 → 0.1.1
raw patch · 6 files changed
+30/−8 lines, 6 filessetup-changed
Files
- ChangeLog.md +5/−0
- LICENSE +17/−0
- Setup.hs +1/−1
- lib/Xmlbf/Xeno.hs +2/−2
- test/Test.hs +3/−3
- xmlbf-xeno.cabal +2/−2
ChangeLog.md view
@@ -1,3 +1,8 @@+# 0.1.1++* Made compatible with `xmlbf-0.3`.++ # 0.1 * First version.
LICENSE view
@@ -1,3 +1,20 @@+Copyright 2017-2018, Renzo Carbonara <renλren.zone>.++Except where otherwise explicitly mentioned, all of contents of the+"xmlbf-xeno" project are licensed under the Apache License, Version 2.0 (the+"License"); you may not use this file except in compliance with the+License. You may obtain a copy of the License at the end of this file or at+http://www.apache.org/licenses/LICENSE-2.0++Unless required by applicable law or agreed to in writing, software+distributed under the License is distributed on an "AS IS" BASIS,+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+See the License for the specific language governing permissions and+limitations under the License.+++-------------------------------------------------------------------------------+ Apache License Version 2.0, January 2004
Setup.hs view
@@ -1,4 +1,4 @@ #! /usr/bin/env nix-shell-#! nix-shell ./default.nix -i runghc+#! nix-shell ./shell.nix -i runghc import Distribution.Simple main = defaultMain
lib/Xmlbf/Xeno.hs view
@@ -32,8 +32,8 @@ (,) <$> decodeUtf8 k <*> unescapeXmlUtf8 v cs <- for (Xeno.contents x) $ \case Xeno.Element n1 -> element n1- Xeno.Text bs -> Xmlbf.Text <$> unescapeXmlUtf8 bs- Xeno.CData bs -> Xmlbf.Text <$> decodeUtf8 bs+ Xeno.Text bs -> Xmlbf.text <$> unescapeXmlUtf8 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@
test/Test.hs view
@@ -50,7 +50,7 @@ Xx.nodes "" @?= Right [] , HU.testCase "2" $ do- Xx.nodes " " @?= Right [X.Text " "]+ Xx.nodes " " @?= Right [X.text " "] , HU.testCase "3" $ do Xx.nodes "<foo/>" @?= Right [el "foo" [] []]@@ -59,10 +59,10 @@ Xx.nodes "<foo></foo>" @?= Right [el "foo" [] []] , HU.testCase "5" $ do- Xx.nodes " <foo></foo>" @?= Right [X.Text " ", el "foo" [] []]+ Xx.nodes " <foo></foo>" @?= Right [X.text " ", el "foo" [] []] , HU.testCase "6" $ do- Xx.nodes " <foo/> " @?= Right [X.Text " ", el "foo" [] [], " "]+ Xx.nodes " <foo/> " @?= Right [X.text " ", el "foo" [] [], " "] , HU.testCase "7" $ do Xx.nodes "<foo a=\"\"/>" @?= Right [el "foo" [("a", "")] []]
xmlbf-xeno.cabal view
@@ -1,12 +1,12 @@ name: xmlbf-xeno-version: 0.1+version: 0.1.1 synopsis: xeno backend support for the xmlbf library. homepage: https://gitlab.com/k0001/xmlbf license: Apache-2.0 license-file: LICENSE author: Renzo Carbonara maintainer: ren§ren*zone-copyright: Copyright 2017 Renzo Carbonara+copyright: Copyright 2017-2018 Renzo Carbonara category: Text build-type: Simple extra-source-files: ChangeLog.md README.md