Re: [Caml-list] what do I need to know to understand camlp4

2010-09-24 Thread David House
On 24 September 2010 01:15, Elias Gabriel Amaral da Silva wrote: > [1] Pervasives should define it. In fact, even though ** is > right-associative, it looks like any user-defined operator is > left-associative by default. So it works like Haskell: > > # let ($) a b = a b;; > val ( $ ) : ('a -> 'b)

Re: [Caml-list] Question about float refs.

2010-08-19 Thread David House
Note that you can directly observe boxedness using the Obj functions: # type t1 = { a : float; b : int };; type t1 = { a : float; b : int; } # type t2 = { c : float; d : float };; type t2 = { c : float; d : float; } # let x1 = { a = 1.; b = 2 };; val x1 : t1 = {a = 1.; b = 2} # let x2 = { c = 3.;

Re: [Caml-list] Errors in Bignum arithmetic?

2010-08-10 Thread David House
On 10 August 2010 08:34, Jim Pryor wrote: > Fermat's Little Theorem says that when p is prime, then for all 1<=a a**(p-1) mod p = 1. However, some composite p also have this property > for some choices of a. However, if one checks a handful of a, only a few > composite p will have the property wrt

Re: [Caml-list] interest in a much simpler, but modern, Caml?

2010-08-09 Thread David House
On 8 August 2010 17:47, bluestorm wrote: > If you don't have any of these, you have to declare infix operators > directly inside the module. You'd have a "val (=) : int -> int -> > bool" in the "int.ml" file for example. That's notoriously painful to > handle if you use the "open" statement : a bu