<br><br><div class="gmail_quote">On Sat, Oct 8, 2011 at 4:28 PM, Captain Freako <span dir="ltr"><<a href="mailto:capn.freako@gmail.com">capn.freako@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
<span style="font-family:courier new,monospace"> 17 newtype Filter e a = F {</span><br style="font-family:courier new,monospace">
<b><span style="font-family:courier new,monospace">
18 runFilter :: EitherT e (State FilterState) a</span><br style="font-family:courier new,monospace">
</b><span style="font-family:courier new,monospace"><b>
</b> 19 } deriving (Monad, MonadState FilterState)</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">
</span><br>
it compiles, but I can't figure out how I'd feed the input to the filter, in that case.<br></blockquote><div><br></div><div>Input to Filter would be modeled with: 'a -> Filter e b'.</div><div><br></div>
<div>I would rename your 'runFilter' to 'unFilter', then define a function 'runFilter' accepting an initial FilterState.</div><div><br></div><div>Regards,</div><div><br></div><div>- db</div><div><br>
</div></div>