<flux>
in expression (try a with ... -> b) a and b must be of the same type
ankit9 has quit [Quit: Leaving]
bobry has quit [Ping timeout: 255 seconds]
<Ptival>
thanks flux
chrissbx has joined #ocaml
<zsparks>
I downloaded a package, compiled it, and put it in /usr/local/lib/ocaml (which is where all the libraries I have seem to live), but ocaml isn't recognizing its existence. What else do I have to do to get to use it?
<zsparks>
(the package came with virtually no support -- even the 'make install' target didn't work for some strange reason, and I had to copy it over manually)
lopex has quit []
<f[x]>
zsparks, start with naming the package and showing make install error message
<f[x]>
and what do you mean by "ocaml isn't recognizing its existence"
bobry has joined #ocaml
<zsparks>
f[x]: the package is Contfrac
<zsparks>
the error message is "make: `install' is up to date."
<zsparks>
and by not recognizing, I mean it says:
<zsparks>
# include Contfrac ;;
<zsparks>
Error: Reference to undefined global `Contfrac'
<f[x]>
add `.PHONY: install` to Makefile
<f[x]>
does it have META file in distribution?
<thelema>
f[x]: nope
<zsparks>
f[x]: add it anywhere in the file?
<thelema>
it's a single .ml,mli file package
<thelema>
zsparks: the top works fine.
<zsparks>
thelema: ?
<f[x]>
zsparks, at the beginning
<zsparks>
ah
<thelema>
zsparks: you can add 'phony' at the top
<thelema>
I think it'll work anywhere before the install target itself
<f[x]>
ok, without META you will need to specify path to installed files manually
<thelema>
zsparks: if I were you, I'd just copy the contfrac.ml* files into your project.
<thelema>
but I'm lazy like that sometimes
<zsparks>
f[x]: so, I run ocaml -I <the specified directory>
<f[x]>
#directory "/usr/local/lib/ocaml/contfrac";; for toplevel
<zsparks>
and I still get the same error
<f[x]>
what is in that folder?
<f[x]>
did it install cmi files?
<zsparks>
yeah
Ptival has quit [Quit: Leaving]
<zsparks>
after I do the #directory thing it still has the same error
<zsparks>
oh, would it help to say that I'm on a mac?
<zsparks>
thelema: yeah, I am considering doing that
<f[x]>
ouch, it is from 2004?
<zsparks>
but it would be nice to know how to get this to work in the general case without resorting to hax
<zsparks>
f[x]: possibly?
<zsparks>
yeah, looks like.
<zsparks>
really, what I want is a mathematica-style precision package
<thelema>
zsparks: the right thing is for the packager to use findlib for install.
<zsparks>
but I haven't been able to find anything like that.
<thelema>
zsparks: have you looked at Ratio in the stdlib?
<zsparks>
and yeah, I probably should use ocamlbuild, but I didn't find out about it until this was already underway
<adrien>
well, you're supposed to set EXEC, there's a line for that :P
<adrien>
and it's not too late to switch to ocamlbuild :P
<zsparks>
I did
<zsparks>
but there's no target for $(EXEC).opt
<adrien>
and in cases you really really want makefiles, try OCamlMakefile
<adrien>
it's pretty huge but it works (it has a few issues but I don't think anyone will fix a 5k lines makefileà
<zsparks>
it's not too late, but I do need to get some results in by tomorrow, so I can't take the time to switch 'til after that
<adrien>
)
<adrien>
there's "$(EXEC)-opt", maybe a typo, I don't know all the makefile syntax
<adrien>
well, ocamlbuild is _very_ quick to start using: which version of ocaml are you using, which packages/libraries are you using?
eikke has quit [Ping timeout: 276 seconds]
<zsparks>
version 3.12.0, and I'm using...uhh, at least Num, and I think this one Constants package, too
<zsparks>
ideally I'd be using GMP, but I couldn't get it to install on my mac.
todun has quit [Quit: :s]
<adrien>
what is the constants package?
<zsparks>
hmm
<zsparks>
lemme check
<zsparks>
the ocaml mathlib
<zsparks>
is where it is from, I think
todun has joined #ocaml
<adrien>
oh, hadn't heard of that library
<adrien>
for ocamlbuild, create a file named "_tags" with the following line (not perfect, can be improved later on): <*>: package(num), package(mathlib)
<adrien>
and run: ocamlbuild -use-ocamlfind ${your_target}.native
<adrien>
assuming you are building an executable
<adrien>
it'll probably complain about output files in the current directory, check them and maybe clean them with the generated script
eb4890 has quit [Ping timeout: 255 seconds]
malc_ has joined #ocaml
Anarchos has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
oriba has joined #ocaml
oriba has left #ocaml []
ftrvxmtrx has joined #ocaml
eikke has joined #ocaml
_andre has quit [Quit: leaving]
iratsu has quit [Ping timeout: 240 seconds]
edwin has quit [Remote host closed the connection]
ulfdoz has quit [Ping timeout: 258 seconds]
todun has quit [Quit: :s]
ftrvxmtrx has quit [Quit: Leaving]
todun has joined #ocaml
eikke has quit [Ping timeout: 258 seconds]
thomasga has quit [Quit: Leaving.]
todun has quit [Quit: :s]
todun has joined #ocaml
iratsu has joined #ocaml
todun has quit [Remote host closed the connection]
agarwal1975 has joined #ocaml
sepp2k has quit [Quit: Leaving.]
lamawithonel has joined #ocaml
Obfuscate has quit [Ping timeout: 246 seconds]
ejackson has quit [Quit: ejackson]
Obfuscate has joined #ocaml
Anarchos has quit [Read error: Operation timed out]