-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Incremental JSON parser with early termination and a declarative DSL -- -- Incremental JSON parser with early termination and a declarative DSL @package json-incremental-decoder @version 0.1.1 -- | A DSL for specification of a single-pass incremental and possibly -- partial parser of JSON. module JSONIncrementalDecoder -- | Converts the Value specification into a Supplemented Attoparsec -- Parser. valueToSupplementedParser :: Value a -> Supplemented Parser a -- | Essentially just a helper, which is the same as -- --
--   runSupplemented . valueToSupplementedParser
--   
valueToParser :: Value a -> Parser (a, Parser ()) -- | Converts the Value specification into a function, which decodes a -- strict ByteString. valueToByteStringToEither :: Value a -> ByteString -> Either Text a -- | Converts the Value specification into a function, which decodes a -- strict LazyByteString. valueToLazyByteStringToEither :: Value a -> ByteString -> Either Text a data Value a null :: Value () nullable :: Value a -> Value (Maybe a) bool :: Value Bool numberAsInt :: Value Int numberAsInteger :: Value Integer numberAsDouble :: Value Double numberAsScientific :: Value Scientific string :: Value Text objectRows :: ObjectRows a -> Value a objectLookup :: ObjectLookup a -> Value a arrayElements :: ArrayElements a -> Value a data ObjectRows a row :: (a -> b -> c) -> Matcher Text a -> Value b -> ObjectRows c anyRow :: ObjectRows () data ObjectLookup a atKey :: Text -> Value a -> ObjectLookup a data ArrayElements a element :: Value a -> ArrayElements a anyElement :: ArrayElements () -- | A composable abstraction for checking or converting a context value. data Matcher a b :: * -> * -> * -- | Tests the matched value on equality with the provided value. equals :: Eq a => a -> Matcher a () -- | Checks whether the matched value satisfies the provided predicate. satisfies :: (a -> Bool) -> Matcher a () -- | Tries to convert the matched value to an output value, with -- Either encoding the success or failure of the conversion. converts :: (a -> Either Text b) -> Matcher a b -- | The matcher, which is always satisfied. whatever :: Matcher a () instance GHC.Base.MonadPlus JSONIncrementalDecoder.ArrayElements instance GHC.Base.Monad JSONIncrementalDecoder.ArrayElements instance GHC.Base.Alternative JSONIncrementalDecoder.ArrayElements instance GHC.Base.Applicative JSONIncrementalDecoder.ArrayElements instance GHC.Base.Functor JSONIncrementalDecoder.ArrayElements instance GHC.Base.Applicative JSONIncrementalDecoder.ObjectLookup instance GHC.Base.Functor JSONIncrementalDecoder.ObjectLookup instance GHC.Base.MonadPlus JSONIncrementalDecoder.ObjectRows instance GHC.Base.Monad JSONIncrementalDecoder.ObjectRows instance GHC.Base.Alternative JSONIncrementalDecoder.ObjectRows instance GHC.Base.Applicative JSONIncrementalDecoder.ObjectRows instance GHC.Base.Functor JSONIncrementalDecoder.ObjectRows instance GHC.Base.Functor JSONIncrementalDecoder.Value instance GHC.Base.Monoid (JSONIncrementalDecoder.Value a)