-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Type derived JSON parsing using Aeson -- -- A library for deriving JSON parsers (using Aeson) by indicating JSON -- structure at the type level. @package tyro @version 0.2.0.0 module Data.Tyro -- | Extract a represents trying to parse JSON to an a. type Extract a = JSBranch '[] a -- | The type operator '>%> provides a way of describing how to walk -- down a JSON tree. -- | The List type operator constructs a parsing type for parsing a -- list of JSON objects. -- | unwrap unwraps a value from it's parsing type. unwrap :: JSBranch xs a -> a -- | Tyro is an abstract type representing a parser that walks down -- a JSON tree. data Tyro -- | extract is the value which represents halting the walk along -- the JSON tree, and pulling out the value there. extract :: Tyro -- | >%> allows you to specify a subtree indexed by a key. -- It's right associative, so chains of keys can be specified without -- parenthesese. (>%>) :: String -> Tyro -> Tyro infixr 9 >%> -- | %%> tries to parse a ByteString along a Tyro to -- obtain a value (%%>) :: (FromJSON a) => ByteString -> Tyro -> Maybe a infixl 8 %%> -- | JSBranch is a dependent datatype which represents a walk down a -- JSON tree. JSBranch ["key1", "key2"] a represents the walk -- "take the value at key1 and then the value at key2, -- and (try to) interpret that as an a". data JSBranch :: [Symbol] -> * -> * instance GHC.Show.Show Data.Tyro.Tyro instance GHC.Classes.Eq Data.Tyro.Tyro instance (Data.Aeson.Types.FromJSON.FromJSON a, Data.Singletons.SingI xs) => Data.Aeson.Types.FromJSON.FromJSON (Data.Tyro.JSBranch xs a)