module Polysemy.Test.Data.Test where
import Path (Abs, Dir, File, Path, Rel)
data Test :: Effect where
TestDir :: Test m (Path Abs Dir)
TempDir :: Path Rel Dir -> Test m (Path Abs Dir)
TempFile :: [Text] -> Path Rel File -> Test m (Path Abs File)
TempFileContent :: Path Rel File -> Test m Text
FixturePath :: Path Rel p -> Test m (Path Abs p)
Fixture :: Path Rel File -> Test m Text
makeSem_ ''Test
testDir ::
∀ r .
Member Test r =>
Sem r (Path Abs Dir)
tempDir ::
∀ r .
Member Test r =>
Path Rel Dir ->
Sem r (Path Abs Dir)
tempFile ::
∀ r .
Member Test r =>
[Text] ->
Path Rel File ->
Sem r (Path Abs File)
tempFileContent ::
∀ r .
Member Test r =>
Path Rel File ->
Sem r Text
fixturePath ::
∀ p r .
Member Test r =>
Path Rel p ->
Sem r (Path Abs p)
fixture ::
∀ r .
Member Test r =>
Path Rel File ->
Sem r Text