Warnings about missing signatures (local, kind, instance)
Motivation
Can we make a warning for missing signatures?
For
- local bindings
- standalone kind signatures
- instance signatures
Proposal
Create new warnings that will warn about missing local bindings, the name is up for grabs
{-# Options_GHC -Wmissing-local-signatures-all #-}
rev :: [a] -> [a]
rev as = rev'd where
-- Local binding with no type signature:
-- rev'd :: [a]
rev'd = reverse as
Lack of kind-signatures
{-# Options_GHC -Wmissing-kind-signatures #-}
-- Type synonym with no kind signature:
-- type Option :: Type -> Type
type Option = Maybe
and instance sigs
{-# Options_GHC -Wmissing-local-signatures-all #-}
type One :: Type
data One = MkOne
instance Eq X where
-- Instance method with no kind signature:
-- (==) :: X -> X -> Bool
MkOne == MkOne = True