module PDF.EOL ( Style(..) , charset , parser ) where import Data.ByteString.Lazy.Char8 (ByteString) import Text.Parsec ((<|>), Parsec, string, try) data Style = CR | LF | CRLF deriving Show charset :: String charset = "\r\n" parser :: Parsec ByteString u Style parser = try (string "\r\n" >> return CRLF) <|> (string "\r" >> return CR) <|> (string "\n" >> return LF)