napkin-0.5.9
Copyright(c) Soostone Inc 2020
LicenseAllRightsReserved
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Napkin.Spec.ComboTypes

Description

 
Synopsis

Documentation

data RuntimeEventType #

Maintains some basic, human-reportable state over the run of the Spec in order to show progress.

Constructors

RuntimeEventStart

generated when a Spec starts to run

RuntimeEventDone TrackingQueryStats

generated when a Spec successfully completes

RuntimeEventFailed String

generated when a Spec throws an error

RuntimeEventSkipped

generated when a Spec update is skipped

data RuntimeEvent #

Constructors

RuntimeEvent (Ref Table) RuntimeEventType 
RuntimeEventComplete TrackingQueryStats

generated when napkin is done running

RuntimeEventFatal

generated from the napkin backend for fatal events (such as failed validation)

Instances

Instances details
Eq RuntimeEvent # 
Instance details

Defined in Napkin.Spec.ComboTypes

Show RuntimeEvent # 
Instance details

Defined in Napkin.Spec.ComboTypes

newtype ComboT m a #

Constructors

ComboT 

Instances

Instances details
MonadTrans ComboT # 
Instance details

Defined in Napkin.Spec.ComboTypes

Methods

lift :: Monad m => m a -> ComboT m a #

MonadTransControl ComboT # 
Instance details

Defined in Napkin.Spec.ComboTypes

Associated Types

type StT ComboT a #

Methods

liftWith :: Monad m => (Run ComboT -> m a) -> ComboT m a #

restoreT :: Monad m => m (StT ComboT a) -> ComboT m a #

Monad m => MonadReader ComboEnv (ComboT m) # 
Instance details

Defined in Napkin.Spec.ComboTypes

Methods

ask :: ComboT m ComboEnv #

local :: (ComboEnv -> ComboEnv) -> ComboT m a -> ComboT m a #

reader :: (ComboEnv -> a) -> ComboT m a #

(Monad m, MonadBase m m) => MonadBase m (ComboT m) # 
Instance details

Defined in Napkin.Spec.ComboTypes

Methods

liftBase :: m α -> ComboT m α #

(MonadBase n (ComboT m), MonadBaseControl n m) => MonadBaseControl n (ComboT m) # 
Instance details

Defined in Napkin.Spec.ComboTypes

Associated Types

type StM (ComboT m) a #

Methods

liftBaseWith :: (RunInBase (ComboT m) n -> n a) -> ComboT m a #

restoreM :: StM (ComboT m) a -> ComboT m a #

Monad m => Monad (ComboT m) # 
Instance details

Defined in Napkin.Spec.ComboTypes

Methods

(>>=) :: ComboT m a -> (a -> ComboT m b) -> ComboT m b #

(>>) :: ComboT m a -> ComboT m b -> ComboT m b #

return :: a -> ComboT m a #

Functor m => Functor (ComboT m) # 
Instance details

Defined in Napkin.Spec.ComboTypes

Methods

fmap :: (a -> b) -> ComboT m a -> ComboT m b #

(<$) :: a -> ComboT m b -> ComboT m a #

MonadFix m => MonadFix (ComboT m) # 
Instance details

Defined in Napkin.Spec.ComboTypes

Methods

mfix :: (a -> ComboT m a) -> ComboT m a #

MonadFail m => MonadFail (ComboT m) # 
Instance details

Defined in Napkin.Spec.ComboTypes

Methods

fail :: String -> ComboT m a #

Monad m => Applicative (ComboT m) # 
Instance details

Defined in Napkin.Spec.ComboTypes

Methods

pure :: a -> ComboT m a #

(<*>) :: ComboT m (a -> b) -> ComboT m a -> ComboT m b #

liftA2 :: (a -> b -> c) -> ComboT m a -> ComboT m b -> ComboT m c #

(*>) :: ComboT m a -> ComboT m b -> ComboT m b #

(<*) :: ComboT m a -> ComboT m b -> ComboT m a #

MonadIO m => MonadIO (ComboT m) # 
Instance details

Defined in Napkin.Spec.ComboTypes

Methods

liftIO :: IO a -> ComboT m a #

MonadThrow m => MonadThrow (ComboT m) # 
Instance details

Defined in Napkin.Spec.ComboTypes

Methods

throwM :: Exception e => e -> ComboT m a #

MonadCatch m => MonadCatch (ComboT m) # 
Instance details

Defined in Napkin.Spec.ComboTypes

Methods

catch :: Exception e => ComboT m a -> (e -> ComboT m a) -> ComboT m a #

MonadMask m => MonadMask (ComboT m) # 
Instance details

Defined in Napkin.Spec.ComboTypes

Methods

mask :: ((forall a. ComboT m a -> ComboT m a) -> ComboT m b) -> ComboT m b #

uninterruptibleMask :: ((forall a. ComboT m a -> ComboT m a) -> ComboT m b) -> ComboT m b #

generalBracket :: ComboT m a -> (a -> ExitCase b -> ComboT m c) -> (a -> ComboT m b) -> ComboT m (b, c) #

MonadIO m => Katip (ComboT m) # 
Instance details

Defined in Napkin.Spec.ComboTypes

Methods

getLogEnv :: ComboT m LogEnv #

localLogEnv :: (LogEnv -> LogEnv) -> ComboT m a -> ComboT m a #

(Monad m, MonadBaseControl IO (ComboT m)) => MonadQueryStats (ComboT m) # 
Instance details

Defined in Napkin.Spec.ComboTypes

type StT ComboT a # 
Instance details

Defined in Napkin.Spec.ComboTypes

type StT ComboT a = (a, TrackingQueryStats, ())
type StM (ComboT m) a # 
Instance details

Defined in Napkin.Spec.ComboTypes

type StM (ComboT m) a = ComposeSt ComboT m a

type Combo = ComboT IO #

Versions of the FromJSON helpers that use Typeable to cut down boilerplate

withObject' :: forall a. Typeable a => (Object -> Parser a) -> Value -> Parser a #

Functions like withObject can be used to provide nice type error messages rather than a non-exhaustive pattern match on Value:

> instance FromJSON Foo where
>   parseJSON = withObject' parseFoo
>     where
>       parseFoo v = Foo <$> v .: "bar" <*> v .: "baz"

(.:?!) :: FromJSON a => Object -> Text -> Parser (Maybe a) #

Restores previous behavior of .:? from aeson < 0.10: the field can either be null or completely omitted. This works by turning your parser into a Maybe a which is itself optional, thus (Parser (Maybe (Maybe a)) and then flattens the result into 1 level.