fix Docs haddocks
This commit is contained in:
parent
d6464d9dc4
commit
5b5f530406
1 changed files with 3 additions and 4 deletions
|
@ -34,7 +34,6 @@
|
||||||
-- > import Data.Proxy
|
-- > import Data.Proxy
|
||||||
-- > import Data.Text
|
-- > import Data.Text
|
||||||
-- > import Servant
|
-- > import Servant
|
||||||
-- > import Servant.Docs
|
|
||||||
-- >
|
-- >
|
||||||
-- > -- our type for a Greeting message
|
-- > -- our type for a Greeting message
|
||||||
-- > data Greet = Greet { _msg :: Text }
|
-- > data Greet = Greet { _msg :: Text }
|
||||||
|
@ -46,7 +45,7 @@
|
||||||
-- >
|
-- >
|
||||||
-- > -- we provide a sample value for the 'Greet' type
|
-- > -- we provide a sample value for the 'Greet' type
|
||||||
-- > instance ToSample Greet where
|
-- > instance ToSample Greet where
|
||||||
-- > toSample Proxy = Just (encode g)
|
-- > toSample = Just g
|
||||||
-- >
|
-- >
|
||||||
-- > where g = Greet "Hello, haskeller!"
|
-- > where g = Greet "Hello, haskeller!"
|
||||||
-- >
|
-- >
|
||||||
|
@ -97,7 +96,7 @@ module Servant.Docs
|
||||||
, Action, captures, params, rqbody, response, defAction
|
, Action, captures, params, rqbody, response, defAction
|
||||||
, single
|
, single
|
||||||
|
|
||||||
, -- * Useful modules when defining your own instances
|
, -- * Useful modules when defining your doc printers
|
||||||
module Control.Lens
|
module Control.Lens
|
||||||
, module Data.Monoid
|
, module Data.Monoid
|
||||||
) where
|
) where
|
||||||
|
@ -313,7 +312,7 @@ class HasDocs layout where
|
||||||
-- > instance ToJSON Greet
|
-- > instance ToJSON Greet
|
||||||
-- >
|
-- >
|
||||||
-- > instance ToSample Greet where
|
-- > instance ToSample Greet where
|
||||||
-- > toSample Proxy = Just (encode g)
|
-- > toSample = Just g
|
||||||
-- >
|
-- >
|
||||||
-- > where g = Greet "Hello, haskeller!"
|
-- > where g = Greet "Hello, haskeller!"
|
||||||
class ToJSON a => ToSample a where
|
class ToJSON a => ToSample a where
|
||||||
|
|
Loading…
Reference in a new issue