dan2 changed the topic of #ocaml to: OCaml 3.08.2 available! | Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
smimou has quit ["?"]
smkl has quit [Read error: 110 (Connection timed out)]
cjohnson has quit [Read error: 110 (Connection timed out)]
_JusSx_ has joined #ocaml
_JusSx__ has quit [Read error: 110 (Connection timed out)]
smkl has joined #ocaml
Nutssh has joined #ocaml
_JusSx_ has quit ["leaving"]
CosmicRay has joined #ocaml
Nutssh has quit ["Client exiting"]
kinners has joined #ocaml
cjohnson has joined #ocaml
xol has quit [Read error: 110 (Connection timed out)]
gim has quit ["dodo time"]
tintin has quit [Read error: 113 (No route to host)]
kinners has quit ["leaving"]
xol has joined #ocaml
CosmicRay has quit ["Leaving"]
cjohnson has quit [Read error: 110 (Connection timed out)]
mrvn has joined #ocaml
CosmicRay has joined #ocaml
purevoid has joined #ocaml
<purevoid> hi, I'm having problems with multiple types defined in .mli/.ml files
<purevoid> complains that they don't match
<Smerdyakov> They probably don't....
<purevoid> I copy/pasted
<purevoid> error message is:
<purevoid> val draw_graphic :
<purevoid> shape * VectorGraphics.brush * VectorGraphics.pen -> unit
<purevoid> is not included in
<purevoid> val draw_graphic : shape * brush * pen -> unit
<Smerdyakov> The shape and brush in the second case must not be from VectorGraphics.
<purevoid> well, I defined the type in both the .mli and .ml file
<purevoid> I thought that was how to do it
<Smerdyakov> Which type?
<purevoid> all three
<purevoid> shape, brush, and pen
<purevoid> are identical and in both VectorGraphics.ml and VectorGraphics.mli
<purevoid> you do put the types in both files right?
<Smerdyakov> Yes. Does either file contain the text 'VectorGraphics'?
<purevoid> only in comments
mrvn_ has quit [Read error: 110 (Connection timed out)]
<Smerdyakov> Are you opening some other module that defines a conflicting type?
<purevoid> no
<purevoid> I have my function declaration in the .ml file as
<purevoid> val draw_graphic : (shape * brush * pen) -> unit
<purevoid> and in the implementation, it is inferring the types
<Smerdyakov> Did you mean "in the .mli file"?
<purevoid> oh, yeah
<Smerdyakov> Can you come up with a minimal example that illustrates the problem?
<purevoid> hmm, I dunno
<purevoid> could it be a cyclic-dependency problem?
<Smerdyakov> I have no idea.
<purevoid> cause Graphics depends on the types defined in VectorGraphics
<purevoid> and VectorGraphics defines a function that calls another in Graphics
<Smerdyakov> It seems that brush is not resolving to the binding site that you want it to.
<purevoid> ok
<purevoid> putting types in a separate .mli file seems to have fixed it
<CapNemo> damned what is the operator for the "or" between two boolean ?
<Smerdyakov> ||
<CapNemo> key != "" || value != "" is a good expression ?
<Smerdyakov> Use <> instead of !=
<CapNemo> ahh <> is to compare the content and != the ref right ?
<Smerdyakov> Yes
<CapNemo> ok thanks a lot :)
smkl has quit [Read error: 110 (Connection timed out)]
humasect has quit [Read error: 110 (Connection timed out)]
zzorn has quit ["zzleep"]
<CapNemo> someone knows how to pre-declare functions in order to used in other functions before their real implementations ?
<Smerdyakov> That's not the ML way.
<Smerdyakov> We use mutually recursive function nests.
<mrvn> You can't.
<Smerdyakov> You can probably find that easily in the manual.
<CapNemo> mm so perhaps i misuse the functions$
<mrvn> You can declare a module interface in an mli file if you have no circular recursions.
<mrvn> If that is what you ment.
<CapNemo> in fact im using a function of the module in the module implementation before to be defined
<mrvn> you can't.
<CapNemo> ok order counts
<mrvn> Only thing you can do is define multiple functions together using "let rec foo ... and bar ..."
<mrvn> Otherwise it has to be strictly ordered.
<CapNemo> ah yes i remember the and one
<CapNemo> i was only trying to separate a bit public functions from private functions of the module
smkl has joined #ocaml
dottedmag has joined #ocaml
mlh has joined #ocaml
Submarine has joined #ocaml
CapNemo has quit ["Leaving"]
purevoid has quit []
zzorn has joined #ocaml
Chiii has quit [Read error: 110 (Connection timed out)]
Submarine has quit ["Leaving"]
zzorn has quit [Read error: 104 (Connection reset by peer)]
tintin has joined #ocaml
smkl has quit [Read error: 110 (Connection timed out)]
ne1 has quit ["Few people understand understanding."]
dd_ has quit [Nick collision from services.]
dd_ has joined #ocaml
dd_ has quit [Nick collision from services.]
dd__ has joined #ocaml
<mflux> is there a way for a method to construct a new object of the class it is contained in?
<mflux> hm, actually that isn't a problem
<mflux> but I'm trying to do something like this: class virtual base = object (self : 'c) method virtual clone : 'c end
<mflux> and then child = object method clone = new child end
<mflux> but, it complains about types
<mflux> "Self type cannot escape its class"
<mflux> "This expression has type 'a but is here used with type < clone : 'b; .. > as 'b"
<mflux> the thing is that clone-method could just as well return {<>}, and it compiles..
<mflux> so basically this is an academical problem ;)
smkl has joined #ocaml
<mflux> I would like to call the initializer too, though
<mflux> although I'm having the same problem with another kind of setup: a display_port, child of virtual class port, would return an instance of display_viewport, which too is a child of port
<mflux> hm, not using the 'c -trickery fixed it
<mflux> but I was so sure it needed to be used ;)
Submarine has joined #ocaml
xol is now known as cj|sleep
vezenchio has joined #ocaml
Submarine has quit ["Leaving"]
smimou has joined #ocaml
cj|sleep has quit [Read error: 104 (Connection reset by peer)]
shawn has joined #ocaml
smkl_ has joined #ocaml
smkl has quit [Read error: 110 (Connection timed out)]
tintin has quit [Remote closed the connection]
gim has joined #ocaml
tintin has joined #ocaml
dottedmag is now known as dottedmag|afk
Submarine has joined #ocaml
_JusSx_ has joined #ocaml
dottedmag|afk is now known as dottedmag
gim has quit ["++"]
Submarine has quit ["Leaving"]
zzorn has joined #ocaml
Inspico has joined #ocaml
mlh has quit ["Chatzilla 0.9.66e [Firefox 1.0/20041107]"]
Submarine has joined #ocaml
Submarine is now known as SubmarineWork
smkl_ has quit [Read error: 60 (Operation timed out)]
cjohnson has joined #ocaml
CosmicRay has quit ["Client exiting"]
mattam has joined #ocaml
smkl_ has joined #ocaml
zzorn is now known as zzorn_afk
mattam has quit ["Lost terminal"]
dottedmag has quit ["ERC Version 4.0 $Revision: 1.703 $ (IRC client for Emacs)"]
drewr has joined #ocaml
Yorick has joined #ocaml
jourdechance has joined #ocaml
cjohnson has quit [""The only difference between suicide and martyrdom is press coverage""]
Yorick has quit [Read error: 110 (Connection timed out)]
mattam has joined #ocaml
SubmarineWork is now known as Submarine
pango has quit [Nick collision from services.]
pango has joined #ocaml
smkl_ has quit [Read error: 110 (Connection timed out)]
smkl_ has joined #ocaml
ganjalink has joined #ocaml
<ganjalink> hello
Spike_Manuel has joined #ocaml
<Spike_Manuel> hello
Submarine has quit ["Leaving"]
ToTolamoi has joined #ocaml
Yorick has joined #ocaml
cjohnson has joined #ocaml
Spike_Manuel has quit ["Allez les Verts! et Rondoudou!"]
ToTolamoi has quit [Read error: 54 (Connection reset by peer)]
ToTolamoi has joined #ocaml
mlh has joined #ocaml
Submarine has joined #ocaml
<ganjalink> +
ganjalink has quit ["Quit rulez !"]
gim has joined #ocaml
smkl_ has quit [Read error: 110 (Connection timed out)]
kuribas has joined #ocaml
ToTolamoi has quit [Read error: 54 (Connection reset by peer)]
ToTolamoi has joined #ocaml
ToTolamoi has quit [Client Quit]
_fab has joined #ocaml
Submarine has quit ["Leaving"]
<jourdechance> I am looking for an implementation of a mergeable heap (fibonacci or binomial).
<jourdechance> I have some difficulties to implement complex imperativ data structures in ocaml.
<Riastradh> Why imperative? Why not use functional data structures?
<jourdechance> i want to implement dijkstra with a fibonacci heap.
<mattam> there is a binomial heap impl in okasaki's purely functional data structures IIRC. There are some ocaml sources for it on the web too.
<jourdechance> what's IIRC ?
<mattam> if i recall/remember correctly
<mattam> i may have just invented 'recall' ;)
<pango> $ wtf iirc
<pango> IIRC: if I recall correctly
Yorick has quit ["Leaving"]
smkl_ has joined #ocaml
kuribas has quit ["Leaving"]
_JusSx_ has quit ["leaving"]
smkl_ is now known as smkl
__DL__ has quit ["Bye Bye"]
Herrchen has joined #ocaml
jourdechance has quit [Remote closed the connection]
Herrchen has quit ["bye"]
cjohnson has quit [Read error: 110 (Connection timed out)]