[Haskell-cafe] The Proliferation of List-Like Types

Johan Tibell johan.tibell at gmail.com
Thu Feb 21 04:06:55 EST 2008

Hi John!

On Wed, Feb 20, 2008 at 3:39 PM, John Goerzen <jgoerzen at complete.org> wrote:
>  3) Would it make sense to base as much code as possible in the Haskell
>    core areound ListLike definitions?  Here I think of functions such
>    as lines and words, which make sense both on [Char] as well as
>    ByteStrings.

I don't think the examples you gave (i.e. lines and words) make much
sense on ByteStrings. You would have to assume that the sequence of
bytes are in some particular Unicode encoding and thus words and lines
will break if they get passed a ByteString using a different encoding.
I don't think either of those two functions make sense on anything but
sequence of character types like String.

-- Johan

More information about the Haskell-Cafe mailing list