@@ -274,26 +274,15 @@ idrisInstall verbosity copy pkg local = unless (execOnly (configFlags local)) $
274274-- -----------------------------------------------------------------------------
275275-- Test
276276
277−-- FIXME: We use the __GLASGOW_HASKELL__ macro because MIN_VERSION_cabal seems
278−-- to be broken !
279−
280277-- There are two "dataDir" in cabal, and they don't relate to each other.
281278-- When fetching modules, idris uses the second path (in the pkg record),
282279-- which by default is the root folder of the project.
283280-- We want it to be the install directory where we put the idris libraries.
284281fixPkg pkg target = pkg { dataDir = target }
285282
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
290−#else
291−originalTestHook = testHook simpleUserHooks
292−#endif
293−
294283idrisTestHook args pkg local hooks flags = do
295284 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
297286
298287-- -----------------------------------------------------------------------------
299288-- Main
@@ -314,9 +303,5 @@ main = defaultMainWithHooks $ simpleUserHooks
314303 , preSDist = idrisPreSDist
315304 , sDistHook = idrisSDist (sDistHook simpleUserHooks)
316305 , postSDist = idrisPostSDist
317−#if __GLASGOW_HASKELL__ < 710
318− , testHook = idrisTestHook ()
319−#else
320306 , testHook = idrisTestHook
321−#endif
322307 }