liquidhaskell-cabal-0.1.1.0: Liquid Haskell integration for Cabal and stack

Safe HaskellNone
LanguageHaskell2010

LiquidHaskell.Cabal

Contents

Description

Please see the README for setup and usage instructions.

Synopsis

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 }