Add ToSample instances for (), Bool and Ordering

Also remove `instance ToSample ()` from example.
This commit is contained in:
Nickolay Kudasov 2015-09-19 01:22:28 +03:00
parent a2bc8a0d0d
commit c769800adb
2 changed files with 5 additions and 3 deletions
servant-docs
example
src/Servant/Docs

View file

@ -53,9 +53,6 @@ instance ToParam (MatrixParam "lang" String) where
"Get the greeting message selected language. Default is en." "Get the greeting message selected language. Default is en."
Normal Normal
instance ToSample () () where
toSample _ = Just ()
instance ToSample Greet Greet where instance ToSample Greet Greet where
toSample _ = Just $ Greet "Hello, haskeller!" toSample _ = Just $ Greet "Hello, haskeller!"

View file

@ -961,6 +961,11 @@ instance HasDocs sublayout => HasDocs (Vault :> sublayout) where
docsFor Proxy ep = docsFor Proxy ep =
docsFor (Proxy :: Proxy sublayout) ep docsFor (Proxy :: Proxy sublayout) ep
-- 'ToSample' instances for simple types
instance ToSample () ()
instance ToSample Bool Bool
instance ToSample Ordering Ordering
-- polymorphic 'ToSample' instances -- polymorphic 'ToSample' instances