A few things.
If you give newFilterIS a type signature it works fine. Note that this
requires a higher-rank type, but that's okay:
data FilterIS = FilterIS { source :: InputStream s = s, filter
:: Filter }
newFilterIS :: (forall s . InputStream s = s) - Filter - FilterIS
newFilterIS =
In a project I'm working on, one data type I've defined is this:
data FilterIS = FilterIS { source :: (InputStream s) = s, filter ::
Filter }
which, to me, just means it holds any instance of the InputStream class
and a Filter value. Sure, says ghci, fine by me. However, if I try to do