2017-01-16 08:06:22 +01:00
|
|
|
\begin{code}
|
|
|
|
{-# LANGUAGE CPP #-}
|
2017-05-15 14:52:22 +02:00
|
|
|
{-# OPTIONS_GHC -Wall #-}
|
2017-01-16 08:06:22 +01:00
|
|
|
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
|
2017-01-16 08:06:22 +01:00
|
|
|
#endif
|
|
|
|
|
2017-05-15 14:52:22 +02:00
|
|
|
#if MIN_VERSION_cabal_doctest(1,0,0)
|
2017-01-16 08:06:22 +01:00
|
|
|
|
2017-05-15 14:52:22 +02:00
|
|
|
import Distribution.Extra.Doctest ( defaultMainWithDoctests )
|
2017-01-16 08:06:22 +01:00
|
|
|
main :: IO ()
|
2017-05-15 14:52:22 +02:00
|
|
|
main = defaultMainWithDoctests "doctests"
|
2017-01-16 08:06:22 +01:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
2017-05-15 14:52:22 +02:00
|
|
|
#ifdef MIN_VERSION_Cabal
|
2017-05-24 09:22:01 +02:00
|
|
|
#warning You are configuring this package without cabal-doctest installed. \
|
|
|
|
The doctests test-suite will not work as a result. \
|
|
|
|
To fix this, install cabal-doctest before configuring.
|
2017-01-16 08:06:22 +01:00
|
|
|
#endif
|
|
|
|
|
2017-05-15 14:52:22 +02:00
|
|
|
import Distribution.Simple
|
2017-01-16 08:06:22 +01:00
|
|
|
|
2017-05-15 14:52:22 +02:00
|
|
|
main :: IO ()
|
|
|
|
main = defaultMain
|
2017-01-16 08:06:22 +01:00
|
|
|
|
2017-05-15 14:52:22 +02:00
|
|
|
#endif
|
2017-01-16 08:06:22 +01:00
|
|
|
|
|
|
|
\end{code}
|