Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
class (Eq a, NFData a, Binary a, Show a) => Atomable a where Source #
All database values ("atoms") adhere to the Atomable
typeclass. This class is derivable allowing new datatypes to be easily marshaling between Haskell values and database values.
toAtom :: (Generic a, AtomableG (Rep a)) => a -> Atom Source #
fromAtom :: Atom -> a Source #
fromAtom :: (Generic a, AtomableG (Rep a)) => Atom -> a Source #
toAtomType :: proxy a -> AtomType Source #
toAtomType :: (Generic a, AtomableG (Rep a)) => proxy a -> AtomType Source #
toAddTypeExpr :: Proxy a -> DatabaseContextExpr Source #
Creates DatabaseContextExpr necessary to load the type constructor and data constructor into the database.
toAddTypeExpr :: (Generic a, AtomableG (Rep a)) => proxy a -> DatabaseContextExpr Source #
Creates DatabaseContextExpr necessary to load the type constructor and data constructor into the database.
Atomable Bool Source # | |
Atomable Double Source # | |
Atomable Int Source # | |
Atomable Integer Source # | |
Atomable ByteString Source # | |
Atomable Text Source # | |
Atomable UTCTime Source # | |
Atomable Day Source # | |
Atomable a => Atomable [a] Source # | |
Atomable a => Atomable (Maybe a) Source # | |
(Atomable a, Atomable b) => Atomable (Either a b) Source # | |
class AtomableG g where Source #
toAtomG :: g a -> AtomType -> Atom Source #
fromAtomG :: Atom -> [Atom] -> Maybe (g a) Source #
toAtomTypeG :: g a -> AtomType Source #
toAtomsG :: g a -> [Atom] Source #
toAddTypeExprG :: g a -> AtomType -> DatabaseContextExpr Source #
getConstructorsG :: g a -> [DataConstructorDef] Source #
getConstructorArgsG :: g a -> [DataConstructorDefArg] Source #
AtomableG * U1 Source # | |
Atomable a => AtomableG * (K1 c a) Source # | |
(AtomableG * a, AtomableG * b) => AtomableG * ((:+:) a b) Source # | |
(AtomableG * a, AtomableG * b) => AtomableG * ((:*:) a b) Source # | |
(Datatype Meta c, AtomableG * a) => AtomableG * (M1 D c a) Source # | |
(Constructor Meta c, AtomableG * a) => AtomableG * (M1 C c a) Source # | |
(Selector Meta c, AtomableG * a) => AtomableG * (M1 S c a) Source # | |