Skip to content

Commit

Permalink
Fixed compilation of tests with stack
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanGlScott committed Jun 15, 2016
1 parent 1a350f3 commit bbe2591
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.markdown
Expand Up @@ -3,6 +3,7 @@ next
* The remaining orphan instances is `Data.Traversable.Instances` have been replaced in favor of the orphan instances from `transformers-compat-0.5`.
* The documentation now states laws that instances of `Apply` are expected to uphold.
* `doctest-0.11` support
* Fixed compilation of tests with `stack`

5.0.1
-------
Expand Down
4 changes: 4 additions & 0 deletions Setup.lhs
Expand Up @@ -32,6 +32,10 @@ generateBuildModule verbosity pkg lbi = do
withTestLBI pkg lbi $ \suite suitecfg -> do
rewriteFile (dir </> "Build_" ++ testName suite ++ ".hs") $ unlines
[ "module Build_" ++ testName suite ++ " where"
, ""
, "autogen_dir :: String"
, "autogen_dir = " ++ show dir
, ""
, "deps :: [String]"
, "deps = " ++ (show $ formatdeps (testDeps libcfg suitecfg))
]
Expand Down
6 changes: 3 additions & 3 deletions test/doctests.hsc
Expand Up @@ -15,7 +15,7 @@
-----------------------------------------------------------------------------
module Main where

import Build_doctests (deps)
import Build_doctests (autogen_dir, deps)
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative
#endif
Expand Down Expand Up @@ -56,9 +56,9 @@ withUnicode m = m
main :: IO ()
main = withUnicode $ getSources >>= \sources -> doctest $
"-isrc"
: "-idist/build/autogen"
: ("-i" ++ autogen_dir)
: "-optP-include"
: "-optPdist/build/autogen/cabal_macros.h"
: ("-optP" ++ autogen_dir ++ "/cabal_macros.h")
: "-hide-all-packages"
: map ("-package="++) deps ++ sources

Expand Down

0 comments on commit bbe2591

Please sign in to comment.