License | MPL-2.0 |
---|---|
Maintainer | hencutJohnson@gmail.com |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Included are some wrapping functions for Cozo's C API and data types to deserialize them.
Synopsis
- newtype CozoResult = CozoResult {}
- data CozoOkay = CozoOkay {}
- data NamedRows = NamedRows {
- namedRowsHeaders :: [Text]
- namedRowsRows :: [[Value]]
- namedRowsNext :: Maybe NamedRows
- data CozoBad = CozoBad {}
- newtype CozoRelationExportPayload = CozoRelationExportPayload {}
- data CozoException
- open :: Text -> Text -> Text -> IO (Either CozoException Connection)
- close :: Connection -> IO Bool
- runQuery :: Connection -> Text -> KeyMap Value -> IO (Either CozoException CozoResult)
- backup :: Connection -> Text -> IO (Either CozoException ())
- restore :: Connection -> Text -> IO (Either CozoException ())
- importRelations :: Connection -> CozoRelationExportPayload -> IO (Either CozoException ())
- exportRelations :: Connection -> [Text] -> IO (Either CozoException CozoRelationExportPayload)
- importFromBackup :: Connection -> Text -> [Text] -> IO (Either CozoException ())
- open' :: ByteString -> ByteString -> ByteString -> IO (Either InternalCozoError Connection)
- close' :: Connection -> IO Bool
- runQuery' :: Connection -> ByteString -> ByteString -> IO (Either CozoNullResultPtrException ByteString)
- backup' :: Connection -> ByteString -> IO (Either CozoNullResultPtrException ByteString)
- restore' :: Connection -> ByteString -> IO (Either CozoNullResultPtrException ByteString)
- importRelations' :: Connection -> ByteString -> IO (Either CozoNullResultPtrException ByteString)
- exportRelations' :: Connection -> ByteString -> IO (Either CozoNullResultPtrException ByteString)
- importFromBackup' :: Connection -> ByteString -> IO (Either CozoNullResultPtrException ByteString)
- data Connection
- data CozoNullResultPtrException
- data InternalCozoError
- data Key
- data KeyMap v
- empty :: KeyMap v
- singleton :: Key -> v -> KeyMap v
- insert :: Key -> v -> KeyMap v -> KeyMap v
- fromList :: [(Key, v)] -> KeyMap v
- data Value
Data
newtype CozoResult Source #
Instances
FromJSON CozoResult Source # | |
Defined in Database.Cozo parseJSON :: Value -> Parser CozoResult # parseJSONList :: Value -> Parser [CozoResult] # | |
Generic CozoResult Source # | |
Defined in Database.Cozo type Rep CozoResult :: Type -> Type # from :: CozoResult -> Rep CozoResult x # to :: Rep CozoResult x -> CozoResult # | |
Show CozoResult Source # | |
Defined in Database.Cozo showsPrec :: Int -> CozoResult -> ShowS # show :: CozoResult -> String # showList :: [CozoResult] -> ShowS # | |
Eq CozoResult Source # | |
Defined in Database.Cozo (==) :: CozoResult -> CozoResult -> Bool # (/=) :: CozoResult -> CozoResult -> Bool # | |
type Rep CozoResult Source # | |
Defined in Database.Cozo type Rep CozoResult = D1 ('MetaData "CozoResult" "Database.Cozo" "cozo-hs-0.1.0.0-inplace" 'True) (C1 ('MetaCons "CozoResult" 'PrefixI 'True) (S1 ('MetaSel ('Just "runCozoResult") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either CozoBad CozoOkay)))) |
An okay result from a query.
Contains result headers, and rows among other things.
Instances
FromJSON CozoOkay Source # | |
Defined in Database.Cozo | |
Generic CozoOkay Source # | |
Show CozoOkay Source # | |
Eq CozoOkay Source # | |
type Rep CozoOkay Source # | |
Defined in Database.Cozo type Rep CozoOkay = D1 ('MetaData "CozoOkay" "Database.Cozo" "cozo-hs-0.1.0.0-inplace" 'False) (C1 ('MetaCons "CozoOkay" 'PrefixI 'True) (S1 ('MetaSel ('Just "cozoOkayNamedRows") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 NamedRows) :*: S1 ('MetaSel ('Just "cozoOkayTook") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Double))) |
Relation information with headers, their values, and another NamedRows
if
it exists.
NamedRows | |
|
Instances
FromJSON NamedRows Source # | |
Defined in Database.Cozo | |
ToJSON NamedRows Source # | |
Generic NamedRows Source # | |
Show NamedRows Source # | |
Eq NamedRows Source # | |
type Rep NamedRows Source # | |
Defined in Database.Cozo type Rep NamedRows = D1 ('MetaData "NamedRows" "Database.Cozo" "cozo-hs-0.1.0.0-inplace" 'False) (C1 ('MetaCons "NamedRows" 'PrefixI 'True) (S1 ('MetaSel ('Just "namedRowsHeaders") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Text]) :*: (S1 ('MetaSel ('Just "namedRowsRows") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [[Value]]) :*: S1 ('MetaSel ('Just "namedRowsNext") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe NamedRows))))) |
A bad result from a query.
Contains information on what went wrong.
Instances
FromJSON CozoBad Source # | |
Defined in Database.Cozo | |
Generic CozoBad Source # | |
Show CozoBad Source # | |
Eq CozoBad Source # | |
type Rep CozoBad Source # | |
Defined in Database.Cozo type Rep CozoBad = D1 ('MetaData "CozoBad" "Database.Cozo" "cozo-hs-0.1.0.0-inplace" 'False) (C1 ('MetaCons "CozoBad" 'PrefixI 'True) (S1 ('MetaSel ('Just "cozoBadDisplay") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "cozoBadMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "cozoBadSeverity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))) |
newtype CozoRelationExportPayload Source #
A map of names and the relations they contain. This type is intended to be used as input to an import function or otherwise stored as JSON.
Instances
FromJSON CozoRelationExportPayload Source # | |
Defined in Database.Cozo | |
Generic CozoRelationExportPayload Source # | |
Defined in Database.Cozo type Rep CozoRelationExportPayload :: Type -> Type # | |
Show CozoRelationExportPayload Source # | |
Defined in Database.Cozo showsPrec :: Int -> CozoRelationExportPayload -> ShowS # show :: CozoRelationExportPayload -> String # showList :: [CozoRelationExportPayload] -> ShowS # | |
Eq CozoRelationExportPayload Source # | |
Defined in Database.Cozo | |
type Rep CozoRelationExportPayload Source # | |
Defined in Database.Cozo type Rep CozoRelationExportPayload = D1 ('MetaData "CozoRelationExportPayload" "Database.Cozo" "cozo-hs-0.1.0.0-inplace" 'True) (C1 ('MetaCons "CozoRelationExportPayload" 'PrefixI 'True) (S1 ('MetaSel ('Just "cozoRelationExportPayloadData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (KeyMap NamedRows)))) |
data CozoException Source #
A failure that cannot be recovered from easily.
CozoExceptionInternal InternalCozoError | An internal error may occur when a connection is first being established but not after that. |
CozoErrorNullPtr CozoNullResultPtrException | If any operation in the underlying C API returns a null pointer instead of a pointer to a valid string, this error will be returned. |
CozoJSONParseException String | The result of any operation fails to be deserialized appropriately. This is a problem with the wrapper for the API and should be submitted as an issue if it ever arises. |
CozoOperationFailed Text | A non-query operation such as a backup or import failed. These usually occur because the user is trying to import or export a relation that does not exist in the target database. |
Instances
Functions
open :: Text -> Text -> Text -> IO (Either CozoException Connection) Source #
Open a connection to a cozo database
- engine: "mem", "sqlite" or "rocksdb"
- path: utf8 encoded filepath
- options: engine-specific options. "{}" is an acceptable empty value.
close :: Connection -> IO Bool Source #
True if the database was closed and False if it was already closed or if it does not exist.
runQuery :: Connection -> Text -> KeyMap Value -> IO (Either CozoException CozoResult) Source #
Run a utf8 encoded query with a map of parameters.
Parameters are declared with text names and can be any valid JSON type. They are referenced in a query by a "$" preceding their name.
backup :: Connection -> Text -> IO (Either CozoException ()) Source #
Backup a database.
Accepts the path of the output file.
restore :: Connection -> Text -> IO (Either CozoException ()) Source #
Restore a database from a backup.
importRelations :: Connection -> CozoRelationExportPayload -> IO (Either CozoException ()) Source #
Import data in relations.
Triggers are not run for relations, if you wish to activate triggers, use a query with parameters.
exportRelations :: Connection -> [Text] -> IO (Either CozoException CozoRelationExportPayload) Source #
Export the relations specified by the given names.
importFromBackup :: Connection -> Text -> [Text] -> IO (Either CozoException ()) Source #
Import the relations corresponding to the given names from the specified path.
Lower Level Wrappers
:: ByteString | engine: "mem", "sqlite" or "rocksdb" |
-> ByteString | path: utf8 encoded filepath |
-> ByteString | options: engine-specific options. "{}" is an acceptable emtpy value. |
-> IO (Either InternalCozoError Connection) |
Open a connection to a cozo database
- engine: "mem", "sqlite" or "rocksdb"
- path: utf8 encoded filepath
- options: engine-specific options. "{}" is an acceptable empty value.
close' :: Connection -> IO Bool Source #
True if the database was closed and False if it was already closed or if it does not exist.
runQuery' :: Connection -> ByteString -> ByteString -> IO (Either CozoNullResultPtrException ByteString) Source #
Run a query.
The CozoError
that might arise from this function is a CozoNullResultPtr
.
If there are any errors internal to cozo, those will be returned as part of the
JSON string returned in the Right value. Simple returning a Right value does not
mean the query was successful.
- script: utf8 encoded script to execute
- params_raw: a utf8 encoded, JSON formatted map of parameters for use in the script.
backup' :: Connection -> ByteString -> IO (Either CozoNullResultPtrException ByteString) Source #
Backup a database.
Accepts the path of the output file.
restore' :: Connection -> ByteString -> IO (Either CozoNullResultPtrException ByteString) Source #
Restore a database from a backup.
importRelations' :: Connection -> ByteString -> IO (Either CozoNullResultPtrException ByteString) Source #
Import data in relations.
Triggers are not run for relations, if you wish to activate triggers, use a query with parameters.
The given bytestring is a utf8, JSON formatted payload of relations.
In the same form as that given by exportRelations'
exportRelations' :: Connection -> ByteString -> IO (Either CozoNullResultPtrException ByteString) Source #
Export relations into JSON
The given bytestring must be a utf8 encoded JSON payload. See the manual for expected fields.
importFromBackup' :: Connection -> ByteString -> IO (Either CozoNullResultPtrException ByteString) Source #
Import relations from a backup.
Note that triggers are not run for the relations. To run triggers, use a query with parameters.
- payload:
"{
path
: ...,relations
: [...]}"
Re-exports
data Connection Source #
data CozoNullResultPtrException Source #
Instances
Exception CozoNullResultPtrException Source # | |
Generic CozoNullResultPtrException Source # | |
Defined in Database.Cozo.Internal type Rep CozoNullResultPtrException :: Type -> Type # | |
Show CozoNullResultPtrException Source # | |
Defined in Database.Cozo.Internal showsPrec :: Int -> CozoNullResultPtrException -> ShowS # show :: CozoNullResultPtrException -> String # showList :: [CozoNullResultPtrException] -> ShowS # | |
Eq CozoNullResultPtrException Source # | |
Defined in Database.Cozo.Internal | |
type Rep CozoNullResultPtrException Source # | |
data InternalCozoError Source #
Wrapper around primitive failure states.
Instances
Instances
Arbitrary Key | Since: aeson-2.0.3.0 |
CoArbitrary Key | Since: aeson-2.0.3.0 |
Defined in Data.Aeson.Key coarbitrary :: Key -> Gen b -> Gen b # | |
Function Key | Since: aeson-2.0.3.0 |
FromJSON Key | |
Defined in Data.Aeson.Types.FromJSON | |
FromJSONKey Key | |
Defined in Data.Aeson.Types.FromJSON | |
ToJSON Key | |
ToJSONKey Key | |
Defined in Data.Aeson.Types.ToJSON | |
Data Key | |
Defined in Data.Aeson.Key gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Key -> c Key # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Key # dataTypeOf :: Key -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Key) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Key) # gmapT :: (forall b. Data b => b -> b) -> Key -> Key # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Key -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Key -> r # gmapQ :: (forall d. Data d => d -> u) -> Key -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Key -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Key -> m Key # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Key -> m Key # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Key -> m Key # | |
IsString Key | |
Defined in Data.Aeson.Key fromString :: String -> Key # | |
Monoid Key | |
Semigroup Key | |
Read Key | |
Show Key | |
NFData Key | |
Defined in Data.Aeson.Key | |
Eq Key | |
Ord Key | |
Hashable Key | |
Defined in Data.Aeson.Key | |
FoldableWithIndex Key KeyMap | |
Defined in Data.Aeson.KeyMap | |
FunctorWithIndex Key KeyMap | |
TraversableWithIndex Key KeyMap | |
Defined in Data.Aeson.KeyMap | |
SemialignWithIndex Key KeyMap | |
Defined in Data.Aeson.KeyMap | |
ZipWithIndex Key KeyMap | |
Lift Key | |
FilterableWithIndex Key KeyMap | |
WitherableWithIndex Key KeyMap | |
FromPairs Value (DList Pair) | |
Defined in Data.Aeson.Types.ToJSON | |
v ~ Value => KeyValuePair v (DList Pair) | |
Defined in Data.Aeson.Types.ToJSON |
A map from JSON key type Key
to v
.
Instances
Arbitrary1 KeyMap | Since: aeson-2.0.3.0 |
Defined in Data.Aeson.KeyMap liftArbitrary :: Gen a -> Gen (KeyMap a) # liftShrink :: (a -> [a]) -> KeyMap a -> [KeyMap a] # | |
FromJSON1 KeyMap | Since: aeson-2.0.1.0 |
ToJSON1 KeyMap | |
Defined in Data.Aeson.Types.ToJSON liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> KeyMap a -> Value # liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [KeyMap a] -> Value # liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> KeyMap a -> Encoding # liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [KeyMap a] -> Encoding # liftOmitField :: (a -> Bool) -> KeyMap a -> Bool # | |
Foldable KeyMap | |
Defined in Data.Aeson.KeyMap fold :: Monoid m => KeyMap m -> m # foldMap :: Monoid m => (a -> m) -> KeyMap a -> m # foldMap' :: Monoid m => (a -> m) -> KeyMap a -> m # foldr :: (a -> b -> b) -> b -> KeyMap a -> b # foldr' :: (a -> b -> b) -> b -> KeyMap a -> b # foldl :: (b -> a -> b) -> b -> KeyMap a -> b # foldl' :: (b -> a -> b) -> b -> KeyMap a -> b # foldr1 :: (a -> a -> a) -> KeyMap a -> a # foldl1 :: (a -> a -> a) -> KeyMap a -> a # elem :: Eq a => a -> KeyMap a -> Bool # maximum :: Ord a => KeyMap a -> a # minimum :: Ord a => KeyMap a -> a # | |
Traversable KeyMap | |
Functor KeyMap | |
Align KeyMap | |
Defined in Data.Aeson.KeyMap | |
Semialign KeyMap | |
Zip KeyMap | |
Filterable KeyMap | |
Witherable KeyMap | |
Defined in Data.Aeson.KeyMap wither :: Applicative f => (a -> f (Maybe b)) -> KeyMap a -> f (KeyMap b) # witherM :: Monad m => (a -> m (Maybe b)) -> KeyMap a -> m (KeyMap b) # filterA :: Applicative f => (a -> f Bool) -> KeyMap a -> f (KeyMap a) # witherMap :: Applicative m => (KeyMap b -> r) -> (a -> m (Maybe b)) -> KeyMap a -> m r # | |
FoldableWithIndex Key KeyMap | |
Defined in Data.Aeson.KeyMap | |
FunctorWithIndex Key KeyMap | |
TraversableWithIndex Key KeyMap | |
Defined in Data.Aeson.KeyMap | |
SemialignWithIndex Key KeyMap | |
Defined in Data.Aeson.KeyMap | |
ZipWithIndex Key KeyMap | |
FilterableWithIndex Key KeyMap | |
WitherableWithIndex Key KeyMap | |
value ~ Value => KeyValue Value (KeyMap value) | Constructs a singleton |
value ~ Value => KeyValueOmit Value (KeyMap value) | |
Lift v => Lift (KeyMap v :: Type) | |
Arbitrary v => Arbitrary (KeyMap v) | Since: aeson-2.0.3.0 |
CoArbitrary v => CoArbitrary (KeyMap v) | Since: aeson-2.0.3.0 |
Defined in Data.Aeson.KeyMap coarbitrary :: KeyMap v -> Gen b -> Gen b # | |
Function v => Function (KeyMap v) | Since: aeson-2.0.3.0 |
FromJSON v => FromJSON (KeyMap v) | Since: aeson-2.0.1.0 |
Defined in Data.Aeson.Types.FromJSON | |
ToJSON v => ToJSON (KeyMap v) | |
Data v => Data (KeyMap v) | |
Defined in Data.Aeson.KeyMap gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> KeyMap v -> c (KeyMap v) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (KeyMap v) # toConstr :: KeyMap v -> Constr # dataTypeOf :: KeyMap v -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (KeyMap v)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (KeyMap v)) # gmapT :: (forall b. Data b => b -> b) -> KeyMap v -> KeyMap v # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> KeyMap v -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> KeyMap v -> r # gmapQ :: (forall d. Data d => d -> u) -> KeyMap v -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> KeyMap v -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> KeyMap v -> m (KeyMap v) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> KeyMap v -> m (KeyMap v) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> KeyMap v -> m (KeyMap v) # | |
Monoid (KeyMap v) | |
Semigroup (KeyMap v) | |
IsList (KeyMap v) | Since: aeson-2.0.2.0 |
Read v => Read (KeyMap v) | |
Show v => Show (KeyMap v) | |
NFData v => NFData (KeyMap v) | |
Defined in Data.Aeson.KeyMap | |
Eq v => Eq (KeyMap v) | |
Ord v => Ord (KeyMap v) | |
Defined in Data.Aeson.KeyMap | |
Hashable v => Hashable (KeyMap v) | |
Defined in Data.Aeson.KeyMap | |
type Item (KeyMap v) | |
Defined in Data.Aeson.KeyMap |
insert :: Key -> v -> KeyMap v -> KeyMap v #
Associate the specified value with the specified key in this map. If this map previously contained a mapping for the key, the old value is replaced.
fromList :: [(Key, v)] -> KeyMap v #
Construct a map with the supplied mappings. If the list contains duplicate mappings, the later mappings take precedence.
>>>
fromList [("a", 'x'), ("a", 'y')]
fromList [("a",'y')]
A JSON value represented as a Haskell value.
Instances
Arbitrary Value | Since: aeson-2.0.3.0 |
CoArbitrary Value | Since: aeson-2.0.3.0 |
Defined in Data.Aeson.Types.Internal coarbitrary :: Value -> Gen b -> Gen b # | |
Function Value | Since: aeson-2.0.3.0 |
FromJSON Value | |
Defined in Data.Aeson.Types.FromJSON | |
ToJSON Value | |
Data Value | |
Defined in Data.Aeson.Types.Internal gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Value -> c Value # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Value # dataTypeOf :: Value -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Value) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Value) # gmapT :: (forall b. Data b => b -> b) -> Value -> Value # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Value -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Value -> r # gmapQ :: (forall d. Data d => d -> u) -> Value -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Value -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Value -> m Value # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Value -> m Value # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Value -> m Value # | |
IsString Value | |
Defined in Data.Aeson.Types.Internal fromString :: String -> Value # | |
Generic Value | |
Read Value | |
Show Value | Since version 1.5.6.0 version object values are printed in lexicographic key order
|
NFData Value | |
Defined in Data.Aeson.Types.Internal | |
Eq Value | |
Ord Value | The ordering is total, consistent with Since: aeson-1.5.2.0 |
Hashable Value | |
Defined in Data.Aeson.Types.Internal | |
KeyValue Encoding Series | |
KeyValueOmit Encoding Series | |
Lift Value | Since: aeson-0.11.0.0 |
(GToJSON' Encoding arity a, ConsToJSON Encoding arity a, Constructor c) => SumToJSON' TwoElemArray Encoding arity (C1 c a) | |
Defined in Data.Aeson.Types.ToJSON | |
(GToJSON' Value arity a, ConsToJSON Value arity a, Constructor c) => SumToJSON' TwoElemArray Value arity (C1 c a) | |
Defined in Data.Aeson.Types.ToJSON | |
GToJSON' Encoding arity (U1 :: Type -> Type) | |
GToJSON' Encoding arity (V1 :: Type -> Type) | |
GToJSON' Value arity (U1 :: Type -> Type) | |
GToJSON' Value arity (V1 :: Type -> Type) | |
ToJSON1 f => GToJSON' Encoding One (Rec1 f) | |
ToJSON1 f => GToJSON' Value One (Rec1 f) | |
(EncodeProduct arity a, EncodeProduct arity b) => GToJSON' Encoding arity (a :*: b) | |
ToJSON a => GToJSON' Encoding arity (K1 i a :: Type -> Type) | |
(WriteProduct arity a, WriteProduct arity b, ProductSize a, ProductSize b) => GToJSON' Value arity (a :*: b) | |
ToJSON a => GToJSON' Value arity (K1 i a :: Type -> Type) | |
(ToJSON1 f, GToJSON' Encoding One g) => GToJSON' Encoding One (f :.: g) | |
(ToJSON1 f, GToJSON' Value One g) => GToJSON' Value One (f :.: g) | |
FromPairs Value (DList Pair) | |
Defined in Data.Aeson.Types.ToJSON | |
value ~ Value => KeyValue Value (KeyMap value) | Constructs a singleton |
value ~ Value => KeyValueOmit Value (KeyMap value) | |
v ~ Value => KeyValuePair v (DList Pair) | |
Defined in Data.Aeson.Types.ToJSON | |
(key ~ Key, value ~ Value) => KeyValue Value (key, value) | |
Defined in Data.Aeson.Types.ToJSON | |
type Rep Value | |
Defined in Data.Aeson.Types.Internal type Rep Value = D1 ('MetaData "Value" "Data.Aeson.Types.Internal" "aeson-2.2.1.0-5ff71fc79f9d9173c322972bd2e495bd71d52b4dda78216c26dfecacf660c8ce" 'False) ((C1 ('MetaCons "Object" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Object)) :+: (C1 ('MetaCons "Array" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Array)) :+: C1 ('MetaCons "String" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))) :+: (C1 ('MetaCons "Number" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Scientific)) :+: (C1 ('MetaCons "Bool" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :+: C1 ('MetaCons "Null" 'PrefixI 'False) (U1 :: Type -> Type)))) |