summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhaskellworks <>2018-03-27 10:50:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2018-03-27 10:50:00 (GMT)
commit481f3f7bc14976577bb239a02e8bf964a0ac2ed5 (patch)
treef189573d443aa96b9431dbef3b102efb29d07098
parent462d2cd5ff9961de92b520c6b39f45ee6d81cc06 (diff)
version 0.1.0.20.1.0.2
-rw-r--r--hw-xml.cabal285
-rw-r--r--src/HaskellWorks/Data/Xml/Succinct/Cursor/Internal.hs8
2 files changed, 164 insertions, 129 deletions
diff --git a/hw-xml.cabal b/hw-xml.cabal
index 804b17f..dc7803a 100644
--- a/hw-xml.cabal
+++ b/hw-xml.cabal
@@ -1,136 +1,165 @@
-name: hw-xml
-version: 0.1.0.1
-synopsis: Conduits for tokenizing streams.
-description: Please see README.md
-homepage: http://github.com/haskell-works/hw-xml#readme
-license: BSD3
-license-file: LICENSE
-author: John Ky, Alexey Raga
-maintainer: alexey.raga@gmail.com
-copyright: 2016 John Ky, Alexey Raga
-category: Data, XML
-build-type: Simple
-extra-source-files: README.md
-cabal-version: >= 1.22
-data-files: data/catalog.xml
+-- This file has been generated from package.yaml by hpack version 0.20.0.
+--
+-- see: https://github.com/sol/hpack
+--
+-- hash: e29a00d5843147d2a13e015c883da59050b71c35b839fdaf3359ca371d542aac
-executable hw-xml-example
- hs-source-dirs: app
- main-is: Main.hs
- ghc-options: -threaded -rtsopts -with-rtsopts=-N -O2 -Wall -msse4.2
- build-depends: base >= 4 && < 5
- , bytestring
- , hw-balancedparens >= 0.2.0.1
- , hw-bits >= 0.7.0.2
- , hw-prim >= 0.5.0.0
- , hw-rankselect >= 0.10.0.3
- , hw-xml
- , vector
- default-language: Haskell2010
+name: hw-xml
+version: 0.1.0.2
+synopsis: Conduits for tokenizing streams.
+description: Please see README.md
+category: Data, XML
+homepage: http://github.com/haskell-works/hw-xml#readme
+bug-reports: https://github.com/haskell-works/hw-xml/issues
+author: John Ky,
+ Alexey Raga
+maintainer: alexey.raga@gmail.com
+copyright: 2016 John Ky,
+ Alexey Raga
+license: BSD3
+license-file: LICENSE
+build-type: Simple
+cabal-version: >= 1.10
-library
- hs-source-dirs: src
- exposed-modules: HaskellWorks.Data.Xml
- , HaskellWorks.Data.Xml.Blank
- , HaskellWorks.Data.Xml.CharLike
- , HaskellWorks.Data.Xml.Conduit
- , HaskellWorks.Data.Xml.Conduit.Blank
- , HaskellWorks.Data.Xml.Conduit.Words
- , HaskellWorks.Data.Xml.Decode
- , HaskellWorks.Data.Xml.DecodeError
- , HaskellWorks.Data.Xml.DecodeResult
- , HaskellWorks.Data.Xml.Grammar
- , HaskellWorks.Data.Xml.Index
- , HaskellWorks.Data.Xml.Lens
- , HaskellWorks.Data.Xml.Succinct
- , HaskellWorks.Data.Xml.Succinct.Cursor
- , HaskellWorks.Data.Xml.Succinct.Cursor.BalancedParens
- , HaskellWorks.Data.Xml.Succinct.Cursor.BlankedXml
- , HaskellWorks.Data.Xml.Succinct.Cursor.InterestBits
- , HaskellWorks.Data.Xml.Succinct.Cursor.Internal
- , HaskellWorks.Data.Xml.Succinct.Cursor.Token
- , HaskellWorks.Data.Xml.Succinct.Index
- , HaskellWorks.Data.Xml.RawDecode
- , HaskellWorks.Data.Xml.RawValue
- , HaskellWorks.Data.Xml.Token.Tokenize
- , HaskellWorks.Data.Xml.Token.Types
- , HaskellWorks.Data.Xml.Token
- , HaskellWorks.Data.Xml.Type
- , HaskellWorks.Data.Xml.Value
- build-depends: base >= 4 && < 5
- , array
- , ansi-wl-pprint
- , attoparsec
- , bytestring
- , cereal
- , conduit
- , containers
- , ghc-prim
- , hw-balancedparens >= 0.1.0.0
- , hw-bits >= 0.4.0.0
- , hw-conduit >= 0.2.0.2
- , hw-parser
- , hw-prim >= 0.4.0.0
- , hw-rankselect >= 0.7.0.0
- , hw-rankselect-base >= 0.2.0.0
- , lens
- , mtl
- , resourcet
- , transformers
- , vector
- , word8
+extra-source-files:
+ README.md
- default-language: Haskell2010
- ghc-options: -Wall -O2 -msse4.2
-
-test-suite hw-xml-test
- type: exitcode-stdio-1.0
- hs-source-dirs: test
- main-is: Spec.hs
- other-modules: HaskellWorks.Data.Xml.Conduit.BlankSpec
- , HaskellWorks.Data.Xml.RawValueSpec
- , HaskellWorks.Data.Xml.Succinct.Cursor.BalancedParensSpec
- , HaskellWorks.Data.Xml.Succinct.Cursor.InterestBitsSpec
- , HaskellWorks.Data.Xml.Succinct.CursorSpec
- , HaskellWorks.Data.Xml.Token.TokenizeSpec
- , HaskellWorks.Data.Xml.TypeSpec
- build-depends: base >= 4 && < 5
- , attoparsec
- , bytestring
- , conduit
- , hspec
- , hw-balancedparens >= 0.1.0.0
- , hw-bits >= 0.4.0.0
- , hw-conduit >= 0.2.0.2
- , hw-xml
- , hw-prim >= 0.4.0.0
- , hw-rankselect >= 0.7.0.0
- , hw-rankselect-base >= 0.2.0.0
- , QuickCheck
- , vector
- ghc-options: -threaded -rtsopts -with-rtsopts=-N
- -- -Wall
- default-language: Haskell2010
+data-files:
+ data/catalog.xml
source-repository head
- type: git
+ type: git
location: https://github.com/haskell-works/hw-xml
+library
+ hs-source-dirs:
+ src
+ ghc-options: -Wall -O2 -msse4.2
+ build-depends:
+ ansi-wl-pprint
+ , array
+ , attoparsec
+ , base >=4 && <5
+ , bytestring
+ , cereal
+ , conduit
+ , containers
+ , deepseq
+ , ghc-prim
+ , hw-balancedparens >=0.1.0.0
+ , hw-bits >=0.4.0.0
+ , hw-conduit >=0.2.0.2
+ , hw-parser
+ , hw-prim >=0.4.0.0
+ , hw-rankselect >=0.7.0.0
+ , hw-rankselect-base >=0.2.0.0
+ , lens
+ , mtl
+ , resourcet
+ , transformers
+ , vector
+ , word8
+ exposed-modules:
+ HaskellWorks.Data.Xml
+ HaskellWorks.Data.Xml.Blank
+ HaskellWorks.Data.Xml.CharLike
+ HaskellWorks.Data.Xml.Conduit
+ HaskellWorks.Data.Xml.Conduit.Blank
+ HaskellWorks.Data.Xml.Conduit.Words
+ HaskellWorks.Data.Xml.Decode
+ HaskellWorks.Data.Xml.DecodeError
+ HaskellWorks.Data.Xml.DecodeResult
+ HaskellWorks.Data.Xml.Grammar
+ HaskellWorks.Data.Xml.Index
+ HaskellWorks.Data.Xml.Lens
+ HaskellWorks.Data.Xml.Succinct
+ HaskellWorks.Data.Xml.Succinct.Cursor
+ HaskellWorks.Data.Xml.Succinct.Cursor.BalancedParens
+ HaskellWorks.Data.Xml.Succinct.Cursor.BlankedXml
+ HaskellWorks.Data.Xml.Succinct.Cursor.InterestBits
+ HaskellWorks.Data.Xml.Succinct.Cursor.Internal
+ HaskellWorks.Data.Xml.Succinct.Cursor.Token
+ HaskellWorks.Data.Xml.Succinct.Index
+ HaskellWorks.Data.Xml.RawDecode
+ HaskellWorks.Data.Xml.RawValue
+ HaskellWorks.Data.Xml.Token.Tokenize
+ HaskellWorks.Data.Xml.Token.Types
+ HaskellWorks.Data.Xml.Token
+ HaskellWorks.Data.Xml.Type
+ HaskellWorks.Data.Xml.Value
+ other-modules:
+ Paths_hw_xml
+ default-language: Haskell2010
+
+executable hw-xml-example
+ main-is: Main.hs
+ hs-source-dirs:
+ app
+ ghc-options: -threaded -rtsopts -with-rtsopts=-N -O2 -Wall -msse4.2
+ build-depends:
+ base >=4 && <5
+ , bytestring
+ , hw-balancedparens >=0.2.0.1
+ , hw-bits >=0.7.0.2
+ , hw-prim >=0.5.0.0
+ , hw-rankselect >=0.10.0.3
+ , hw-xml
+ , vector
+ other-modules:
+ Paths_hw_xml
+ default-language: Haskell2010
+
+test-suite hw-xml-test
+ type: exitcode-stdio-1.0
+ main-is: Spec.hs
+ hs-source-dirs:
+ test
+ ghc-options: -threaded -rtsopts -with-rtsopts=-N
+ build-depends:
+ QuickCheck
+ , attoparsec
+ , base >=4 && <5
+ , bytestring
+ , conduit
+ , hspec
+ , hw-balancedparens >=0.1.0.0
+ , hw-bits >=0.4.0.0
+ , hw-conduit >=0.2.0.2
+ , hw-prim >=0.4.0.0
+ , hw-rankselect >=0.7.0.0
+ , hw-rankselect-base >=0.2.0.0
+ , hw-xml
+ , vector
+ other-modules:
+ HaskellWorks.Data.Xml.Conduit.BlankSpec
+ HaskellWorks.Data.Xml.RawValueSpec
+ HaskellWorks.Data.Xml.Succinct.Cursor.BalancedParensSpec
+ HaskellWorks.Data.Xml.Succinct.Cursor.InterestBitsSpec
+ HaskellWorks.Data.Xml.Succinct.CursorSpec
+ HaskellWorks.Data.Xml.Token.TokenizeSpec
+ HaskellWorks.Data.Xml.TypeSpec
+ Paths_hw_xml
+ default-language: Haskell2010
+
benchmark bench
- Type: exitcode-stdio-1.0
- HS-Source-Dirs: bench
- Main-Is: Main.hs
- GHC-Options: -O2 -Wall -msse4.2
- Default-Language: Haskell2010
- Build-Depends: base >= 4 && < 5
- , bytestring
- , conduit
- , criterion
- , hw-balancedparens >= 0.1.0.0
- , hw-bits >= 0.4.0.0
- , hw-conduit >= 0.2.0.2
- , hw-xml
- , hw-prim >= 0.4.0.0
- , mmap
- , resourcet
- , vector
+ type: exitcode-stdio-1.0
+ main-is: Main.hs
+ hs-source-dirs:
+ bench
+ ghc-options: -O2 -Wall -msse4.2
+ build-depends:
+ base >=4 && <5
+ , bytestring
+ , conduit
+ , criterion
+ , hw-balancedparens >=0.1.0.0
+ , hw-bits >=0.4.0.0
+ , hw-conduit >=0.2.0.2
+ , hw-prim >=0.4.0.0
+ , hw-xml
+ , mmap
+ , resourcet
+ , vector
+ other-modules:
+ Paths_hw_xml
+ default-language: Haskell2010
diff --git a/src/HaskellWorks/Data/Xml/Succinct/Cursor/Internal.hs b/src/HaskellWorks/Data/Xml/Succinct/Cursor/Internal.hs
index 99a2a4d..058c175 100644
--- a/src/HaskellWorks/Data/Xml/Succinct/Cursor/Internal.hs
+++ b/src/HaskellWorks/Data/Xml/Succinct/Cursor/Internal.hs
@@ -1,3 +1,6 @@
+{-# LANGUAGE DeriveAnyClass #-}
+{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE InstanceSigs #-}
@@ -9,10 +12,12 @@ module HaskellWorks.Data.Xml.Succinct.Cursor.Internal
, xmlCursorPos
) where
+import Control.DeepSeq (NFData)
import Data.ByteString.Internal as BSI
import Data.String
import Data.Word
import Foreign.ForeignPtr
+import GHC.Generics
import HaskellWorks.Data.Bits.BitShown
import HaskellWorks.Data.FromByteString
import HaskellWorks.Data.FromForeignRegion
@@ -37,7 +42,8 @@ data XmlCursor t v w = XmlCursor
, balancedParens :: !w
, cursorRank :: !Count
}
- deriving (Eq, Show)
+ deriving (Eq, Show, Generic)
+ deriving anyclass NFData
instance (FromBlankedXml (XmlInterestBits a), FromBlankedXml (CBP.XmlBalancedParens b))
=> FromByteString (XmlCursor BS.ByteString a b) where