packages feed

parsers 0.10.2 → 0.10.3

raw patch · 2 files changed

+35/−4 lines, 2 filesdep ~base

Dependency ranges changed: base

Files

parsers.cabal view
@@ -1,6 +1,6 @@ name:          parsers category:      Text, Parsing-version:       0.10.2+version:       0.10.3 license:       BSD3 cabal-version: >= 1.10 license-file:  LICENSE@@ -21,6 +21,7 @@   location: git://github.com/ekmett/parsers.git  flag lib-Werror+  description: Treat warnings as errors when building.   manual: True   default: False 
src/Text/Parser/Token.hs view
@@ -670,8 +670,18 @@ -- | This is a parser transformer you can use to disable syntax highlighting -- over a range of text you are parsing. newtype Unhighlighted m a = Unhighlighted { runUnhighlighted :: m a }-  deriving (Functor,Applicative,Alternative,Monad,MonadPlus,Parsing,CharParsing)+  deriving (Functor,Applicative,Alternative,Monad,MonadPlus,CharParsing) +instance Parsing m => Parsing (Unhighlighted m) where+  try (Unhighlighted m) = Unhighlighted $ try m+  {-# INLINE try #-}+  Unhighlighted m <?> l = Unhighlighted $ m <?> l+  {-# INLINE (<?>) #-}+  unexpected = Unhighlighted . unexpected+  {-# INLINE unexpected #-}+  eof = Unhighlighted eof+  {-# INLINE eof #-}+ instance MonadTrans Unhighlighted where   lift = Unhighlighted   {-# INLINE lift #-}@@ -689,8 +699,18 @@ -- | This is a parser transformer you can use to disable the automatic trailing -- space consumption of a Token parser. newtype Unspaced m a = Unspaced { runUnspaced :: m a }-  deriving (Functor,Applicative,Alternative,Monad,MonadPlus,Parsing,CharParsing)+  deriving (Functor,Applicative,Alternative,Monad,MonadPlus,CharParsing) +instance Parsing m => Parsing (Unspaced m) where+  try (Unspaced m) = Unspaced $ try m+  {-# INLINE try #-}+  Unspaced m <?> l = Unspaced $ m <?> l+  {-# INLINE (<?>) #-}+  unexpected = Unspaced . unexpected+  {-# INLINE unexpected #-}+  eof = Unspaced eof+  {-# INLINE eof #-}+ instance MonadTrans Unspaced where   lift = Unspaced   {-# INLINE lift #-}@@ -708,7 +728,17 @@ -- | This is a parser transformer you can use to disable the automatic trailing -- newline (but not whitespace-in-general) consumption of a Token parser. newtype Unlined m a = Unlined { runUnlined :: m a }-  deriving (Functor,Applicative,Alternative,Monad,MonadPlus,Parsing,CharParsing)+  deriving (Functor,Applicative,Alternative,Monad,MonadPlus,CharParsing)++instance Parsing m => Parsing (Unlined m) where+  try (Unlined m) = Unlined $ try m+  {-# INLINE try #-}+  Unlined m <?> l = Unlined $ m <?> l+  {-# INLINE (<?>) #-}+  unexpected = Unlined . unexpected+  {-# INLINE unexpected #-}+  eof = Unlined eof+  {-# INLINE eof #-}  instance MonadTrans Unlined where   lift = Unlined