Re: type fine until you try to use it

2003-01-14 Thread Hal Daume III
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 =

type fine until you try to use it

2003-01-13 Thread Abraham Egnor
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