Hi,

In MissingH, I have a bunch of little functions that operate on lists.
Some, like uniq (which eliminates duplicate elements in a list), operate
on (Eq a => [a]) lists.  Others, like strip (which eliminates whitespace
at the start and end), operate on Strings only.

Most functions of both types would be useful on ByteStrings and lazy
ByteStrings.  Most of these functions are written in terms of Data.List
functions or list primitives that have equivolents in Data.ByteString.

So, my question is: is there a clever hack available to me so that I
could have 1 version of each function, and have it work on all three
different types of input?  I'd rather avoid having 3 versions, that are
exactly the same except for imports.

Thanks,

-- John
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to