Re: How to user-define a type equality constraint?
Carter Schonwald <[email protected]> Tue, 6 Apr 2021 10:05:48 -0400
| Newsgroups | gmane.comp.lang.haskell.glasgow.user |
|---|---|
| Message-ID | <CAHYVw0zrXDUb8x_fo8WF+JRr5JFRU=k6Ww+=PGTpxSXaZPFb+w@mail.gmail.com> |
That sounds like a bug/oversight! Is that not fixed in 9.2? On Mon, Apr 5, 2021 at 11:08 PM David Feuer <[email protected]> wrote: > `Char` is defined in user code. What you really can't define are Char# and > TYPE, and you can't modify `RuntimeRep`. Speaking of `Char#`, I see that in > 9.0, at least, it has kind TYPE 'WordRep. Why is that not Word32Rep? > > On Mon, Apr 5, 2021, 10:50 PM Richard Eisenberg <[email protected]> wrote: > >> >> >> On Apr 1, 2021, at 8:12 PM, Anthony Clayden <[email protected]> >> wrote: >> >> Can I user-define a conventional type-class that behaves more like `(~)`? >> >> >> I don't think so. >> >> But why does this matter? I can't define `Char` in user code, but it's >> exported from the Prelude and requires no extensions. While I can define Eq >> in user code, I can't make `deriving` work with my version. I can't define >> `error` in user code. There are many others, I'm sure. >> >> So: why does this matter? >> >> Thanks, >> Richard >> _______________________________________________ >> Glasgow-haskell-users mailing list >> [email protected] >> http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users >> > _______________________________________________ > Glasgow-haskell-users mailing list > [email protected] > http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users > _______________________________________________ Glasgow-haskell-users mailing list [email protected] http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users