ghcide-2.9.0.0: The core of an IDE
Safe HaskellSafe-Inferred
LanguageGHC2021

Development.IDE.Core.PluginUtils

Synopsis

Documentation

runActionE :: MonadIO m => String -> IdeState -> ExceptT e Action a -> ExceptT e m a Source #

ExceptT version of runAction, takes a ExceptT Action

runActionMT :: MonadIO m => String -> IdeState -> MaybeT Action a -> MaybeT m a Source #

MaybeT version of runAction, takes a MaybeT Action

useE :: IdeRule k v => k -> NormalizedFilePath -> ExceptT PluginError Action v Source #

ExceptT version of use that throws a PluginRuleFailed upon failure

useMT :: IdeRule k v => k -> NormalizedFilePath -> MaybeT Action v Source #

MaybeT version of use

usesE :: (Traversable f, IdeRule k v) => k -> f NormalizedFilePath -> ExceptT PluginError Action (f v) Source #

ExceptT version of uses that throws a PluginRuleFailed upon failure

usesMT :: (Traversable f, IdeRule k v) => k -> f NormalizedFilePath -> MaybeT Action (f v) Source #

MaybeT version of uses

useWithStaleE :: IdeRule k v => k -> NormalizedFilePath -> ExceptT PluginError Action (v, PositionMapping) Source #

ExceptT version of useWithStale that throws a PluginRuleFailed upon failure

useWithStaleMT :: IdeRule k v => k -> NormalizedFilePath -> MaybeT Action (v, PositionMapping) Source #

MaybeT version of useWithStale

runIdeActionE :: MonadIO m => String -> ShakeExtras -> ExceptT e IdeAction a -> ExceptT e m a Source #

ExceptT version of runIdeAction, takes a ExceptT IdeAction

runIdeActionMT :: MonadIO m => String -> ShakeExtras -> MaybeT IdeAction a -> MaybeT m a Source #

MaybeT version of runIdeAction, takes a MaybeT IdeAction

useWithStaleFastE :: IdeRule k v => k -> NormalizedFilePath -> ExceptT PluginError IdeAction (v, PositionMapping) Source #

ExceptT version of useWithStaleFast that throws a PluginRuleFailed upon failure

useWithStaleFastMT :: IdeRule k v => k -> NormalizedFilePath -> MaybeT IdeAction (v, PositionMapping) Source #

MaybeT version of useWithStaleFast

uriToFilePathE :: Monad m => Uri -> ExceptT PluginError m FilePath Source #

ExceptT version of uriToFilePath that throws a PluginInvalidParams upon failure

toCurrentPositionE :: Monad m => PositionMapping -> Position -> ExceptT PluginError m Position Source #

ExceptT version of toCurrentPosition that throws a PluginInvalidUserState upon failure

fromCurrentPositionE :: Monad m => PositionMapping -> Position -> ExceptT PluginError m Position Source #

ExceptT version of fromCurrentPosition that throws a PluginInvalidUserState upon failure

toCurrentRangeE :: Monad m => PositionMapping -> Range -> ExceptT PluginError m Range Source #

ExceptT version of toCurrentRange that throws a PluginInvalidUserState upon failure

fromCurrentRangeE :: Monad m => PositionMapping -> Range -> ExceptT PluginError m Range Source #

ExceptT version of fromCurrentRange that throws a PluginInvalidUserState upon failure