data families/newtype instances allow `DatatypeContext`s ?

Anthony Clayden anthony.d.clayden at
Mon Mar 13 06:20:48 UTC 2023

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).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Glasgow-haskell-users mailing list