From 747765c26985c0affdd9ccb0edb0888bdac2f3c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Sinan=20A=C4=9Facan?= Date: Fri, 25 Aug 2017 15:00:04 +0300 Subject: [PATCH] Remove `ToSample a => ToSample [a]` instance `ToSample [a]` was generating an infinite list of samples. This is far from being useful; if you have two samples for `a` servant-docs generates 79kloc long samples for `[a]`. Because it's impossible to come up with a useful `ToSample [a]` that works for all use cases, we leave that out. --- servant-docs/CHANGELOG.md | 2 ++ servant-docs/src/Servant/Docs/Internal.hs | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/servant-docs/CHANGELOG.md b/servant-docs/CHANGELOG.md index c239a5b4..4391baca 100644 --- a/servant-docs/CHANGELOG.md +++ b/servant-docs/CHANGELOG.md @@ -6,6 +6,8 @@ * Add a markdown header for the Headers an endpoint is sensitive to. * Document the HTTP Method the parameters of an endpoint belong to (rather than assuming `GET` for all of them). +* Remove `ToSample a => ToSample [a]` and `ToSample (ZipList a)` instances + (https://github.com/haskell-servant/servant/pull/797). 0.11 ---- diff --git a/servant-docs/src/Servant/Docs/Internal.hs b/servant-docs/src/Servant/Docs/Internal.hs index ea85f22d..ea717da8 100644 --- a/servant-docs/src/Servant/Docs/Internal.hs +++ b/servant-docs/src/Servant/Docs/Internal.hs @@ -895,11 +895,9 @@ instance (ToSample a, ToSample b, ToSample c, ToSample d, ToSample e, ToSample f instance ToSample a => ToSample (Maybe a) instance (ToSample a, ToSample b) => ToSample (Either a b) -instance ToSample a => ToSample [a] -- ToSample instances for Control.Applicative types instance ToSample a => ToSample (Const a b) -instance ToSample a => ToSample (ZipList a) -- ToSample instances for Data.Monoid newtypes instance ToSample All