megaparsec 9.0.0 → 9.0.1
raw patch · 17 files changed
+41/−7 lines, 17 filesdep ~bytestringPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: bytestring
API changes (from Hackage documentation)
- Text.Megaparsec.Internal: instance (a Data.Type.Equality.~ Text.Megaparsec.Stream.Tokens s, Data.String.IsString a, GHC.Classes.Eq a, Text.Megaparsec.Stream.Stream s, GHC.Classes.Ord e) => Data.String.IsString (Text.Megaparsec.Internal.ParsecT e s m a)
+ Text.Megaparsec.Internal: instance (a GHC.Types.~ Text.Megaparsec.Stream.Tokens s, Data.String.IsString a, GHC.Classes.Eq a, Text.Megaparsec.Stream.Stream s, GHC.Classes.Ord e) => Data.String.IsString (Text.Megaparsec.Internal.ParsecT e s m a)
+ Text.Megaparsec.Pos: instance GHC.Generics.Generic Text.Megaparsec.Pos.Pos
Files
- CHANGELOG.md +6/−0
- Text/Megaparsec.hs +1/−0
- Text/Megaparsec/Byte.hs +1/−0
- Text/Megaparsec/Byte/Lexer.hs +1/−0
- Text/Megaparsec/Char.hs +2/−1
- Text/Megaparsec/Char/Lexer.hs +1/−0
- Text/Megaparsec/Class.hs +1/−0
- Text/Megaparsec/Common.hs +1/−0
- Text/Megaparsec/Debug.hs +1/−0
- Text/Megaparsec/Error.hs +1/−0
- Text/Megaparsec/Error/Builder.hs +1/−0
- Text/Megaparsec/Internal.hs +16/−2
- Text/Megaparsec/Lexer.hs +1/−0
- Text/Megaparsec/Pos.hs +3/−2
- Text/Megaparsec/State.hs +1/−0
- Text/Megaparsec/Stream.hs +1/−0
- megaparsec.cabal +2/−2
CHANGELOG.md view
@@ -1,3 +1,9 @@+## Megaparsec 9.0.1++* Added [Safe+ Haskell](https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/safe_haskell.html)+ support.+ ## Megaparsec 9.0.0 * Split the `Stream` type class. The methods `showTokens` and `tokensLength`
Text/Megaparsec.hs view
@@ -2,6 +2,7 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-}+{-# LANGUAGE Safe #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-}
Text/Megaparsec/Byte.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-}
Text/Megaparsec/Byte/Lexer.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE Trustworthy #-} {-# LANGUAGE TypeFamilies #-} -- |
Text/Megaparsec/Char.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-}+{-# LANGUAGE Safe #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} @@ -118,7 +119,7 @@ -- | Like 'space1', but does not accept newlines and carriage returns. ----- @since 8.0.0+-- @since 9.0.0 hspace1 :: (MonadParsec e s m, Token s ~ Char) => m () hspace1 = void $ takeWhile1P (Just "white space") isHSpace {-# INLINE hspace1 #-}
Text/Megaparsec/Char/Lexer.hs view
@@ -1,6 +1,7 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE Trustworthy #-} {-# LANGUAGE TypeFamilies #-} -- |
Text/Megaparsec/Class.hs view
@@ -1,6 +1,7 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE Safe #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE UndecidableInstances #-}
Text/Megaparsec/Common.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE Safe #-} -- | -- Module : Text.Megaparsec.Common
Text/Megaparsec/Debug.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE Unsafe #-} -- | -- Module : Text.Megaparsec.Debug
Text/Megaparsec/Error.hs view
@@ -6,6 +6,7 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE Safe #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE UndecidableInstances #-}
Text/Megaparsec/Error/Builder.hs view
@@ -1,6 +1,7 @@ {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE Safe #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE UndecidableInstances #-}
Text/Megaparsec/Internal.hs view
@@ -1,10 +1,10 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-}+{-# LANGUAGE Safe #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-}@@ -86,8 +86,13 @@ -- unexpected 'a' -- expecting 'r' or end of input newtype Hints t = Hints [Set (ErrorItem t)]- deriving (Semigroup, Monoid) +instance Semigroup (Hints t) where+ Hints xs <> Hints ys = Hints $ xs <> ys++instance Monoid (Hints t) where+ mempty = Hints mempty+ -- | All information available after parsing. This includes consumption of -- input, success (with returned value) or failure (with parse error), and -- parser state at the end of parsing.@@ -280,6 +285,15 @@ Error e -> eerr e s' -- | 'mzero' is a parser that __fails__ without consuming input.+--+-- __Note__: strictly speaking, this instance is unlawful. The right+-- identity law is does not hold, e.g. in general this is not true:+--+-- > v >> mzero = mero+--+-- However the following holds:+--+-- > try v >> mzero = mzero instance (Ord e, Stream s) => MonadPlus (ParsecT e s m) where mzero = pZero mplus = pPlus
Text/Megaparsec/Lexer.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE Safe #-} -- | -- Module : Text.Megaparsec.Common
Text/Megaparsec/Pos.hs view
@@ -1,6 +1,7 @@+{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE Safe #-} -- | -- Module : Text.Megaparsec.Pos@@ -48,7 +49,7 @@ -- -- @since 5.0.0 newtype Pos = Pos Int- deriving (Show, Eq, Ord, Data, Typeable, NFData)+ deriving (Show, Eq, Ord, Data, Generic, Typeable, NFData) -- | Construction of 'Pos' from 'Int'. The function throws -- 'InvalidPosException' when given a non-positive argument.
Text/Megaparsec/State.hs view
@@ -1,6 +1,7 @@ {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE Safe #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE UndecidableInstances #-}
Text/Megaparsec/Stream.hs view
@@ -4,6 +4,7 @@ {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE Safe #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-}
megaparsec.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: megaparsec-version: 9.0.0+version: 9.0.1 license: BSD2 license-file: LICENSE.md maintainer: Mark Karpov <markkarpov92@gmail.com>@@ -9,7 +9,7 @@ Paolo Martini <paolo@nemail.it>, Daan Leijen <daan@microsoft.com> -tested-with: ghc ==8.6.5 ghc ==8.8.4 ghc ==8.10.1+tested-with: ghc ==8.6.5 ghc ==8.8.4 ghc ==8.10.2 homepage: https://github.com/mrkkrp/megaparsec bug-reports: https://github.com/mrkkrp/megaparsec/issues synopsis: Monadic parser combinators