Problem: we want to make a new release to support latest
GHC versions, but there was a deprecation in recent changes.
Solution: make a major version bump, set the new version to
1.1.0.0.
We want to release a version which supports text-2.0.* and newer GHC.
Note: I have deleted the hash from the .cabal file, because it's more
convenient when this file is in the repo.
The old interface only allowed one to perform terminal detection on a
handle and change it to UTF-8 if it was not a terminal. Turns our, it
makes sense to sometimes leave the original encoding on a handle even if
it does not point to a terminal.
* Change the interface to separate these two use-cases.
* Extract main-wrappers to a new `Main` module.
This function allows one to not only safely set the best encoding on a
file descriptor, but also restore the previous one. The idea is that it
will be used on file descriptors that come from the outside and so we
don’t know how they were used and will be used after us.