data families/newtype instances allow `DatatypeContext`s ?

13 Mar
2023
13 Mar
'23
2:20 a.m.
https://discourse.haskell.org/t/choosing-data-representation-based-on-type/5... 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
800
Age (days ago)
800
Last active (days ago)
0 comments
1 participants
participants (1)
-
Anthony Clayden