HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduletmp-postgres-1.35.0.0Haskell2010

Database.Postgres.Temp.Internal.Config

This module provides types and functions for combining partial configs into a complete configs to ultimately make a Plan.

This module has two classes of types.

Types like ProcessConfig that could be used by any library that needs to combine process options.

Finally it has types and functions for creating Plans that use temporary resources. This is used to create the default behavior of Database.Postgres.Temp.startConfig and related functions. |

  • 9 types
  • 46 values
datadata Accum a
#

Accum is a monoid.

It's <> behavior is analogous to 1 and 0 with *. Think of DontCare as 1 and Zlich as 0.

The behavior of Merge is like Justs.

Constructors

Instances7Functor, Applicative, Eq, Ord, Show, Semigroup, …
  • Functor AccumDefined in tmp-postgres-1.35.0.0 · Database.Postgres.Temp.Internal.Config
  • Applicative AccumDefined in tmp-postgres-1.35.0.0 · Database.Postgres.Temp.Internal.Config
  • Eq a => Eq (Accum a)Defined in tmp-postgres-1.35.0.0 · Database.Postgres.Temp.Internal.Config
  • Ord a => Ord (Accum a)Defined in tmp-postgres-1.35.0.0 · Database.Postgres.Temp.Internal.Config
  • Show a => Show (Accum a)Defined in tmp-postgres-1.35.0.0 · Database.Postgres.Temp.Internal.Config
  • Semigroup a => Semigroup (Accum a)Defined in tmp-postgres-1.35.0.0 · Database.Postgres.Temp.Internal.Config
  • Monoid a => Monoid (Accum a)Defined in tmp-postgres-1.35.0.0 · Database.Postgres.Temp.Internal.Config
datadata EnvironmentVariables
#

The environment variables can be declared to inherit from the running process or they can be specifically added.

Instances7Eq, Show, Generic, Semigroup, Monoid, Pretty, …
datadata CommandLineArgs
#

A type to help combine command line Args.

Constructors

  • CommandLineArgs
    • keyBased :: Map String (Maybe String)

      Args of the form -h foo, --host=foo and --switch. The key is mappended with value so the key should include the space or equals (as shown in the first two examples respectively). The Dual monoid is used so the last key wins.

    • indexBased :: Map Int String

      Args that appear at the end of the key based Args. The Dual monoid is used so the last key wins.

Instances7Eq, Show, Generic, Semigroup, Monoid, Pretty, …
datadata ProcessConfig
#

Process configuration

Constructors

Instances7Eq, Show, Generic, Semigroup, Monoid, Pretty, …

A type to track whether a file is temporary and needs to be cleaned up.

Instances7Eq, Ord, Show, Generic, NFData, Pretty, …
datadata DirectoryType
#

Used to specify a Temporary folder that is automatically cleaned up or a Permanent folder which is not automatically cleaned up.

Constructors

Instances6Eq, Ord, Show, Semigroup, Monoid, Pretty
datadata Config
#

The high level options for overriding default behavior.

Constructors

Instances5Generic, Semigroup, Monoid, Pretty, Rep
datadata CopyDirectoryCommand
#

Copy command used to create a data directory. If initdb used to create the data directory directly this is not needed.

If destinationDirectory is Nothing then the dataDirectory (which might be generated) is used.

Instances4Eq, Ord, Show, Pretty
valuetoPlan
  1. :: Bool

    Make initdb options.

  2. -> Bool

    Make createdb options.

  3. -> Int

    The port.

  4. -> FilePath

    Socket directory.

  5. -> FilePath

    The postgres data directory.

  6. -> Config
#

Create a Config that sets the command line options of all processes (initdb, postgres and createdb). This the generated plan that is combined with the extra plan from Database.Postgres.Temp.startConfig.

datadata Resources
#

Resources holds a description of the temporary folders (if there are any) and includes the final Plan that can be used with startPlan. See setupConfig for an example of how to create a Resources.

Constructors

Instances1Pretty
  • Pretty ResourcesDefined in tmp-postgres-1.35.0.0 · Database.Postgres.Temp.Internal.Config

Attempt to create a config from a Options. This is useful if want to create a database owned by a specific user you will also log in as among other use cases. It is possible some Options are not supported so don't hesitate to open an issue on github if you find one.