<uzdav>
If I want to have a module signature in a file by itself, (say myModule.mli) and I want to implement a module using that signature with a different name, how do I get it to find that file?
<uzdav>
For example, in file myModule.mli, I have this:
<uzdav>
type something
<uzdav>
val b : something
<uzdav>
val v : something -> int
<uzdav>
in another file foo.ml, I have this:
<uzdav>
module Foo : MyModule = struct
<uzdav>
type something = int
<uzdav>
let b = 5
<uzdav>
let v x = b
<uzdav>
end
<uzdav>
<uzdav>
<uzdav>
when I compile, it says unbound module MyModule.
<uzdav>
What must be done so that I can have an arbitrary interface in its own file, with an implementation of that module in an arbitrarily-named .ml file?
<uzdav>
(I have one interface with several implementations I'd like to have, and am trying to get this to work in one case before I continue.)
jlamar has joined #ocaml
docelic has quit ["Client Exiting"]
systems has joined #ocaml
systems has quit ["Client Exiting"]
uzdav has quit [Read error: 60 (Operation timed out)]
<whee>
someone want to clue me in as to what the characters '+' and '-' do when used in a variant type declaration?
<whee>
nevermind, found it
<whee>
still trying to find a good example of when to use polymorphic variants :\
jlamar has quit ["Client Exiting"]
jlamar has joined #ocaml
<jlamar>
Is there an existing lib for MP3 and/or MOD decompression for ocaml?
graydon has quit ["xchat exiting.."]
<jlamar>
Guess I should check the hump
<whee>
I don't recall seeing one
<jlamar>
Hmm..maybe I'll port some C one
<jlamar>
err...bind
<whee>
gah I'm going nuts trying to figure out how to use = < and > with polymorphic variants and the type definition
<whee>
unless those are only for constraints, which makes a lot more sense. heh
graydon has joined #ocaml
graydon_ has joined #ocaml
graydon has quit [Read error: 60 (Operation timed out)]
graydon_ is now known as graydon
mattam has joined #ocaml
jlamar has quit ["Client Exiting"]
MegaWatS has joined #ocaml
<MegaWatS>
hi^^
<MegaWatS>
why doesn`t irc.ocaml.org work anymore? :(
graydon has quit ["xchat exiting.."]
gl has quit [Read error: 104 (Connection reset by peer)]
gl has joined #ocaml
lament has joined #ocaml
SoreEel has quit [Read error: 113 (No route to host)]
gl has quit [Connection reset by peer]
gl has joined #ocaml
yangsx has joined #ocaml
yangsx has left #ocaml []
mrvn_ has joined #ocaml
mrvn has quit [Read error: 110 (Connection timed out)]
karryall_ has joined #ocaml
lament is now known as lameAFK
karryall has quit []
gl has quit [Read error: 110 (Connection timed out)]
Torquemada has quit [Read error: 104 (Connection reset by peer)]
ayrnieu has joined #ocaml
MegaWatS has quit ["Oceania has ALWAYS been at war with Eastasia!"]
lameAFK is now known as lament
smkl has quit [Read error: 110 (Connection timed out)]
smkl has joined #ocaml
smkl has quit [Remote closed the connection]
gl has joined #ocaml
Torquemada has joined #ocaml
Yurik has joined #ocaml
<Yurik>
re
awwaiid has joined #ocaml
Yurik_ has joined #ocaml
<Yurik_>
re
Yurik_ has quit [Read error: 104 (Connection reset by peer)]
awwaiid has quit [Read error: 104 (Connection reset by peer)]
Yurik has quit [Read error: 110 (Connection timed out)]
malc has joined #ocaml
Yurik has joined #ocaml
malc has quit ["no reason"]
ayrnieu has quit [Read error: 104 (Connection reset by peer)]
graydon has joined #ocaml
Yurik has quit [Read error: 54 (Connection reset by peer)]
ayrnieu has joined #ocaml
mellum has joined #ocaml
<mellum>
hi
lament has quit ["mental mantle"]
gl has quit [Read error: 104 (Connection reset by peer)]
gl has joined #ocaml
docelic has joined #ocaml
karryall_ has quit []
<mellum>
Is there something like assert() in ocaml?
taw has joined #ocaml
<mellum>
Looks like there is, and it's called "assert". That was too easy :)
<taw>
is it possible to make shared library in ocaml that will be accessed from c code ?
<Segora>
hmm. interesting question... let's see if ocamlopt can produce position independent and reentrant code.
<taw>
who cares about multithreading
<taw>
i will be happy if single-thread will work
<Segora>
that has nothing to do with multithreading
<taw>
oh
<Segora>
the code has to be position independent because it may be mapped to different addresses in different processes
<taw>
that part is true
<taw>
the second is not very true
<Segora>
unfortunately, I didn't find an option to produce PIC
<Segora>
ah, you're right about the second part
<Segora>
silly me
<Segora>
you could produce shared libraries without PIC which shoudl work most of the time by specifying a fixed address in the ELF header. but that's an ugly hack and it won't always work.
docelic has quit ["Client Exiting"]
<taw>
hmm
<taw>
-custom
<taw>
Link in ``custom runtime'' mode. In the default linking mode, the linker produces bytecode that is
<taw>
intended to be executed with the shared runtime system, ocamlrun(1). In the custom runtime mode,
<taw>
the linker produces an output file that contains both the runtime system and the bytecode for the
<taw>
program. The resulting file is larger, but it can be executed directly, even if the ocamlrun(1)
<taw>
command is not installed. Moreover, the ``custom runtime'' mode enables linking Caml code with
<taw>
user-defined C functions.
<taw>
-ccopt Pass the given option to the C compiler and linker, when linking in ``custom runtime'' mode (see
<taw>
the -custom option). For instance, -ccopt -L dir causes the C linker to search for C libraries in
<taw>
directory dir.
<Segora>
hmm
<taw>
can i pass -PIC to -ccopt ?
<Segora>
maybe, didn't try so far
<Segora>
give it a try
lament has joined #ocaml
<taw>
mmm, my swig generates bogus c code for linking to ocaml
<taw>
it doesn't even compile
gl has quit [Read error: 104 (Connection reset by peer)]
gl has joined #ocaml
smkl has joined #ocaml
gl has quit [Read error: 104 (Connection reset by peer)]
gl has joined #ocaml
zack has joined #ocaml
ayrnieu has quit ["ERC v2.93 $Revision: 1.308 $ (IRC client for Emacs)"]
zack has left #ocaml []
SoreEel has joined #ocaml
nkoza has quit [Read error: 110 (Connection timed out)]
jfincher has joined #ocaml
jfincher is now known as jemfinch
jemfinch has quit ["Client Exiting"]
jfincher_ has joined #ocaml
jfincher_ is now known as jemfinch
karryall has joined #ocaml
jemfinch has quit ["Client Exiting"]
jemfinch has joined #ocaml
taw has quit [Remote closed the connection]
jemfinch has quit [Read error: 104 (Connection reset by peer)]
jemfinch has joined #ocaml
smklsmkl has joined #ocaml
jemfinch has quit [forward.freenode.net irc.freenode.net]
SoreEel has quit [forward.freenode.net irc.freenode.net]
smkl has quit [forward.freenode.net irc.freenode.net]
Torquemada has quit [forward.freenode.net irc.freenode.net]
mrvn_ has quit [forward.freenode.net irc.freenode.net]
emu has quit [forward.freenode.net irc.freenode.net]
jemfinch has joined #ocaml
SoreEel has joined #ocaml
smkl has joined #ocaml
Torquemada has joined #ocaml
mrvn_ has joined #ocaml
emu has joined #ocaml
mellum has quit [Read error: 60 (Operation timed out)]
Yurik has joined #ocaml
<Yurik>
re
smkl has quit [Connection timed out]
smklsmkl is now known as smkl
mellum has joined #ocaml
jemfinch has quit [Read error: 104 (Connection reset by peer)]
Yurik has quit [Read error: 54 (Connection reset by peer)]