| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Dhall.Lint
Contents
Description
This module contains the implementation of the dhall lint command
Synopsis
- lint :: Expr s Import -> Expr t Import
- removeLetInLet :: Eq a => Expr s a -> Maybe (Expr s a)
- removeUnusedBindings :: Eq a => Expr s a -> Maybe (Expr s a)
- optionalLitToSomeNone :: Expr s a -> Maybe (Expr s a)
Lint
lint :: Expr s Import -> Expr t Import Source #
Automatically improve a Dhall expression
Currently this:
- removes unused
letbindings withremoveLetInLet. - consolidates nested
letbindings to use a multiple-letbinding withremoveUnusedBindings. - switches legacy
List-likeOptionalliterals to useSome/Noneinstead withoptionalLitToSomeNone
removeLetInLet :: Eq a => Expr s a -> Maybe (Expr s a) Source #
removeUnusedBindings :: Eq a => Expr s a -> Maybe (Expr s a) Source #
optionalLitToSomeNone :: Expr s a -> Maybe (Expr s a) Source #