versioning-0.2.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 #

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

Upgrade from a lower to a higher version by calling adapt on all the intermediary steps. You do not need to define any instance. They are derived automatically if all the intermediary Adapt instances are defined.

Minimal complete definition

upgrade'

Methods

upgrade' :: a v -> a w Source #

Instances

(Adapt v (Incr v w) a, Upgrade (Incr v w) w a) => Upgrade v w a Source # 

Methods

upgrade' :: a v -> a w Source #

Upgrade v v a Source # 

Methods

upgrade' :: a v -> a v Source #

upgrade :: 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.