-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Alternative parser for TOML values produced by the toml-reader package. -- -- Package defines a set of parser combinators that allows analyzing -- arbitrary TOML structures. Includes formatted errors that keep track -- of where in the original TOML file a value came from. @package toml-reader-parse @version 0.1.0.0 module TOML.Parse data Value Table :: Table -> Value Array :: [Value] -> Value String :: Text -> Value Integer :: Integer -> Value Float :: Double -> Value Boolean :: Bool -> Value OffsetDateTime :: (LocalTime, TimeZone) -> Value LocalDateTime :: LocalTime -> Value LocalDate :: Day -> Value LocalTime :: TimeOfDay -> Value data Parser a runParser :: a -> (L a -> Parser b) -> Either (Doc Void) b mkTomlError :: L a -> Doc Void -> TomlError data AtomicTomlError UnexpectedType :: !TomlType -> Value -> AtomicTomlError MissingKey :: !Text -> Table -> AtomicTomlError IndexOutOfBounds :: !Int -> Value -> AtomicTomlError OtherError :: Doc Void -> AtomicTomlError data TomlError -- | Add textual annotation to the provided located thing. The annotation -- will be shows as part of error message if the location ultimately gets -- passed to throwParseError. (>) :: L a -> Text -> L a infixl 9 > -- | Adds to a its provenance in the toml file. data L a -- |
-- extract . fmap f = f . extract --extract :: Comonad w => w a -> a class (Applicative m, Alternative m) => TomlParse m throwParseError :: TomlParse m => L b -> AtomicTomlError -> m a class FromToml a b fromToml :: FromToml a b => L a -> Parser b class Index a (.:) :: (Index a, FromToml Value b) => a -> Text -> Parser b (.:?) :: (Index a, FromToml Value b) => a -> Text -> Parser (Maybe b) infixl 5 .: infixl 5 .:? -- | Assign default value to a parser that produces Maybe. Typically -- used together with .:?: -- --
-- foo .:? "bar" .!= 10 --(.!=) :: Functor m => m (Maybe a) -> a -> m a infixl 5 .!= pTable :: TomlParse m => L Value -> m (L Table) pKey :: TomlParse m => Text -> L Table -> m (L Value) pKeyMaybe :: Text -> L Table -> L (Maybe Value) pStr :: TomlParse m => L Value -> m Text pStrL :: TomlParse m => L Value -> m (L Text) pBool :: TomlParse m => L Value -> m Bool pInt :: TomlParse m => L Value -> m Int pIntL :: TomlParse m => L Value -> m (L Int) pDouble :: TomlParse m => L Value -> m Double pDoubleL :: TomlParse m => L Value -> m (L Double) pArray :: TomlParse m => L Value -> m [L Value] data TomlDateTime TomlLocalDateTime :: LocalTime -> TomlDateTime TomlOffsetDateTime :: (LocalTime, TimeZone) -> TomlDateTime TomlLocalDate :: Day -> TomlDateTime TomlLocalTime :: TimeOfDay -> TomlDateTime pDatetime :: TomlParse m => L Value -> m TomlDateTime pDatetimeL :: TomlParse m => L Value -> m (L TomlDateTime) pCases :: (Ord k, FromToml Value k, Pretty k) => Map k v -> L Value -> Parser v -- | Prettyprint toml value. ppToml :: Value -> Doc ann instance GHC.Generics.Generic TOML.Parse.TomlType instance GHC.Show.Show TOML.Parse.TomlType instance GHC.Classes.Ord TOML.Parse.TomlType instance GHC.Classes.Eq TOML.Parse.TomlType instance GHC.Generics.Generic TOML.Parse.TomlPath instance GHC.Show.Show TOML.Parse.TomlPath instance GHC.Classes.Ord TOML.Parse.TomlPath instance GHC.Classes.Eq TOML.Parse.TomlPath instance GHC.Generics.Generic TOML.Parse.AtomicTomlError instance GHC.Show.Show TOML.Parse.AtomicTomlError instance GHC.Generics.Generic TOML.Parse.TomlError instance GHC.Show.Show TOML.Parse.TomlError instance GHC.Enum.Bounded TOML.Parse.IsCommitted instance GHC.Enum.Enum TOML.Parse.IsCommitted instance GHC.Show.Show TOML.Parse.IsCommitted instance GHC.Classes.Ord TOML.Parse.IsCommitted instance GHC.Classes.Eq TOML.Parse.IsCommitted instance GHC.Base.Functor TOML.Parse.Validation instance Prettyprinter.Internal.Pretty TOML.Parse.ParseEnv instance GHC.Generics.Generic TOML.Parse.ParseEnv instance GHC.Show.Show TOML.Parse.ParseEnv instance GHC.Classes.Ord TOML.Parse.ParseEnv instance GHC.Classes.Eq TOML.Parse.ParseEnv instance GHC.Base.MonadPlus TOML.Parse.Parser instance GHC.Base.Alternative TOML.Parse.Parser instance GHC.Base.Applicative TOML.Parse.Parser instance GHC.Base.Functor TOML.Parse.Parser instance GHC.Generics.Generic (TOML.Parse.L a) instance Data.Traversable.Traversable TOML.Parse.L instance Data.Foldable.Foldable TOML.Parse.L instance GHC.Base.Functor TOML.Parse.L instance GHC.Show.Show a => GHC.Show.Show (TOML.Parse.L a) instance GHC.Classes.Ord a => GHC.Classes.Ord (TOML.Parse.L a) instance GHC.Classes.Eq a => GHC.Classes.Eq (TOML.Parse.L a) instance GHC.Generics.Generic TOML.Parse.TomlDateTime instance GHC.Show.Show TOML.Parse.TomlDateTime instance GHC.Classes.Ord TOML.Parse.TomlDateTime instance GHC.Classes.Eq TOML.Parse.TomlDateTime instance Control.DeepSeq.NFData TOML.Parse.TomlDateTime instance Prettyprinter.Internal.Pretty TOML.Parse.TomlDateTime instance TOML.Parse.Index (TOML.Parse.L TOML.Value.Table) instance TOML.Parse.Index (TOML.Parse.L TOML.Value.Value) instance (a GHC.Types.~ TOML.Parse.L TOML.Value.Value) => TOML.Parse.Index (TOML.Parse.Parser a) instance TOML.Parse.FromToml a (TOML.Parse.L a) instance TOML.Parse.FromToml a a instance TOML.Parse.FromToml TOML.Value.Value GHC.Base.String instance TOML.Parse.FromToml TOML.Value.Value Data.Text.Internal.Text instance TOML.Parse.FromToml TOML.Value.Value GHC.Types.Bool instance TOML.Parse.FromToml TOML.Value.Value GHC.Types.Int instance TOML.Parse.FromToml TOML.Value.Value GHC.Types.Double instance (GHC.Classes.Ord k, TOML.Parse.FromToml Data.Text.Internal.Text k, TOML.Parse.FromToml TOML.Value.Value v) => TOML.Parse.FromToml TOML.Value.Value (Data.Map.Internal.Map k v) instance (GHC.Classes.Ord k, TOML.Parse.FromToml Data.Text.Internal.Text k, TOML.Parse.FromToml TOML.Value.Value v) => TOML.Parse.FromToml TOML.Value.Table (Data.Map.Internal.Map k v) instance TOML.Parse.FromToml TOML.Value.Value a => TOML.Parse.FromToml TOML.Value.Value (Data.Vector.Vector a) instance TOML.Parse.FromToml TOML.Value.Value a => TOML.Parse.FromToml TOML.Value.Value [a] instance TOML.Parse.FromToml TOML.Value.Value a => TOML.Parse.FromToml TOML.Value.Value (GHC.Base.NonEmpty a) instance TOML.Parse.TomlParse TOML.Parse.Parser instance Prettyprinter.Internal.Pretty a => Prettyprinter.Internal.Pretty (TOML.Parse.L a) instance Control.Comonad.Comonad TOML.Parse.L instance GHC.Base.Monad TOML.Parse.Parser instance GHC.Base.Applicative TOML.Parse.Validation instance GHC.Base.Alternative TOML.Parse.Validation instance GHC.Base.Monad TOML.Parse.Validation instance GHC.Base.MonadPlus TOML.Parse.Validation instance GHC.Base.Semigroup TOML.Parse.IsCommitted instance Prettyprinter.Internal.Pretty TOML.Parse.TomlError instance Prettyprinter.Internal.Pretty TOML.Parse.AtomicTomlError instance Prettyprinter.Internal.Pretty TOML.Parse.TomlPath