on master help sign in
Add ToSample instances for (), Bool and Ordering
c769800Nickolay Kudasov
servant-docs/example/greet.hs−3
@@ -53,9 +53,6 @@ instance ToParam (MatrixParam "lang" String) where
53 "Get the greeting message selected language. Default is en."
53 "Get the greeting message selected language. Default is en."
54 Normal
54 Normal
55
55
56−instance ToSample () () where
57− toSample _ = Just ()
58−
59instance ToSample Greet Greet where
56instance ToSample Greet Greet where
60 toSample _ = Just $ Greet "Hello, haskeller!"
57 toSample _ = Just $ Greet "Hello, haskeller!"
61
58
servant-docs/src/Servant/Docs/Internal.hs+5
@@ -961,6 +961,11 @@ instance HasDocs sublayout => HasDocs (Vault :> sublayout) where
961 docsFor Proxy ep =
961 docsFor Proxy ep =
962 docsFor (Proxy :: Proxy sublayout) ep
962 docsFor (Proxy :: Proxy sublayout) ep
963
963
964+-- 'ToSample' instances for simple types
965+
966+instance ToSample () ()
967+instance ToSample Bool Bool
968+instance ToSample Ordering Ordering
964
969
965-- polymorphic 'ToSample' instances
970-- polymorphic 'ToSample' instances
966
971