Unicode 8.0 and later characters are invariably lexical errors
I've tried a few added alphabet characters and emojis from various Unicode versions. It seems like Unicode 7.0 works fine. It seems like characters from Unicode 8.0 and later are lexical errors.
For example, with the Unicode 10.0 T. rex emoji, there are three lexical errors below:
module NoTRex where tRex :: String tRex = "🦖" 🦖 :: String 🦖 = "🦖"
[1 of 1] Compiling NoTRex ( NoTRex.hs, NoTRex.o ) NoTRex.hs:4:9: error: lexical error in string/character literal at character '\129430' | 4 | tRex = "🦖" | ^
If that's removed, the name of the function
🦖 is also shown to be a lexical error.
Also, pasting the fourth line into GHCi pastes only the characters before the first
🦖, like the
🦖 and everything afterward weren't pasted in.
$ ghc --version The Glorious Glasgow Haskell Compilation System, version 8.4.3 $ lsb_release -ds Ubuntu 16.04.5 LTS