... Not that I know of. It may let the compiler optimise it somehow, as the evaluation order of the bindings is now decided by the compiler. When evaluation...
6495
Richard Jones
rwmjones
Aug 26, 2006 12:51 pm
On Fri, Aug 25, 2006 at 08:39:45PM +0200, Lukasz Stafiniak wrote: [...] I guess you _can_ do this, but should you do it? It's (sometimes, not always) a good...
6496
Oliver Bandel
oliver@...
Aug 26, 2006 1:34 pm
... [...] Yes. Thinking in types/interfaces even helps to reason about the whole application. Working with OCaml has helped me to reason about what to do even ...
6497
Lukasz Stafiniak
luk_stafi
Aug 26, 2006 1:47 pm
... Yes, but now I need a help to get out of the jungle generated by "-i" ;)...
6498
Oliver Bandel
oliver@...
Aug 26, 2006 5:31 pm
... [...] Well, why is there such a lot of stuff? Didn't you used modules inside? There you also can hide things, so that the helper-functions of helper ...
6499
Lukasz Stafiniak
luk_stafi
Aug 26, 2006 6:02 pm
... Yes, I appreciate your answer. I didn't think about using (nested) modules. I need the tool to learn which are the ("merely") helper-functions actually. ...
6500
Oliver Bandel
oliver@...
Aug 26, 2006 6:18 pm
... [...] At least for dead code inside of functions there is a compiler switch. I also asked the OCaml developers to add an option (or optimize the option I...
6501
toochoos@...
mouss_b
Aug 26, 2006 7:14 pm
hi list! i am quite surprised that you can't put a double quote alone in comments. i'm using the default ubuntu package of 3.09.1. for instance: Objective Caml...
6502
Martin Jambon
BioMim
Aug 26, 2006 9:39 pm
... That's a design choice. Otherwise, you couldn't comment out a string like "*)", which would be annoying too. Martin -- Martin Jambon, PhD ...
6503
LORENZO
arniwarp
Aug 27, 2006 4:40 am
Aha~ really simple and good answer to the question, How can I make the step parameter as optional, namely (range a b) and (range a b c) both works ?...
6504
Jonathan Roewen
consulatewizard
Aug 27, 2006 7:50 am
The last parameter can not be optional. This restriction is to do with commuting labels. When the last parameter (or all) must be optional, it's common...
6505
mouss_b
Aug 27, 2006 7:23 pm
... like ... Thanks for your answer... so I'll just add another to match the first. But, by curiosity, isn't it possible to write parser rules that detect ...
6506
Laurent Le Brun
llb_deussum
Aug 27, 2006 7:36 pm
... The same thing with the 3.09.2. $ cat foo.ml let x = (* " *) 1 $ ocaml titi.ml File "foo.ml", line 1, characters 8-10: This comment contains an...
6507
Richard Jones
rwmjones
Aug 27, 2006 10:26 pm
... OCaml allows nested comments, like (*(* this *) *), and does the right thing in this case. So a straightforward strategy of ignoring everything until the...
6508
Laurent Le Brun
llb_deussum
Aug 27, 2006 10:38 pm
... Oh, I understand ! OCaml allows comments like : let a = (* "test(*" *) 4;; So tokens (* between quotes are ignored. And so, quotes have to be closed. ... ...
6509
code17
code_1977
Aug 28, 2006 1:22 am
Hi, there Today when I wrote some scripts for my window manager in OCaml, I ran into the "Segmentation fault" problem. I have minimized the problematic code...
6510
Brian N. Makin
merimus
Aug 28, 2006 2:48 am
I'm having some trouble with the following. I'm trying to interface ocaml to a c library. I'm representing a cStruct with an abstract type cStruct. What I'd...
6511
Jonathan Roewen
consulatewizard
Aug 28, 2006 3:06 am
... Interesting error, but easy fix. a) Create a .mli file, and put: type cStruct val set_current_struct : cStruct -> unit val get_current_struct : unit ->...
6512
Jonathan Roewen
consulatewizard
Aug 28, 2006 3:07 am
... Ah wait, I missed your `cStruct. ref is a function (as well as a type -- they're in separate namespaces though), so it needs an initial value. so: let...
6513
Christoph Bauer
Christoph.Bauer@...
Aug 28, 2006 8:27 am
Hi, it's maybe this bug: http://caml.inria.fr/mantis/view.php?id=4059 (Try to replace close_out oc with flush oc). Christoph Bauer...
6514
code17
code_1977
Aug 28, 2006 1:39 pm
... Exactly! Thanks u very much! I've manually installed the cvs version, the bug disappeared. (cf. cvs log of byterun/io.c for PR#4039) ... No, that won't...
6515
Michael Wojcik
michael_wojcik
Aug 28, 2006 5:07 pm
... No one seems to have replied to this. I've just tried the browser under OCaml 3.09.0 for Windows, and it has the same bug there - sometimes. My first...
6516
LORENZO
arniwarp
Aug 30, 2006 3:16 pm
Since I just want to know the built-in type of the parameter enter to a function, I tried #let testype x = if x <> 0 or x = 0 then Printf.printf "%d\n" x else...
6517
Martin Jambon
BioMim
Aug 31, 2006 5:55 am
... Leave the function definition intact, e.g.: let f x = [x;x;x] ;; Here, the x argument is polymorphic (could be any type). When you use it, you will pass an...
6518
doug_arro
Aug 31, 2006 6:46 am
... (and ... I don't quite get this -dtypes option. Doesn't the interactive top-level in the tuareg-mode give you any type error encountered in the program?...
6519
doug_arro
Aug 31, 2006 6:59 am
Hi, Since F# shares a core language with OCaml, can one use VisualStudio Mode for F# to create OCaml programs using just its core so to take advantage of all...
6520
Jonathan Roewen
consulatewizard
Aug 31, 2006 7:49 am
You could, but some features show up as errors in VS, for example polymorphic variants, and OO, to name but a couple....
6521
Jon Harrop
harropjon
Aug 31, 2006 11:01 am
... The -dtypes option gets the OCaml compiler to spit out a "foo.annot" file that gives the inferred types of all subexpressions in "foo.ml". When you're ...
6522
Chris Campbell
chrisdanx
Aug 31, 2006 11:02 pm
Hi, I'm writing a small program which uses modules and functors. Basically the situation is there are 3 modules. Game, Display and Control. module GameM =...
6523
Jonathan Roewen
consulatewizard
Aug 31, 2006 11:40 pm
does the following not work? val init : int -> int -> Game.G.t -> t...