[Haskell-cafe] Lazy vs Strict ByteStrings

ALeX Kazik alex at kazik.de
Thu Mar 16 08:47:08 UTC 2017


Hi,

> Obviously, this is not exclusive to ByteString. Using the same name for
> strict and lazy versions is all over the place. Here is another example:
>
> https://hackage.haskell.org/package/unordered-containers/docs/Data-HashMap-Lazy.html
> https://hackage.haskell.org/package/unordered-containers/docs/Data-HashMap-Strict.html

HashMaps and Maps lazy and strict do have the same type! Only the
function which work on them are different.
Yes, you can use a Data.HashMap.Lazy.HashMap with the
Data.HashMap.Strict functions.

Text however has a different type for lazy and strict (like ByteString).

And yes, I agree that it's confusing.

ALeX.


More information about the Haskell-Cafe mailing list