2 ms·
Since we’re discussing syntax I’d like to question the necessity of the tick preceding [JSON]. Could we leave out this tick given that the kind of this paramet
by runeks 6y ago
Since we’re discussing syntax I’d like to question the necessity of the tick preceding [JSON].
Could we leave out this tick given that the kind of this parameter is [*]?
- pyrale 6y agoFor reasons that are not easy to explain, no. [JSON] and '[JSON] have different meanings. Here, '[JSON] does not refer to a list of json files, but to a type-level list of the mimetypes that can be returned. You could see '[JSON, PNG] instead, which would make no sense in the context of a list type declaration. The genius of Servant is that the DSL doesn't require you to know how '[] is implemented and why it's different from [], you just have to know the DSL.