essence-of-live-coding-0.2.6: General purpose live coding framework
Safe HaskellNone
LanguageHaskell2010

LiveCoding.Migrate

Synopsis

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 #

The standard migration working horse. Tries to apply the given migration, and if this fails, tries to recurse into the data structure.

sameConstructorMigration :: Migration -> Migration Source #

Assuming that both are algebraic data types, possibly the constructor names match. In that case, we will try and recursively migrate as much data as possible onto the new constructor.

constructorMigration :: Migration -> Migration Source #

Still assuming that both are algebraic data types, but the constructor names don't match. In that case, we will try and recursively fill all the fields new constructor. If this doesn't work, fail.

newtype GenericR' m Source #

Constructors

GR 

Fields

setChildren :: Data a => [GenericT'] -> a -> a Source #