napkin-1.0.0
Safe HaskellNone
LanguageGHC2021

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) (rs :: [(Type -> Type) -> Type -> Type]) 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, External :: (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] r, r ~ (BackendSpecificEffect b ': ((External :: (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) ': rs)))))), DumpBackendRequirements b, RunBackendEffect b) => Sem ((Output ExtraDependencies :: (Type -> Type) -> Type -> Type) ': r) a -> Sem r ((Dependencies, Artifacts, [DumpItem b]), a) #

runSqlFake :: 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 (BackendSpecificEffect bk ': ((External :: (Type -> Type) -> Type -> Type) ': ((SqlWrite bk :: (Type -> Type) -> Type -> Type) ': ((SqlRead bk :: (Type -> Type) -> Type -> Type) ': ((AnnotateRead bk :: (Type -> Type) -> Type -> Type) ': ((AnnotateWrite bk :: (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] 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 -> ExternMacros -> 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 #