It is possible with the DatatypeContexts
extension, but it is strongly discouraged:
newtype Show a => SomeType a = SomeType { foo :: Maybe a }
It is recommended to put the constraint on the functions that use SomeType
or use GADTs. See the answers to these questions for more information.
Alternative for deprecated -XDatatypeContext?
DatatypeContexts Deprecated in Latest GHC: Why?
Basically, it doesn't add anything useful and it makes you have to put constraints where they wouldn't otherwise be necessary.