
8 Apr
2011
8 Apr
'11
1:14 p.m.
Hi Ross, On Apr 8, 2011, at 6:50 AM, Ross Paterson wrote:
instance (MonadFix m) => MonadFix (MaybeT m) where mfix f = MaybeT (mfix (runMaybeT . f . unJust)) where unJust = fromMaybe (error "mfix MaybeT: Nothing")
is compatible with the MonadFix instance for Maybe, so it should probably go in.
For whatever it's worth, modulo names and type-wrappers, your definition above is the same as Equation 4.36 (pg. 54) of http://bit.ly/fGJMVD, and Proposition 4.9.1 (on the same page) establishes that it's a good definition. -Levent.