Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derive Generic for MediaType #32

Open
kahlil29 opened this issue Apr 19, 2019 · 1 comment
Open

Derive Generic for MediaType #32

kahlil29 opened this issue Apr 19, 2019 · 1 comment

Comments

@kahlil29
Copy link

Is it possible to derive the Generic typeclass for the MediaType type located in
Network.HTTP.Media.MediaType ?

I'm using the type to represent something in a Dhall config and need to have an Interpret instance, so that's why I would need it to derive Generic.

@endgame
Copy link

endgame commented Jan 12, 2024

One problem with doing this is that a Generic instance lets you get around abstraction boundaries, and the MediaType type is declared in an Internal module and its constructors are not exposed in the public interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants