restartable-0.3.0.0: Minimal live coding library for model-view-event-update applications.

Safe HaskellNone
LanguageHaskell2010

Control.Restartable.Initial

Description

This module describes values that are initialized from a list of _all optional_ Aeson.Values. Initialization should be fully generic by default.

Synopsis

Documentation

class (FromJSON a, ToJSON a) => Initial a Source #

Special class for values that should give initial value when JSON parse fails.

initial :: Initial a => a Source #

Initial value

initially :: (Generic a, GFromJSON Zero (Rep a)) => a -> Value -> Parser a Source #

Implements FromJSON with a fixed initialization. initializeWith :: (Generic a, GFromJSON Zero (Rep a)) => a -> Value -> Parser a

robustOptions :: Options Source #

JSON encoding options that are more robust to datatype migration.