summaryrefslogtreecommitdiff
path: root/compiler/GHC.hs
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2020-04-24 08:45:25 +0100
committerMatthew Pickering <matthewtpickering@gmail.com>2020-04-24 08:45:25 +0100
commit00a8ad780165bceca2e4268f67efe0667e5922bf (patch)
tree187170227b9b4ecf391e30d2020ef219d0437e3c /compiler/GHC.hs
parenteaed0a3289e4c24ff1a70c6fc4b7f8bae6cd2dd3 (diff)
downloadhaskell-wip/open-telemetry.tar.gz
Diffstat (limited to 'compiler/GHC.hs')
-rw-r--r--compiler/GHC.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/GHC.hs b/compiler/GHC.hs
index b78883c42e..02af8f0e02 100644
--- a/compiler/GHC.hs
+++ b/compiler/GHC.hs
@@ -378,6 +378,7 @@ import Data.IORef
import System.FilePath
import Control.Concurrent
import Control.Applicative ((<|>))
+import Control.Monad.Catch (MonadMask)
import Maybes
import System.IO.Error ( isDoesNotExistError )
@@ -1068,15 +1069,15 @@ instance Outputable CoreModule where
-- desugars the module, then returns the resulting Core module (consisting of
-- the module name, type declarations, and function declarations) if
-- successful.
-compileToCoreModule :: GhcMonad m => FilePath -> m CoreModule
+compileToCoreModule :: (GhcMonad m, MonadMask m) => FilePath -> m CoreModule
compileToCoreModule = compileCore False
-- | Like compileToCoreModule, but invokes the simplifier, so
-- as to return simplified and tidied Core.
-compileToCoreSimplified :: GhcMonad m => FilePath -> m CoreModule
+compileToCoreSimplified :: (MonadMask m, GhcMonad m) => FilePath -> m CoreModule
compileToCoreSimplified = compileCore True
-compileCore :: GhcMonad m => Bool -> FilePath -> m CoreModule
+compileCore :: (GhcMonad m, MonadMask m) => Bool -> FilePath -> m CoreModule
compileCore simplify fn = do
-- First, set the target to the desired filename
target <- guessTarget fn Nothing