Rename withContext -> withInteractiveContext
This commit is contained in:
parent
eceb34c8af
commit
473f1e09c7
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user