On 3/18/10, Martin Jambon wrote:
> Stas Miasnikou wrote:
>> OCaml 3.11.1, OpenBSD 4.6, i386.
>>
>> I am trying to read whole file by doing:
>>
>> let read_file_bin name =
>> let ic = open_in_bin name in
>> let b = Buffer.create 1024 in
>> (try Buffer.add_channel b ic max_int with _ -> ()); (
Stas Miasnikou writes:
> Hi,
>
> OCaml 3.11.1, OpenBSD 4.6, i386.
>
> I am trying to read whole file by doing:
>
> let read_file_bin name =
> let ic = open_in_bin name in
> let b = Buffer.create 1024 in
> (try Buffer.add_channel b ic max_int with _ -> ()); (* <-- HERE *)
> close_in ic;
>
Stas Miasnikou wrote:
> Hi,
>
> OCaml 3.11.1, OpenBSD 4.6, i386.
>
> I am trying to read whole file by doing:
>
> let read_file_bin name =
> let ic = open_in_bin name in
> let b = Buffer.create 1024 in
> (try Buffer.add_channel b ic max_int with _ -> ()); (* <-- HERE *)
> close_in ic;
>
Hi,
OCaml 3.11.1, OpenBSD 4.6, i386.
I am trying to read whole file by doing:
let read_file_bin name =
let ic = open_in_bin name in
let b = Buffer.create 1024 in
(try Buffer.add_channel b ic max_int with _ -> ()); (* <-- HERE *)
close_in ic;
Array.init (Buffer.length b) (fun i -> int_o
Hi,
> AFAIK local modules is a syntax extension not a compiler
> extension - I expect (not looked at it) that the syntax
> extension simply alpha renames all the local module
> declarations to make them unique and puts them globally... a
> very useful extension but no expressive power added.
But
On 3/17/2010 6:42 PM, David Allsopp wrote:
AFAIK local modules is a syntax extension not a compiler extension - I
expect (not looked at it) that the syntax extension simply alpha renames
all the local module declarations to make them unique and puts them
globally... a very useful extension but no
Hi,
> Here is a variant of your version with first-class modules
> (which will be available in OCaml 3.12). Compared to your
> version, we get the benefit of laziness (the "functor body"
> is evaluated only once).
I see, thanks. That is actually a very welcome feature; I have in the
past attempt
Dario Teixeira wrote:
> I've come across a problem which though novel to me, I presume must be
> familiar to those with more ML baggage. Namely, I need a module whose
> values are not known at the initialisation stage, since they can only be
> determined after reading a configuration file. If thi
On 17/03/2010 18:04, Dario Teixeira wrote:
In a sense I need a lazy module. Also, note that I find the solution
of declaring all values in that module as lazy a bit inelegant.
I do have a solution which though hackish and relying on a language
extension (local modules) seems to work: I create t
Hi,
I've come across a problem which though novel to me, I presume must be
familiar to those with more ML baggage. Namely, I need a module whose
values are not known at the initialisation stage, since they can only
be determined after reading a configuration file. If this were a lone
value, I wo
Goswin von Brederlow writes:
>> On Wed, Mar 17, 2010 at 09:27:30AM +0100, Goswin von Brederlow wrote:
>>> I want to rewrite the Digest module to expose a more lowlevel interface
>>> to the md5 digest and add support to digest Bigarrays. I've patched the
>>> respective files involved and it all lo
"Mark Shinwell" writes:
> On Wed, Mar 17, 2010 at 09:27:30AM +0100, Goswin von Brederlow wrote:
>> I want to rewrite the Digest module to expose a more lowlevel interface
>> to the md5 digest and add support to digest Bigarrays. I've patched the
>> respective files involved and it all looks alrig
On Wed, Mar 17, 2010 at 09:27:30AM +0100, Goswin von Brederlow wrote:
> I want to rewrite the Digest module to expose a more lowlevel interface
> to the md5 digest and add support to digest Bigarrays. I've patched the
> respective files involved and it all looks alright but when I try to
> build oc
Hi,
I want to rewrite the Digest module to expose a more lowlevel interface
to the md5 digest and add support to digest Bigarrays. I've patched the
respective files involved and it all looks alright but when I try to
build ocaml I get the following error:
File "_none_", line 1, characters 0-1:
Er
14 matches
Mail list logo