Commit 8eb82cdf authored by Moritz Angermann's avatar Moritz Angermann
Browse files

More cleanup

parent bee8003a
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Haddock
-- Copyright : Isaac Jones 2003-2005
-- Module : Distribution.Simple.Doctest
-- Copyright : Moritz Angermann 2017
-- License : BSD3
--
-- Maintainer : cabal-devel@haskell.org
......@@ -11,6 +12,8 @@
--
-- This module deals with the @doctest@ command.
-- Note: this module is modelled after Distribution.Simple.Haddock
module Distribution.Simple.Doctest (
doctest
) where
......@@ -88,8 +91,11 @@ doctest pkg_descr lbi suffixes doctestFlags = do
CFLib _ -> return () -- do not doctest foreign libs
CTest _ -> return () -- do not doctest tests
CBench _ -> return () -- do not doctest benchmarks
--
--
-- -----------------------------------------------------------------------------
-- Contributions to DoctestArgs (see also Haddock.hs for very similar code).
componentGhcOptions :: Verbosity -> LocalBuildInfo
-> BuildInfo -> ComponentLocalBuildInfo -> FilePath
-> GhcOptions
......@@ -128,7 +134,7 @@ mkDoctestArgs verbosity tmp lbi clbi inFiles bi = do
then return vanillaOpts
else if withSharedLib lbi
then return sharedOpts
else die' verbosity $ "Must have canilla or shared lirbaries "
else die' verbosity $ "Must have vanilla or shared lirbaries "
++ "enabled in order to run doctest"
ghcVersion <- maybe (die' verbosity "Compiler has no GHC version")
return
......
......@@ -242,7 +242,7 @@ haddock pkg_descr lbi suffixes flags' = do
for_ files $ copyFileTo verbosity (unDir $ argOutputDir commonArgs)
-- ------------------------------------------------------------------------------
-- Contributions to HaddockArgs.
-- Contributions to HaddockArgs (see also Doctest.hs for very similar code).
fromFlags :: PathTemplateEnv -> HaddockFlags -> HaddockArgs
fromFlags env flags =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment