On Fri, Mar 14, 2008 at 6:28 PM, John Meacham <[EMAIL PROTECTED]> wrote: > Note also that you are attaching your rule to 'fmap', however, since > your rule only applies to the 'Parser' monad (if I am reading it > properly) then 'fmap' will have been replaced by the 'fmap' in the > Functor Parser instance. So you would probably be better off doing > something like > > instance Functor Parser where > fmap = parserFmap > > {-# RULES forall x . parserFmap S.pack ( ...
Didn't think of that. I'll change my code accordingly. > Also, you have to be careful attaching rules to functions you don't > define, as you don't know how it will interact with other rules, inline > pragmas or whatnot that might already be attached to that function. Sounds like good advice. Thanks. _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users