Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- maybeMigrateToPair :: (Typeable a, Typeable b, Typeable c) => (t a b -> a) -> (t a b -> b) -> (a -> b -> t a b) -> t a b -> c -> Maybe (t a b)
- maybeMigrateFromPair :: (Typeable a, Typeable b, Typeable c) => (t a b -> a) -> (t a b -> b) -> t a b -> Maybe c
- migrationToComposition :: Migration
- migrationFromComposition :: Migration
- migrationComposition :: Migration
- migrationToParallel :: Migration
- migrationFromParallel :: Migration
- migrationParallel :: Migration
- migrationToChoice :: Migration
- migrationFromChoice :: Migration
- migrationChoice :: Migration
- migrationToFeedback :: Migration
- migrationFromFeedback :: Migration
- migrationFeedback :: Migration
- maybeMigrateToExceptState :: (Typeable state, Typeable state') => ExceptState state e -> state' -> Maybe (ExceptState state e)
- migrationToExceptState :: Migration
- maybeMigrateFromExceptState :: (Typeable state, Typeable state') => ExceptState state e -> Maybe state'
- migrationFromExceptState :: Migration
- migrationExceptState :: Migration
- migrationCell :: Migration
Migrations to and from pairs
Generic migration functions
:: (Typeable a, Typeable b, Typeable c) | |
=> (t a b -> a) | The accessor of the first element |
-> (t a b -> b) | The accessor of the second element |
-> t a b | |
-> Maybe c |
Like maybeMigrateToPair
, but in the other direction.
Again, it is biased with respect to the first element of the pair.
Migrations involving sequential compositions of cells
migrationToComposition :: Migration Source #
Migrate cell
to cell >>> cell'
, and if this fails, to cell' >>> cell
.
migrationFromComposition :: Migration Source #
Migrate cell1 >>> cell2
to cell1
, and if this fails, to cell2
.
migrationComposition :: Migration Source #
Combines all migrations related to composition, favouring migration to compositions.
Migrations involving parallel compositions of cells
migrationToParallel :: Migration Source #
Migrate cell
to cell *** cell'
, and if this fails, to cell' *** cell
.
migrationFromParallel :: Migration Source #
Migrate from cell1 *** cell2
to cell1
, and if this fails, to cell2
.
migrationParallel :: Migration Source #
Combines all migrations related to parallel composition, favouring migration to parallel composition.
Migration involving ArrowChoice
migrationToChoice :: Migration Source #
Migrate cell
to cell ||| cell'
, and if this fails, to cell' ||| cell
.
migrationFromChoice :: Migration Source #
Migrate from cell1 ||| cell2
to cell1
, and if this fails, to cell2
.
migrationChoice :: Migration Source #
Combines all migrations related to choice, favouring migration to choice.
Feedback
migrationToFeedback :: Migration Source #
Migrate from cell
to feedback s cell
, and if this fails, to feedback (cellState cell) cell'
.
migrationFromFeedback :: Migration Source #
Migrate from feedback s cell
to cell
, and if this fails, to Cell { cellState = s, .. }
.
migrationFeedback :: Migration Source #
Combines all migrations related to feedback, favouring migration to feedback.
Control flow
maybeMigrateToExceptState :: (Typeable state, Typeable state') => ExceptState state e -> state' -> Maybe (ExceptState state e) Source #
migrationToExceptState :: Migration Source #
Migration from cell2
to try cell1 >> safe cell2
maybeMigrateFromExceptState :: (Typeable state, Typeable state') => ExceptState state e -> Maybe state' Source #
migrationFromExceptState :: Migration Source #
Migration from try cell1 >> safe cell2
to cell2
migrationExceptState :: Migration Source #
Combines all control flow related migrations
Overall migration
migrationCell :: Migration Source #
Combines all Cell
-related migrations.