On Sat, Oct 8, 2011 at 4:28 PM, Captain Freako <[email protected]>wrote:
>
> 17 newtype Filter e a = F {
> * 18 runFilter :: EitherT e (State FilterState) a
> ** * 19 } deriving (Monad, MonadState FilterState)
>
> it compiles, but I can't figure out how I'd feed the input to the filter,
> in that case.
>
Input to Filter would be modeled with: 'a -> Filter e b'.
I would rename your 'runFilter' to 'unFilter', then define a function
'runFilter' accepting an initial FilterState.
Regards,
- db
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe