<br><br><div class="gmail_quote">On Sat, Oct 8, 2011 at 4:28 PM, Captain Freako <span dir="ltr">&lt;<a href="mailto:capn.freako@gmail.com">capn.freako@gmail.com</a>&gt;</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&#39;t figure out how I&#39;d feed the input to the filter, in that case.<br></blockquote><div><br></div><div>Input to Filter would be modeled with:  &#39;a -&gt; Filter e b&#39;.</div><div><br></div>
<div>I would rename your &#39;runFilter&#39; to &#39;unFilter&#39;, then define a function &#39;runFilter&#39; accepting an initial FilterState.</div><div><br></div><div>Regards,</div><div><br></div><div>- db</div><div><br>
</div></div>