haskell-lsp-types 0.23.0.0 → 0.24.0.0
raw patch · 3 files changed
+14/−1 lines, 3 filesdep ~basenew-uploaderPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
+ Language.Haskell.LSP.Types: Reason :: Text -> Reason
+ Language.Haskell.LSP.Types: [$sel:_disabled:CodeAction] :: CodeAction -> Maybe Reason
+ Language.Haskell.LSP.Types: [$sel:_isPreferred:CodeAction] :: CodeAction -> Maybe Bool
+ Language.Haskell.LSP.Types: [$sel:_reason:Reason] :: Reason -> Text
+ Language.Haskell.LSP.Types: newtype Reason
+ Language.Haskell.LSP.Types.Lens: class HasDisabled s a | s -> a
+ Language.Haskell.LSP.Types.Lens: class HasIsPreferred s a | s -> a
+ Language.Haskell.LSP.Types.Lens: disabled :: HasDisabled s a => Lens' s a
+ Language.Haskell.LSP.Types.Lens: instance Language.Haskell.LSP.Types.Lens.HasDisabled Language.Haskell.LSP.Types.CodeAction.CodeAction (GHC.Maybe.Maybe Language.Haskell.LSP.Types.CodeAction.Reason)
+ Language.Haskell.LSP.Types.Lens: instance Language.Haskell.LSP.Types.Lens.HasIsPreferred Language.Haskell.LSP.Types.CodeAction.CodeAction (GHC.Maybe.Maybe GHC.Types.Bool)
+ Language.Haskell.LSP.Types.Lens: isPreferred :: HasIsPreferred s a => Lens' s a
- Language.Haskell.LSP.Types: CodeAction :: Text -> Maybe CodeActionKind -> Maybe (List Diagnostic) -> Maybe WorkspaceEdit -> Maybe Command -> CodeAction
+ Language.Haskell.LSP.Types: CodeAction :: Text -> Maybe CodeActionKind -> Maybe (List Diagnostic) -> Maybe WorkspaceEdit -> Maybe Command -> Maybe Bool -> Maybe Reason -> CodeAction
Files
ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for haskell-lsp-types +## 0.24.0.0++* Add and 'isPreferred' and 'disabled' fields to CodeAction+ ## 0.23.0.0 * Add runWith for transporots other than stdio (@paulyoung)
haskell-lsp-types.cabal view
@@ -1,5 +1,5 @@ name: haskell-lsp-types-version: 0.23.0.0+version: 0.24.0.0 synopsis: Haskell library for the Microsoft Language Server Protocol, data types description: An implementation of the types to allow language implementors to
src/Language/Haskell/LSP/Types/CodeAction.hs view
@@ -261,6 +261,10 @@ deriveJSON lspOptions ''CodeActionParams +newtype Reason = Reason {_reason :: Text}+ deriving (Read, Show, Eq)++deriveJSON lspOptions ''Reason data CodeAction = -- | A code action represents a change that can be performed in code, e.g. to fix a problem or -- to refactor code.@@ -275,6 +279,11 @@ , _command :: Maybe Command -- ^ A command this code action executes. If a code action -- provides an edit and a command, first the edit is -- executed and then the command.+ , _isPreferred :: Maybe Bool -- ^ Marks this as a preferred action.+ -- Preferred actions are used by the `auto fix` command and can be targeted by keybindings.+ -- A quick fix should be marked preferred if it properly addresses the underlying error.+ -- A refactoring should be marked preferred if it is the most reasonable choice of actions to take.+ , _disabled :: Maybe Reason -- ^ Marks that the code action cannot currently be applied. } deriving (Read,Show,Eq) deriveJSON lspOptions ''CodeAction