New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3 documentation suggestions and 5 camlp4 problems #3688
Comments
Comment author: administrator Hi, About the Camlp4 problems:
OCaml forbids such type schemes ( If it happens to be buggy to allow such top level polymorphic types,
Fixed.
Fixed: val -> contents, and contents -> contents__.
There is no way at parse time of guessing the arity of A: needs type I've added a -no_curried_constructors option to pr_r: all non constant data
Fixed. Sincerely, -- Michel |
Comment author: administrator Fixed the Camlp4 part in June 2005 [MM] |
Comment author: @damiendoligez About documentation: STILL TO FIX: point 1 |
Comment author: Kakadu Also in OCaml interface file we write val f : x:int -> y:int -> int but in revised we should write with ~: value f : ~x:int -> ~y:int -> int It seems that Chapter 6 |
Comment author: @damiendoligez Point 1: fixed (commit 13301) |
Comment author: @bobzhang It's true that in revised syntax "~" is required for label types, but I did not find a place to add the documentation |
Comment author: @damiendoligez Camlp4 now has its own bug-tracker, so I reported the problem there: |
Original bug ID: 3688
Reporter: administrator
Status: closed (set by @damiendoligez on 2015-01-09T17:44:32Z)
Resolution: suspended
Priority: normal
Severity: minor
Target version: undecided
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Has duplicate: #5035
Monitored by: @bobzhang "Hendrik Tews"
Bug description
Hi,
during my work on the quotations in original syntax I noticed
several small problems in the documentation and in Camlp4. I
thought I just report all of them for the record.
Ocaml documentation:
The bigarray syntactic sugar is only mentioned in the
bigarray modules. IMHO it deserves at least a place in the
Chapter on language extensions.
In 6.11 there is a production
definition ::= expr
missing.
the empty array is missing in the productions in 6.6 and 6.7
Revised syntax pa_r:
In the revised syntax one can define
type a = ! 'a . list 'a
is this really an admissable type? Anyway, pr_o prints it as
type a = 'a . 'a list
which is illegal.
val is not handled consistenly:
type x = {val : int; kk : int};
value f a = { (a) with val = 4};
works fine with pa_r but becomes illegal when printed with
pr_o.
let a = - -5,6 is leagal with ocaml but rejected from pa_o
Original syntax pa_o:
I believe there are severe problems in guessing the
constructor arity. For instance
type 'a t = A of 'a
let f = function A(a,b) -> A(b,a)
compiles fine with pa_o but becomes illegal when printed with
pr_r.
Quotations q_MLast:
Currently <:expr< -5l >>, <:expr< -5L >> and <:expr< -5n >>
work not as expected in a patterns (they match (~) 5 instead
of -5).
Bye,
Hendrik
The text was updated successfully, but these errors were encountered: