git.iko.soy/typeable/servant
on master help sign in
Eta-reduce the verb-synonyms.
commit23a31a89355f4cd3d7b0bb6f12eb85a721b9645f authorAndres Loeh <andres@well-typed.com> dateThu 28 Jan 2016, 11:46 (11 years ago) parent9270094
1 file changed+27−27
servant/src/Servant/API/Verbs.hs+27−27
servant/src/Servant/API/Verbs.hs+27−27
@@ -34,15 +34,15 @@ data Verb (method :: k1) (statusCode :: Nat) (contentTypes :: [*]) a
3434-- the relevant information is summarily presented here.
3535
3636-- | 'GET' with 200 status code.
37−type Get contentTypes a = Verb 'GET 200 contentTypes a
37+type Get = Verb 'GET 200
3838-- | 'POST' with 200 status code.
39−type Post contentTypes a = Verb 'POST 200 contentTypes a
39+type Post = Verb 'POST 200
4040-- | 'PUT' with 200 status code.
41−type Put contentTypes a = Verb 'PUT 200 contentTypes a
41+type Put = Verb 'PUT 200
4242-- | 'DELETE' with 200 status code.
43−type Delete contentTypes a = Verb 'DELETE 200 contentTypes a
43+type Delete = Verb 'DELETE 200
4444-- | 'PATCH' with 200 status code.
45−type Patch contentTypes a = Verb 'PATCH 200 contentTypes a
45+type Patch = Verb 'PATCH 200
4646
4747-- * Other responses
4848
@@ -58,7 +58,7 @@ type Patch contentTypes a = Verb 'PATCH 200 contentTypes a
5858
5959-- | 'POST' with 201 status code.
6060--
61−type PostCreated contentTypes a = Verb 'POST 201 contentTypes a
61+type PostCreated = Verb 'POST 201
6262
6363
6464-- ** 202 Accepted
@@ -69,15 +69,15 @@ type PostCreated contentTypes a = Verb 'POST 201 contentTypes a
6969-- estimate of when the processing will be finished.
7070
7171-- | 'GET' with 202 status code.
72−type GetAccepted contentTypes a = Verb 'GET 202 contentTypes a
72+type GetAccepted = Verb 'GET 202
7373-- | 'POST' with 202 status code.
74−type PostAccepted contentTypes a = Verb 'POST 202 contentTypes a
74+type PostAccepted = Verb 'POST 202
7575-- | 'DELETE' with 202 status code.
76−type DeleteAccepted contentTypes a = Verb 'DELETE 202 contentTypes a
76+type DeleteAccepted = Verb 'DELETE 202
7777-- | 'PATCH' with 202 status code.
78−type PatchAccepted contentTypes a = Verb 'PATCH 202 contentTypes a
78+type PatchAccepted = Verb 'PATCH 202
7979-- | 'PUT' with 202 status code.
80−type PutAccepted contentTypes a = Verb 'PUT 202 contentTypes a
80+type PutAccepted = Verb 'PUT 202
8181
8282
8383-- ** 203 Non-Authoritative Information
@@ -86,15 +86,15 @@ type PutAccepted contentTypes a = Verb 'PUT 202 contentTypes a
8686-- information may come from a third-party.
8787
8888-- | 'GET' with 203 status code.
89−type GetNonAuthoritative contentTypes a = Verb 'GET 203 contentTypes a
89+type GetNonAuthoritative = Verb 'GET 203
9090-- | 'POST' with 203 status code.
91−type PostNonAuthoritative contentTypes a = Verb 'POST 203 contentTypes a
91+type PostNonAuthoritative = Verb 'POST 203
9292-- | 'DELETE' with 203 status code.
93−type DeleteNonAuthoritative contentTypes a = Verb 'DELETE 203 contentTypes a
93+type DeleteNonAuthoritative = Verb 'DELETE 203
9494-- | 'PATCH' with 203 status code.
95−type PatchNonAuthoritative contentTypes a = Verb 'PATCH 203 contentTypes a
95+type PatchNonAuthoritative = Verb 'PATCH 203
9696-- | 'PUT' with 203 status code.
97−type PutNonAuthoritative contentTypes a = Verb 'PUT 203 contentTypes a
97+type PutNonAuthoritative = Verb 'PUT 203
9898
9999
100100-- ** 204 No Content
@@ -105,15 +105,15 @@ type PutNonAuthoritative contentTypes a = Verb 'PUT 203 contentTypes a
105105-- If the document view should be reset, use @205 Reset Content@.
106106
107107-- | 'GET' with 204 status code.
108−type GetNoContent contentTypes noContent = Verb 'GET 204 contentTypes noContent
108+type GetNoContent = Verb 'GET 204
109109-- | 'POST' with 204 status code.
110−type PostNoContent contentTypes noContent = Verb 'POST 204 contentTypes noContent
110+type PostNoContent = Verb 'POST 204
111111-- | 'DELETE' with 204 status code.
112−type DeleteNoContent contentTypes noContent = Verb 'DELETE 204 contentTypes noContent
112+type DeleteNoContent = Verb 'DELETE 204
113113-- | 'PATCH' with 204 status code.
114−type PatchNoContent contentTypes noContent = Verb 'PATCH 204 contentTypes noContent
114+type PatchNoContent = Verb 'PATCH 204
115115-- | 'PUT' with 204 status code.
116−type PutNoContent contentTypes noContent = Verb 'PUT 204 contentTypes noContent
116+type PutNoContent = Verb 'PUT 204
117117
118118
119119-- ** 205 Reset Content
@@ -124,15 +124,15 @@ type PutNoContent contentTypes noContent = Verb 'PUT 204 contentTypes noContent
124124-- If the document view should not be reset, use @204 No Content@.
125125
126126-- | 'GET' with 205 status code.
127−type GetResetContent contentTypes noContent = Verb 'GET 205 contentTypes noContent
127+type GetResetContent = Verb 'GET 205
128128-- | 'POST' with 205 status code.
129−type PostResetContent contentTypes noContent = Verb 'POST 205 contentTypes noContent
129+type PostResetContent = Verb 'POST 205
130130-- | 'DELETE' with 205 status code.
131−type DeleteResetContent contentTypes noContent = Verb 'DELETE 205 contentTypes noContent
131+type DeleteResetContent = Verb 'DELETE 205
132132-- | 'PATCH' with 205 status code.
133−type PatchResetContent contentTypes noContent = Verb 'PATCH 205 contentTypes noContent
133+type PatchResetContent = Verb 'PATCH 205
134134-- | 'PUT' with 205 status code.
135−type PutResetContent contentTypes noContent = Verb 'PUT 205 contentTypes noContent
135+type PutResetContent = Verb 'PUT 205
136136
137137
138138-- ** 206 Partial Content
@@ -144,7 +144,7 @@ type PutResetContent contentTypes noContent = Verb 'PUT 205 contentTypes noConte
144144-- RFC7233 Section 4.1>
145145
146146-- | 'GET' with 206 status code.
147−type GetPartialContent contentTypes noContent = Verb 'GET 206 contentTypes noContent
147+type GetPartialContent = Verb 'GET 206
148148
149149
150150class ReflectMethod a where