qfpl / applied-fp-course

Applied Functional Programming Course - Move from exercises to a working app!
http://qfpl.io/projects/professional-fp-courses/
Other
625 stars 180 forks source link

level07: Core.hs #56

Closed allantl closed 6 years ago

allantl commented 6 years ago

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?

mankyKitty commented 6 years ago

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. :+1: