module Text.Toml where

import           Data.Text        (Text)
import           Data.Set         (empty)
import           Text.Parsec

import           Text.Toml.Parser


-- | Parse a 'Text' that results in 'Either' a 'String'
-- containing the error message, or an internal representation
-- of the document as a 'Table'.
parseTomlDoc :: String -> Text -> Either ParseError Table
parseTomlDoc :: String -> Text -> Either ParseError Table
parseTomlDoc String
inputName Text
input = forall s t u a.
Stream s Identity t =>
Parsec s u a -> u -> String -> s -> Either ParseError a
runParser Parsec Text (Set [Text]) Table
tomlDoc forall a. Set a
empty String
inputName Text
input