Fix tests

This commit is contained in:
Daniel Gröber
2015-09-14 05:59:01 +02:00
parent a7e2f3d2a6
commit ba14e1790c
4 changed files with 17 additions and 14 deletions

View File

@@ -44,12 +44,12 @@ extract action = do
Right a -> return a
Left e -> error $ show e
withSpecCradle :: IOish m => FilePath -> (Cradle -> m a) -> m a
withSpecCradle :: (IOish m, GmOut m) => FilePath -> (Cradle -> m a) -> m a
withSpecCradle cradledir f =
gbracket (liftIO $ findSpecCradle cradledir) (liftIO . cleanupCradle) f
gbracket (findSpecCradle cradledir) (liftIO . cleanupCradle) f
withGhcModEnvSpec :: (IOish m, GmOut m) => FilePath -> Options -> (GhcModEnv -> m a) -> m a
withGhcModEnvSpec dir opt f = withSpecCradle dir $ withGhcModEnv' opt f
withGhcModEnvSpec = withGhcModEnv' withSpecCradle
runGhcModTSpec :: Options -> GhcModT IO a -> IO (Either GhcModError a, GhcModLog)
runGhcModTSpec opt action = do