parsers 0.12.2.1 → 0.12.3
raw patch · 9 files changed
+91/−60 lines, 9 filesdep +base-orphansdep ~attoparsecdep ~basenew-uploaderPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies added: base-orphans
Dependency ranges changed: attoparsec, base
API changes (from Hackage documentation)
- Text.Parser.Char: instance (CharParsing m, MonadPlus m) => CharParsing (IdentityT m)
- Text.Parser.Char: instance (CharParsing m, MonadPlus m) => CharParsing (ReaderT e m)
- Text.Parser.Char: instance (CharParsing m, MonadPlus m) => CharParsing (StateT s m)
- Text.Parser.Char: instance (CharParsing m, MonadPlus m, Monoid w) => CharParsing (RWST r w s m)
- Text.Parser.Char: instance (CharParsing m, MonadPlus m, Monoid w) => CharParsing (WriterT w m)
- Text.Parser.Char: instance CharParsing ReadP
- Text.Parser.Char: instance Chunk t => CharParsing (Parser t)
- Text.Parser.Char: instance Stream s m Char => CharParsing (ParsecT s u m)
- Text.Parser.Combinators: instance (Parsing m, Monad m) => Parsing (IdentityT m)
- Text.Parser.Combinators: instance (Parsing m, MonadPlus m) => Parsing (ReaderT e m)
- Text.Parser.Combinators: instance (Parsing m, MonadPlus m) => Parsing (StateT s m)
- Text.Parser.Combinators: instance (Parsing m, MonadPlus m, Monoid w) => Parsing (RWST r w s m)
- Text.Parser.Combinators: instance (Parsing m, MonadPlus m, Monoid w) => Parsing (WriterT w m)
- Text.Parser.Combinators: instance (Stream s m t, Show t) => Parsing (ParsecT s u m)
- Text.Parser.Combinators: instance Chunk t => Parsing (Parser t)
- Text.Parser.Combinators: instance Parsing ReadP
- Text.Parser.Expression: instance Bounded Assoc
- Text.Parser.Expression: instance Data Assoc
- Text.Parser.Expression: instance Enum Assoc
- Text.Parser.Expression: instance Eq Assoc
- Text.Parser.Expression: instance Ix Assoc
- Text.Parser.Expression: instance Ord Assoc
- Text.Parser.Expression: instance Read Assoc
- Text.Parser.Expression: instance Show Assoc
- Text.Parser.Expression: instance Typeable Assoc
- Text.Parser.LookAhead: instance (LookAheadParsing m, Monad m) => LookAheadParsing (IdentityT m)
- Text.Parser.LookAhead: instance (LookAheadParsing m, MonadPlus m) => LookAheadParsing (ReaderT e m)
- Text.Parser.LookAhead: instance (LookAheadParsing m, MonadPlus m) => LookAheadParsing (StateT s m)
- Text.Parser.LookAhead: instance (LookAheadParsing m, MonadPlus m, Monoid w) => LookAheadParsing (RWST r w s m)
- Text.Parser.LookAhead: instance (LookAheadParsing m, MonadPlus m, Monoid w) => LookAheadParsing (WriterT w m)
- Text.Parser.LookAhead: instance (Stream s m t, Show t) => LookAheadParsing (ParsecT s u m)
- Text.Parser.LookAhead: instance LookAheadParsing ReadP
- Text.Parser.Permutation: instance Functor m => Functor (Branch m)
- Text.Parser.Permutation: instance Functor m => Functor (Permutation m)
- Text.Parser.Token: _styleHighlight :: IdentifierStyle m -> Highlight
- Text.Parser.Token: _styleLetter :: IdentifierStyle m -> m Char
- Text.Parser.Token: _styleName :: IdentifierStyle m -> String
- Text.Parser.Token: _styleReserved :: IdentifierStyle m -> HashSet String
- Text.Parser.Token: _styleReservedHighlight :: IdentifierStyle m -> Highlight
- Text.Parser.Token: _styleStart :: IdentifierStyle m -> m Char
- Text.Parser.Token: instance (TokenParsing m, MonadPlus m) => TokenParsing (IdentityT m)
- Text.Parser.Token: instance (TokenParsing m, MonadPlus m) => TokenParsing (ReaderT e m)
- Text.Parser.Token: instance (TokenParsing m, MonadPlus m) => TokenParsing (StateT s m)
- Text.Parser.Token: instance (TokenParsing m, MonadPlus m, Monoid w) => TokenParsing (RWST r w s m)
- Text.Parser.Token: instance (TokenParsing m, MonadPlus m, Monoid w) => TokenParsing (WriterT w m)
- Text.Parser.Token: instance Alternative m => Alternative (Unhighlighted m)
- Text.Parser.Token: instance Alternative m => Alternative (Unlined m)
- Text.Parser.Token: instance Alternative m => Alternative (Unspaced m)
- Text.Parser.Token: instance Applicative m => Applicative (Unhighlighted m)
- Text.Parser.Token: instance Applicative m => Applicative (Unlined m)
- Text.Parser.Token: instance Applicative m => Applicative (Unspaced m)
- Text.Parser.Token: instance CharParsing m => CharParsing (Unhighlighted m)
- Text.Parser.Token: instance CharParsing m => CharParsing (Unlined m)
- Text.Parser.Token: instance CharParsing m => CharParsing (Unspaced m)
- Text.Parser.Token: instance Chunk t => TokenParsing (Parser t)
- Text.Parser.Token: instance Functor m => Functor (Unhighlighted m)
- Text.Parser.Token: instance Functor m => Functor (Unlined m)
- Text.Parser.Token: instance Functor m => Functor (Unspaced m)
- Text.Parser.Token: instance Monad m => Monad (Unhighlighted m)
- Text.Parser.Token: instance Monad m => Monad (Unlined m)
- Text.Parser.Token: instance Monad m => Monad (Unspaced m)
- Text.Parser.Token: instance MonadPlus m => MonadPlus (Unhighlighted m)
- Text.Parser.Token: instance MonadPlus m => MonadPlus (Unlined m)
- Text.Parser.Token: instance MonadPlus m => MonadPlus (Unspaced m)
- Text.Parser.Token: instance MonadTrans Unhighlighted
- Text.Parser.Token: instance MonadTrans Unlined
- Text.Parser.Token: instance MonadTrans Unspaced
- Text.Parser.Token: instance Parsing m => Parsing (Unhighlighted m)
- Text.Parser.Token: instance Parsing m => Parsing (Unlined m)
- Text.Parser.Token: instance Parsing m => Parsing (Unspaced m)
- Text.Parser.Token: instance Stream s m Char => TokenParsing (ParsecT s u m)
- Text.Parser.Token: instance TokenParsing ReadP
- Text.Parser.Token: instance TokenParsing m => TokenParsing (Unhighlighted m)
- Text.Parser.Token: instance TokenParsing m => TokenParsing (Unlined m)
- Text.Parser.Token: instance TokenParsing m => TokenParsing (Unspaced m)
- Text.Parser.Token: runUnhighlighted :: Unhighlighted m a -> m a
- Text.Parser.Token: runUnlined :: Unlined m a -> m a
- Text.Parser.Token: runUnspaced :: Unspaced m a -> m a
- Text.Parser.Token.Highlight: instance Bounded Highlight
- Text.Parser.Token.Highlight: instance Enum Highlight
- Text.Parser.Token.Highlight: instance Eq Highlight
- Text.Parser.Token.Highlight: instance Ord Highlight
- Text.Parser.Token.Highlight: instance Read Highlight
- Text.Parser.Token.Highlight: instance Show Highlight
- Text.Parser.Token.Style: _commentEnd :: CommentStyle -> String
- Text.Parser.Token.Style: _commentLine :: CommentStyle -> String
- Text.Parser.Token.Style: _commentNesting :: CommentStyle -> Bool
- Text.Parser.Token.Style: _commentStart :: CommentStyle -> String
- Text.Parser.Token.Style: instance Data CommentStyle
- Text.Parser.Token.Style: instance Eq CommentStyle
- Text.Parser.Token.Style: instance Ord CommentStyle
- Text.Parser.Token.Style: instance Read CommentStyle
- Text.Parser.Token.Style: instance Show CommentStyle
- Text.Parser.Token.Style: instance Typeable CommentStyle
+ Text.Parser.Char: instance (Text.Parser.Char.CharParsing m, GHC.Base.MonadPlus m) => Text.Parser.Char.CharParsing (Control.Monad.Trans.Identity.IdentityT m)
+ Text.Parser.Char: instance (Text.Parser.Char.CharParsing m, GHC.Base.MonadPlus m) => Text.Parser.Char.CharParsing (Control.Monad.Trans.Reader.ReaderT e m)
+ Text.Parser.Char: instance (Text.Parser.Char.CharParsing m, GHC.Base.MonadPlus m) => Text.Parser.Char.CharParsing (Control.Monad.Trans.State.Lazy.StateT s m)
+ Text.Parser.Char: instance (Text.Parser.Char.CharParsing m, GHC.Base.MonadPlus m) => Text.Parser.Char.CharParsing (Control.Monad.Trans.State.Strict.StateT s m)
+ Text.Parser.Char: instance (Text.Parser.Char.CharParsing m, GHC.Base.MonadPlus m, GHC.Base.Monoid w) => Text.Parser.Char.CharParsing (Control.Monad.Trans.RWS.Lazy.RWST r w s m)
+ Text.Parser.Char: instance (Text.Parser.Char.CharParsing m, GHC.Base.MonadPlus m, GHC.Base.Monoid w) => Text.Parser.Char.CharParsing (Control.Monad.Trans.RWS.Strict.RWST r w s m)
+ Text.Parser.Char: instance (Text.Parser.Char.CharParsing m, GHC.Base.MonadPlus m, GHC.Base.Monoid w) => Text.Parser.Char.CharParsing (Control.Monad.Trans.Writer.Lazy.WriterT w m)
+ Text.Parser.Char: instance (Text.Parser.Char.CharParsing m, GHC.Base.MonadPlus m, GHC.Base.Monoid w) => Text.Parser.Char.CharParsing (Control.Monad.Trans.Writer.Strict.WriterT w m)
+ Text.Parser.Char: instance Data.Attoparsec.Internal.Types.Chunk t => Text.Parser.Char.CharParsing (Data.Attoparsec.Internal.Types.Parser t)
+ Text.Parser.Char: instance Text.Parsec.Prim.Stream s m GHC.Types.Char => Text.Parser.Char.CharParsing (Text.Parsec.Prim.ParsecT s u m)
+ Text.Parser.Char: instance Text.Parser.Char.CharParsing Text.ParserCombinators.ReadP.ReadP
+ Text.Parser.Combinators: instance (Text.Parsec.Prim.Stream s m t, GHC.Show.Show t) => Text.Parser.Combinators.Parsing (Text.Parsec.Prim.ParsecT s u m)
+ Text.Parser.Combinators: instance (Text.Parser.Combinators.Parsing m, GHC.Base.Monad m) => Text.Parser.Combinators.Parsing (Control.Monad.Trans.Identity.IdentityT m)
+ Text.Parser.Combinators: instance (Text.Parser.Combinators.Parsing m, GHC.Base.MonadPlus m) => Text.Parser.Combinators.Parsing (Control.Monad.Trans.Reader.ReaderT e m)
+ Text.Parser.Combinators: instance (Text.Parser.Combinators.Parsing m, GHC.Base.MonadPlus m) => Text.Parser.Combinators.Parsing (Control.Monad.Trans.State.Lazy.StateT s m)
+ Text.Parser.Combinators: instance (Text.Parser.Combinators.Parsing m, GHC.Base.MonadPlus m) => Text.Parser.Combinators.Parsing (Control.Monad.Trans.State.Strict.StateT s m)
+ Text.Parser.Combinators: instance (Text.Parser.Combinators.Parsing m, GHC.Base.MonadPlus m, GHC.Base.Monoid w) => Text.Parser.Combinators.Parsing (Control.Monad.Trans.RWS.Lazy.RWST r w s m)
+ Text.Parser.Combinators: instance (Text.Parser.Combinators.Parsing m, GHC.Base.MonadPlus m, GHC.Base.Monoid w) => Text.Parser.Combinators.Parsing (Control.Monad.Trans.RWS.Strict.RWST r w s m)
+ Text.Parser.Combinators: instance (Text.Parser.Combinators.Parsing m, GHC.Base.MonadPlus m, GHC.Base.Monoid w) => Text.Parser.Combinators.Parsing (Control.Monad.Trans.Writer.Lazy.WriterT w m)
+ Text.Parser.Combinators: instance (Text.Parser.Combinators.Parsing m, GHC.Base.MonadPlus m, GHC.Base.Monoid w) => Text.Parser.Combinators.Parsing (Control.Monad.Trans.Writer.Strict.WriterT w m)
+ Text.Parser.Combinators: instance Data.Attoparsec.Internal.Types.Chunk t => Text.Parser.Combinators.Parsing (Data.Attoparsec.Internal.Types.Parser t)
+ Text.Parser.Combinators: instance Text.Parser.Combinators.Parsing Text.ParserCombinators.ReadP.ReadP
+ Text.Parser.Expression: instance Data.Data.Data Text.Parser.Expression.Assoc
+ Text.Parser.Expression: instance GHC.Arr.Ix Text.Parser.Expression.Assoc
+ Text.Parser.Expression: instance GHC.Classes.Eq Text.Parser.Expression.Assoc
+ Text.Parser.Expression: instance GHC.Classes.Ord Text.Parser.Expression.Assoc
+ Text.Parser.Expression: instance GHC.Enum.Bounded Text.Parser.Expression.Assoc
+ Text.Parser.Expression: instance GHC.Enum.Enum Text.Parser.Expression.Assoc
+ Text.Parser.Expression: instance GHC.Read.Read Text.Parser.Expression.Assoc
+ Text.Parser.Expression: instance GHC.Show.Show Text.Parser.Expression.Assoc
+ Text.Parser.LookAhead: instance (Text.Parsec.Prim.Stream s m t, GHC.Show.Show t) => Text.Parser.LookAhead.LookAheadParsing (Text.Parsec.Prim.ParsecT s u m)
+ Text.Parser.LookAhead: instance (Text.Parser.LookAhead.LookAheadParsing m, GHC.Base.Monad m) => Text.Parser.LookAhead.LookAheadParsing (Control.Monad.Trans.Identity.IdentityT m)
+ Text.Parser.LookAhead: instance (Text.Parser.LookAhead.LookAheadParsing m, GHC.Base.MonadPlus m) => Text.Parser.LookAhead.LookAheadParsing (Control.Monad.Trans.Reader.ReaderT e m)
+ Text.Parser.LookAhead: instance (Text.Parser.LookAhead.LookAheadParsing m, GHC.Base.MonadPlus m) => Text.Parser.LookAhead.LookAheadParsing (Control.Monad.Trans.State.Lazy.StateT s m)
+ Text.Parser.LookAhead: instance (Text.Parser.LookAhead.LookAheadParsing m, GHC.Base.MonadPlus m) => Text.Parser.LookAhead.LookAheadParsing (Control.Monad.Trans.State.Strict.StateT s m)
+ Text.Parser.LookAhead: instance (Text.Parser.LookAhead.LookAheadParsing m, GHC.Base.MonadPlus m, GHC.Base.Monoid w) => Text.Parser.LookAhead.LookAheadParsing (Control.Monad.Trans.RWS.Lazy.RWST r w s m)
+ Text.Parser.LookAhead: instance (Text.Parser.LookAhead.LookAheadParsing m, GHC.Base.MonadPlus m, GHC.Base.Monoid w) => Text.Parser.LookAhead.LookAheadParsing (Control.Monad.Trans.RWS.Strict.RWST r w s m)
+ Text.Parser.LookAhead: instance (Text.Parser.LookAhead.LookAheadParsing m, GHC.Base.MonadPlus m, GHC.Base.Monoid w) => Text.Parser.LookAhead.LookAheadParsing (Control.Monad.Trans.Writer.Lazy.WriterT w m)
+ Text.Parser.LookAhead: instance (Text.Parser.LookAhead.LookAheadParsing m, GHC.Base.MonadPlus m, GHC.Base.Monoid w) => Text.Parser.LookAhead.LookAheadParsing (Control.Monad.Trans.Writer.Strict.WriterT w m)
+ Text.Parser.LookAhead: instance Data.Attoparsec.Internal.Types.Chunk i => Text.Parser.LookAhead.LookAheadParsing (Data.Attoparsec.Internal.Types.Parser i)
+ Text.Parser.LookAhead: instance Text.Parser.LookAhead.LookAheadParsing Text.ParserCombinators.ReadP.ReadP
+ Text.Parser.Permutation: instance GHC.Base.Functor m => GHC.Base.Functor (Text.Parser.Permutation.Branch m)
+ Text.Parser.Permutation: instance GHC.Base.Functor m => GHC.Base.Functor (Text.Parser.Permutation.Permutation m)
+ Text.Parser.Token: [_styleHighlight] :: IdentifierStyle m -> Highlight
+ Text.Parser.Token: [_styleLetter] :: IdentifierStyle m -> m Char
+ Text.Parser.Token: [_styleName] :: IdentifierStyle m -> String
+ Text.Parser.Token: [_styleReservedHighlight] :: IdentifierStyle m -> Highlight
+ Text.Parser.Token: [_styleReserved] :: IdentifierStyle m -> HashSet String
+ Text.Parser.Token: [_styleStart] :: IdentifierStyle m -> m Char
+ Text.Parser.Token: [runUnhighlighted] :: Unhighlighted m a -> m a
+ Text.Parser.Token: [runUnlined] :: Unlined m a -> m a
+ Text.Parser.Token: [runUnspaced] :: Unspaced m a -> m a
+ Text.Parser.Token: instance (Text.Parser.Token.TokenParsing m, GHC.Base.MonadPlus m) => Text.Parser.Token.TokenParsing (Control.Monad.Trans.Identity.IdentityT m)
+ Text.Parser.Token: instance (Text.Parser.Token.TokenParsing m, GHC.Base.MonadPlus m) => Text.Parser.Token.TokenParsing (Control.Monad.Trans.Reader.ReaderT e m)
+ Text.Parser.Token: instance (Text.Parser.Token.TokenParsing m, GHC.Base.MonadPlus m) => Text.Parser.Token.TokenParsing (Control.Monad.Trans.State.Lazy.StateT s m)
+ Text.Parser.Token: instance (Text.Parser.Token.TokenParsing m, GHC.Base.MonadPlus m) => Text.Parser.Token.TokenParsing (Control.Monad.Trans.State.Strict.StateT s m)
+ Text.Parser.Token: instance (Text.Parser.Token.TokenParsing m, GHC.Base.MonadPlus m, GHC.Base.Monoid w) => Text.Parser.Token.TokenParsing (Control.Monad.Trans.RWS.Lazy.RWST r w s m)
+ Text.Parser.Token: instance (Text.Parser.Token.TokenParsing m, GHC.Base.MonadPlus m, GHC.Base.Monoid w) => Text.Parser.Token.TokenParsing (Control.Monad.Trans.RWS.Strict.RWST r w s m)
+ Text.Parser.Token: instance (Text.Parser.Token.TokenParsing m, GHC.Base.MonadPlus m, GHC.Base.Monoid w) => Text.Parser.Token.TokenParsing (Control.Monad.Trans.Writer.Lazy.WriterT w m)
+ Text.Parser.Token: instance (Text.Parser.Token.TokenParsing m, GHC.Base.MonadPlus m, GHC.Base.Monoid w) => Text.Parser.Token.TokenParsing (Control.Monad.Trans.Writer.Strict.WriterT w m)
+ Text.Parser.Token: instance Control.Monad.Trans.Class.MonadTrans Text.Parser.Token.Unhighlighted
+ Text.Parser.Token: instance Control.Monad.Trans.Class.MonadTrans Text.Parser.Token.Unlined
+ Text.Parser.Token: instance Control.Monad.Trans.Class.MonadTrans Text.Parser.Token.Unspaced
+ Text.Parser.Token: instance Data.Attoparsec.Internal.Types.Chunk t => Text.Parser.Token.TokenParsing (Data.Attoparsec.Internal.Types.Parser t)
+ Text.Parser.Token: instance GHC.Base.Alternative m => GHC.Base.Alternative (Text.Parser.Token.Unhighlighted m)
+ Text.Parser.Token: instance GHC.Base.Alternative m => GHC.Base.Alternative (Text.Parser.Token.Unlined m)
+ Text.Parser.Token: instance GHC.Base.Alternative m => GHC.Base.Alternative (Text.Parser.Token.Unspaced m)
+ Text.Parser.Token: instance GHC.Base.Applicative m => GHC.Base.Applicative (Text.Parser.Token.Unhighlighted m)
+ Text.Parser.Token: instance GHC.Base.Applicative m => GHC.Base.Applicative (Text.Parser.Token.Unlined m)
+ Text.Parser.Token: instance GHC.Base.Applicative m => GHC.Base.Applicative (Text.Parser.Token.Unspaced m)
+ Text.Parser.Token: instance GHC.Base.Functor m => GHC.Base.Functor (Text.Parser.Token.Unhighlighted m)
+ Text.Parser.Token: instance GHC.Base.Functor m => GHC.Base.Functor (Text.Parser.Token.Unlined m)
+ Text.Parser.Token: instance GHC.Base.Functor m => GHC.Base.Functor (Text.Parser.Token.Unspaced m)
+ Text.Parser.Token: instance GHC.Base.Monad m => GHC.Base.Monad (Text.Parser.Token.Unhighlighted m)
+ Text.Parser.Token: instance GHC.Base.Monad m => GHC.Base.Monad (Text.Parser.Token.Unlined m)
+ Text.Parser.Token: instance GHC.Base.Monad m => GHC.Base.Monad (Text.Parser.Token.Unspaced m)
+ Text.Parser.Token: instance GHC.Base.MonadPlus m => GHC.Base.MonadPlus (Text.Parser.Token.Unhighlighted m)
+ Text.Parser.Token: instance GHC.Base.MonadPlus m => GHC.Base.MonadPlus (Text.Parser.Token.Unlined m)
+ Text.Parser.Token: instance GHC.Base.MonadPlus m => GHC.Base.MonadPlus (Text.Parser.Token.Unspaced m)
+ Text.Parser.Token: instance Text.Parsec.Prim.Stream s m GHC.Types.Char => Text.Parser.Token.TokenParsing (Text.Parsec.Prim.ParsecT s u m)
+ Text.Parser.Token: instance Text.Parser.Char.CharParsing m => Text.Parser.Char.CharParsing (Text.Parser.Token.Unhighlighted m)
+ Text.Parser.Token: instance Text.Parser.Char.CharParsing m => Text.Parser.Char.CharParsing (Text.Parser.Token.Unlined m)
+ Text.Parser.Token: instance Text.Parser.Char.CharParsing m => Text.Parser.Char.CharParsing (Text.Parser.Token.Unspaced m)
+ Text.Parser.Token: instance Text.Parser.Combinators.Parsing m => Text.Parser.Combinators.Parsing (Text.Parser.Token.Unhighlighted m)
+ Text.Parser.Token: instance Text.Parser.Combinators.Parsing m => Text.Parser.Combinators.Parsing (Text.Parser.Token.Unlined m)
+ Text.Parser.Token: instance Text.Parser.Combinators.Parsing m => Text.Parser.Combinators.Parsing (Text.Parser.Token.Unspaced m)
+ Text.Parser.Token: instance Text.Parser.Token.TokenParsing Text.ParserCombinators.ReadP.ReadP
+ Text.Parser.Token: instance Text.Parser.Token.TokenParsing m => Text.Parser.Token.TokenParsing (Text.Parser.Token.Unhighlighted m)
+ Text.Parser.Token: instance Text.Parser.Token.TokenParsing m => Text.Parser.Token.TokenParsing (Text.Parser.Token.Unlined m)
+ Text.Parser.Token: instance Text.Parser.Token.TokenParsing m => Text.Parser.Token.TokenParsing (Text.Parser.Token.Unspaced m)
+ Text.Parser.Token.Highlight: instance GHC.Classes.Eq Text.Parser.Token.Highlight.Highlight
+ Text.Parser.Token.Highlight: instance GHC.Classes.Ord Text.Parser.Token.Highlight.Highlight
+ Text.Parser.Token.Highlight: instance GHC.Enum.Bounded Text.Parser.Token.Highlight.Highlight
+ Text.Parser.Token.Highlight: instance GHC.Enum.Enum Text.Parser.Token.Highlight.Highlight
+ Text.Parser.Token.Highlight: instance GHC.Read.Read Text.Parser.Token.Highlight.Highlight
+ Text.Parser.Token.Highlight: instance GHC.Show.Show Text.Parser.Token.Highlight.Highlight
+ Text.Parser.Token.Style: [_commentEnd] :: CommentStyle -> String
+ Text.Parser.Token.Style: [_commentLine] :: CommentStyle -> String
+ Text.Parser.Token.Style: [_commentNesting] :: CommentStyle -> Bool
+ Text.Parser.Token.Style: [_commentStart] :: CommentStyle -> String
+ Text.Parser.Token.Style: instance Data.Data.Data Text.Parser.Token.Style.CommentStyle
+ Text.Parser.Token.Style: instance GHC.Classes.Eq Text.Parser.Token.Style.CommentStyle
+ Text.Parser.Token.Style: instance GHC.Classes.Ord Text.Parser.Token.Style.CommentStyle
+ Text.Parser.Token.Style: instance GHC.Read.Read Text.Parser.Token.Style.CommentStyle
+ Text.Parser.Token.Style: instance GHC.Show.Show Text.Parser.Token.Style.CommentStyle
Files
- parsers.cabal +18/−26
- src/Text/Parser/Char.hs +6/−2
- src/Text/Parser/Combinators.hs +7/−17
- src/Text/Parser/Expression.hs +14/−3
- src/Text/Parser/LookAhead.hs +7/−0
- src/Text/Parser/Permutation.hs +2/−2
- src/Text/Parser/Token.hs +33/−8
- src/Text/Parser/Token/Style.hs +3/−1
- tests/QuickCheck.hs +1/−1
parsers.cabal view
@@ -1,6 +1,6 @@ name: parsers category: Text, Parsing-version: 0.12.2.1+version: 0.12.3 license: BSD3 cabal-version: >= 1.10 license-file: LICENSE@@ -11,7 +11,12 @@ bug-reports: http://github.com/ekmett/parsers/issues copyright: Copyright (C) 2010-2013 Edward A. Kmett synopsis: Parsing combinators-description: Parsing combinators+description: + This library provides convenient combinators for working with and building parsing combinator libraries.+ .+ Given a few simple instances, e.g. for the class 'Text.Parser.Combinators.Parsing' in "Text.Parser.Combinators.Parsing" you+ get access to a large number of canned definitions. Instances exist for the parsers provided by @parsec@,+ @attoparsec@ and base’s "Text.Read". build-type: Custom extra-source-files: .travis.yml@@ -20,11 +25,6 @@ type: git location: git://github.com/ekmett/parsers.git -flag lib-Werror- description: Treat warnings as errors when building.- manual: True- default: False- library default-language: Haskell2010 exposed-modules:@@ -39,23 +39,19 @@ hs-source-dirs: src - if flag(lib-Werror)- ghc-options: -Wall- else- ghc-options: -Wall-- ghc-options: -O2+ ghc-options: -Wall -fno-warn-wrong-do-bind -fwarn-monomorphism-restriction -fwarn-identities -fwarn-incomplete-record-updates -fwarn-incomplete-uni-patterns build-depends:- base >= 4 && < 5,- charset >= 0.3 && < 1,- containers >= 0.4 && < 0.6,- parsec >= 3.1 && < 3.2,- attoparsec >= 0.12.1 && < 0.14,- text >= 0.10 && < 1.3,- transformers >= 0.2 && < 0.5,- scientific >= 0.3 && < 0.4,- unordered-containers >= 0.2 && < 0.3+ base >= 4 && < 5,+ base-orphans >= 0.3 && < 1,+ charset >= 0.3 && < 1,+ containers >= 0.4 && < 0.6,+ parsec >= 3.1 && < 3.2,+ attoparsec >= 0.12.1.4 && < 0.14,+ text >= 0.10 && < 1.3,+ transformers >= 0.2 && < 0.5,+ scientific >= 0.3 && < 0.4,+ unordered-containers >= 0.2 && < 0.3 -- Verify the results of the examples test-suite doctests@@ -72,8 +68,6 @@ QuickCheck, quickcheck-instances ghc-options: -Wall -threaded- if impl(ghc<7.6.1)- ghc-options: -Werror hs-source-dirs: tests test-suite quickcheck@@ -89,6 +83,4 @@ QuickCheck, quickcheck-instances ghc-options: -Wall -threaded- if impl(ghc<7.6.1)- ghc-options: -Werror hs-source-dirs: tests
src/Text/Parser/Char.hs view
@@ -46,7 +46,9 @@ , CharParsing(..) ) where +#if __GLASGOW_HASKELL__ < 710 import Control.Applicative+#endif import Control.Monad.Trans.Class import Control.Monad.Trans.State.Lazy as Lazy import Control.Monad.Trans.State.Strict as Strict@@ -62,7 +64,9 @@ import qualified Data.CharSet as CharSet import Data.Foldable import qualified Data.IntSet as IntSet+#if __GLASGOW_HASKELL__ < 710 import Data.Monoid+#endif import Data.Text import qualified Text.ParserCombinators.ReadP as ReadP import qualified Text.Parsec as Parsec@@ -81,7 +85,7 @@ {-# ANN oneOf "HLint: ignore Use String" #-} -- | As the dual of 'oneOf', @noneOf cs@ succeeds if the current--- character /not/ in the supplied list of characters @cs@. Returns the+-- character is /not/ in the supplied list of characters @cs@. Returns the -- parsed character. -- -- > consonant = noneOf "aeiou"@@ -101,7 +105,7 @@ {-# INLINE oneOfSet #-} -- | As the dual of 'oneOf', @noneOf cs@ succeeds if the current--- character /not/ in the supplied list of characters @cs@. Returns the+-- character is /not/ in the supplied list of characters @cs@. Returns the -- parsed character. -- -- > consonant = noneOf "aeiou"
src/Text/Parser/Combinators.hs view
@@ -57,11 +57,7 @@ ) where import Control.Applicative-#ifdef ORPHAN_ALTERNATIVE_READP-import Control.Monad (MonadPlus(..), ap)-#else import Control.Monad (MonadPlus(..))-#endif import Control.Monad.Trans.Class import Control.Monad.Trans.State.Lazy as Lazy import Control.Monad.Trans.State.Strict as Strict@@ -72,8 +68,13 @@ import Control.Monad.Trans.Reader import Control.Monad.Trans.Identity import Data.Foldable (asum)+#if __GLASGOW_HASKELL__ < 710 import Data.Monoid+#ifdef ORPHAN_ALTERNATIVE_READP+import Data.Orphans ()+#endif import Data.Traversable (sequenceA)+#endif import qualified Text.Parsec as Parsec import qualified Data.Attoparsec.Types as Att import qualified Data.Attoparsec.Combinator as Att@@ -139,13 +140,13 @@ sepEndBy p sep = sepEndBy1 p sep <|> pure [] {-# INLINE sepEndBy #-} --- | @endBy1 p sep@ parses /one/ or more occurrences of @p@, seperated+-- | @endBy1 p sep@ parses /one/ or more occurrences of @p@, separated -- and ended by @sep@. Returns a list of values returned by @p@. endBy1 :: Alternative m => m a -> m sep -> m [a] endBy1 p sep = some (p <* sep) {-# INLINE endBy1 #-} --- | @endBy p sep@ parses /zero/ or more occurrences of @p@, seperated+-- | @endBy p sep@ parses /zero/ or more occurrences of @p@, separated -- and ended by @sep@. Returns a list of values returned by @p@. -- -- > cStatements = cStatement `endBy` semi@@ -411,14 +412,3 @@ eof = ReadP.eof notFollowedBy p = ((Just <$> p) ReadP.<++ pure Nothing) >>= maybe (pure ()) (unexpected . show)--#ifdef ORPHAN_ALTERNATIVE_READP-instance Applicative ReadP.ReadP where- pure = return- (<*>) = ap--instance Alternative ReadP.ReadP where- empty = mzero- (<|>) = mplus-#endif-
src/Text/Parser/Expression.hs view
@@ -74,22 +74,33 @@ -- expression parser that handles prefix signs, postfix increment and -- basic arithmetic. --+-- > import Control.Applicative ((<|>))+-- > import Text.Parser.Combinators ((<?>))+-- > import Text.Parser.Expression+-- > import Text.Parser.Token (TokenParsing, natural, parens, reserve)+-- > import Text.Parser.Token.Style (emptyOps)+-- >+-- > expr :: (Monad m, TokenParsing m) => m Integer -- > expr = buildExpressionParser table term -- > <?> "expression" -- >+-- > term :: (Monad m, TokenParsing m) => m Integer -- > term = parens expr -- > <|> natural -- > <?> "simple expression" -- >+-- > table :: (Monad m, TokenParsing m) => [[Operator m Integer]] -- > table = [ [prefix "-" negate, prefix "+" id ] -- > , [postfix "++" (+1)] -- > , [binary "*" (*) AssocLeft, binary "/" (div) AssocLeft ] -- > , [binary "+" (+) AssocLeft, binary "-" (-) AssocLeft ] -- > ] -- >--- > binary name fun assoc = Infix (fun <* reservedOp name) assoc--- > prefix name fun = Prefix (fun <* reservedOp name)--- > postfix name fun = Postfix (fun <* reservedOp name)+-- > binary name fun assoc = Infix (fun <$ reservedOp name) assoc+-- > prefix name fun = Prefix (fun <$ reservedOp name)+-- > postfix name fun = Postfix (fun <$ reservedOp name)+-- >+-- > reservedOp name = reserve emptyOps name buildExpressionParser :: forall m a. (Parsing m, Applicative m) => OperatorTable m a
src/Text/Parser/LookAhead.hs view
@@ -36,7 +36,11 @@ import Control.Monad.Trans.RWS.Strict as Strict import Control.Monad.Trans.Reader import Control.Monad.Trans.Identity+import qualified Data.Attoparsec.Types as Att+import qualified Data.Attoparsec.Combinator as Att+#if __GLASGOW_HASKELL__ < 710 import Data.Monoid+#endif import qualified Text.ParserCombinators.ReadP as ReadP import qualified Text.Parsec as Parsec import Text.Parser.Combinators@@ -80,6 +84,9 @@ instance (Parsec.Stream s m t, Show t) => LookAheadParsing (Parsec.ParsecT s u m) where lookAhead = Parsec.lookAhead++instance Att.Chunk i => LookAheadParsing (Att.Parser i) where+ lookAhead = Att.lookAhead instance LookAheadParsing ReadP.ReadP where lookAhead p = ReadP.look >>= \s ->
src/Text/Parser/Permutation.hs view
@@ -45,7 +45,7 @@ {-# INLINE (<||>) #-} -- | The expression @f \<$$> p@ creates a fresh permutation parser--- consisting of parser @p@. The the final result of the permutation+-- consisting of parser @p@. The final result of the permutation -- parser is the function @f@ applied to the return value of @p@. The -- parser @p@ is not allowed to accept empty input - use the optional -- combinator ('<$?>') instead.@@ -72,7 +72,7 @@ {-# INLINE (<|?>) #-} -- | The expression @f \<$?> (x,p)@ creates a fresh permutation parser--- consisting of parser @p@. The the final result of the permutation+-- consisting of parser @p@. The final result of the permutation -- parser is the function @f@ applied to the return value of @p@. The -- parser @p@ is optional - if it can not be applied, the default value -- @x@ will be used instead.
src/Text/Parser/Token.hs view
@@ -1,11 +1,11 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# OPTIONS_GHC -fspec-constr -fspec-constr-count=8 #-}-{-# LANGUAGE CPP #-} #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE Trustworthy #-} #endif+{-# OPTIONS_GHC -fspec-constr -fspec-constr-count=8 #-} ----------------------------------------------------------------------------- -- | -- Module : Text.Parser.Token@@ -97,12 +97,15 @@ import Data.Functor.Identity import qualified Data.HashSet as HashSet import Data.HashSet (HashSet)-import Data.List (foldl')+import Data.List (foldl', transpose)+#if __GLASGOW_HASKELL__ < 710 import Data.Monoid+#endif import Data.Scientific ( Scientific ) import qualified Data.Scientific as Sci import Data.String-import Data.Text hiding (empty,zip,foldl,foldl')+import Data.Text hiding (empty,zip,foldl,foldl',take,map,length,splitAt,null,transpose)+import Numeric (showIntAtBase) import qualified Text.ParserCombinators.ReadP as ReadP import qualified Text.Parsec as Parsec import qualified Data.Attoparsec.Types as Att@@ -579,10 +582,32 @@ escapeCode = (charEsc <|> charNum <|> charAscii <|> charControl) <?> "escape code" where charControl = (\c -> toEnum (fromEnum c - fromEnum '@')) <$> (char '^' *> (upper <|> char '@'))- charNum = toEnum . fromInteger <$> num where- num = decimal- <|> (char 'o' *> number 8 octDigit)- <|> (char 'x' *> number 16 hexDigit)+ charNum = toEnum <$> num+ where+ num = bounded 10 maxchar+ <|> (char 'o' *> bounded 8 maxchar)+ <|> (char 'x' *> bounded 16 maxchar)+ maxchar = fromEnum (maxBound :: Char)++ bounded base bnd = foldl' (\x d -> base * x + digitToInt d) 0+ <$> bounded' (take base thedigits) (map digitToInt $ showIntAtBase base intToDigit bnd "")+ where+ thedigits = map char ['0'..'9'] ++ map oneOf (transpose [['A'..'F'],['a'..'f']])+ toomuch = unexpected "out-of-range numeric escape sequence"+ bounded' dps@(zero:_) bds = skipSome zero *> ([] <$ notFollowedBy (choice dps) <|> bounded'' dps bds)+ <|> bounded'' dps bds+ bounded' [] _ = error "bounded called with base 0"+ bounded'' dps [] = [] <$ notFollowedBy (choice dps) <|> toomuch+ bounded'' dps (bd : bds) = let anyd = choice dps+ nomore = notFollowedBy anyd <|> toomuch+ (low, ex : high) = splitAt bd dps+ in ((:) <$> choice low <*> atMost (length bds) anyd) <* nomore+ <|> ((:) <$> ex <*> ([] <$ nomore <|> bounded'' dps bds))+ <|> if not (null bds)+ then (:) <$> choice high <*> atMost (length bds - 1) anyd <* nomore+ else empty+ atMost n p | n <= 0 = pure []+ | otherwise = ((:) <$> p <*> atMost (n - 1) p) <|> pure [] charEsc = choice $ parseEsc <$> escMap parseEsc (c,code) = code <$ char c escMap = zip "abfnrtv\\\"\'" "\a\b\f\n\r\t\v\\\"\'"
src/Text/Parser/Token/Style.hs view
@@ -1,5 +1,5 @@-{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE CPP #-}+{-# LANGUAGE DeriveDataTypeable #-} #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE Trustworthy #-} #endif@@ -42,7 +42,9 @@ import Control.Applicative import qualified Data.HashSet as HashSet import Data.HashSet (HashSet)+#if __GLASGOW_HASKELL__ < 710 import Data.Monoid+#endif import Data.Data import Text.Parser.Combinators import Text.Parser.Char
tests/QuickCheck.hs view
@@ -32,7 +32,7 @@ -- Instead of letting quick check pick the parser framework as a test parameter -- it may be better to just run all tests for each parser framework. -data P a = P ((Monad m, CharParsing m) => m a)+data P a = P (forall m. (Monad m, CharParsing m) => m a) data TestParser a = TestParser String (P a -> String -> Either String a)