io-string-like

Classes to handle Prelude style IO functions for different datatypes

https://github.com/clintonmead/io-string-like#readme

Latest on Hackage:0.1.0.1@rev:2

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD-3-Clause licensed by Clinton Mead
Maintained by [email protected]

The functions in the Prelude such as "getContents", "putStr" only work for plain Strings.

There are similar functions in "ByteString" for reading and writing, as well as "Text".

This requires one to import the appropriate functions, usually qualified, for the particular datatype one is using. Changing the datatype at the very least involves changing import statements across your program.

The package introduces classes to overload functions like "getContents", "putStr" over multiple datatypes, so implementations can be changed easily.

All the code documentation is in System.IO.StringLike.Impl.

All the other modules are just re-exports.