napkin-runtime-2.0.0
Safe HaskellNone
LanguageGHC2024

Napkin.Run.Effects.Runtime

Description

A module to adapt our effect stack for use in Spec pipelines. Ideally, the Spec machinery would only use this module to access Effects related concerns.

Synopsis

Documentation

interceptDiscoverDependencies :: forall b (r :: EffectRow) a. (Members '[Assertion :: (Type -> Type) -> Type -> Type, AnnotateWrite b :: (Type -> Type) -> Type -> Type, AnnotateRead b :: (Type -> Type) -> Type -> Type, SqlRead b :: (Type -> Type) -> Type -> Type, BackendSpecificEffect b, SqlWrite b :: (Type -> Type) -> Type -> Type, Input (Transformed HiddenDependencies) :: (Type -> Type) -> Type -> Type, Input (Transformed HiddenArtifacts) :: (Type -> Type) -> Type -> Type, Input (Transformed TargetName) :: (Type -> Type) -> Type -> Type, Log :: (Type -> Type) -> Type -> Type, External :: (Type -> Type) -> Type -> Type, Output TableMemo :: (Type -> Type) -> Type -> Type] r, DumpBackendRequirements b, RunBackendEffect b) => Sem ((Output ExtraDependencies :: (Type -> Type) -> Type -> Type) ': ((Output Artifacts :: (Type -> Type) -> Type -> Type) ': ((Output Dependencies :: (Type -> Type) -> Type -> Type) ': (Reader TableMemos ': r)))) a -> Sem r ((Dependencies, Artifacts, [DumpItem b]), a) #

interceptDiscoverDependenciesCommon :: forall b (r :: EffectRow) a. (Members '[Assertion :: (Type -> Type) -> Type -> Type, AnnotateWrite b :: (Type -> Type) -> Type -> Type, AnnotateRead b :: (Type -> Type) -> Type -> Type, SqlRead b :: (Type -> Type) -> Type -> Type, BackendSpecificEffect b, SqlWrite b :: (Type -> Type) -> Type -> Type, Input (Transformed HiddenDependencies) :: (Type -> Type) -> Type -> Type, Input (Transformed HiddenArtifacts) :: (Type -> Type) -> Type -> Type, Log :: (Type -> Type) -> Type -> Type, External :: (Type -> Type) -> Type -> Type, Output TableMemo :: (Type -> Type) -> Type -> Type] r, DumpBackendRequirements b, RunBackendEffect b) => Sem ((Output ExtraDependencies :: (Type -> Type) -> Type -> Type) ': ((Output Artifacts :: (Type -> Type) -> Type -> Type) ': ((Output Dependencies :: (Type -> Type) -> Type -> Type) ': (Reader TableMemos ': r)))) a -> Sem r ((Dependencies, Artifacts, [DumpItem b]), a) #

runRealTemporaryTargetName :: forall (r :: EffectRow) a. Members '[Input RandomToken :: (Type -> Type) -> Type -> Type, Time :: (Type -> Type) -> Type -> Type] r => Ref Table -> Sem ((Input TemporaryTableName :: (Type -> Type) -> Type -> Type) ': r) a -> Sem r a #

runSqlFakeTableEnv :: forall bk (r :: EffectRow) a. (Members '[Input (Transformed TargetName) :: (Type -> Type) -> Type -> Type, Reader HiddenDependencies, Input RandomToken :: (Type -> Type) -> Type -> Type, FatalError :: (Type -> Type) -> Type -> Type] r, RunBackendEffect bk) => TargetExists -> Sem ((External :: (Type -> Type) -> Type -> Type) ': ((SqlRead bk :: (Type -> Type) -> Type -> Type) ': (BackendSpecificEffect bk ': ((SqlWrite bk :: (Type -> Type) -> Type -> Type) ': ((AnnotateRead bk :: (Type -> Type) -> Type -> Type) ': ((AnnotateWrite bk :: (Type -> Type) -> Type -> Type) ': ((State IState :: (Type -> Type) -> Type -> Type) ': r))))))) a -> Sem r (IState, a) #

runSqlFake :: forall bk (r :: EffectRow) a. (Members '[Reader HiddenDependencies, Input RandomToken :: (Type -> Type) -> Type -> Type, FatalError :: (Type -> Type) -> Type -> Type] r, RunBackendEffect bk) => Sem ((SqlRead bk :: (Type -> Type) -> Type -> Type) ': (BackendSpecificEffect bk ': ((SqlWrite bk :: (Type -> Type) -> Type -> Type) ': ((AnnotateRead bk :: (Type -> Type) -> Type -> Type) ': ((AnnotateWrite bk :: (Type -> Type) -> Type -> Type) ': ((State IState :: (Type -> Type) -> Type -> Type) ': r)))))) a -> Sem r (IState, a) #

runSqlFakeCommon :: forall bk (r :: EffectRow) a. (Members '[Reader HiddenDependencies, Input RandomToken :: (Type -> Type) -> Type -> Type, FatalError :: (Type -> Type) -> Type -> Type] r, RunBackendEffect bk) => Sem (BackendSpecificEffect bk ': ((SqlWrite bk :: (Type -> Type) -> Type -> Type) ': ((AnnotateRead bk :: (Type -> Type) -> Type -> Type) ': ((AnnotateWrite bk :: (Type -> Type) -> Type -> Type) ': ((State IState :: (Type -> Type) -> Type -> Type) ': r))))) a -> Sem r (IState, a) #

runSqlReal :: forall b (r :: EffectRow) a (m :: Type -> Type). (Members '[Embed m, FatalError :: (Type -> Type) -> Type -> Type, Log :: (Type -> Type) -> Type -> Type, Reader QueryTransformer, Output ExtraDependencies :: (Type -> Type) -> Type -> Type, Assertion :: (Type -> Type) -> Type -> Type, Time :: (Type -> Type) -> Type -> Type, Output TableMemo :: (Type -> Type) -> Type -> Type, Reader TableMemos] r, SqlReadIO m b, SqlWriteIO m b, AnnotateWriteIO m b, AnnotateReadIO m b, TemplateIO m b, DumpBackendRequirements b, RunBackendEffect b) => BackendConn b -> RuntimeEnv -> Maybe (IORef [(DumpItem b, UTCTime)]) -> Sem (BackendSpecificEffect b ': ((External :: (Type -> Type) -> Type -> Type) ': ((Template :: (Type -> Type) -> Type -> Type) ': ((SqlWrite b :: (Type -> Type) -> Type -> Type) ': ((SqlRead b :: (Type -> Type) -> Type -> Type) ': ((AnnotateRead b :: (Type -> Type) -> Type -> Type) ': ((AnnotateWrite b :: (Type -> Type) -> Type -> Type) ': r))))))) a -> Sem r a #

runSqlParsing :: forall b (r :: EffectRow) (m :: Type -> Type) a. (TemplateIO m b, Members '[Embed m, SqlWrite b :: (Type -> Type) -> Type -> Type, Output ExtraDependencies :: (Type -> Type) -> Type -> Type, SqlRead b :: (Type -> Type) -> Type -> Type, Log :: (Type -> Type) -> Type -> Type, Error NapkinEffectError :: (Type -> Type) -> Type -> Type] r) => RuntimeEnv -> SQLDialect -> Maybe (Sem ((SqlParse :: (Type -> Type) -> Type -> Type) ': ((SqlRender :: (Type -> Type) -> Type -> Type) ': (Reader SQLDialect ': r))) a -> Sem ((SqlParse :: (Type -> Type) -> Type -> Type) ': ((SqlRender :: (Type -> Type) -> Type -> Type) ': (Reader SQLDialect ': r))) a) -> Sem (Reader ConnectionString ': ((LoadQuery :: (Type -> Type) -> Type -> Type) ': ((LocalFile :: (Type -> Type) -> Type -> Type) ': ((Template :: (Type -> Type) -> Type -> Type) ': ((SqlParse :: (Type -> Type) -> Type -> Type) ': ((SqlRender :: (Type -> Type) -> Type -> Type) ': (Reader SQLDialect ': r))))))) a -> Sem r a #

runOutputListIORefWithTS :: forall o (r :: EffectRow) a (n :: Type -> Type). (Member (Embed n) r, MonadIO n, Member (Time :: (Type -> Type) -> Type -> Type) r) => IORef [(o, UTCTime)] -> Sem ((Output o :: (Type -> Type) -> Type -> Type) ': r) a -> Sem r a #

runCoreFake :: forall (m :: Type -> Type) (r :: EffectRow) a. (Member (Embed m) r, MonadIO m) => Sem ((Input RandomToken :: (Type -> Type) -> Type -> Type) ': ((Time :: (Type -> Type) -> Type -> Type) ': ((Log :: (Type -> Type) -> Type -> Type) ': r))) a -> Sem r a #

runCoreReal :: forall (m :: Type -> Type) (r :: EffectRow) a. (Member (Embed m) r, Katip m) => LogItem -> Sem ((Input RandomToken :: (Type -> Type) -> Type -> Type) ': ((Time :: (Type -> Type) -> Type -> Type) ': ((Log :: (Type -> Type) -> Type -> Type) ': r))) a -> Sem r a #