ghc-mod/test/doctests.hs
2016-08-09 15:06:24 +03:00

22 lines
773 B
Haskell

{-# LANGUAGE CPP #-}
module Main where
import Test.DocTest
import System.Environment
import Data.Maybe
main :: IO ()
main = do
distdir <- (fromMaybe "dist" . lookup "DOCTEST_DIST_DIR") `fmap` getEnvironment
doctest
[ "-package", "ghc-" ++ VERSION_ghc
, "-package", "transformers-" ++ VERSION_transformers
, "-package", "mtl-" ++ VERSION_mtl
, "-package", "directory-" ++ VERSION_directory
, "-XScopedTypeVariables", "-XRecordWildCards", "-XNamedFieldPuns", "-XConstraintKinds", "-XFlexibleContexts", "-XDataKinds", "-XKindSignatures", "-XTypeOperators", "-XViewPatterns"
, "-i" ++ distdir ++ "/build/autogen/"
, "-optP-include"
, "-optP" ++ distdir ++ "/build/autogen/cabal_macros.h"
, "Language/Haskell/GhcMod.hs"
]