mirror of
https://github.com/circuithub/rel8.git
synced 2024-09-11 16:05:41 +03:00
Remove AnExpr
This commit is contained in:
parent
d112076151
commit
8a58e45cb1
15
src/Rel8.hs
15
src/Rel8.hs
@ -330,19 +330,6 @@ instance (FromJSON a, ToJSON a, Typeable a) => DBType (JSONEncoded a) where
|
||||
newtype ReadShow a = ReadShow { fromReadShow :: a }
|
||||
|
||||
|
||||
{-| Anything that has an instance of 'DBType' is an 'Expr'. This class packages that knowledge up. -}
|
||||
class
|
||||
( ExprFor (Expr a) a
|
||||
, ExprFor (Expr (Maybe a)) (Maybe a)
|
||||
) => AnExpr (a :: Type)
|
||||
|
||||
|
||||
instance
|
||||
( ExprFor (Expr a) a
|
||||
, ExprFor (Expr (Maybe a)) (Maybe a)
|
||||
) => AnExpr a
|
||||
|
||||
|
||||
{-| A @DatabaseType@ describes how to encode and decode a Haskell type to and
|
||||
from database queries. The @typeName@ is the name of the type in the database,
|
||||
which is used to accurately type literals.
|
||||
@ -1016,7 +1003,7 @@ instance (s ~ t, expr ~ Expr, identity ~ Identity, HigherKindedTable t, HConstra
|
||||
(MkC Dict, MkC x) -> MkC $ monolit x
|
||||
|
||||
|
||||
instance (AnExpr a, DBType a, a ~ b) => Serializable (Expr a) b where
|
||||
instance (DBType a, a ~ b) => Serializable (Expr a) b where
|
||||
rowParser inject = fieldWith $ inject $ decode typeInformation
|
||||
|
||||
lit = Expr . Opaleye.CastExpr typeName . encode
|
||||
|
Loading…
Reference in New Issue
Block a user