Rename withContext -> withInteractiveContext

This commit is contained in:
Daniel Gröber 2015-08-21 04:12:53 +02:00
parent eceb34c8af
commit 473f1e09c7
2 changed files with 5 additions and 5 deletions

View File

@ -7,7 +7,7 @@ module Language.Haskell.GhcMod.Gap (
, setLogAction
, getSrcSpan
, getSrcFile
, withContext
, withInteractiveContext
, fOptions
, toStringBuffer
, showSeverityCaption
@ -214,8 +214,8 @@ fileModSummary file' = do
(Just file==) <$> canonicalizePath `traverse` ml_hs_file (ms_location m)
return ms
withContext :: GhcMonad m => m a -> m a
withContext action = gbracket setup teardown body
withInteractiveContext :: GhcMonad m => m a -> m a
withInteractiveContext action = gbracket setup teardown body
where
setup = getContext
teardown = setCtx

View File

@ -35,7 +35,7 @@ info :: IOish m
info file expr =
ghandle handler $
runGmlT' [Left file] deferErrors $
withContext $
withInteractiveContext $
convert <$> options <*> body
where
handler (SomeException ex) = do
@ -61,7 +61,7 @@ types :: IOish m
types file lineNo colNo =
ghandle handler $
runGmlT' [Left file] deferErrors $
withContext $ do
withInteractiveContext $ do
crdl <- cradle
modSum <- fileModSummaryWithMapping (cradleCurrentDir crdl </> file)
srcSpanTypes <- getSrcSpanType modSum lineNo colNo