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

View File

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