Closed mankyKitty closed 5 years ago
Musings:
AppM
shouldn't be parameterised over the "error" type, it makes more sense to have your newtype'd application monad have the concrete types.
Stands as good motivation to introduce isolated use of ExceptT
. The generality and flexibility of monad transformers is part of the appeal.
Level 07 might benefit from changing out AppM
to a refactoring to use the mtl
package transformers (ReaderT
and ExceptT
). Changing our custom newtype to a more common(?) use case of wrapper for existing transformers.
Refactored, initial feedback from students is good.
The
AppM
is parametrised over the error type, but could be useful when writing this function if it was. Either introduce and guide through ExceptT as a use case, or provide instructions on parameterising over thee
type for the AppM.