essence-of-live-coding-0.1.0.2: General purpose live coding framework

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).

Covers standard cases such as matching types, to and from debuggers, to newtypes.

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

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.

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 FieldsunGR :: GenericR m

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