Why does a partial application have value restriction?

后端 未结 4 1952
日久生厌
日久生厌 2021-01-24 02:15

I can understand that allowing mutable is the reason for value restriction and weakly polymorphism. Basically a mutable ref inside a function may change the type in

4条回答
  •  独厮守ぢ
    2021-01-24 02:42

    A 'let' expression is not a (syntactic) value. While there is a precise definition of 'value', roughly the only values are identifiers, functions, constants, and constructors applied to values.

    This paper and those it references explains the problem in detail.

提交回复
热议问题