A very long-awaited improvement: for unicode exceptions, and I/O exceptions which look like they were caused by a unicode error (usually text decoding failure), our error message now includes an explanation and advice on what to do. Currently this uses the GHC.IO.Encoding API, which is not ideal: "The API of this module is unstable and not meant to be consumed by the general public. If you absolutely must depend on it, make sure to use a tight upper bound, e.g., base < 4.X rather than base < 5, because the interface can change rapidly without much warning." Also it relies on scanning for patterns in GHC's various unicode-related error messages, which may not be complete and could change in future. To do: try the encoding package's IO helpers, perhaps they give more specific exceptions. |
||
|---|---|---|
| .. | ||
| Debug.hs | ||
| IO.hs | ||
| Parse.hs | ||
| Regex.hs | ||
| String.hs | ||
| Test.hs | ||
| Text.hs | ||