Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type family RepToTree (a :: Type -> Type) :: [(Symbol, Type)] where ...
- type family (xs :: [k]) ++ (ys :: [k]) :: [k] where ...
- type family Sort (xs :: [(Symbol, k)]) where ...
- type family Insert (x :: (Symbol, k)) (xs :: [(Symbol, k)]) where ...
- type family Insert' (b :: Ordering) (x :: (Symbol, k)) (y :: (Symbol, k)) (ys :: [(Symbol, k)]) where ...
- data DiffResult
- type family FieldDiff (a :: [(Symbol, Type)]) (b :: [(Symbol, Type)]) :: [DiffResult] where ...
- type family FieldDiffImpl (b :: Ordering) (x :: (Symbol, Type)) (y :: (Symbol, Type)) (xs :: [(Symbol, Type)]) (ys :: [(Symbol, Type)]) :: [DiffResult] where ...
- copyField :: forall name t from to. (HasField' name to t, HasField' name from t) => from -> to -> to
- class GTransform (ts :: [DiffResult]) (src :: Type) (dst :: Type) where
- type Function ts src dst :: Type
- gTransform :: dst -> src -> Function ts src dst
- class GUndefinedFields (o :: * -> *) where
- gUndefinedFields :: o x
- undefinedFields :: (Generic t, GUndefinedFields (Rep t)) => t
Documentation
type family Insert' (b :: Ordering) (x :: (Symbol, k)) (y :: (Symbol, k)) (ys :: [(Symbol, k)]) where ... Source #
data DiffResult Source #
Instances
(Generic dst, GUndefinedFields (Rep dst)) => GTransform ([] :: [DiffResult]) src dst Source # | |
Defined in Data.Migration.Internal gTransform :: dst -> src -> Function [] src dst Source # | |
(GTransform ts src dst, HasField' name src t, HasField' name dst t) => GTransform (NoChange name t ': ts) src dst Source # | |
(GTransform ts src dst, HasField' name dst t) => GTransform (Addition name t ': ts) src dst Source # | |
(GTransform ts src dst, HasField' name src ti, HasField' name dst to) => GTransform (Change name ti to ': ts) src dst Source # | |
type Function ([] :: [DiffResult]) src dst Source # | |
Defined in Data.Migration.Internal | |
type Function (NoChange name t ': ts) src dst Source # | |
Defined in Data.Migration.Internal | |
type Function (Addition name t ': ts) src dst Source # | |
Defined in Data.Migration.Internal | |
type Function (Change name ti to ': ts) src dst Source # | |
Defined in Data.Migration.Internal |
type family FieldDiff (a :: [(Symbol, Type)]) (b :: [(Symbol, Type)]) :: [DiffResult] where ... Source #
FieldDiff xs '[] = '[] | |
FieldDiff '[] ('(y, v) ': ys) = Addition y v ': FieldDiff '[] ys | |
FieldDiff ('(x, t) ': xs) ('(x, t) ': ys) = NoChange x t ': FieldDiff xs ys | |
FieldDiff ('(x, u) ': xs) ('(x, v) ': ys) = Change x u v ': FieldDiff xs ys | |
FieldDiff ('(x, u) ': xs) ('(y, v) ': ys) = FieldDiffImpl (CmpSymbol x y) '(x, u) '(y, v) xs ys |
type family FieldDiffImpl (b :: Ordering) (x :: (Symbol, Type)) (y :: (Symbol, Type)) (xs :: [(Symbol, Type)]) (ys :: [(Symbol, Type)]) :: [DiffResult] where ... Source #
FieldDiffImpl LT _ y xs ys = FieldDiff xs (y ': ys) | |
FieldDiffImpl GT x '(y, v) xs ys = Addition y v ': FieldDiff (x ': xs) ys |
copyField :: forall name t from to. (HasField' name to t, HasField' name from t) => from -> to -> to Source #
class GTransform (ts :: [DiffResult]) (src :: Type) (dst :: Type) where Source #
gTransform :: dst -> src -> Function ts src dst Source #
Instances
(Generic dst, GUndefinedFields (Rep dst)) => GTransform ([] :: [DiffResult]) src dst Source # | |
Defined in Data.Migration.Internal gTransform :: dst -> src -> Function [] src dst Source # | |
(GTransform ts src dst, HasField' name src t, HasField' name dst t) => GTransform (NoChange name t ': ts) src dst Source # | |
(GTransform ts src dst, HasField' name dst t) => GTransform (Addition name t ': ts) src dst Source # | |
(GTransform ts src dst, HasField' name src ti, HasField' name dst to) => GTransform (Change name ti to ': ts) src dst Source # | |
class GUndefinedFields (o :: * -> *) where Source #
gUndefinedFields :: o x Source #
Instances
GUndefinedFields (K1 _1 t :: Type -> Type) Source # | |
Defined in Data.Migration.Internal gUndefinedFields :: K1 _1 t x Source # | |
(GUndefinedFields o1, GUndefinedFields o2) => GUndefinedFields (o1 :*: o2) Source # | |
Defined in Data.Migration.Internal gUndefinedFields :: (o1 :*: o2) x Source # | |
GUndefinedFields o => GUndefinedFields (M1 _3 _4 o) Source # | |
Defined in Data.Migration.Internal gUndefinedFields :: M1 _3 _4 o x Source # |
undefinedFields :: (Generic t, GUndefinedFields (Rep t)) => t Source #
Don't use this, it's not meant to be useful