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!"))```
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 calledapplication
instead, which main supplies torun
.