Hi,

One of my colleagues asked about using Unicode symbols in Haskell operators and I initially thought that this was supported.

However, the code at the bottom of this message doesn't parse, reporting a lexical error on basically all of the funny characters of the form:

Main.hs:1:5: error: lexical error at character '\65288'

Character 65288 (0xff08) is punctuation [Ps] which I understand to mean it counts as a uniSymbol in the lexical structure described in the Haskell Report.

https://www.haskell.org/onlinereport/haskell2010/haskellch2.html#x7-160002.2

Should this work? Not that I really want this specific example to work, but I'm interested to know why.

Many thanks,

David


$ cat app/Main.hs
foo (›’-’)› bar = False
foo ‹(’-’‹) bar = False
foo ∧(’-’)∧ bar = False
foo ∨(’-’)∨ bar = False
$ cat app/Main.hs | base64 # try and avoid mangling in email
Zm9vIO+8iOKAuuKAmS3igJnvvInigLogYmFyID0gRmFsc2UKZm9vIOKAue+8iOKAmS3igJnigLnv
vIkgYmFyID0gRmFsc2UKZm9vIOKIp++8iOKAmS3igJnvvIniiKcgYmFyID0gRmFsc2UKZm9vIOKI
qO+8iOKAmS3igJnvvIniiKggYmFyID0gRmFsc2UK