Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
BNF insufficient for S (3, 4) #5883
Original bug ID: 5883
The syntax does not seem to produce the expression “S (3, 4)” in the context of the declaration “type w = S of int * int”. The rule: expr ::= constr expr might suggest that expr could be a tuple, but then “let u = 4, 8 in S u” should be legal but ocaml 4.00.1 rejects it.
For prettier text and soap box see:
Comment author: @garrigue
Indeed, constructors have an arity, and you cannot apply them to tuples.
By the way, I think that the problem is not the production itself (which is about the parse,