polysemy-scoped-fs-0.1.0.0: Well-typed filesystem operation effects.
Copyright(c) Hisaket VioletRed 2022
LicenseAGPL-3.0-or-later
Maintainerhisaket@outlook.jp
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Polysemy.Scoped.Path.Isolation

Description

This module provides methods that allow for isolating effects inside or outside the scope locally.

It will be useful when using the effects for virtualization or containerization such as libvirt or Docker safely.

Synopsis

Documentation

isolatingScopedP :: Member (ScopedP path resource effect) r => path -> InterpretersFor '[Tagged 'Inner effect, Input path, Tagged 'Outer (Bundle r)] r Source #

Variant of scopedP that can isolate effects inside or outside the scope locally.

isolatingScopedPSub :: forall es path resource effect r. (Member (ScopedP path resource effect) r, Members es r) => path -> InterpretersFor '[Tagged 'Inner effect, Input path, Tagged 'Outer (Bundle es)] r Source #

Variant of scopedP that can isolate effects inside or outside the scope locally. A version that can isolate only a subset of effects in regards to outside the scope.

isolatingScopedPSubUsing :: forall es path resource effect r. Member (ScopedP path resource effect) r => (forall e. ElemOf e es -> ElemOf e r) -> path -> InterpretersFor '[Tagged 'Inner effect, Input path, Tagged 'Outer (Bundle es)] r Source #

Variant of scopedP that can isolate effects inside or outside the scope locally.

data ScopeSide Source #

Constructors

Inner

A tag type that represents effects inside the scope.

Outer

A tag type that represents effects outside the scope.

inScope :: Member (Tagged Inner (Bundle es)) r => Sem es a -> Sem r a Source #

Isolate only effects inside the scope.

inScope_single :: Member (Tagged Inner eff) r => Sem '[eff] a -> Sem r a Source #

Isolate only effects inside the scope. No bundle version.

outScope :: Member (Tagged Outer (Bundle es)) r => Sem es a -> Sem r a Source #

Isolate only effects outside the scope.