HsYAML 0.2.1.0 → 0.2.1.1
raw patch · 9 files changed
+53/−44 lines, 9 filesdep +transformersdep ~basedep ~bytestringdep ~deepseqnew-uploaderPVP ok
version bump matches the API change (PVP)
Dependencies added: transformers
Dependency ranges changed: base, bytestring, deepseq, mtl, tasty, text
API changes (from Hackage documentation)
Files
- ChangeLog.md +7/−0
- HsYAML.cabal +31/−18
- LICENSE.GPLv2 +0/−9
- LICENSE.GPLv3 +0/−4
- src-test/TML.hs +4/−5
- src/Data/YAML/Event.hs +1/−2
- src/Data/YAML/Loader.hs +3/−1
- src/Data/YAML/Token.hs +4/−4
- src/Util.hs +3/−1
ChangeLog.md view
@@ -1,5 +1,12 @@ See also http://pvp.haskell.org/faq +### 0.2.1.1++_2022-05-11_++* Compatibility with `mtl-2.3`+* Tested with GHC 7.4 - 9.2+ ### 0.2.1.0 * Define `Functor Doc` instance ([#33](https://github.com/haskell-hvr/HsYAML/issues/33))
HsYAML.cabal view
@@ -1,20 +1,32 @@ cabal-version: 1.14 name: HsYAML-version: 0.2.1.0+version: 0.2.1.1 synopsis: Pure Haskell YAML 1.2 processor-homepage: https://github.com/hvr/HsYAML-bug-reports: https://github.com/hvr/HsYAML/issues+homepage: https://github.com/haskell-hvr/HsYAML+bug-reports: https://github.com/haskell-hvr/HsYAML/issues license: GPL-2 X-SPDX-License-Identifier: GPL-2.0-or-later license-files: LICENSE.GPLv2 LICENSE.GPLv3 author: Herbert Valerio Riedel-maintainer: hvr@gnu.org+maintainer: https://github.com/haskell-hvr/HsYAML copyright: 2015-2018 Herbert Valerio Riedel , 2007-2008 Oren Ben-Kiki category: Text build-type: Simple-tested-with: GHC==8.6.1, GHC==8.4.3, GHC==8.4.1, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2+tested-with:+ GHC == 9.2.2+ GHC == 9.0.2+ GHC == 8.10.7+ GHC == 8.8.4+ GHC == 8.6.5+ GHC == 8.4.4+ GHC == 8.2.2+ GHC == 8.0.2+ GHC == 7.10.3+ GHC == 7.8.4+ GHC == 7.6.3+ GHC == 7.4.2 description: @HsYAML@ is a [YAML 1.2](http://yaml.org/spec/1.2/spec.html) processor, i.e. a library for parsing and serializing YAML documents.@@ -38,7 +50,7 @@ source-repository head type: git- location: https://github.com/hvr/HsYAML.git+ location: https://github.com/haskell-hvr/HsYAML.git flag exe description: Enable @exe:yaml-test@ component@@ -77,23 +89,24 @@ Trustworthy TypeSynonymInstances - build-depends: base >=4.5 && <4.14- , bytestring >=0.9 && <0.11- , containers >=0.4.2 && <0.7- , deepseq >=1.3.0 && <1.5- , text >=1.2.3 && <1.3- , mtl >=2.2.1 && <2.3- , parsec >=3.1.13.0 && < 3.2+ build-depends: base >= 4.5 && < 4.17+ , bytestring >= 0.9 && < 0.12+ , containers >= 0.4.2 && < 0.7+ , deepseq >= 1.3.0 && < 1.5+ , text >= 1.2.3 && < 2.1+ , mtl >= 2.2.1 && < 2.4+ , parsec >= 3.1.13.0 && < 3.2+ , transformers >= 0.4 && < 0.7 -- for GHC.Generics if impl(ghc < 7.6) build-depends: ghc-prim if !impl(ghc >= 8.0)- build-depends: fail >=4.9.0.0 && <4.10+ build-depends: fail >= 4.9.0.0 && < 4.10 if !impl(ghc >= 7.10)- build-depends: nats >=1.1.2 && <1.2+ build-depends: nats >= 1.1.2 && < 1.2 ghc-options: -Wall @@ -113,7 +126,7 @@ , containers , mtl -- non-inherited- , megaparsec >= 6.5.0 && < 6.6+ , megaparsec >= 7.0 && < 10 , microaeson == 0.1.* , filepath == 1.4.* , directory >= 1.2 && < 1.4@@ -138,6 +151,6 @@ , containers , mtl -- non-inherited- , QuickCheck == 2.13.*- , tasty == 1.2.*+ , QuickCheck == 2.14.*+ , tasty == 1.4.* , tasty-quickcheck == 0.10.*
LICENSE.GPLv2 view
@@ -337,12 +337,3 @@ consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License.------ ---
LICENSE.GPLv3 view
@@ -672,7 +672,3 @@ the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.--- -
src-test/TML.hs view
@@ -40,12 +40,11 @@ import Text.Megaparsec import Text.Megaparsec.Char import qualified Text.Megaparsec.Char.Lexer as L-import Text.Megaparsec.Expr type Parser = Parsec Void T.Text parse :: String -> T.Text -> Either T.Text Document-parse fn raw = either (Left . T.pack . parseErrorPretty' raw)+parse fn raw = either (Left . T.pack . errorBundlePretty) (Right .process_pseudo) (Text.Megaparsec.parse testml_document fn raw) @@ -318,7 +317,7 @@ block_definition = do -- block_heading string "===" *> ws- l <- T.pack <$> manyTill anyChar eol+ l <- T.pack <$> manyTill anySingle eol -- TODO: user_defined ps <- many point_definition@@ -333,7 +332,7 @@ let single = do _ <- char ':' *> ws- x <- T.pack <$> manyTill anyChar eol+ x <- T.pack <$> manyTill anySingle eol -- consume and ignore any point_lines _ <- point_lines pure $! case j of@@ -358,7 +357,7 @@ point_lines :: Parser T.Text point_lines = T.pack . unlines <$> go where- go = many (notFollowedBy point_boundary *> manyTill anyChar eol)+ go = many (notFollowedBy point_boundary *> manyTill anySingle eol) point_boundary :: Parser () point_boundary = void (string "---") <|> void (string "===") <|> eof
src/Data/YAML/Event.hs view
@@ -409,7 +409,6 @@ | ii, hasLeadingSpace acc = [Left (tok2pos t, "leading empty lines contain more spaces than the first non-empty line in scalar: " ++ show acc)] | otherwise = Right (EvPos (Scalar manchor tag sty (T.pack acc)) pos0) : cont rest - go' _ _ _ xs | False = error (show xs) go' _ _ _ xs = err xs hasLeadingSpace (' ':_) = True@@ -669,7 +668,7 @@ -- -- Round-tripping at event-level will preserve all the comments and their relative position in the YAML-document but still, -- we lose some information like the exact indentation and the position at which the comments were present previously.--- This information sometimes can be quiet important for human-perception of comments.+-- This information sometimes can be quite important for human-perception of comments. -- Below are some guildlines, so that you can avoid ambiguities. -- -- 1) Always try to start your comment in a newline. This step will avoid most of the ambiguities.
src/Data/YAML/Loader.hs view
@@ -16,7 +16,9 @@ , NodeId ) where -import Control.Monad.State+import Control.Monad.State (MonadState(..), gets, modify,+ StateT, evalStateT, state)+import Control.Monad.Trans (MonadTrans(..)) import qualified Data.ByteString.Lazy as BS.L import qualified Data.Map as Map import qualified Data.Set as Set
src/Data/YAML/Token.hs view
@@ -542,17 +542,17 @@ -- | @lookbehind <?@ matches the current point without consuming any -- characters, if the previous character matches the lookbehind parser (single--- character positive lookbehind)+-- character positive lookbehind). (<?) :: (Match match result) => match -> Parser result (<?) lookbehind = prev lookbehind -- | @lookahead >?@ matches the current point without consuming any characters--- if it matches the lookahead parser (positive lookahead)+-- if it matches the lookahead parser (positive lookahead). (>?) :: (Match match result) => match -> Parser result (>?) lookahead = peek lookahead --- | @lookahead >?@ matches the current point without consuming any characters--- if it matches the lookahead parser (negative lookahead)+-- | @lookahead >!@ matches the current point without consuming any characters+-- if it matches the lookahead parser (negative lookahead). (>!) :: (Match match result) => match -> Pattern (>!) lookahead = reject lookahead Nothing
src/Util.hs view
@@ -33,8 +33,10 @@ import GHC.Generics as X (Generic) import Numeric.Natural as X (Natural) -import Control.Monad.Except as X (ExceptT (..), MonadError (..), runExceptT)+import Control.Monad.Fix as X (MonadFix)+import Control.Monad.Except as X (MonadError (..)) import Control.Monad.Identity as X+import Control.Monad.Trans.Except as X (ExceptT (..), runExceptT) import Data.Char as X (chr, ord) import Data.Map as X (Map)