Skip to content

Extract KnownTool type from Tool

Fredrik Wieczerkowski requested to merge known-tool-type into master

Similar to Extension, this branch splits

data Tool = KICS2 | PAKCS | CYMAKE | FRONTEND | UnknownTool String
  deriving (Eq, Read, Show)

up into

data KnownTool = KICS2 | PAKCS | CYMAKE | FRONTEND
  deriving (Eq, Read, Show, Enum, Bounded)

data Tool = KnownTool KnownTool | UnknownTool String
  deriving (Eq, Read, Show)

The surrounding helper functions are also updated, therefore this change should not have any impact on source or binary compatibility, everything should work exactly as before.

The primary motivation behind this change, in particular the deriving of Enum/Bounded instances, is to make it easier for the language server to query a list of known tools for code completion. Additionally it makes the definition slightly more consistent with the similarly defined Extension/KnownExtension types.

Merge request reports

Loading