libyaml-streamly 0.2.0 → 0.2.1
raw patch · 4 files changed
+19/−10 lines, 4 filesdep +deepseqPVP ok
version bump matches the API change (PVP)
Dependencies added: deepseq
API changes (from Hackage documentation)
+ Text.Libyaml: instance Control.DeepSeq.NFData Text.Libyaml.Event
+ Text.Libyaml: instance Control.DeepSeq.NFData Text.Libyaml.MappingStyle
+ Text.Libyaml: instance Control.DeepSeq.NFData Text.Libyaml.SequenceStyle
+ Text.Libyaml: instance Control.DeepSeq.NFData Text.Libyaml.Style
+ Text.Libyaml: instance Control.DeepSeq.NFData Text.Libyaml.Tag
+ Text.Libyaml: instance Control.DeepSeq.NFData Text.Libyaml.YamlException
+ Text.Libyaml: instance Control.DeepSeq.NFData Text.Libyaml.YamlMark
+ Text.Libyaml: instance GHC.Generics.Generic Text.Libyaml.Event
+ Text.Libyaml: instance GHC.Generics.Generic Text.Libyaml.MappingStyle
+ Text.Libyaml: instance GHC.Generics.Generic Text.Libyaml.SequenceStyle
+ Text.Libyaml: instance GHC.Generics.Generic Text.Libyaml.Style
+ Text.Libyaml: instance GHC.Generics.Generic Text.Libyaml.Tag
+ Text.Libyaml: instance GHC.Generics.Generic Text.Libyaml.YamlException
+ Text.Libyaml: instance GHC.Generics.Generic Text.Libyaml.YamlMark
Files
- ChangeLog.md +4/−0
- README.md +2/−2
- libyaml-streamly.cabal +2/−1
- src/Text/Libyaml.hs +11/−7
ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for libyaml-streamly +## 0.2.1++* Add benchmarks and NFData instances+ ## 0.2.0 * Rewrite in streamly
README.md view
@@ -1,3 +1,3 @@-# libyaml+# libyaml-streamly -This package provides a haskell wrapper over the [libyaml C library version 0.2.2 by Kirill Simonov](https://github.com/yaml/libyaml). It contains the C source so you don't need to worry about any non-Haskell dependencies.+This package provides a haskell wrapper over the [libyaml C library version 0.2.5 by Kirill Simonov](https://github.com/yaml/libyaml). It contains the C source so you don't need to worry about any non-Haskell dependencies.
libyaml-streamly.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.12 name: libyaml-streamly-version: 0.2.0+version: 0.2.1 synopsis: Low-level, streaming YAML interface via streamly. description: Rewrite of libyaml in streamly category: Text@@ -51,6 +51,7 @@ build-depends: base >=4.9.1 && <5 , bytestring >=0.9.1.4+ , deepseq , safe-exceptions , streamly >=0.8.0
src/Text/Libyaml.hs view
@@ -9,6 +9,8 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StrictData #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE DeriveGeneric, DeriveAnyClass #-} -- | Low-level, streaming YAML interface. For a higher-level interface, see -- "Data.Yaml".@@ -71,6 +73,8 @@ #if WINDOWS && __GLASGOW_HASKELL__ >= 806 import System.Directory (removeFile) #endif+import GHC.Generics (Generic)+import Control.DeepSeq import Control.Exception.Safe import qualified Streamly.Internal.Data.Stream.StreamD.Type as D@@ -91,7 +95,7 @@ | EventSequenceEnd | EventMappingStart !Tag !MappingStyle !Anchor | EventMappingEnd- deriving (Show, Eq)+ deriving (Show, Eq, Generic, NFData) -- | Event with start and end marks. --@@ -111,19 +115,19 @@ | Literal | Folded | PlainNoTag- deriving (Show, Read, Eq, Enum, Bounded, Ord, Data, Typeable)+ deriving (Show, Read, Eq, Enum, Bounded, Ord, Data, Typeable, Generic, NFData) -- | Style for sequences - e.g. block or flow -- -- @since 0.9.0 data SequenceStyle = AnySequence | BlockSequence | FlowSequence- deriving (Show, Eq, Enum, Bounded, Ord, Data, Typeable)+ deriving (Show, Eq, Enum, Bounded, Ord, Data, Typeable, Generic, NFData) -- | Style for mappings - e.g. block or flow -- -- @since 0.9.0 data MappingStyle = AnyMapping | BlockMapping | FlowMapping- deriving (Show, Eq, Enum, Bounded, Ord, Data, Typeable)+ deriving (Show, Eq, Enum, Bounded, Ord, Data, Typeable, Generic, NFData) data Tag = StrTag | FloatTag@@ -135,7 +139,7 @@ | MapTag | UriTag String | NoTag- deriving (Show, Eq, Read, Data, Typeable)+ deriving (Show, Eq, Read, Data, Typeable, Generic, NFData) tagSuppressed :: Tag -> Bool tagSuppressed (NoTag) = True@@ -854,10 +858,10 @@ -- | The pointer position data YamlMark = YamlMark { yamlIndex :: Int, yamlLine :: Int, yamlColumn :: Int }- deriving Show+ deriving (Show, Generic, NFData) data YamlException = YamlException String -- | problem, context, index, position line, position column | YamlParseException { yamlProblem :: String, yamlContext :: String, yamlProblemMark :: YamlMark }- deriving (Show, Typeable)+ deriving (Show, Typeable, Generic, NFData) instance Exception YamlException