Add multiline Description example
This commit is contained in:
parent
272e47c3d3
commit
262453b0d1
1 changed files with 8 additions and 1 deletions
|
@ -18,7 +18,14 @@ data Summary (sym :: Symbol)
|
||||||
--
|
--
|
||||||
-- Example:
|
-- Example:
|
||||||
--
|
--
|
||||||
-- >>> type MyApi = Description "Some longer implementation details here." :> "books" :> Capture "isbn" Text :> Get '[JSON] Book
|
-- >>> :{
|
||||||
|
--type MyApi = Description
|
||||||
|
-- "This comment is visible in multiple Servant interpretations \
|
||||||
|
-- \and can be really long if necessary. \
|
||||||
|
-- \Haskell multiline support is not perfect \
|
||||||
|
-- \but it's still very readable."
|
||||||
|
-- :> Get '[JSON] Book
|
||||||
|
-- :}
|
||||||
data Description (sym :: Symbol)
|
data Description (sym :: Symbol)
|
||||||
deriving (Typeable)
|
deriving (Typeable)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue