on master help sign in
Make sure tutorial can build
commitb3e35fbc79ec315179f12d1bcfe0e4b2c939c98d authorIvan Lazar Miljenovic <Ivan.Miljenovic@gmail.com> dateMon 9 Oct 2017, 13:22 (9 years ago) parentdc40bad
2 files changed+5
doc/tutorial/Docs.lhs+4 doc/tutorial/tutorial.cabal+1
doc/tutorial/Docs.lhs+4
@@ -23,6 +23,7 @@ import Network.Wai
2323import Servant.API
2424import Servant.Docs
2525import Servant.Server
26+import Web.FormUrlEncoded(FromForm(..), ToForm(..))
2627```
2728
2829And we'll import some things from one of our earlier modules
@@ -218,6 +219,9 @@ type ExampleAPI2 = "position" :> Capture "x" Int :> Capture "y" Int :> Get '[JSO
218219 :<|> "hello" :> QueryParam "name" String :> Get '[JSON] HelloMessage
219220 :<|> "marketing" :> ReqBody '[JSON, FormUrlEncoded] ClientInfo :> Post '[JSON] Email
220221
222+instance ToForm ClientInfo
223+instance FromForm ClientInfo
224+
221225exampleAPI2 :: Proxy ExampleAPI2
222226exampleAPI2 = Proxy
223227
doc/tutorial/tutorial.cabal+1
@@ -31,6 +31,7 @@ library
3131 , servant-docs == 0.11.*
3232 , servant-js >= 0.9 && <0.10
3333 , warp
34+ , http-api-data
3435 , http-media
3536 , lucid
3637 , time