git.iko.soy/typeable/cabal2nix
on v2.4 help sign in
34 lines 836 B history raw
1{-# LANGUAGE CPP #-}
2{-# OPTIONS_GHC -Wall #-}
4module Main ( main ) where
6#ifndef MIN_VERSION_cabal_doctest
7#define MIN_VERSION_cabal_doctest(x,y,z) 0
8#endif
10#if MIN_VERSION_cabal_doctest(1,0,0)
12import Distribution.Extra.Doctest ( defaultMainWithDoctests )
13main :: IO ()
14main = defaultMainWithDoctests "doctests"
16#else
18#ifdef MIN_VERSION_Cabal
19-- If the macro is defined, we have new cabal-install,
20-- but for some reason we don't have cabal-doctest in package-db
21--
22-- Probably we are running cabal sdist, when otherwise using new-build
23-- workflow
24#warning You are configuring this package without cabal-doctest installed. \
25 The doctests test-suite will not work as a result. \
26 To fix this, install cabal-doctest before configuring.
27#endif
29import Distribution.Simple
31main :: IO ()
32main = defaultMain
34#endif