/liquidhaskell-cabal-demo

🚤 Test drive Liquid Haskell integration for Cabal and Stack

Primary LanguageHaskellCreative Commons Zero v1.0 UniversalCC0-1.0

liquidhaskell-cabal-demo

Demo of Liquid Haskell integration for Cabal and Stack.

Hackage Hackage-Deps

What's This?

This is a sample project set up with liquidhaskell-cabal. It includes:

  • A .cabal file configured for liquidhaskell-cabal, including custom LiquidHaskell flags for each component of the package.
  • A Setup.hs file file set up to hook liquidhaskell-cabal into the build process.

Pre-Flight Setup

To use LiquidHaskell at all, you'll need to have the LiquidHaskell binary installed and available in your $PATH, via one of:

stack install liquidhaskell # if you're using Stack
cabal install liquidhaskell # if you're using Cabal directly

(Please make sure you have a version >= 0.6.0.0 installed.)

If you're using Cabal <1.24, you'll need to install the liquidhaskell-cabal package manually before trying to build this project, to make it available to the Setup.hs file.

cabal install liquidhaskell-cabal-0.2.1.0

Stack and Cabal >=1.24 can automatically handle Setup.hs dependencies.

Test Drive

Once everything is set up, this sample project can be built with one of:

stack build # if you're using Stack
cabal build # if you're using Cabal directly

This will do a normal build without LiquidHaskell active. To build and verify with LiquidHaskell, run one of:

stack build --flag liquidhaskell-cabal-demo:liquidhaskell # if you're using Stack
cabal configure -fliquidhaskell && cabal build            # if you're using Cabal directly

License

The liquidhaskell-cabal-demo sample project is licensed under the CC0 1.0 Universal Public Domain Dedication.

Helpful resources:

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this work by you shall be licensed as above, without any additional terms or conditions.