headed-megaparsec 0.2.1.2 → 0.2.1.3
raw patch · 3 files changed
+78/−35 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- headed-megaparsec.cabal +62/−24
- library/HeadedMegaparsec.hs +15/−10
- library/HeadedMegaparsec/Prelude.hs +1/−1
headed-megaparsec.cabal view
@@ -1,33 +1,71 @@-name: headed-megaparsec-version: 0.2.1.2-category: Parsers, Parsing, Megaparsec-synopsis: More informative parser-homepage: https://github.com/nikita-volkov/headed-megaparsec-bug-reports: https://github.com/nikita-volkov/headed-megaparsec/issues-author: Nikita Volkov <nikita.y.volkov@mail.ru>-maintainer: Nikita Volkov <nikita.y.volkov@mail.ru>-copyright: (c) 2019, Nikita Volkov-license: MIT-license-file: LICENSE-build-type: Simple-cabal-version: >=1.10+cabal-version: 3.0+name: headed-megaparsec+version: 0.2.1.3+category: Parsers, Parsing, Megaparsec+synopsis: More informative parser+homepage: https://github.com/nikita-volkov/headed-megaparsec+bug-reports: https://github.com/nikita-volkov/headed-megaparsec/issues+author: Nikita Volkov <nikita.y.volkov@mail.ru>+maintainer: Nikita Volkov <nikita.y.volkov@mail.ru>+copyright: (c) 2019, Nikita Volkov+license: MIT+license-file: LICENSE source-repository head- type: git+ type: git location: git://github.com/nikita-volkov/headed-megaparsec.git library- hs-source-dirs: library- default-extensions: ApplicativeDo, Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures, DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric, DeriveTraversable, DuplicateRecordFields, EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, LambdaCase, LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf, NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards, ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections, TypeFamilies, TypeOperators, UnboxedTuples- default-language: Haskell2010- exposed-modules:- HeadedMegaparsec+ hs-source-dirs: library+ default-extensions:+ NoImplicitPrelude+ NoMonomorphismRestriction+ ApplicativeDo+ Arrows+ BangPatterns+ ConstraintKinds+ DataKinds+ DefaultSignatures+ DeriveDataTypeable+ DeriveFoldable+ DeriveFunctor+ DeriveGeneric+ DeriveTraversable+ DuplicateRecordFields+ EmptyDataDecls+ FlexibleContexts+ FlexibleInstances+ FunctionalDependencies+ GADTs+ GeneralizedNewtypeDeriving+ LambdaCase+ LiberalTypeSynonyms+ MagicHash+ MultiParamTypeClasses+ MultiWayIf+ OverloadedStrings+ ParallelListComp+ PatternGuards+ QuasiQuotes+ RankNTypes+ RecordWildCards+ ScopedTypeVariables+ StandaloneDeriving+ TemplateHaskell+ TupleSections+ TypeFamilies+ TypeOperators+ UnboxedTuples++ default-language: Haskell2010+ exposed-modules: HeadedMegaparsec other-modules: HeadedMegaparsec.Megaparsec HeadedMegaparsec.Prelude+ build-depends:- base >=4.13 && <5,- case-insensitive >=1.2 && <2,- megaparsec >=9.2 && <10,- parser-combinators >=1.3 && <1.4,- selective >=0.7 && <0.8+ , base >=4.13 && <5+ , case-insensitive >=1.2 && <2+ , megaparsec >=9.2 && <10+ , parser-combinators >=1.3 && <1.4+ , selective >=0.7 && <0.8
library/HeadedMegaparsec.hs view
@@ -114,12 +114,14 @@ junction2 <- p2 case junction2 of Left a -> return (Left (aToB a))- Right tailP2 -> return $- Right $ do+ Right tailP2 -> return+ $ Right+ $ do a <- tailP2 return (aToB a)- Right tailP1 -> return $- Right $ do+ Right tailP1 -> return+ $ Right+ $ do aToB <- tailP1 junction2 <- p2 case junction2 of@@ -139,8 +141,9 @@ case junction2 of Left aToB -> return (Left (aToB a)) Right tailP2 -> return (Right (fmap ($ a) tailP2))- Right tailP1 -> return $- Right $ do+ Right tailP1 -> return+ $ Right+ $ do eitherAOrB <- tailP1 case eitherAOrB of Right b -> return b@@ -156,8 +159,9 @@ junction1 <- p1 case junction1 of Left a -> case k2 a of HeadedParsec p2 -> p2- Right tailP1 -> return $- Right $ do+ Right tailP1 -> return+ $ Right+ $ do a <- tailP1 Megaparsec.contPossibly $ case k2 a of HeadedParsec p2 -> p2 @@ -234,8 +238,9 @@ if pred a then return (Left a) else fail (err a)- Right tailP -> return $- Right $ do+ Right tailP -> return+ $ Right+ $ do a <- tailP if pred a then return a
library/HeadedMegaparsec/Prelude.hs view
@@ -27,7 +27,7 @@ import Data.Fixed as Exports import Data.Foldable as Exports import Data.Function as Exports hiding (id, (.))-import Data.Functor as Exports+import Data.Functor as Exports hiding (unzip) import Data.Functor.Identity as Exports import Data.IORef as Exports import Data.Int as Exports