[Caml-list] aborting a build when encountering first error

2010-10-07 Thread mark
is an intentional characteristic of OCaml's #use or is it a bug in the language?) Thanks, Mark. ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginn

[Caml-list]

2010-10-07 Thread mark
suggest. How do I file a feature request in Mantis? I would also be interested in a neat shorter term solution that works in the top loop. Mark. ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/l

Re: [Caml-list] Code-execution (evaluation) time

2010-10-19 Thread mark
functions. For example: let foo x y = x && y;; (print_string "X"; false) && (print_string "Y"; false);; - this will print just "X" foo (print_string "X"; false) (print_string "Y"; false);; - this will print "YX", because it

Re: [Caml-list] Infix function composition operator

2010-11-09 Thread mark
s an argument, it avoids explicitly mentioning arguments of that function. This sort of thing can happen a lot in functional programming generally. For example: List.map (op2 <<- op1) xs Instead of: List.map (fun x -> op2 (op1 x)) xs Mark Adams _

Re: [Caml-list] Infix function composition operator

2010-11-10 Thread mark
So how does value restriction affect things here? (excuse my lack of knowledge) One thing about using a pipeline like this is that it relies on '|>' being left-associative (which it is due to OCaml's convention on operators that start with "|"). Mark. on 10/11/10

Re: [Caml-list] Infix function composition operator

2010-11-10 Thread mark
Fascinating! I do use parser combinators myself, and find myself having to use the eta-expanded form, like you say. Thanks for that explanation. Mark. on 10/11/10 2:20 PM, Jon Harrop wrote: > In OCaml, the value restriction leads to non-generalized type variables ('_a > etc.) if

Re: [Caml-list] zero-arity constructor

2010-11-27 Thread mark
Or is it already too late because '_' has already been incorporated and backwards compatibility dictates that this cannot be changed? type ty = A | B let test = function | A * -> () | B -> () Mark Adams on 26/11/10 10:35 PM, bluestorm wrote: > A quick summary for those li

[Caml-list] Type checker (ex-)bug

2008-06-18 Thread Mark Shinwell
ecks); - reset_delayed_checks () + reset_delayed_checks (); + Btype.backtrack snap Could someone comment whether this patch is indeed the correct fix for this problem (I assume it was written to fix something else)? Or is there perhaps still something wrong tha

Re: [Caml-list] Segfault in Garbage collector code: any ideas?

2008-06-19 Thread Mark Shinwell
in the Interfacing C chapter of the manual). Mark ___ 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_beginne

Re: [Caml-list] surprising type error with labels

2008-06-20 Thread Mark Shinwell
somewhat obfuscated, and error messages are potentially confusing as Jake witnessed. Is there any theoretical reason why the compiler couldn't just deem applications of the form given by the original poster as total, even though it results in the loss of some expressibility? Perhaps it would b

Re: [Caml-list] file_desc

2008-07-01 Thread Mark Shinwell
ity" Another approach is to write something like: let file_descr_of_int fd = assert (fd >= 0); assert (Obj.is_int (Obj.repr Unix.stdin)); ((Obj.magic fd) : Unix.file_descr) Mark ___ Caml-list mailing list. Subscription m

Re: [Caml-list] Could not get a file descriptor referring to the console

2008-08-21 Thread Mark Shinwell
On Thu, Aug 21, 2008 at 02:42:43PM +0200, Luc Maranget wrote: > /usr/bin/open (?) ...which exists on Mac OS X. Mark ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: h

Re: [Caml-list] What does Jane Street use/want for an IDE? What about you?

2008-10-20 Thread Mark Shinwell
er features you dream of? Something along the lines of Jun Furuse's ocamlspotter work, with good editor integration, is probably highest on my list at the moment. Mark ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-

Re: [Caml-list] problem installing janestreet core through godi

2008-10-22 Thread Mark Shinwell
es cpp to behave differently from gcc -E; I've hit this before but can't remember the full explanation offhand. You can see the difference, for example, if you try to use the ## operator. Does everything work if you get everything to use gcc -E for preprocessing? Mark

Re: [Caml-list] Caml implementation of the relaxed value restriction

2009-01-14 Thread Mark Shinwell
u need to say "type +'a s", otherwise the compiler (since "s" is an abstract type) cannot know the variance of that type parameter inside a value of type 'a s. That information is needed to determine how to generalize the type of x. Mark

Re: [Caml-list] Threads performance issue.

2009-02-17 Thread Mark Shinwell
m confused as to why your results are so different. You could use ocamlopt -p and run gprof on the resulting gmon.out file. Mark ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives:

Re: [Caml-list] Re: Threads performance issue.

2009-02-17 Thread Mark Shinwell
s often not released here). This process isn't especially cheap, so it would be better to use one of the other channel calls to read data in larger blocks. Mark ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mai

Re: [Caml-list] Re: Threads performance issue.

2009-02-17 Thread Mark Shinwell
I would like to have anyway. > > I'll give a try to big buffers using Using.read. Any example code around ? > And then why not try iao ! Try something straightforward to start with like reading the file just one line at a time? Especially if the lines are long this sh

Re: [Caml-list] Threads?

2009-04-23 Thread Mark Shinwell
ollow the order given on the page: http://caml.inria.fr/pub/docs/manual-ocaml/manual038.html (in particular it looks like your sdsp.cmxa needs to come after threads.cmxa). Does that make it work? Mark ___ Caml-list mailing list. Subscription manage

