Copyright | (c) Soostone Inc 2020 |
---|---|
License | AllRightsReserved |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- data AppConfig = AppConfig {}
- data RuntimeEventType
- data RuntimeEvent
- type RuntimeEventQueue = TBQueue RuntimeEvent
- data ComboEnv = ComboEnv {}
- newtype ComboT m a = ComboT {
- getComboT :: RWST ComboEnv () TrackingQueryStats m a
- type Combo = ComboT IO
- withObject' :: forall a. Typeable a => (Object -> Parser a) -> Value -> Parser a
- (.:?!) :: FromJSON a => Object -> Text -> Parser (Maybe a)
- class HasAppConfig c where
- appConfig :: Lens' c AppConfig
- acAppName :: Lens' c Text
- acInteractive :: Lens' c Bool
- acLogOptions :: Lens' c LogOptions
- ceLog :: Lens' ComboEnv LogEnv
- ceEventQueue :: Lens' ComboEnv (Maybe RuntimeEventQueue)
- ceAppConfig :: Lens' ComboEnv AppConfig
Documentation
Instances
data RuntimeEventType #
Maintains some basic, human-reportable state over the run of the Spec in order to show progress.
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 |
Instances
Eq RuntimeEventType # | |
Defined in Napkin.Spec.ComboTypes (==) :: RuntimeEventType -> RuntimeEventType -> Bool # (/=) :: RuntimeEventType -> RuntimeEventType -> Bool # | |
Show RuntimeEventType # | |
Defined in Napkin.Spec.ComboTypes showsPrec :: Int -> RuntimeEventType -> ShowS # show :: RuntimeEventType -> String # showList :: [RuntimeEventType] -> ShowS # |
data RuntimeEvent #
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
Eq RuntimeEvent # | |
Defined in Napkin.Spec.ComboTypes (==) :: RuntimeEvent -> RuntimeEvent -> Bool # (/=) :: RuntimeEvent -> RuntimeEvent -> Bool # | |
Show RuntimeEvent # | |
Defined in Napkin.Spec.ComboTypes showsPrec :: Int -> RuntimeEvent -> ShowS # show :: RuntimeEvent -> String # showList :: [RuntimeEvent] -> ShowS # |
type RuntimeEventQueue = TBQueue RuntimeEvent #
Instances
HasAppConfig ComboEnv # | |
Monad m => MonadReader ComboEnv (ComboT m) # | |
ComboT | |
|
Instances
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.
class HasAppConfig c where #