
On Tuesday 28 March 2006 11:12, Daniel McAllansmith wrote:
Hi, folks.
I've got a working class and instances thereof. I would now like to change the class such that error behaviour is specified by MonadError, for the moment throwing String errors. When I try to add MonadError into the types I eventually hit the requirement for allow-undecidable-instances. Is there some way I can I avoid having to use this extension?
I've received a link[1] off-list to a patch to GHC changing this behaviour, so it looks like in the future I'll be able to remove the allow-undecidable-instances flag and rely on just glasgow-exts.
instance (Num i, Bounded i, Monad m, MonadError String m) => MonadSource i (SourceT i m) where ...
That aside, is what I have done, including a type in the context, considered an acceptable solution for this sort of problem? Cheers Daniel [1] http://article.gmane.org/gmane.comp.lang.haskell.cvs.ghc/13500