Cabal-2.2.0.1: A framework for packaging Haskell software

CopyrightIsaac Jones 2003-2005
LicenseBSD3
Maintainer[email protected]
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Distribution.Simple.UserHooks

Description

This defines the API that Setup.hs scripts can use to customise the way the build works. This module just defines the UserHooks type. The predefined sets of hooks that implement the Simple, Make and Configure build systems are defined in Distribution.Simple. The UserHooks is a big record of functions. There are 3 for each action, a pre, post and the action itself. There are few other miscellaneous hooks, ones to extend the set of programs and preprocessors and one to override the function used to read the .cabal file.

This hooks type is widely agreed to not be the right solution. Partly this is because changes to it usually break custom Setup.hs files and yet many internal code changes do require changes to the hooks. For example we cannot pass any extra parameters to most of the functions that implement the various phases because it would involve changing the types of the corresponding hook. At some point it will have to be replaced.

Synopsis

Documentation

data UserHooks Source #

Hooks allow authors to add specific functionality before and after a command is run, and also to specify additional preprocessors.

  • WARNING: The hooks interface is under rather constant flux as we try to understand users needs. Setup files that depend on this interface may break in future releases.

Constructors

UserHooks 

Fields

type Args = [String] Source #

emptyUserHooks :: UserHooks Source #

Empty UserHooks which do nothing.