versioning-0.3.0.0: Type-safe data versioning.

Safe HaskellNone
LanguageHaskell2010

Versioning.Upgrade

Synopsis

Documentation

class Adapt (v :: V) (w :: V) (a :: V -> Type) where Source #

Adapt from a version to another

Minimal complete definition

adapt

Methods

adapt :: a v -> a w Source #

type Upgrade v w a = Upgrade' (v == w) v w a Source #

This constraint specifies that a value of type a can be upgraded from version v to version w.

upgrade :: forall v w a. Upgrade v w a => a v -> a w Source #

Upgrade from a lower to a higher version by calling adapt on all the intermediary steps.