Skip to content

GHCi 9.2.1 Unicode input broken on macOS Arm64

Summary

Entering non-ASCII symbols into the GHCi readline environment on arm64 doesn't work (x86_64 is unaffected).

Steps to reproduce

  1. Enter the GHCi interpreter
  2. Type or paste print "¬"
  3. Observe that the Unicode replacement character has been inserted, but press return anyway
  4. Observe the output "\65533\65533"
  5. Note that putStrLn "\172" prints the expected character

Expected behavior

Rather than "\65533\65533" (two instances of the Unicode replacement character), the output should be "\172" as it is on x86_64 builds. The symbol should behave as it does in the terminal outside of GHCi, being printed as itself rather than as the replacement character.

Environment

  • GHC version used: 9.2.1

Optional:

  • Operating System: macOS 11.6
  • System Architecture: arm64
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information