Safe Haskell | None |
---|---|
Language | GHC2021 |
Synopsis
- newtype YamlParseError = YamlParseError Text
- type LoadYamlConstraint backend = (SpecBackend backend, Default (DbBackendOptions backend), Show (DbBackendOptions backend), FromJSON (DbBackendOptions backend), Eq (BackendTableMeta backend), Show (BackendTableMeta backend), RunBackendEffect backend, RunBackendConn backend, DumpBackendRequirements backend, HasBackendQueryStats backend, BackendMetaConstraints backend, SqlConcat backend)
- type CliAction (m :: k -> Type) (a :: k) = forall b. LoadYamlConstraint b => b -> YamlSpec b -> Value -> m a
- loadYamlFile :: MonadIO m => SpecFilesWithOverrides -> CliAction m a -> m (Either NapkinError a)
- loadYamlFile' :: (MonadError NapkinError m, MonadIO m) => SpecFilesWithOverrides -> CliAction m a -> m a
- loadYaml' :: Monad m => Value -> Maybe Patch -> CliAction m a -> m (Either Text a)
- loadHaskellModules :: (ToDbBackend bk, Typeable bk, MonadIO m) => InterpreterInstance -> YamlSpec bk -> m (Either HaskellEvaluationError ())
- interpretTables :: forall bk (m :: Type -> Type). (ToDbBackend bk, Typeable bk, MonadIO m) => InterpreterInstance -> YamlSpec bk -> ExceptT HaskellEvaluationError m (SpecProgramArguments, Spec bk ())
- interpretHaskellSpec :: (ToDbBackend bk, Typeable bk) => InterpreterInstance -> YamlSpec bk -> ExceptT HaskellEvaluationError (Spec bk) ()
- interpretYamlToSpec :: forall b (m :: Type -> Type). (MonadIO m, ReifiesBackend b, ToDbBackend b, Typeable b) => LogEnv -> RuntimeEnv -> YamlSpec b -> SpecMetaArgs -> ExceptT NapkinError m (RawInterpretedSpec b)
- interpretYamlToSpec' :: forall b (m :: Type -> Type). (MonadIO m, ToDbBackend b, Typeable b) => LogEnv -> RuntimeEnv -> YamlSpec b -> SpecMetaArgs -> ExceptT YamlSpecInterpretError m (RawInterpretedSpec b)
- interpretTable :: forall bk (m :: Type -> Type). (MonadIO m, Typeable bk) => InterpreterInstance -> SpecTableName -> YamlTableSpec bk -> ExceptT HaskellEvaluationError m (SpecProgramArguments, Spec bk ())
- interpretSpec :: Typeable b => InterpreterInstance -> Typed (Spec b ()) ModuleFunction -> ExceptT HaskellEvaluationError (Spec b) ()
- evalHsFun :: forall (m :: Type -> Type) b. (Typeable b, MonadIO m) => InterpreterInstance -> Typed b ModuleFunction -> ExceptT HaskellEvaluationError m b
- specMerge :: SpecFileArrayMergeStrategy -> Value -> Value -> Value
Documentation
newtype YamlParseError #
Instances
Exception YamlParseError # | |
Defined in Napkin.Spec.Yaml.Interpret | |
Show YamlParseError # | |
Defined in Napkin.Spec.Yaml.Interpret showsPrec :: Int -> YamlParseError -> ShowS # show :: YamlParseError -> String # showList :: [YamlParseError] -> ShowS # | |
Eq YamlParseError # | |
Defined in Napkin.Spec.Yaml.Interpret (==) :: YamlParseError -> YamlParseError -> Bool # (/=) :: YamlParseError -> YamlParseError -> Bool # |
type LoadYamlConstraint backend = (SpecBackend backend, Default (DbBackendOptions backend), Show (DbBackendOptions backend), FromJSON (DbBackendOptions backend), Eq (BackendTableMeta backend), Show (BackendTableMeta backend), RunBackendEffect backend, RunBackendConn backend, DumpBackendRequirements backend, HasBackendQueryStats backend, BackendMetaConstraints backend, SqlConcat backend) #
type CliAction (m :: k -> Type) (a :: k) = forall b. LoadYamlConstraint b => b -> YamlSpec b -> Value -> m a #
loadYamlFile :: MonadIO m => SpecFilesWithOverrides -> CliAction m a -> m (Either NapkinError a) #
loadYamlFile' :: (MonadError NapkinError m, MonadIO m) => SpecFilesWithOverrides -> CliAction m a -> m a #
loadHaskellModules :: (ToDbBackend bk, Typeable bk, MonadIO m) => InterpreterInstance -> YamlSpec bk -> m (Either HaskellEvaluationError ()) #
The main entry point interpreting a given YAML spec file as a
Spec
value ready to run via executeSpec
This function is intended to unroll/interpret as much as possible to get the spec in its final state ready to be actually run.
interpretTables :: forall bk (m :: Type -> Type). (ToDbBackend bk, Typeable bk, MonadIO m) => InterpreterInstance -> YamlSpec bk -> ExceptT HaskellEvaluationError m (SpecProgramArguments, Spec bk ()) #
interpretHaskellSpec :: (ToDbBackend bk, Typeable bk) => InterpreterInstance -> YamlSpec bk -> ExceptT HaskellEvaluationError (Spec bk) () #
interpretYamlToSpec :: forall b (m :: Type -> Type). (MonadIO m, ReifiesBackend b, ToDbBackend b, Typeable b) => LogEnv -> RuntimeEnv -> YamlSpec b -> SpecMetaArgs -> ExceptT NapkinError m (RawInterpretedSpec b) #
interpretYamlToSpec' :: forall b (m :: Type -> Type). (MonadIO m, ToDbBackend b, Typeable b) => LogEnv -> RuntimeEnv -> YamlSpec b -> SpecMetaArgs -> ExceptT YamlSpecInterpretError m (RawInterpretedSpec b) #
interpretTable :: forall bk (m :: Type -> Type). (MonadIO m, Typeable bk) => InterpreterInstance -> SpecTableName -> YamlTableSpec bk -> ExceptT HaskellEvaluationError m (SpecProgramArguments, Spec bk ()) #
Main entry point for fully interpreting a given table's entry in the YAML file.
interpretSpec :: Typeable b => InterpreterInstance -> Typed (Spec b ()) ModuleFunction -> ExceptT HaskellEvaluationError (Spec b) () #
evalHsFun :: forall (m :: Type -> Type) b. (Typeable b, MonadIO m) => InterpreterInstance -> Typed b ModuleFunction -> ExceptT HaskellEvaluationError m b #