From 3e412dd1723ad1f4ed076ce27381072e2b8af031 Mon Sep 17 00:00:00 2001 From: Trevis Elser Date: Sat, 29 Oct 2022 19:34:33 -0400 Subject: [PATCH 1/2] Add a barebones hlint configuration to kickstart discussion. --- hlint/stability_hlint.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 hlint/stability_hlint.yaml diff --git a/hlint/stability_hlint.yaml b/hlint/stability_hlint.yaml new file mode 100644 index 0000000..6cf22b5 --- /dev/null +++ b/hlint/stability_hlint.yaml @@ -0,0 +1,9 @@ +# Turn off all rules by default so we only include our explicit configuration. +- ignore: { } + +# Turn on restricted module configurations to be warnings. +- warn: {name: "Avoid restricted module"} + +- modules: + - {name: Control.Monad.Trans.Error, within: []} # This module is deprecated. + - {name: Control.Monad.Trans.List, within: []} # This module is deprecated. From 63d9704db4e0483c7d2176aef8a48e5f8bee4276 Mon Sep 17 00:00:00 2001 From: Trevis Elser Date: Mon, 14 Nov 2022 11:55:48 -0500 Subject: [PATCH 2/2] Add hlint README, with the beginnings of a feature wishlist --- hlint/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 hlint/README.md diff --git a/hlint/README.md b/hlint/README.md new file mode 100644 index 0000000..4298492 --- /dev/null +++ b/hlint/README.md @@ -0,0 +1,12 @@ +# Hlint Rules Aiming To Promote Stability + +## Wishlist Of Hlint Features + +There are some features we do not have access to from hlint, but that would help us write more +rules. + +1. A default typeclass method is overridden. + +For example, the `Eq` typeclass has a method, `(/=)`, that is being considered for removal from the +class. To promote stability, we would like to be able to write a rule that would trigger a warning +when this method is manually defined. However we cannot, as of this writing, construct such a rule.