{-# LANGUAGE Safe #-}

-----------------------------------------------------------------------------
-- |
-- Module      :  Text.ParserCombinators.Parsec.Prim
-- Copyright   :  (c) Paolo Martini 2007
-- License     :  BSD-style (see the LICENSE file)
--
-- Maintainer  :  derek.a.elkins@gmail.com
-- Stability   :  provisional
-- Portability :  portable
--
-- Parsec compatibility module
--
-----------------------------------------------------------------------------

module Text.ParserCombinators.Parsec.Prim
    ( (<?>),
      (<|>),
      Parser,
      GenParser,
      runParser,
      parse,
      parseFromFile,
      parseTest,
      token,
      tokens,
      tokenPrim,
      tokenPrimEx,
      try,
      label,
      labels,
      unexpected,
      pzero,
      many,
      skipMany,
      getState,
      setState,
      updateState,
      getPosition,
      setPosition,
      getInput,
      setInput,
      State(..),
      getParserState,
      setParserState
    ) where

import Text.Parsec.Prim hiding (runParser, try)
import qualified Text.Parsec.Prim as N -- 'N' for 'New'
import Text.Parsec.String

import Text.Parsec.Error
import Text.Parsec.Pos

pzero :: GenParser tok st a
pzero :: forall tok st a. GenParser tok st a
pzero = ParsecT [tok] st Identity a
forall s u (m :: * -> *) a. ParsecT s u m a
parserZero

runParser :: GenParser tok st a
          -> st
          -> SourceName
          -> [tok]
          -> Either ParseError a
runParser :: forall tok st a.
GenParser tok st a
-> st -> SourceName -> [tok] -> Either ParseError a
runParser = Parsec [tok] st a
-> st -> SourceName -> [tok] -> Either ParseError a
forall s t u a.
Stream s Identity t =>
Parsec s u a -> u -> SourceName -> s -> Either ParseError a
N.runParser

try :: GenParser tok st a -> GenParser tok st a
try :: forall tok st a. GenParser tok st a -> GenParser tok st a
try = ParsecT [tok] st Identity a -> ParsecT [tok] st Identity a
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m a
N.try