
12 Mar
2010
12 Mar
'10
8 p.m.
*> runWriter . runErrorT $ censor (filter (/=3)) $ tell [1,2,3] >> throwError "" (Left "",[1,2,3]) That's kind of weird, right? I understand why it is that way. I think this is reason enough to make censor part of the class, since it wouldn't have this short-coming if it weren't defined in terms of pass. *> let censorErrorT f (ErrorT m) = ErrorT (censor f m) *> runWriter . runErrorT $ censorErrorT (filter (/=3)) $ tell [1,2,3]
throwError "" (Left "",[1,2])
Or is it preferable for censor and pass to misbehave in the same way?