* [Caml-list] camlp4 and assignments
@ 2003-07-14 4:21 Pietro Abate
2003-07-14 12:55 ` Stefano Zacchiroli
0 siblings, 1 reply; 2+ messages in thread
From: Pietro Abate @ 2003-07-14 4:21 UTC (permalink / raw)
To: caml-list
Hi all,
I want to write a quotation to produce and assignment.
So far I was only able to produce a variable assigment,
but, of course, that's not what I want...
my attempt looks like:
<:str_item<$lid:"foo" := $str:"bar"$ >>
and the expected result should be
let _ = foo := "bar"
but I get
let _ = foo <- "bar"
and "Unbound instance variable foo"
what's the right syntax ?
tnx,
p
--
Civilization advances by extending the number
of important operations which we can perform
without thinking. (Alfred North Whitehead)
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] camlp4 and assignments
2003-07-14 4:21 [Caml-list] camlp4 and assignments Pietro Abate
@ 2003-07-14 12:55 ` Stefano Zacchiroli
0 siblings, 0 replies; 2+ messages in thread
From: Stefano Zacchiroli @ 2003-07-14 12:55 UTC (permalink / raw)
To: Inria Ocaml Mailing List
On Mon, Jul 14, 2003 at 02:21:05PM +1000, Pietro Abate wrote:
> <:str_item<$lid:"foo" := $str:"bar"$ >>
>
> and the expected result should be
> let _ = foo := "bar"
>
> but I get
>
> let _ = foo <- "bar"
Inside quotations you have to use revised syntax in which refs are
declared as record types with a "val" field.
Standard syntax: foo := "bar"
Revised syntax: foo.val := "bar"
Cheers
--
Stefano Zacchiroli -- Master in Computer Science @ Uni. Bologna, Italy
zack@{cs.unibo.it,debian.org,bononia.it} - http://www.bononia.it/zack/
" I know you believe you understood what you think I said, but I am not
sure you realize that what you heard is not what I meant! " -- G.Romney
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-07-14 12:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-14 4:21 [Caml-list] camlp4 and assignments Pietro Abate
2003-07-14 12:55 ` Stefano Zacchiroli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox