data families/newtype instances allow `DatatypeContext`s ?

Anthony Clayden <[email protected]> Mon, 13 Mar 2023 19:20:48 +1300
Newsgroups gmane.comp.lang.haskell.glasgow.user
Message-ID <CABU_mxhPAvWnfH40bDZwLCe_Kv5MR3ov3Ot8rFiaJC=2VrAxZw@mail.gmail.com>
https://discourse.haskell.org/t/choosing-data-representation-based-on-type/5970/4?u=antc2

A `DatatypeContext` on a `newtype instance` gets the usual warning it's
deprecated. But the decl is accepted -- at GHC 8.10. (It doesn't achieve
what the O.P. was asking for -- but then I wouldn't expect it to.)

Is this behaviour deliberate, or more of an accident? I'm surprised such a
modern feature (datatype families) tolerates such an old/deprecated feature.

I suppose this means the two features are orthogonal -- which is kinda a
Good Thing (wrt some continuing discussions).

AntC

_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users