Safe Haskell | None |
---|---|
Language | Haskell2010 |
Please see the README for setup and usage instructions.
- liquidHaskellMain :: IO ()
- liquidHaskellHooks :: UserHooks
- liquidHaskellPostBuildHook :: Args -> BuildFlags -> PackageDescription -> LocalBuildInfo -> IO ()
Setup.hs Hooks Kit
liquidHaskellMain :: IO () Source
The simplest method of incorporating LiquidHaskell into a Setup.hs
file.
import LiquidHaskell.Cabal main = liquidHaskellMain
This is equivalent to:
import Distribution.Simple import LiquidHaskell.Cabal main = defaultMainWithHooks liquidHaskellHooks
liquidHaskellHooks :: UserHooks Source
Cabal's simpleUserHooks
configured with liquidHaskellPostBuildHook
in
the postBuild
field. Can be customized with your project's own user hooks.
import Distribution.Simple import LiquidHaskell.Cabal main = defaultMainWithHooks liquidHaskellHooks
This is equivalent to:
import Distribution.Simple import LiquidHaskell.Cabal main = defaultMainWithHooks $ simpleUserHooks { postBuild = liquidHaskellPostBuildHook }
liquidHaskellPostBuildHook :: Args -> BuildFlags -> PackageDescription -> LocalBuildInfo -> IO () Source
The raw build hook, checking the liquidhaskell
flag and executing the
LiquidHaskell binary with appropriate arguments when enabled. Can be hooked
into a UserHooks
map or invoked from within your own custom postBuild
hook.
import Distribution.Simple import LiquidHaskell.Cabal main = defaultMainWithHooks $ simpleUserHooks { postBuild = liquidHaskellPostBuildHook }