On Wed, 2009-03-11 at 06:57 +0100, David Rajchenbach-Teller wrote:
How would you determine that = or foo maps to Foo? IMHO, that's
the main problem with getting typeclasses in OCaml.
Ah, ok, I just realized that I had understood your example backwards. My
bad.
Cheers,
David
--
David
I'm using ocamldoc, as I need a custom generator.
I've considered using ocamldoc.opt to generate the n first dumps and I
may do this, if I find out how to get OCamlBuild to do this. However,
the last load already takes something like 8 minutes, so that would not
solve all issues.
Thanks,
David
Any suggestions on how to resolve this?
ocamlfind installs into /usr/local/lib/site-lib and there's a site-lib/
camlp4 directory with META in it.
Thanks, Joel
---
ocamlfind ocamlc -package 'oUnit, extlib, camlp4' -linkpkg -g src/
easy_ast.cmo src/easy_code.cmo src/easy_lexer.cmo
Thanks, peng, it works.
Conglun
On Sun, Mar 8, 2009 at 2:50 PM, Peng Zang peng.z...@gmail.com wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Here is something similar from one of my projects. Although each subproject
is not in a subdirectory, it should be trivial to modify by
On Mar 11, 2009, at 1:33 PM, Matthieu Wipliez wrote:
I'm not familiar with ocamlfind, but for Camlp4 you need this:
-I +camlp4 camlp4lib.cma
I was under the impression that ocamlfind -packages takes care of
adding the camlp4 bits.
Does this solve the problem?
Not really but thanks
Joel Reymont wrote:
ocamlfind ocamlc -package 'oUnit, extlib, *camlp4*' -linkpkg -g src/
easy_ast.cmo src/easy_code.cmo src/easy_lexer.cmo src/easy_symtab.cmo
src/token.cmo src/static1.cmo src/easy_parser.cmo src/test_tools.cmo
src/parser_test.cmo src/test.cmo -o src/test.byte
File
Is it just me or there's a fresh uptake of OCaml among bright people?
I used to have to wait a long time (hours?) to get my questions
answered and now I get them answered in just a few minutes. And I'm
not talking simple questions since I don't consider camlp4 anywhere
simple. Woot!
I
On Wed, Mar 11, 2009 at 02:11, yoann padioleau pada...@wanadoo.fr wrote:
Yes on this example, but what if I can't move it out because
the types really need to be mutually recursive ?
I'm afraid, I don't see any straightforward way of achieving this
goal. If the above were allowed in a truly
Yes - I'd agree OCaml is getting more traction these days! Looking forward
to it in the commercial field :)
Also, I'm starting to see more openings in my field where FP is a
requirements. See for instance for OCaml:
On Wed, Mar 11, 2009 at 02:17:20PM +, Sylvain Le Gall wrote:
http://planet.ocamlcore.org
Anyone who writes about OCaml, even irregularly, I'd urge you to get
your blog syndicated on this planet. This page describes how:
http://www.ocamlcore.org/planet/
Rich.
--
Richard Jones
Red Hat
I'm using the readline for toplevel from programmer-monk for a while
now:
http://pmonk.net/svn/ocaml-misc/readline
I can use the up-down arrows easily which is usually enough. Still
when I try to do C-r for incremental backward search, it doesn't
work. Anybody knows how to enable it?
This is a quick overview of my current understanding. Corrections by
higher authorities are welcome:
Optional type declarations in ocaml only enable to restrict given
types (not to generalize them). Although it enables better error
reporting it does not allow us to compile anything that would
In some folds over data when creating ocmalgraph's, I'd need an empty
vertex value, something like V.null, to give to an edge-creating fold
when I know it's not going to be used. Currently I have to look ahead
into the data. Does it make sense to add a null value to the V
module, or is
Yitzhak Mandelbaum yitzh...@cs.princeton.edu writes:
While I'm not sure it will help you in this case (because the code is
generated),
The code is generated, but I am ok with modifying it. I use
typeconv/sexplib/binprot and camlp4 just as a way to produce a first draft
and then I refine the
I would like my expression rule to parse 1 + 2 points as Plus (1,
Points 2).
I currently have the following, with Points right-associative and at
the bottom, but it doesn't work. Is this something that Camlp4 can
handle?
Thanks, Joel
expr:
[ ...
| LEFTA
[ e1 = expr; Or;
I'm trying to properly set up the precedence in my expression camlp4
rule.
It's not working properly, though.
(* wrong!!! has higher prec than and*)
# parse_with_rule expr 1 2 and 3 4;;
- : Easy_ast.expr = Cond (Int 1, GT, And (Int 2, Cond (Int 3, GT, Int
4)))
(* right! mul is higher
Joel Reymont wrote:
I would like my expression rule to parse 1 + 2 points as Plus (1,
Points 2).
I currently have the following, with Points right-associative and at the
bottom, but it doesn't work. Is this something that Camlp4 can handle?
Thanks, Joel
expr:
[ ...
| LEFTA
It looks like the only way to change a label on an edge e -- say
increment it -- is to read off the old one with G.E.label, then
remember the src and dst with G.E.src/dst, then G.remove_edge_e g e,
create a new edge e' with G.V.create src (label+1) dst, and
G.add_adge_e g e'. Is this
18 matches
Mail list logo