{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Text.Parsec.ByteString.Lazy
( Parser, GenParser, parseFromFile
) where
import Text.Parsec.Error
import Text.Parsec.Prim
import qualified Data.ByteString.Lazy.Char8 as C
instance (Monad m) => Stream C.ByteString m Char where
uncons = return . C.uncons
type Parser = Parsec C.ByteString ()
type GenParser t st = Parsec C.ByteString st
parseFromFile :: Parser a -> String -> IO (Either ParseError a)
parseFromFile p fname
= do input <- C.readFile fname
return (runP p () fname input)