on master help sign in
Add multiline Description example
262453bCatherine Galkina
servant/src/Servant/API/Description.hs+8−1
@@ -18,7 +18,14 @@ data Summary (sym :: Symbol)
18--
18--
19-- Example:
19-- Example:
20--
20--
21−-- >>> type MyApi = Description "Some longer implementation details here." :> "books" :> Capture "isbn" Text :> Get '[JSON] Book
21+-- >>> :{
22+--type MyApi = Description
23+-- "This comment is visible in multiple Servant interpretations \
24+-- \and can be really long if necessary. \
25+-- \Haskell multiline support is not perfect \
26+-- \but it's still very readable."
27+-- :> Get '[JSON] Book
28+-- :}
22data Description (sym :: Symbol)
29data Description (sym :: Symbol)
23 deriving (Typeable)
30 deriving (Typeable)
24
31