Skip to content

Instantly share code, notes, and snippets.

@cartazio
Created May 23, 2013 03:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cartazio/5632636 to your computer and use it in GitHub Desktop.
Save cartazio/5632636 to your computer and use it in GitHub Desktop.
shim to make sure cabalized package only builds with cabal >= 1.17 add to your Setup.hs
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
import Language.Haskell.TH
import Distribution.Simple
import Distribution.Simple.Utils
goodVersion=
$(if cabalVersion >= Version [1,17,0] []
then [| "its all good" |]
else [| 1 + "this package should not be used with cabal version < 1.17.0 , it will break" |]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment