ghcide-2.7.0.0: The core of an IDE

Safe Haskell | None
Language | GHC2021

Development.IDE.Core.PluginUtils

Synopsis

- runActionE :: forall (m :: Type -> Type) e a. MonadIO m => String -> IdeState -> ExceptT e Action a -> ExceptT e m a
- runActionMT :: forall (m :: Type -> Type) a. MonadIO m => String -> IdeState -> MaybeT Action a -> MaybeT m a
- useE :: IdeRule k v => k -> NormalizedFilePath -> ExceptT PluginError Action v
- useMT :: IdeRule k v => k -> NormalizedFilePath -> MaybeT Action v
- usesE :: (Traversable f, IdeRule k v) => k -> f NormalizedFilePath -> ExceptT PluginError Action (f v)
- usesMT :: (Traversable f, IdeRule k v) => k -> f NormalizedFilePath -> MaybeT Action (f v)
- useWithStaleE :: IdeRule k v => k -> NormalizedFilePath -> ExceptT PluginError Action (v, PositionMapping)
- useWithStaleMT :: IdeRule k v => k -> NormalizedFilePath -> MaybeT Action (v, PositionMapping)
- runIdeActionE :: forall (m :: Type -> Type) e a. MonadIO m => String -> ShakeExtras -> ExceptT e IdeAction a -> ExceptT e m a
- runIdeActionMT :: forall (m :: Type -> Type) a. MonadIO m => String -> ShakeExtras -> MaybeT IdeAction a -> MaybeT m a
- useWithStaleFastE :: IdeRule k v => k -> NormalizedFilePath -> ExceptT PluginError IdeAction (v, PositionMapping)
- useWithStaleFastMT :: IdeRule k v => k -> NormalizedFilePath -> MaybeT IdeAction (v, PositionMapping)
- uriToFilePathE :: forall (m :: Type -> Type). Monad m => Uri -> ExceptT PluginError m FilePath
- toCurrentPositionE :: forall (m :: Type -> Type). Monad m => PositionMapping -> Position -> ExceptT PluginError m Position
- toCurrentPositionMT :: forall (m :: Type -> Type). Monad m => PositionMapping -> Position -> MaybeT m Position
- fromCurrentPositionE :: forall (m :: Type -> Type). Monad m => PositionMapping -> Position -> ExceptT PluginError m Position
- fromCurrentPositionMT :: forall (m :: Type -> Type). Monad m => PositionMapping -> Position -> MaybeT m Position
- toCurrentRangeE :: forall (m :: Type -> Type). Monad m => PositionMapping -> Range -> ExceptT PluginError m Range
- toCurrentRangeMT :: forall (m :: Type -> Type). Monad m => PositionMapping -> Range -> MaybeT m Range
- fromCurrentRangeE :: forall (m :: Type -> Type). Monad m => PositionMapping -> Range -> ExceptT PluginError m Range
- fromCurrentRangeMT :: forall (m :: Type -> Type). Monad m => PositionMapping -> Range -> MaybeT m Range

# Documentation

runActionE :: forall (m :: Type -> Type) e a. MonadIO m => String -> IdeState -> ExceptT e Action a -> ExceptT e m a #

ExceptT version of `runAction`, takes a ExceptT Action

runActionMT :: forall (m :: Type -> Type) a. MonadIO m => String -> IdeState -> MaybeT Action a -> MaybeT m a #

MaybeT version of `runAction`, takes a MaybeT Action

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

ExceptT version of `use` that throws a PluginRuleFailed upon failure

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

MaybeT version of `use`

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

ExceptT version of `uses` that throws a PluginRuleFailed upon failure

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

MaybeT version of `uses`

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

ExceptT version of `useWithStale` that throws a PluginRuleFailed upon failure

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

MaybeT version of `useWithStale`

runIdeActionE :: forall (m :: Type -> Type) e a. MonadIO m => String -> ShakeExtras -> ExceptT e IdeAction a -> ExceptT e m a #

ExceptT version of `runIdeAction`, takes a ExceptT IdeAction

runIdeActionMT :: forall (m :: Type -> Type) a. MonadIO m => String -> ShakeExtras -> MaybeT IdeAction a -> MaybeT m a #

MaybeT version of `runIdeAction`, takes a MaybeT IdeAction

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

ExceptT version of `useWithStaleFast` that throws a PluginRuleFailed upon failure

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

MaybeT version of `useWithStaleFast`

uriToFilePathE :: forall (m :: Type -> Type). Monad m => Uri -> ExceptT PluginError m FilePath #

ExceptT version of `uriToFilePath` that throws a PluginInvalidParams upon failure

toCurrentPositionE :: forall (m :: Type -> Type). Monad m => PositionMapping -> Position -> ExceptT PluginError m Position #

ExceptT version of `toCurrentPosition` that throws a PluginInvalidUserState upon failure

toCurrentPositionMT :: forall (m :: Type -> Type). Monad m => PositionMapping -> Position -> MaybeT m Position #

MaybeT version of `toCurrentPosition`

fromCurrentPositionE :: forall (m :: Type -> Type). Monad m => PositionMapping -> Position -> ExceptT PluginError m Position #

ExceptT version of `fromCurrentPosition` that throws a PluginInvalidUserState upon failure

fromCurrentPositionMT :: forall (m :: Type -> Type). Monad m => PositionMapping -> Position -> MaybeT m Position #

MaybeT version of `fromCurrentPosition`

toCurrentRangeE :: forall (m :: Type -> Type). Monad m => PositionMapping -> Range -> ExceptT PluginError m Range #

ExceptT version of `toCurrentRange` that throws a PluginInvalidUserState upon failure

toCurrentRangeMT :: forall (m :: Type -> Type). Monad m => PositionMapping -> Range -> MaybeT m Range #

MaybeT version of `toCurrentRange`

fromCurrentRangeE :: forall (m :: Type -> Type). Monad m => PositionMapping -> Range -> ExceptT PluginError m Range #

ExceptT version of `fromCurrentRange` that throws a PluginInvalidUserState upon failure

fromCurrentRangeMT :: forall (m :: Type -> Type). Monad m => PositionMapping -> Range -> MaybeT m Range #

MaybeT version of `fromCurrentRange`