Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- emptyCaseLensCommandId :: CommandId
- workspaceEditHandler :: CommandFunction IdeState WorkspaceEdit
- codeLensProvider :: PluginMethodHandler IdeState TextDocumentCodeLens
- scrutinzedType :: EmptyCaseSort Type -> Maybe Type
- mkEmptyCaseLensDesc :: Type -> Text
- hush :: Either e a -> Maybe a
- graftMatchGroup :: SrcSpan -> Located [LMatch GhcPs (LHsExpr GhcPs)] -> Graft (Either String) ParsedSource
- fromMaybeT :: Functor m => a -> MaybeT m a -> m a
- emptyCaseScrutinees :: IdeState -> NormalizedFilePath -> MaybeT IO [(Tracked 'Current RealSrcSpan, Type)]
- data EmptyCaseSort a
- = EmptyCase a
- | EmptyLamCase a
- emptyCaseQ :: GenericQ [(SrcSpan, EmptyCaseSort (HsExpr GhcTc))]
Documentation
emptyCaseLensCommandId :: CommandId Source #
The CommandId
for the empty case completion.
workspaceEditHandler :: CommandFunction IdeState WorkspaceEdit Source #
A command function that just applies a WorkspaceEdit
.
codeLensProvider :: PluginMethodHandler IdeState TextDocumentCodeLens Source #
Provide the "empty case completion" code lens
scrutinzedType :: EmptyCaseSort Type -> Maybe Type Source #
mkEmptyCaseLensDesc :: Type -> Text Source #
The description for the empty case lens.
graftMatchGroup :: SrcSpan -> Located [LMatch GhcPs (LHsExpr GhcPs)] -> Graft (Either String) ParsedSource Source #
Graft a RunTacticResults
into the correct place in an AST. Correctly
deals with top-level holes, in which we might need to fiddle with the
Match
s that bind variables.
fromMaybeT :: Functor m => a -> MaybeT m a -> m a Source #
emptyCaseScrutinees :: IdeState -> NormalizedFilePath -> MaybeT IO [(Tracked 'Current RealSrcSpan, Type)] Source #
Find the last typechecked module, and find the most specific span, as well as the judgement at the given range.
data EmptyCaseSort a Source #
Instances
emptyCaseQ :: GenericQ [(SrcSpan, EmptyCaseSort (HsExpr GhcTc))] Source #
Get the SrcSpan
and scrutinee of every empty case.