@@ -274,26 +274,15 @@ idrisInstall verbosity copy pkg local = unless (execOnly (configFlags local)) $
274-- -----------------------------------------------------------------------------
274-- -----------------------------------------------------------------------------
277−-- FIXME: We use the __GLASGOW_HASKELL__ macro because MIN_VERSION_cabal seems
280-- There are two "dataDir" in cabal, and they don't relate to each other.
277-- There are two "dataDir" in cabal, and they don't relate to each other.
281-- When fetching modules, idris uses the second path (in the pkg record),
278-- When fetching modules, idris uses the second path (in the pkg record),
282-- which by default is the root folder of the project.
279-- which by default is the root folder of the project.
283-- We want it to be the install directory where we put the idris libraries.
280-- We want it to be the install directory where we put the idris libraries.
284fixPkg pkg target = pkg { dataDir = target }
281fixPkg pkg target = pkg { dataDir = target }
286−-- The "Args" argument of the testHooks has been added in cabal 1.22.0,
287−-- and should therefore be ignored for prior versions.
288−#if __GLASGOW_HASKELL__ < 710
289−originalTestHook _ = testHook simpleUserHooks
291−originalTestHook = testHook simpleUserHooks
294idrisTestHook args pkg local hooks flags = do
283idrisTestHook args pkg local hooks flags = do
295 let target = datadir $ L.absoluteInstallDirs pkg local NoCopyDest
284 let target = datadir $ L.absoluteInstallDirs pkg local NoCopyDest
296− originalTestHook args (fixPkg pkg target) local hooks flags
285+ testHook simpleUserHooks args (fixPkg pkg target) local hooks flags
298-- -----------------------------------------------------------------------------
287-- -----------------------------------------------------------------------------
@@ -314,9 +303,5 @@ main = defaultMainWithHooks $ simpleUserHooks
314 , preSDist = idrisPreSDist
303 , preSDist = idrisPreSDist
315 , sDistHook = idrisSDist (sDistHook simpleUserHooks)
304 , sDistHook = idrisSDist (sDistHook simpleUserHooks)
316 , postSDist = idrisPostSDist
305 , postSDist = idrisPostSDist
317−#if __GLASGOW_HASKELL__ < 710
318− , testHook = idrisTestHook ()
320 , testHook = idrisTestHook
306 , testHook = idrisTestHook