moocfi / haskell-mooc

Haskell MOOC University of Helsinki
Other
307 stars 414 forks source link

Minor typo in Part2 material about HTTP servers #33

Closed Sose closed 3 years ago

Sose commented 3 years ago

https://haskell.mooc.fi/part2#writing-a-http-server-wai-and-warp

The code block has a minor error that is already fixed in the HelloServer.hs file. In the file, the function server is correctly called application instead, which main supplies to run.


main = run port application

-- type Application = Request -> (Response -> IO ResponseReceived) -> IO ResponseReceived
server :: Application
server request respond =
  respond (responseLBS status200 [] (LB.pack "Hello World!"))```
opqdonut commented 3 years ago

thanks, fixed :)