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

Preview media types #370

Merged
merged 3 commits into from
May 30, 2019
Merged

Preview media types #370

merged 3 commits into from
May 30, 2019

Conversation

phadej
Copy link
Contributor

@phadej phadej commented May 30, 2019

No description provided.

@phadej phadej changed the title Mt preview Preview media types May 30, 2019
@phadej
Copy link
Contributor Author

phadej commented May 30, 2019

Note: If one would need a bunch of different preview content types, then writing a

data MyPreviewTypes = A | B | C

data P (p :: MyPreviewTypes)

instance PreviewAccept (P 'A) where ...
instance PreviewAccept (P 'B) where ...
instance PreviewAccept (P 'C) where ...

would work. It's a bit roundabout, but better than making GenRequest polykinded.

EDIT: Yet, now as I think about it, this is little different then separate types. You cannot put different content-types requests into a list anyway, without some existential thingie, at which point it's somewhat irrelevant; maybe.

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

Successfully merging this pull request may close these issues.

None yet

1 participant