haskell - Why is there no typeclass for container-types? -
i found out containers have similar function set. list, set, sequence, text , bytestrings example. wonder why don't use 1 or more common typeclasses.
actually there are, see question making single function work on lists, bytestrings , texts (and perhaps other similar representations), duplicate of yours.
the main reason being in separate package needs language extension - either functional dependencies or type families. have somehow text
can contain char
s, bytestring
can contain word8
s, []
can contain type, , set
can contain instances of ord
.
Comments
Post a Comment