{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE Safe #-}
module Text.Megaparsec.Common
( string,
string',
)
where
import qualified Data.CaseInsensitive as CI
import Data.Function (on)
import Text.Megaparsec
string :: (MonadParsec e s m) => Tokens s -> m (Tokens s)
string :: forall e s (m :: * -> *).
MonadParsec e s m =>
Tokens s -> m (Tokens s)
string = forall e s (m :: * -> *).
MonadParsec e s m =>
Tokens s -> m (Tokens s)
chunk
{-# INLINE string #-}
string' ::
(MonadParsec e s m, CI.FoldCase (Tokens s)) =>
Tokens s ->
m (Tokens s)
string' :: forall e s (m :: * -> *).
(MonadParsec e s m, FoldCase (Tokens s)) =>
Tokens s -> m (Tokens s)
string' = forall e s (m :: * -> *).
MonadParsec e s m =>
(Tokens s -> Tokens s -> Bool) -> Tokens s -> m (Tokens s)
tokens (forall a. Eq a => a -> a -> Bool
(==) forall b c a. (b -> b -> c) -> (a -> b) -> a -> a -> c
`on` forall s. FoldCase s => s -> CI s
CI.mk)
{-# INLINE string' #-}