You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 1862 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Hi,
this code fragment and the operations done gives me the
problem. Please try it, sorry but I haven't done more
tests about it, but it seems me related to other posts
earlier on this list. My opinion is that this transformations
should work as in 3.07+beta2
value page ?(h1=[]) ?(h2=[]) ?(h4=[]) ?(track="") ?(bgcolor="")
?(color="") ?(hr=(0, ""))
tit act met d =
let ph l su pr c =
if l <> [] then do {
let s = ref "" in
List.iter (fun (x, p) -> s.val :=
s.val ^ (if p then "
Original bug ID: 1862
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
From: artboreb@netscape.net (Arturo Borquez)
Hi,
this code fragment and the operations done gives me the
problem. Please try it, sorry but I haven't done more
tests about it, but it seems me related to other posts
earlier on this list. My opinion is that this transformations
should work as in 3.07+beta2
Please cut and paste the folowing:
(*
A round tour with camlp4 with
generate ocaml syntax mli file, convert it to revised syntax & compile
'a.ml (r_syntax -i option) -> 'ao.mli (o_syntax) -> 'a.mli (r_syntax) -> 'a.cmi
ocamlopt -pp camlp4r -i html.ml > htmlo.mli;
camlp4o pr_r.cmo -l 92 htmlo.mli > html.mli;
ocamlopt -pp camlp4r -c html.mli;
compiles ok in 3.07+beta2
feature or bug ???
BUT with 3.07 the same yields
[20:51:13 fethtml-1]: ocamlopt -pp camlp4r -i html.ml > htmlo.mli;
[20:51:16 fethtml-1]: camlp4o pr_r.cmo -l 92 htmlo.mli > html.mli;
[20:51:16 fethtml-1]: ocamlopt -pp camlp4r -c html.mli;
File "html.mli", line 8, characters 6-224:
Failure: labelled type not allowed here
Preprocessor error
[20:51:16 fethtml-1]:
*)
module Html = struct
type me = [ Get | Post ];
value page ?(h1=[]) ?(h2=[]) ?(h4=[]) ?(track="") ?(bgcolor="")
?(color="") ?(hr=(0, ""))
tit act met d =
let ph l su pr c =
if l <> [] then do {
let s = ref "" in
List.iter (fun (x, p) -> s.val :=
s.val ^ (if p then "
" else "") ^ su ^
" else "")) l; s.val ^ "\n" }pr ^ (if p then "
else "" in
("\n" ^
"\n" ^
"<meta http-equiv="content-type" content="text/html; charset=UTF-8">\n" ^
"<TITLE>" ^ tit ^ "</TITLE>\n\n<BODY" ^
(if bgcolor <> "" then " BGCOLOR="" ^ bgcolor ^ """
else "") ^ ">\n" ^
(ph h1 "
" "
" color) ^(ph h2 "
" "
" color) ^(ph h4 "
" "
" color) ^"<FORM action="" ^ act ^ "" method="" ^
(if met = Get then "GET" else "POST") ^ "">\n" ^
(if track <> "" then
"<input type="hidden" name="track" value="" ^ track ^ "">\n"
else "")) ^
d ^ "\n\n" ^
(if fst hr > 0 then
"<HR ALIGN="LEFT" WIDTH="" ^ (string_of_int (fst hr)) ^ "%">"
else "") ^
(if snd hr <> "" then snd hr else "") ^ "\n\n"
;
end;
Best regards
--
Arturo Borquez
The text was updated successfully, but these errors were encountered: