qfpl / applied-fp-course

Applied Functional Programming Course - Move from exercises to a working app!

Home Page:http://qfpl.io/projects/professional-fp-courses/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

level07: Core.hs

allantl opened this issue · comments

In level 07, Core.hs (in function app)

Since mkErrorResponse, now returns an AppM Response.
When you run it, the return will be IO (Either Error a).

I'm a bit lost here, how do you handle the error case?

Erm, not cleanly. After you've run the AppM you would then need to handle this Error separately to the others.

Seems like a confusing leftover from a recent refactoring, sorry about that. I'll fix it up so it makes a bit more sense. 👍