incorrect suggestion to use `newtype` instead of `data` for unlifted datatypes
Bug
type Wrap :: UnliftedType -> Type
data Wrap a = Wrap a
triggers "Use newtype instead of data" which is incorrect (this is also true for the opposite direction, i.e. Type -> UnliftedType
hlint version
λ ι hlint --version
HLint v3.5, (C) Neil Mitchell 2006-2022
Note It is not sufficient to actually look for things suffixed with
#because a. it's a convention b. we have aUnliftedDataTypesextension
It's OK for HLint to follow conventions, because this is really a tool about making people follow more conventions. Is this something that came up in practice for you? Or just a thought experiment?
It came up in practise. I have a data family I which can be of kind UnliftedType to Type but that has to be a data, not a newtype. It's not terribly important though as i guess it's not occurring to often