doctest-parallel-0.4: Test interactive Haskell examples

Safe Haskell | None
Language | Haskell2010

Test.DocTest.Internal.Nix

Synopsis

- compilerVersionStr :: String
- findDirectoryUp :: (FilePath -> IO (Maybe a)) -> MaybeT IO a
- findDirectoryUpPredicate :: (FilePath -> IO Bool) -> MaybeT IO FilePath
- findCabalProjectRoot :: MaybeT IO FilePath
- findLocalPackageDb :: MaybeT IO FilePath
- inNixShell :: IO Bool
- inNixBuild :: IO Bool
- getLocalCabalPackageDbArgs :: IO [String]
- getLocalNixPackageDbArgs :: IO [String]
- getGlobalPackageDb :: IO String
- getNixGhciArgs :: IO [String]

# Documentation

compilerVersionStr :: String Source #

E.g. `9.0.2`

findDirectoryUp :: (FilePath -> IO (Maybe a)) -> MaybeT IO a Source #

Traverse upwards until one of the following conditions is met:

- Current working directory is either root or a home directory
- The predicate function returns `Just`

findDirectoryUpPredicate :: (FilePath -> IO Bool) -> MaybeT IO FilePath Source #

Like `findDirectoryUp`, but takes a predicate function instead. If the predicate yields `True`, the filepath is returned.

findCabalProjectRoot :: MaybeT IO FilePath Source #

Find the root of the Cabal project relative to the current directory.

findLocalPackageDb :: MaybeT IO FilePath Source #

Find the local package database in `dist-newstyle`.

inNixShell :: IO Bool Source #

Are we running in a Nix shell?

inNixBuild :: IO Bool Source #

Are we running in a Nix build environment?

getLocalCabalPackageDbArgs :: IO [String] Source #

getLocalNixPackageDbArgs :: IO [String] Source #

getGlobalPackageDb :: IO String Source #

Get global package db; used in a NIX_SHELL context

getNixGhciArgs :: IO [String] Source #

Get flags to be used when running in a Nix context (either in a build, or a shell).