request: a Nat ordering constraint that is not an equality constraint

Richard Eisenberg rae at richarde.dev
Tue May 21 07:28:25 UTC 2019


This is an interesting proposal. When I started reading it, I wondered why anyone would want to avoid the current definition. But you motivate that part well. I would want a larger test of the IsTrue approach to make sure it does what you want before supporting this. But wait: couldn't you write your GHC.TypeLits.Passive today, in a library, with no ill effect? If so, there isn't a strict reason GHC needs to adopt this. (Of course, if the new definition proves useful, then it might make sense to do so in time.)

> On May 21, 2019, at 3:48 AM, Nicolas Frisby <nicolas.frisby at gmail.com> wrote:
> 
> P.P.S. - Is there a standard place to find something like `IsTrue`? More generally: a test for type equality that does not drive unification? Thanks again.

If something like this ends up in GHC, Data.Type.Bool seems like the right place.

Richard


More information about the Libraries mailing list