* can anyone replicate this camlp4 problem?
@ 2009-03-25 19:55 Peng Zang
2009-03-25 20:01 ` [Caml-list] " Andres Varon
0 siblings, 1 reply; 5+ messages in thread
From: Peng Zang @ 2009-03-25 19:55 UTC (permalink / raw)
To: caml-list
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi, camlp4 seems to break parsing of object duplication on 3.11. Can anyone
replicate this problem? Is this an known issue? A quick google search did
not reveal anything..
Peng
Objective Caml version 3.11.0
# #use "topfind";;
Findlib has been successfully loaded. Additional directives:
#require "package";; to load a package
#list;; to list the available packages
#camlp4o;; to load camlp4 (standard syntax)
#camlp4r;; to load camlp4 (revised syntax)
#predicates "p,q,...";; to set these predicates
Topfind.reset();; to force that packages will be reloaded
#thread;; to enable threads
# #camlp4o;;
/home/peng/app-data/godi-3.11/lib/ocaml/std-lib/dynlink.cma: loaded
/home/peng/app-data/godi-3.11/lib/ocaml/std-lib/camlp4: added to search path
/home/peng/app-data/godi-3.11/lib/ocaml/std-lib/camlp4/camlp4o.cma: loaded
Camlp4 Parsing version 3.11.0
# class functional_point x y = object
val x = x
val y = y
method get_x = x
method get_y = y
method move dx dy = {< x = x + dx; y = y + dy >}
end;;
Characters 138-144:
method move dx dy = {< x = x + dx; y = y + dy >}
^^^^^^
Warning S: this expression should have type unit.
Characters 146-156:
method move dx dy = {< x = x + dx; y = y + dy >}
^^^^^^^^^^
Error: This expression has type bool but is here used with type int
#
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
iD8DBQFJyoxPfIRcEFL/JewRAg8TAKCjoxTmDmfLxVHa7sXq0tGlt2rKDgCgp/C2
nc4vnKWkTvKXeR4Q0z4XB94=
=IwA+
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] can anyone replicate this camlp4 problem?
2009-03-25 19:55 can anyone replicate this camlp4 problem? Peng Zang
@ 2009-03-25 20:01 ` Andres Varon
2009-03-25 20:15 ` Peng Zang
0 siblings, 1 reply; 5+ messages in thread
From: Andres Varon @ 2009-03-25 20:01 UTC (permalink / raw)
To: caml-list
[-- Attachment #1: Type: text/plain, Size: 2323 bytes --]
On Mar 25, 2009, at 3:55 PM, Peng Zang wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi, camlp4 seems to break parsing of object duplication on 3.11.
> Can anyone
> replicate this problem? Is this an known issue? A quick google
> search did
> not reveal anything..
Yeah. I reported the bug here:
http://caml.inria.fr/mantis/view.php?id=4673
Andres
>
> Peng
>
>
> Objective Caml version 3.11.0
>
> # #use "topfind";;
> Findlib has been successfully loaded. Additional directives:
> #require "package";; to load a package
> #list;; to list the available packages
> #camlp4o;; to load camlp4 (standard syntax)
> #camlp4r;; to load camlp4 (revised syntax)
> #predicates "p,q,...";; to set these predicates
> Topfind.reset();; to force that packages will be reloaded
> #thread;; to enable threads
>
> # #camlp4o;;
> /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/dynlink.cma: loaded
> /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/camlp4: added to
> search path
> /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/camlp4/camlp4o.cma:
> loaded
> Camlp4 Parsing version 3.11.0
>
> # class functional_point x y = object
> val x = x
> val y = y
> method get_x = x
> method get_y = y
> method move dx dy = {< x = x + dx; y = y + dy >}
> end;;
> Characters 138-144:
> method move dx dy = {< x = x + dx; y = y + dy >}
> ^^^^^^
> Warning S: this expression should have type unit.
> Characters 146-156:
> method move dx dy = {< x = x + dx; y = y + dy >}
> ^^^^^^^^^^
> Error: This expression has type bool but is here used with type int
> #
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.7 (GNU/Linux)
>
> iD8DBQFJyoxPfIRcEFL/JewRAg8TAKCjoxTmDmfLxVHa7sXq0tGlt2rKDgCgp/C2
> nc4vnKWkTvKXeR4Q0z4XB94=
> =IwA+
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
[-- Attachment #2: Type: text/html, Size: 4133 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] can anyone replicate this camlp4 problem?
2009-03-25 20:01 ` [Caml-list] " Andres Varon
@ 2009-03-25 20:15 ` Peng Zang
2009-03-25 20:25 ` Peng Zang
2009-03-25 20:30 ` Andres Varon
0 siblings, 2 replies; 5+ messages in thread
From: Peng Zang @ 2009-03-25 20:15 UTC (permalink / raw)
To: caml-list; +Cc: Andres Varon
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Thanks, do you know of a good work around?
Peng
On Wednesday 25 March 2009 04:01:24 pm Andres Varon wrote:
> On Mar 25, 2009, at 3:55 PM, Peng Zang wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hi, camlp4 seems to break parsing of object duplication on 3.11.
> > Can anyone
> > replicate this problem? Is this an known issue? A quick google
> > search did
> > not reveal anything..
>
> Yeah. I reported the bug here:
>
> http://caml.inria.fr/mantis/view.php?id=4673
>
> Andres
>
> > Peng
> >
> >
> > Objective Caml version 3.11.0
> >
> > # #use "topfind";;
> > Findlib has been successfully loaded. Additional directives:
> > #require "package";; to load a package
> > #list;; to list the available packages
> > #camlp4o;; to load camlp4 (standard syntax)
> > #camlp4r;; to load camlp4 (revised syntax)
> > #predicates "p,q,...";; to set these predicates
> > Topfind.reset();; to force that packages will be reloaded
> > #thread;; to enable threads
> >
> > # #camlp4o;;
> > /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/dynlink.cma: loaded
> > /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/camlp4: added to
> > search path
> > /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/camlp4/camlp4o.cma:
> > loaded
> > Camlp4 Parsing version 3.11.0
> >
> > # class functional_point x y = object
> > val x = x
> > val y = y
> > method get_x = x
> > method get_y = y
> > method move dx dy = {< x = x + dx; y = y + dy >}
> > end;;
> > Characters 138-144:
> > method move dx dy = {< x = x + dx; y = y + dy >}
> > ^^^^^^
> > Warning S: this expression should have type unit.
> > Characters 146-156:
> > method move dx dy = {< x = x + dx; y = y + dy >}
> > ^^^^^^^^^^
> > Error: This expression has type bool but is here used with type int
> > #
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v2.0.7 (GNU/Linux)
> >
> > iD8DBQFJyoxPfIRcEFL/JewRAg8TAKCjoxTmDmfLxVHa7sXq0tGlt2rKDgCgp/C2
> > nc4vnKWkTvKXeR4Q0z4XB94=
> > =IwA+
> > -----END PGP SIGNATURE-----
> >
> > _______________________________________________
> > Caml-list mailing list. Subscription management:
> > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> > Archives: http://caml.inria.fr
> > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> > Bug reports: http://caml.inria.fr/bin/caml-bugs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
iD8DBQFJypDsfIRcEFL/JewRAvQWAKDAcQhk9Un3O3jGNfPyKJMX+jzxewCgjHna
RA7M5aQ2rtU0baudpADZ4EQ=
=jhoe
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] can anyone replicate this camlp4 problem?
2009-03-25 20:15 ` Peng Zang
@ 2009-03-25 20:25 ` Peng Zang
2009-03-25 20:30 ` Andres Varon
1 sibling, 0 replies; 5+ messages in thread
From: Peng Zang @ 2009-03-25 20:25 UTC (permalink / raw)
To: caml-list; +Cc: Andres Varon
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I only know of the brute force update which is less than desirable:
class test (x : int) = object
val a = x;
val b = x;
method add (d:int) =
let copy = {<>} in
let arr : int array = Obj.magic copy in
arr.(2) <- arr.(2) + d;
arr.(3) <- arr.(3) + d;
copy
method print = Format.printf "%d %d" a b
end
But my brain is fried and I can't think of a nicer way..
Peng
On Wednesday 25 March 2009 04:15:38 pm Peng Zang wrote:
> Thanks, do you know of a good work around?
>
> Peng
>
> On Wednesday 25 March 2009 04:01:24 pm Andres Varon wrote:
> > On Mar 25, 2009, at 3:55 PM, Peng Zang wrote:
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > > Hi, camlp4 seems to break parsing of object duplication on 3.11.
> > > Can anyone
> > > replicate this problem? Is this an known issue? A quick google
> > > search did
> > > not reveal anything..
> >
> > Yeah. I reported the bug here:
> >
> > http://caml.inria.fr/mantis/view.php?id=4673
> >
> > Andres
> >
> > > Peng
> > >
> > >
> > > Objective Caml version 3.11.0
> > >
> > > # #use "topfind";;
> > > Findlib has been successfully loaded. Additional directives:
> > > #require "package";; to load a package
> > > #list;; to list the available packages
> > > #camlp4o;; to load camlp4 (standard syntax)
> > > #camlp4r;; to load camlp4 (revised syntax)
> > > #predicates "p,q,...";; to set these predicates
> > > Topfind.reset();; to force that packages will be reloaded
> > > #thread;; to enable threads
> > >
> > > # #camlp4o;;
> > > /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/dynlink.cma: loaded
> > > /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/camlp4: added to
> > > search path
> > > /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/camlp4/camlp4o.cma:
> > > loaded
> > > Camlp4 Parsing version 3.11.0
> > >
> > > # class functional_point x y = object
> > > val x = x
> > > val y = y
> > > method get_x = x
> > > method get_y = y
> > > method move dx dy = {< x = x + dx; y = y + dy >}
> > > end;;
> > > Characters 138-144:
> > > method move dx dy = {< x = x + dx; y = y + dy >}
> > > ^^^^^^
> > > Warning S: this expression should have type unit.
> > > Characters 146-156:
> > > method move dx dy = {< x = x + dx; y = y + dy >}
> > > ^^^^^^^^^^
> > > Error: This expression has type bool but is here used with type int
> > > #
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v2.0.7 (GNU/Linux)
> > >
> > > iD8DBQFJyoxPfIRcEFL/JewRAg8TAKCjoxTmDmfLxVHa7sXq0tGlt2rKDgCgp/C2
> > > nc4vnKWkTvKXeR4Q0z4XB94=
> > > =IwA+
> > > -----END PGP SIGNATURE-----
> > >
> > > _______________________________________________
> > > Caml-list mailing list. Subscription management:
> > > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> > > Archives: http://caml.inria.fr
> > > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> > > Bug reports: http://caml.inria.fr/bin/caml-bugs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
iD8DBQFJypNGfIRcEFL/JewRAtIOAJ9xEOuh4XNivJkjKZZ1uTYmONGzZQCfQAZH
4UBdyDEFCYNJ6wH4ZG8zpzU=
=twIi
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] can anyone replicate this camlp4 problem?
2009-03-25 20:15 ` Peng Zang
2009-03-25 20:25 ` Peng Zang
@ 2009-03-25 20:30 ` Andres Varon
1 sibling, 0 replies; 5+ messages in thread
From: Andres Varon @ 2009-03-25 20:30 UTC (permalink / raw)
To: peng.zang; +Cc: caml-list
On Mar 25, 2009, at 4:15 PM, Peng Zang wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Thanks, do you know of a good work around?
Nope, I didn't see a satisfactory workaround. Luckily I didn't need
camlp4 in those modules anymore, so I only reported the problem,
corrected the Makefile to skip them, and moved on.
Andres
>
> Peng
>
>
> On Wednesday 25 March 2009 04:01:24 pm Andres Varon wrote:
>> On Mar 25, 2009, at 3:55 PM, Peng Zang wrote:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Hi, camlp4 seems to break parsing of object duplication on 3.11.
>>> Can anyone
>>> replicate this problem? Is this an known issue? A quick google
>>> search did
>>> not reveal anything..
>>
>> Yeah. I reported the bug here:
>>
>> http://caml.inria.fr/mantis/view.php?id=4673
>>
>> Andres
>>
>>> Peng
>>>
>>>
>>> Objective Caml version 3.11.0
>>>
>>> # #use "topfind";;
>>> Findlib has been successfully loaded. Additional directives:
>>> #require "package";; to load a package
>>> #list;; to list the available packages
>>> #camlp4o;; to load camlp4 (standard syntax)
>>> #camlp4r;; to load camlp4 (revised syntax)
>>> #predicates "p,q,...";; to set these predicates
>>> Topfind.reset();; to force that packages will be reloaded
>>> #thread;; to enable threads
>>>
>>> # #camlp4o;;
>>> /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/dynlink.cma: loaded
>>> /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/camlp4: added to
>>> search path
>>> /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/camlp4/camlp4o.cma:
>>> loaded
>>> Camlp4 Parsing version 3.11.0
>>>
>>> # class functional_point x y = object
>>> val x = x
>>> val y = y
>>> method get_x = x
>>> method get_y = y
>>> method move dx dy = {< x = x + dx; y = y + dy >}
>>> end;;
>>> Characters 138-144:
>>> method move dx dy = {< x = x + dx; y = y + dy >}
>>> ^^^^^^
>>> Warning S: this expression should have type unit.
>>> Characters 146-156:
>>> method move dx dy = {< x = x + dx; y = y + dy >}
>>> ^^^^^^^^^^
>>> Error: This expression has type bool but is here used with type int
>>> #
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG v2.0.7 (GNU/Linux)
>>>
>>> iD8DBQFJyoxPfIRcEFL/JewRAg8TAKCjoxTmDmfLxVHa7sXq0tGlt2rKDgCgp/C2
>>> nc4vnKWkTvKXeR4Q0z4XB94=
>>> =IwA+
>>> -----END PGP SIGNATURE-----
>>>
>>> _______________________________________________
>>> Caml-list mailing list. Subscription management:
>>> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
>>> Archives: http://caml.inria.fr
>>> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
>>> Bug reports: http://caml.inria.fr/bin/caml-bugs
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.7 (GNU/Linux)
>
> iD8DBQFJypDsfIRcEFL/JewRAvQWAKDAcQhk9Un3O3jGNfPyKJMX+jzxewCgjHna
> RA7M5aQ2rtU0baudpADZ4EQ=
> =jhoe
> -----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-03-25 20:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-25 19:55 can anyone replicate this camlp4 problem? Peng Zang
2009-03-25 20:01 ` [Caml-list] " Andres Varon
2009-03-25 20:15 ` Peng Zang
2009-03-25 20:25 ` Peng Zang
2009-03-25 20:30 ` Andres Varon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox