Fix a bunch of relate exception handling problems

should handle exceptions outside of runGmlT otherwise we don't catch ghc
load related ones.
This commit is contained in:
Daniel Gröber
2015-03-09 22:04:04 +01:00
parent 7d7f848afb
commit 539c294dd4
8 changed files with 41 additions and 42 deletions

View File

@@ -29,7 +29,7 @@ check :: IOish m
=> [FilePath] -- ^ The target files.
-> GhcModT m (Either String String)
check files =
runGmLoadedTWith
runGmlTWith
(map Left files)
return
((fmap fst <$>) . withLogger (setAllWarningFlags . setNoMaxRelevantBindings))
@@ -49,7 +49,7 @@ expandTemplate files = either id id <$> expand files
-- | Expanding Haskell Template.
expand :: IOish m => [FilePath] -> GhcModT m (Either String String)
expand files =
runGmLoadedTWith
runGmlTWith
(map Left files)
return
((fmap fst <$>) . withLogger (Gap.setDumpSplices . setNoWarningFlags))