Safe Haskell | None |
---|---|
Language | GHC2021 |
A SqlBackend interpreter that performs a minimal amount of table state management to facilitate dry runs and trivial unwrapping of SqlBackend effects.
It produces a report of used dependencies, but this is not intended for use in the Spec system for figuring out dependencies. User's forced/added dependencies would not show up here, for example. This is meant more for dry runs and simulations.
Synopsis
- data IState = IState {}
- emptyIState :: IState
- createReference :: forall (r :: EffectRow). Member (State IState :: (Type -> Type) -> Type -> Type) r => Ref Table -> Sem r ()
- useDependency :: forall (r :: EffectRow). (Member (State IState :: (Type -> Type) -> Type -> Type) r, Member (Reader HiddenDependencies) r) => Ref Table -> Sem r ()
- newtype TargetExists = TargetExists Bool
- runSqlReadFake :: forall {k} (r :: EffectRow) (b :: k) a. Members '[State IState :: (Type -> Type) -> Type -> Type, Reader HiddenDependencies, Input (Transformed TargetName) :: (Type -> Type) -> Type -> Type] r => TargetExists -> Sem ((SqlRead b :: (Type -> Type) -> Type -> Type) ': r) a -> Sem r a
- runAnnotateWriteFake :: forall {k} (r :: EffectRow) (b :: k) a. (Member (State IState :: (Type -> Type) -> Type -> Type) r, Member (Reader HiddenDependencies) r) => Sem ((AnnotateWrite b :: (Type -> Type) -> Type -> Type) ': r) a -> Sem r a
- runAnnotateReadFake :: forall {k} (r :: EffectRow) (b :: k) a. (Member (State IState :: (Type -> Type) -> Type -> Type) r, Member (Reader HiddenDependencies) r) => Sem ((AnnotateRead b :: (Type -> Type) -> Type -> Type) ': r) a -> Sem r a
- runSqlWriteFake :: forall (r :: EffectRow) b a. (Member (State IState :: (Type -> Type) -> Type -> Type) r, Member (Reader HiddenDependencies) r) => Sem ((SqlWrite b :: (Type -> Type) -> Type -> Type) ': r) a -> Sem r a
- runExternalFakeSuccess :: forall (effs :: EffectRow) a. Members '[State IState :: (Type -> Type) -> Type -> Type, Input (Transformed TargetName) :: (Type -> Type) -> Type -> Type] effs => Sem ((External :: (Type -> Type) -> Type -> Type) ': effs) a -> Sem effs a
Documentation
IState | |
|
Instances
emptyIState :: IState #
createReference :: forall (r :: EffectRow). Member (State IState :: (Type -> Type) -> Type -> Type) r => Ref Table -> Sem r () #
Simulate creation of a table
useDependency :: forall (r :: EffectRow). (Member (State IState :: (Type -> Type) -> Type -> Type) r, Member (Reader HiddenDependencies) r) => Ref Table -> Sem r () #
Simulate use of a table
newtype TargetExists #
runSqlReadFake :: forall {k} (r :: EffectRow) (b :: k) a. Members '[State IState :: (Type -> Type) -> Type -> Type, Reader HiddenDependencies, Input (Transformed TargetName) :: (Type -> Type) -> Type -> Type] r => TargetExists -> Sem ((SqlRead b :: (Type -> Type) -> Type -> Type) ': r) a -> Sem r a #
runAnnotateWriteFake :: forall {k} (r :: EffectRow) (b :: k) a. (Member (State IState :: (Type -> Type) -> Type -> Type) r, Member (Reader HiddenDependencies) r) => Sem ((AnnotateWrite b :: (Type -> Type) -> Type -> Type) ': r) a -> Sem r a #
runAnnotateReadFake :: forall {k} (r :: EffectRow) (b :: k) a. (Member (State IState :: (Type -> Type) -> Type -> Type) r, Member (Reader HiddenDependencies) r) => Sem ((AnnotateRead b :: (Type -> Type) -> Type -> Type) ': r) a -> Sem r a #