packages feed

parsix 0.2.2.0 → 0.2.2.1

raw patch · 6 files changed

+28/−6 lines, 6 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+# 0.2.2.1++- Make compatible with GHC 8.8+ # 0.2.2.0  - Fix bug in `lookAhead`, where lookaheads would commit the parser
parsix.cabal view
@@ -1,5 +1,5 @@ name:                parsix-version:             0.2.2.0+version:             0.2.2.1 synopsis:            Parser combinators with slicing, error recovery, and syntax highlighting description:         A parser combinator library based on 'parsers' (like 'trifecta') with slicing, error recovery, and syntax highlighted diagnostics homepage:            https://github.com/ollef/parsix@@ -13,7 +13,7 @@ extra-source-files:  README.md                      CHANGELOG.md cabal-version:       >=1.10-tested-with:         GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.3+tested-with:         GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.3, GHC == 8.6.5, GHC == 8.8.3  source-repository head   type:     git
src/Text/Parsix/Highlight.hs view
@@ -1,9 +1,12 @@+{-# LANGUAGE CPP #-} module Text.Parsix.Highlight where  import Data.IntervalMap.FingerTree(IntervalMap) import qualified Data.IntervalMap.FingerTree as IntervalMap import Data.List+#if !MIN_VERSION_base(4,11,0) import Data.Semigroup+#endif import Data.Text(Text) import Data.Text.Prettyprint.Doc import Data.Text.Prettyprint.Doc.Render.Terminal
src/Text/Parsix/Parser/Internal.hs view
@@ -1,13 +1,17 @@-{-# LANGUAGE OverloadedStrings, RankNTypes #-}+{-# LANGUAGE CPP, OverloadedStrings, RankNTypes #-} -- | This module exposes internals of the package: its API may change independently of the PVP-compliant version number. module Text.Parsix.Parser.Internal where  import Control.Applicative import Control.Monad+#if !MIN_VERSION_base(4,13,0) import Control.Monad.Fail as Fail+#endif import Control.Monad.IO.Class import qualified Data.IntervalMap.FingerTree as IntervalMap+#if !MIN_VERSION_base(4,11,0) import Data.Semigroup+#endif import qualified Data.Set as Set import Data.Text(Text) import qualified Data.Text as Text@@ -41,9 +45,13 @@ instance Semigroup a => Semigroup (Parser a) where   (<>) = liftA2 (<>) +#if MIN_VERSION_base(4,11,0) instance Monoid a => Monoid (Parser a) where+#else+instance (Monoid a, Semigroup a) => Monoid (Parser a) where+#endif   mempty = pure mempty-  mappend = liftA2 mappend+  mappend = (<>)  instance Functor Parser where   fmap f (Parser p) = Parser $ \s0 s e0 e -> p (s0 . f) (s . f) e0 e@@ -91,7 +99,9 @@       pos       hl       inp+#if !MIN_VERSION_base(4,13,0)   fail = Fail.fail+#endif  instance MonadFail Parser where   fail x = Parser
src/Text/Parsix/Position.hs view
@@ -1,7 +1,9 @@-{-# LANGUAGE BangPatterns, DeriveGeneric, OverloadedStrings #-}+{-# LANGUAGE BangPatterns, CPP, DeriveGeneric, OverloadedStrings #-} module Text.Parsix.Position where +#if !MIN_VERSION_base(4,11,0) import Data.Semigroup+#endif import GHC.Generics import Data.Text(Text) import qualified Data.Text as Text@@ -31,6 +33,7 @@  instance Monoid Position where   mempty = Position 0 0 0+  mappend = (<>)  next :: Char -> Int -> Position -> Position next !c !delta !pos = Position
src/Text/Parsix/Result.hs view
@@ -1,8 +1,10 @@-{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable, OverloadedStrings #-}+{-# LANGUAGE CPP, DeriveFunctor, DeriveFoldable, DeriveTraversable, OverloadedStrings #-} module Text.Parsix.Result where  import Control.Applicative+#if !MIN_VERSION_base(4,11,0) import Data.Semigroup+#endif import qualified Data.Set as Set import Data.Set(Set) import Data.Text(Text)