Safe Haskell | None |
---|---|
Language | Haskell2010 |
Dhall.LSP.Backend.Linting
Synopsis
- data Suggestion = Suggestion {
- range :: Range
- suggestion :: Text
- suggest :: Expr Src Import -> [Suggestion]
- lint :: Eq s => Expr s Import -> Expr s Import
Documentation
data Suggestion Source #
Constructors
Suggestion | |
Fields
|
suggest :: Expr Src Import -> [Suggestion] Source #
Given an dhall expression suggest all the possible improvements that would be made by the linter.
lint :: Eq s => Expr s Import -> Expr s Import #
Automatically improve a Dhall expression
Currently this:
- removes unused
let
bindings withremoveUnusedBindings
. - fixes
let a = x ≡ y
to belet a = assert : x ≡ y
- consolidates nested
let
bindings to use a multiple-let
binding withremoveLetInLet
- fixes paths of the form
./../foo
to../foo