git.iko.soy/typeable/http-api-data
on master help sign in
Add warning for DeriveAnyClass (closes #27)
commit57bf0a34cade14e9014ddb479203c876cbbf077e authorNickolay Kudasov <nickolay.kudasov@gmail.com> dateFri 10 Jun 2016, 02:41 (10 years ago) parent9bd7e99
1 file changed+6
Web/HttpApiData/Internal.hs+6
Web/HttpApiData/Internal.hs+6
@@ -44,6 +44,9 @@ import TextShow (TextShow, showt)
4444#endif
4545
4646-- | Convert value to HTTP API data.
47+--
48+-- __WARNING__: Do not derive this using @DeriveAnyClass@ as the generated
49+-- instance will loop indefinitely.
4750class ToHttpApiData a where
4851 {-# MINIMAL toUrlPiece | toQueryParam #-}
4952 -- | Convert to URL path piece.
@@ -59,6 +62,9 @@ class ToHttpApiData a where
5962 toQueryParam = toUrlPiece
6063
6164-- | Parse value from HTTP API data.
65+--
66+-- __WARNING__: Do not derive this using @DeriveAnyClass@ as the generated
67+-- instance will loop indefinitely.
6268class FromHttpApiData a where
6369 {-# MINIMAL parseUrlPiece | parseQueryParam #-}
6470 -- | Parse URL path piece.