Of the following lines, Haskell seems to have problems only with the last one. The error when I load the file in GHCi is error: parse error on input ‘♟’
.
xK = '♔'
xK = '♕'
xR = '♖'
xB = '♗'
xN = '♘'
xP = '♙'
xk = '♚'
xk = '♛'
xr = '♜'
xb = '♝'
xn = '♞'
xp = '♟︎'
Whatever the reason is, I find so strange that everything is just fine with the other 11 characters.
Might be important: I copied the characters straight from Wikipedia.
Your black pawn is secretly two codepoints. Compare:
> "♟" -- entered myself
"\9823"
> "♟︎" -- copied and pasted from the question
"\9823\65038"
If you include only the first codepoint or change your binding from a Char
to a String
, it will work fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With