servant/servant-server/Setup.lhs

35 lines
673 B
Plaintext
Raw Normal View History

\begin{code}
{-# LANGUAGE CPP #-}
2017-05-15 14:52:22 +02:00
{-# OPTIONS_GHC -Wall #-}
module Main (main) where
2017-05-15 14:52:22 +02:00
#ifndef MIN_VERSION_cabal_doctest
#define MIN_VERSION_cabal_doctest(x,y,z) 0
#endif
2017-05-15 14:52:22 +02:00
#if MIN_VERSION_cabal_doctest(1,0,0)
2017-05-15 14:52:22 +02:00
import Distribution.Extra.Doctest ( defaultMainWithDoctests )
main :: IO ()
2017-05-15 14:52:22 +02:00
main = defaultMainWithDoctests "doctests"
#else
2017-05-15 14:52:22 +02:00
#ifdef MIN_VERSION_Cabal
-- If the macro is defined, we have new cabal-install,
-- but for some reason we don't have cabal-doctest in package-db
--
-- Probably we are running cabal sdist, when otherwise using new-build
-- workflow
import Warning ()
#endif
2017-05-15 14:52:22 +02:00
import Distribution.Simple
2017-05-15 14:52:22 +02:00
main :: IO ()
main = defaultMain
2017-05-15 14:52:22 +02:00
#endif
\end{code}