on master help sign in
Add ToSample instances for (), Bool and Ordering

Also remove `instance ToSample ()` from example.

commitc769800adbb5c74e5f54e85b42812f457c041b3a authorNickolay Kudasov <nickolay.kudasov@gmail.com> dateSat 19 Sep 2015, 01:22 (11 years ago) parenta2bc8a0
2 files changed+5−3
servant-docs/example/greet.hs−3 servant-docs/src/Servant/Docs/Internal.hs+5
servant-docs/example/greet.hs−3
@@ -53,9 +53,6 @@ instance ToParam (MatrixParam "lang" String) where
5353 "Get the greeting message selected language. Default is en."
5454 Normal
5555
56−instance ToSample () () where
57− toSample _ = Just ()
58−
5956instance ToSample Greet Greet where
6057 toSample _ = Just $ Greet "Hello, haskeller!"
6158
servant-docs/src/Servant/Docs/Internal.hs+5
@@ -961,6 +961,11 @@ instance HasDocs sublayout => HasDocs (Vault :> sublayout) where
961961 docsFor Proxy ep =
962962 docsFor (Proxy :: Proxy sublayout) ep
963963
964+-- 'ToSample' instances for simple types
965+
966+instance ToSample () ()
967+instance ToSample Bool Bool
968+instance ToSample Ordering Ordering
964969
965970-- polymorphic 'ToSample' instances
966971