... It's not possible, at least not in pure OCaml. Have a look at Std.dump in extlib. Rich. -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and...
Hello, As I understand it Ocaml (using version 3.09.2) only has 2^31 bits available for bit manipulation. This means that the maximum value acceptable is...
Hello, Le ven 01 sep 2006 11:42:16 CEST, ... On a 32 bits-machine, ocaml's integers are indeed 31 bits long. On a 64-bits, their size is 63 bits. ... ^^ 30 Not...
Le ven 01 sep 2006 13:09:37 CEST, ... BTW, this is exactly the bug 3582: http://caml.inria.fr/mantis/view.php?id=3582 -- E tutto per oggi, a la prossima volta....
Typical 2s complement :) ints in ocaml are signed, so when you shift 2^30 left 1 bit, the sign bit is set => negative. shift it right 1 bit, the sign bit is no...
Hello all, I'm using the "ocamlgraph" library by Mr Filliatre et al - found on the caml hump - and I have no problem while compiling with ocamlc, but compiling...
Do you compile in right order? e.g. ocamlc -c game.mli game.ml ocamlc -c display.mli display.ml ocamlc -c init.mli init.ml You can't compile display.ml until...
That's a binutils error, not ocaml (/usr/bin/ld). You may want to try `ranlib /usr/local/lib/ocaml/graph.a` as the command suggests, and see if that fixes it....
`man ar` gives the answer, for completeness. ar creates an index to the symbols defined in relocatable object modules in the archive when you specify the...
... It was just a load of ml files, no interfaces. They were compiled in the right order. I'll play around adding an mli file to a similar example later...
I've built a graph functor which allows graphs with arbitrary node labels and a creates a couple of processing functions. Suppose I wanted to make a graph out...
... It's hard to tell without seeing some code, but my guess is that you're not exposing the type that contains Np (looppath?) in the functor's signature. ...
Well you set me on the right track. What I had was something like module Make(...) : G with type ... but the "with" syntax doesn't allow constructed types for...
Hello folks, I'm getting tired of typing List.Foo, Array.bar, and so on, but I don't (necessarily) want to deal with the gigantic namespace I get when I open...
I googled for implementation of variable length array but haven't found. I need the collect long lists: only to add to the end and finally iterate over the...
Hello, I have a map (actually a hashtable) with a function update table key update_fun default_data If this finds the key in the table then replaces it's value...
... Have a look at Extlib. There is a variable length array implementation in there, although I've never used it. ... This implementation is the reason why...
... As far as I can understand this message, I think you've got two or possibly three different problems. Firstly, take a look at the Lazy module (and the lazy...
... If you want to avoid the find+add scheme, you have to copy-paste hashtbl.ml and hashtbl.mli, and create your own "update" function. I suggest the following...
On Wed, 06 Sep 2006 20:47:12 +0200, Martin Jambon ... I've my own implementation with similar update function but the updater is ('b -> 'b). My problem is the...
Hi, Can someone please enlighten me on how Ocaml decudes formal parameters for a function? See the following example: # let foo = function x -> x + 1;; val...
... No, it's a function (or a lazy value if you prefer): let init () = ref 0 ... let updater v = incr v ... -> calls init ... -> calls updater ... Only the...
... Because foo2 is a function that takes 2 arguments. You can define functions in ocaml in several different ways. foo demonstrates creating a function by...
... Same as: let foo2 x y = y + 1 ... The second argument is missing, so you get a function which expects the remaining argument. ... -- Martin Jambon, PhD ...