hw-polysemy-0.3.0.1: Opinionated polysemy library
Safe HaskellSafe-Inferred
LanguageHaskell2010

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.3.0.1-JPl7U2Y5mMRKUA3JdKAeMU-hedgehog" 'True) (C1 ('MetaCons "Workspace" 'PrefixI 'True) (S1 ('MetaSel ('Just "filePath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)))

workspace :: HasCallStack => 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 :: HasCallStack => 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.