on develop help sign in
Adding OVERLAPPABLE/OVERLAPPING pragmas
commit6345095a7d409282c1ae3e0afebeb640f42f145d authorBrendan Hay <brendan.g.hay@gmail.com> dateTue 6 Oct 2015, 10:47 (11 years ago) parentb88c75f
1 file changed+30−9
core/src/Network/Google/Client.hs+30−9
core/src/Network/Google/Client.hs+30−9
@@ -335,51 +335,72 @@ instance ( MimeRender c a
335335
336336-- instance GoogleClient fn => GoogleClient (ReqBody (c ': cs) Body :> fn) where
337337
338−instance MimeUnrender c a => GoogleClient (Get (c ': cs) a) where
338+instance {-# OVERLAPPABLE #-}
339+ MimeUnrender c a => GoogleClient (Get (c ': cs) a) where
339340 type Fn (Get (c ': cs) a) = Client a
340341
341342 clientBuild Proxy = clientMime (Proxy :: Proxy c) methodGet [200, 203]
342343
343−instance Accept c => GoogleClient (Get (c ': cs) ResponseBody) where
344+instance {-# OVERLAPPING #-}
345+ Accept c => GoogleClient (Get (c ': cs) ResponseBody) where
344346 type Fn (Get (c ': cs) ResponseBody) = Client ResponseBody
345347
346348 clientBuild Proxy = clientStream (Proxy :: Proxy c) methodGet [200, 203]
347349
348−instance GoogleClient (Get (c ': cs) ()) where
350+instance {-# OVERLAPPING #-}
351+ GoogleClient (Get (c ': cs) ()) where
349352 type Fn (Get (c ': cs) ()) = Client ()
350353
351354 clientBuild Proxy = clientEmpty methodGet [204]
352355
353−instance MimeUnrender c a => GoogleClient (Post (c ': cs) a) where
356+instance {-# OVERLAPPABLE #-}
357+ MimeUnrender c a => GoogleClient (Post (c ': cs) a) where
354358 type Fn (Post (c ': cs) a) = Client a
355359
356360 clientBuild Proxy = clientMime (Proxy :: Proxy c) methodPost [200, 201]
357361
358−instance GoogleClient (Post (c ': cs) ()) where
362+instance {-# OVERLAPPING #-}
363+ GoogleClient (Post (c ': cs) ()) where
359364 type Fn (Post (c ': cs) ()) = Client ()
360365
361366 clientBuild Proxy = clientEmpty methodPost [204]
362367
363−instance MimeUnrender c a => GoogleClient (Put (c ': cs) a) where
368+instance {-# OVERLAPPABLE #-}
369+ MimeUnrender c a => GoogleClient (Put (c ': cs) a) where
364370 type Fn (Put (c ': cs) a) = Client a
365371
366372 clientBuild Proxy = clientMime (Proxy :: Proxy c) methodPut [200, 201]
367373
368−instance GoogleClient (Put (c ': cs) ()) where
374+instance {-# OVERLAPPING #-}
375+ GoogleClient (Put (c ': cs) ()) where
369376 type Fn (Put (c ': cs) ()) = Client ()
370377
371378 clientBuild Proxy = clientEmpty methodPut [204]
372379
373−instance MimeUnrender c a => GoogleClient (Patch (c ': cs) a) where
380+instance {-# OVERLAPPABLE #-}
381+ MimeUnrender c a => GoogleClient (Patch (c ': cs) a) where
374382 type Fn (Patch (c ': cs) a) = Client a
375383
376384 clientBuild Proxy = clientMime (Proxy :: Proxy c) methodPatch [200, 201]
377385
378−instance GoogleClient (Patch (c ': cs) ()) where
386+instance {-# OVERLAPPING #-}
387+ GoogleClient (Patch (c ': cs) ()) where
379388 type Fn (Patch (c ': cs) ()) = Client ()
380389
381390 clientBuild Proxy = clientEmpty methodPatch [204]
382391
392+instance {-# OVERLAPPABLE #-}
393+ MimeUnrender c a => GoogleClient (Delete (c ': cs) a) where
394+ type Fn (Delete (c ': cs) a) = Client a
395+
396+ clientBuild Proxy = clientMime (Proxy :: Proxy c) methodDelete [200, 202]
397+
398+instance {-# OVERLAPPING #-}
399+ GoogleClient (Delete (c ': cs) ()) where
400+ type Fn (Delete (c ': cs) ()) = Client ()
401+
402+ clientBuild Proxy = clientEmpty methodDelete [204]
403+
383404-- perform :: Accept
384405-- -> (ResponseBody -> Client (Either SerializeError a))
385406-- -> Method