Re: [Caml-list] ocamlopt debugging options

2009-04-23 Thread Mark Shinwell
eir compiled form due to the names used in the cmm dump. How do > you people get around that difficulty? I use objdump -Dr :) Mark ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list

Re: [Caml-list] ocamlopt debugging options

2009-06-18 Thread Mark Shinwell
names are preserved (although they are mangled, but it's a lot easier to decipher than C++ mangling). Mark ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr B

Re: [Caml-list] annotations and type-checking

2009-07-29 Thread Mark Shinwell
b/ml-archives/caml-list/2002/06/a03da53be62c12671a891708c51e85f9.en.html Mark ___ 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

Re: [Caml-list] linking errors involving cpp files

2009-12-15 Thread Mark Shinwell
headers have the guards added? (I only spot-checked one, mlvalues.h, and that didn't appear to have it). Mark ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.

Re: [Caml-list] How to add a "non-standard" static c library to ocaml project

2009-12-29 Thread Mark Shinwell
the GNU linker you should be able to use something like: -static -lsomename -dynamic in the middle of the command. Just as a side point, an output of the linker errors pasted into an email is always useful for this sort of diagnosis. Hope that helps, Mark _

Re: [Caml-list] [newbie] miscellaneous on installation and web site

2010-03-01 Thread Mark Shinwell
at to work. As another poster has said, it's probably best to use the distribution packages if possible, or else just directly write into the installation location (using ./configure -prefix /path/to/install/dir). Mark ___ Caml-list mailing

Re: [Caml-list] Debugging C and OCaml

2010-03-01 Thread Mark Shinwell
compiler support for emitting the debug info required by gdb to debug at the language level. That said, ocamlopt-compiled assembly code is fairly easy to read, and you should be able to get something resembling a backtrace using "where". Mark ___

Re: [Caml-list] Debugging C and OCaml

2010-03-01 Thread Mark Shinwell
On Mon, Mar 01, 2010 at 08:24:32PM +0100, ri...@happyleptic.org wrote: > -[ Mon, Mar 01, 2010 at 03:19:41PM +0000, Mark Shinwell ] > > That said, ocamlopt-compiled assembly code is fairly easy to > > read, and you should be able to get something resembling a backtrace u

Re: [Caml-list] Debugging C and OCaml

2010-03-01 Thread Mark Shinwell
he assemly code. The names are mangled, but it's pretty easy to work out what they correspond to, except in the case of anonymous functions where you may need to do some detective work. Mark ___ Caml-list mailing list. Subscription management: ht

Re: [Caml-list] Debugging C and OCaml

2010-03-01 Thread Mark Shinwell
On Mon, Mar 01, 2010 at 07:48:56PM -0500, Jianzhou Zhao wrote: > On Mon, Mar 1, 2010 at 10:19 AM, Mark Shinwell > wrote: > I compiled OCaml code into *.o by 'ocamlc -custom -output-obj...', > and then linked it with *.o from C and C++ code. > I think this isnt a na

Re: [Caml-list] Rewriting the Digest module causes linking errors

2010-03-17 Thread Mark Shinwell
the compiler. I think "make bootstrap" will do the trick, although you may have to run it twice if I remember correctly. Mark ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/ca

Re: [Caml-list] Static exception analysis or alternative to using exceptions

2010-05-27 Thread Mark Shinwell
t there are arguments relating to verbosity of the use of option types, I think the strongest argument for keeping the *_exn variants may actually be that they're just a lot more convenient for quick hacks. Mark ___ Caml-list mailing list. Subscription

Re: [Caml-list] Native code stack overflow detection guarantees

2010-07-09 Thread Mark Shinwell
Linux kernels also has the potential to mess up the runtime's metrics for calculating whether the faulting address lies in the stack or not. This can also affect, basically randomly, whether you get Stack_overflow or a segfault. Mark ___ Caml-list

Re: [Caml-list] Native code stack overflow detection guarantees - followup

2010-07-09 Thread Mark Shinwell
On Fri, Jul 09, 2010 at 09:39:06AM +0100, Mark Shinwell wrote: > On Thu, Jul 08, 2010 at 08:59:30PM -0400, Michael Ekstrand wrote: > > Therefore, I am wondering: are there documented guarantees on which the > > native code stack overflow behavior rests? Linux processes usuall

Re: [Caml-list] Segfaults with Dynlink with OCaml 3.11

2010-08-23 Thread Mark Shinwell
ode, it might be worth trying to eliminate Dynlink from the program as a test. Mark ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's l

Re: [Caml-list] Re: Possible ocamlmpi finalization error?

2010-09-08 Thread Mark Shinwell
using pthread_mutex_trylock(). If that function tells you the mutex is already locked, then use signal() to send SIGSTOP to your own pid. If this triggers (which can be seen by looking at the state of the process using "ps"), gdb can be attached to the program and you should be able to see

[Caml-list] Re: Is OCaml fast?

2010-11-23 Thread Mark Diekhans
The source of this pharse is unknown, however Mark Twain is credited with making it well known: "There are three kinds of lies: lies, damned lies and statistics." Isaac Gouy writes: > Is that book the source for the quotation 'Lies--damned lies--and statistics'? >