hw-polysemy-0.2.4.2: Opinionated polysemy library
Safe HaskellSafe-Inferred
LanguageGHC2021

HaskellWorks.Polysemy.Hedgehog.Workspace

Synopsis

Documentation

newtype Workspace Source #

Constructors

Workspace 

Fields

Instances

Instances details
Generic Workspace Source # 
Instance details

Defined in HaskellWorks.Polysemy.Hedgehog.Workspace.Types

Associated Types

type Rep Workspace :: Type -> Type #

Show Workspace Source # 
Instance details

Defined in HaskellWorks.Polysemy.Hedgehog.Workspace.Types

Eq Workspace Source # 
Instance details

Defined in HaskellWorks.Polysemy.Hedgehog.Workspace.Types

type Rep Workspace Source # 
Instance details

Defined in HaskellWorks.Polysemy.Hedgehog.Workspace.Types

type Rep Workspace = D1 ('MetaData "Workspace" "HaskellWorks.Polysemy.Hedgehog.Workspace.Types" "hw-polysemy-0.2.4.2-4GWM1yCF1lOFPdMSuRtoN7-hedgehog" 'True) (C1 ('MetaCons "Workspace" 'PrefixI 'True) (S1 ('MetaSel ('Just "filePath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)))

workspace :: Member Hedgehog r => Member Log r => Member (Embed IO) r => HasCallStack => FilePath -> Sem (Reader Workspace : r) () -> Sem r () Source #

Create a workspace directory which will exist for at least the duration of the supplied block.

The directory will have the supplied prefix but contain a generated random suffix to prevent interference between tests

The directory will be deleted if the block succeeds, but left behind if the block fails.

moduleWorkspace :: Member Hedgehog r => Member Log r => Member (Embed IO) r => String -> Sem (Reader Workspace : r) () -> Sem r () Source #

Create a workspace directory which will exist for at least the duration of the supplied block.

The directory will have the prefix as "$prefixPath/$moduleName" but contain a generated random suffix to prevent interference between tests

The directory will be deleted if the block succeeds, but left behind if the block fails.

The prefix argument should not contain directory delimeters.

findCabalProjectDir :: Member Hedgehog r => Member (Embed IO) r => Member Log r => FilePath -> Sem r FilePath Source #

Compute the project base. This will be the first parent directory that contains the `cabal.project` file. This should should point to the root directory of the Github project checkout.