
On 24 February 2017 at 11:25, Jeff Clites
On Feb 23, 2017, at 9:49 PM, Brandon Allbery
wrote: On Fri, Feb 24, 2017 at 12:38 AM, Harendra Kumar
wrote:
In these examples, we can identify the constructor (capitalized first letter) on the LHS and so we are trained to know that it is a pattern match. The original point related to number specialness was that "1 = 2" is not easily identifiable as a pattern match because there are no explicit constructors. The literal "1" here is neither an "explicit constructor" nor a binding symbol.
Yes, at this point you just have to know that the Report specifies a bunch of special handling for numeric literals.
Also: "day" = "night"
Isn't every "=" a pattern match?
Every "=" with a constructor on the LHS. String is also a special case similar to numeric literals. The above example should be equivalent to: 'd' : 'a' : 'y' : [] = "night" -harendra