Why not> allowed as a Haskell infix operator?

Why is it not allowed as an infix operator in Haskell?

GHCi, version 8.0.2: http://www.haskell.org/ghc/  :? for help
Prelude> :{
 infixr 6
 (〉) :: Int -> (Int -> (Int))
 a 〉 b = a + 2*b
:}
print (12)

According to this Haskell Report any Unicode symbol or punctuation and this question it should work.

+4
source share
1 answer

This is probably a mistake. This does not seem to mean that the symbols ClosePunctuationor are OpenPunctuationindicated by the symbol generalCategory. I suggest you open a GHC Trac ticket and see what they think.

https://ghc.haskell.org/trac/ghc/ticket/2687 looks connected and suggests that at least at some point OpenPunctuationthey ClosePunctuationwere considered graphic rather than a symbol.

+6

Source: https://habr.com/ru/post/1679848/


All Articles