You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It doesn't seem that this is possible currently, but perhaps I'm missing something. There are a couple of use cases for this that have come up for me.
One is being able to enforce that enumFrom is defined in an instance of Enum, as we've encountered trouble in a couple of codebases now where an expectation with arises with the default of an infinite enumeration, but we more frequently have finite ones.
The second is to be able to say that '(/=)' is not defined, to prepare for that becoming not a typeclass method. This second use case would be fantastic for the HF stability working group to be able to promote as way to help the community smooth over transitions like this in a general way.
The text was updated successfully, but these errors were encountered:
Not currently. There are two ways to go to add it:
Add a generic mechanism inside HLint to require that a class instance is/isn't defined.
Add custom hints built in at the Haskell layer that validate the type class.
Given the two instances you have both are built in to the base library, doing a custom hint in the Haskell layer seems reasonable. I guess I wonder if there are more instances you might want to hint in the future?
It doesn't seem that this is possible currently, but perhaps I'm missing something. There are a couple of use cases for this that have come up for me.
One is being able to enforce that
enumFrom
is defined in an instance ofEnum
, as we've encountered trouble in a couple of codebases now where an expectation with arises with the default of an infinite enumeration, but we more frequently have finite ones.The second is to be able to say that '(/=)' is not defined, to prepare for that becoming not a typeclass method. This second use case would be fantastic for the HF stability working group to be able to promote as way to help the community smooth over transitions like this in a general way.
The text was updated successfully, but these errors were encountered: