An obscure corner of the Haskell Report

Section 5.2 of the Haskell 2010 Report deals with module export lists. At one point, it says:

Entities in an export list may be named as follows:

  • A value, field name, or class method, whether declared in the module body or imported, may be named by giving the name of the value as a qvarid, which must be in scope. Operators should be enclosed in parentheses to turn them into qvarids.
  • ...

    But, uh... am I missing something? Because according to the Syntax Reference in Chapter 10:

    qvarid → [ monid . ] varid

    varid → ( small { small | large | digit | ' })

    So in which universe does putting an operator in brackets turn it into a qvarid? It looks to me like an operator is clearly a varsym (or maybe qvarsym).

    Does anybody know what's going on here? I mean, clearly Haskell definitely supports writing operators in an export list, but the syntax description in the Report doesn't appear to make sense...


    Wait, hold up... According to the Control-Free Syntax given in section 10.5:

    export → qvar | qtycon ... | qtycls ... | module monid

    ...

    var → varid | ( varsym )

    qvar → qvarid | ( qvarsym )

    So it seems that it's not a qvarid, it's supposed to be a qvar. So it's just a typo, I guess? Is there a process for having such things fixed in the official report?

    链接地址: http://www.djcxy.com/p/87452.html

    上一篇: 如何设置交错网格跨度计数以使用可用的屏幕宽度?

    下一篇: 哈斯克尔报告中一个不起眼的角落