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
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
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
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
_
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
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
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
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
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
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
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
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
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-
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
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
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:
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
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
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
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
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
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
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.
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
_
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
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
___
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
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
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
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
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
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
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
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
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
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'?
>
36 matches
Mail list logo