Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- migrate :: (Data a, Data b) => a -> b -> a
- migrateWith :: (Data a, Data b) => Migration -> a -> b -> a
- standardMigration :: Migration
- treeMigration :: Migration -> Migration
- treeMigrateWith :: (Data a, Data b) => Migration -> a -> b -> Maybe a
- getChildrenSetters :: Data a => Migration -> a -> [GenericT']
- setChildren :: Data a => [GenericT'] -> a -> a
Documentation
migrate :: (Data a, Data b) => a -> b -> a Source #
The standard migration solution, recursing into the data structure and applying standardMigration
.
migrateWith :: (Data a, Data b) => Migration -> a -> b -> a Source #
Still recurse into the data structure, but apply your own given migration.
Often you will want to call migrateWith (standardMigration <> yourMigration)
.
standardMigration :: Migration Source #
Covers standard cases such as matching types, to and from debuggers, to newtypes.
treeMigration :: Migration -> Migration Source #
Wrapping treeMigrateWith
in the newtype.
treeMigrateWith :: (Data a, Data b) => Migration -> a -> b -> Maybe a Source #
The standard migration working horse. Tries to apply the given migration, and if this fails, tries to recurse into the data structure.
setChildren :: Data a => [GenericT'] -> a -> a Source #