Haskell 运算符允许使用哪些字符? [英] What characters are permitted for Haskell operators?
本文介绍了Haskell 运算符允许使用哪些字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有某处允许的字符的完整列表,或者确定可以在标识符和运算符中使用什么的规则?
Is there a complete list of allowed characters somewhere, or a rule that determines what can be used in an identifier vs an operator?
推荐答案
我要找的是完整的字符列表.根据其他答案,完整列表是;
What I was looking for was the complete list of characters. Based on the other answers, the full list is;
Unicode 标点符号:
Unicode Punctuation:
- http://www.fileformat.info/info/unicode/category/Pc/list.htm
- http://www.fileformat.info/info/unicode/category/Pd/list.htm
- http://www.fileformat.info/info/unicode/category/Pe/list.htm
- http://www.fileformat.info/info/unicode/category/Pf/list.htm
- http://www.fileformat.info/info/unicode/category/Pi/list.htm
- http://www.fileformat.info/info/unicode/category/Po/list.htm
- http://www.fileformat.info/info/unicode/category/Ps/list.htm
Unicode 符号:
Unicode Symbols:
- http://www.fileformat.info/info/unicode/category/Sc/list.htm
- http://www.fileformat.info/info/unicode/category/Sk/list.htm
- http://www.fileformat.info/info/unicode/category/Sm/list.htm
- http://www.fileformat.info/info/unicode/category/So/list.htm
但是排除以下在 Haskell 中具有特殊含义的字符:
But excluding the following characters with special meaning in Haskell:
(),;[]`{}_:"'
A :
仅允许作为运算符的第一个字符,并表示构造函数(参见 以冒号开头的运算符符号是构造函数).
A :
is only permitted as the first character of the operator, and denotes a constructor (see An operator symbol starting with a colon is a constructor).
这篇关于Haskell 运算符允许使用哪些字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文