Awesome
VSCode Haskutil
'QuickFix' actions for Haskell editor
Requirements
This extension uses diagnostics (errors and warnings) from PROBLEMS
tab which is populated by other Haskell extensions such as Simple GHC, Haskero, ghcid or ghcide. Please install one of them along with this extension.
Features
- Add missing import
- Organize imports
- Remove unused imports
- Add missing LANGUAGE extension
- Organize LANGUAGE extensions
- Add top-level signature
- Fill typed hole
Individual features can be turned on and off via haskutil.feature.[feature]
flags
Add missing import
Uses Hoogle to search for matching modules. Configurable via hoogle-vscode extension configuration (can be configured to use local instance of hoogle for example).
Organize imports
Sorting and alignment are configurable via haskutil.sortImports
and haskutil.alignImports
respectively. Imports can also be organized on file save with haskutil.organiseImportsOnSave: true
(dafault is false
).
Remove unused imports
Removes unused imports identified by warnings. haskutil.alignImports
controls if remaning imports are also aligned.
Add missing LANGUAGE extension
Adds LANGUAGE
pragma suggested by error. List of supported pragmas is defined by haskutil.supportedExtensions
.
Organize LANGUAGE extensions
Splitting, sorting and alignment of extensions are configurable via haskutil.splitExtensions
, haskutil.sortExtensions
and haskutil.alignExtensions
respectively. Extensions can also be organized on file save with haskutil.organiseExtensionOnSave: true
(dafault is false
).
Add top-level signature
Adds signature suggested by warning.
Fill typed hole
Replaces typed hole with one of the valid hole fits
from the warning.
Similarly replaces type wildcard with inferred type.
Dependencies
- Automatic dependency (auto install) hoogle-vscode