Skip to content

Preview media types#370

Merged
phadej merged 3 commits intomasterfrom
MtPreview
May 30, 2019
Merged

Preview media types#370
phadej merged 3 commits intomasterfrom
MtPreview

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.

1 participant