lusory_ has quit [Remote host closed the connection]
awm22 has quit [Quit: Leaving.]
foo303 has quit [Read error: Connection reset by peer]
foo303 has joined #ocaml
leoncamel has joined #ocaml
bru` has quit [Ping timeout: 245 seconds]
walter|r has quit [Quit: Leaving]
ollehar1 has quit [Ping timeout: 240 seconds]
chambart has quit [Ping timeout: 256 seconds]
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 245 seconds]
darkf_ is now known as darkf
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
weie_ has quit [Quit: Leaving...]
areece has quit [Quit: No Ping reply in 180 seconds.]
areece has joined #ocaml
milosn has quit [Ping timeout: 264 seconds]
jlouis_ has joined #ocaml
jlouis has quit [Ping timeout: 240 seconds]
yacks has joined #ocaml
weie has joined #ocaml
bernardofpc has quit [Ping timeout: 240 seconds]
bernardofpc has joined #ocaml
sivoais has quit [Ping timeout: 240 seconds]
sivoais has joined #ocaml
cdidd has joined #ocaml
<orbitz>
thelema: yes adding types worked for me. Times like this I really wis hI could separate the annotation from the defintion in something not in a .mli
alxbl has quit [Remote host closed the connection]
caligula__ has quit [Quit: Konversation terminated!]
clintnewsom has joined #ocaml
<flux>
orbitz, was it your so called main.ml?
<flux>
orbitz, ie. a file you don't export symbols from
<flux>
orbitz, if so, you can just touch main.mli and be done with it :)
caligula has joined #ocaml
clintnewsom has quit [Quit: clintnewsom]
sysopfb has quit [Ping timeout: 264 seconds]
sysop_fb has joined #ocaml
mikurubeam has joined #ocaml
leoncamel has quit [Ping timeout: 256 seconds]
<orbitz>
flux: yes it is, I could but that says something that isn't true (stuff in this module should be called from outside of it) whih I like less
Cyanure has joined #ocaml
<flux>
orbitz, it says "stuff described in this interface file can be called from outside. that is, nothing can."
<flux>
echo '(* nothing exported *)' > main.mli would be better, of course
<orbitz>
flux: ohh, i see
<orbitz>
flux: the poblem I'm having though i stype inference doesn't work for this function so I need to type annotate it
<orbitz>
Which is ugly in ocaml unelss it's in a .mli
<flux>
orbitz, you can use this syntax, which is more mli-like: let f : int -> 'a -> 'a -> bool = fun x y z -> false
<flux>
orbitz, or, if you insist, you can put the stuff inside a module :) : module Bar : sig val f : int -> 'a -> 'a -> bool end = struct let f x y z = false end
<flux>
but if type inference is not working, it sounds like you have a polymorphic recursive function..
<flux>
so you would need recursive modules as well..
adotbrown has quit [Ping timeout: 256 seconds]
Cyanure has quit [Remote host closed the connection]
chambart has joined #ocaml
ggole has joined #ocaml
Snark has joined #ocaml
chambart has quit [Ping timeout: 256 seconds]
yacks has quit [Ping timeout: 260 seconds]
<orbitz>
flux: yeah, still ugly
<orbitz>
i'm aware of all the options, just none of them are better than the fictional solution of allowing 'val' statements in .ml's :)
adotbrown has joined #ocaml
Yoric has joined #ocaml
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
Cyanure has joined #ocaml
yacks has joined #ocaml
<ggole>
Hmm? What's the point of that?
<ggole>
If you want a more restrictive type in a .ml, can't you annotate the binding?
Yoric has quit [Ping timeout: 256 seconds]
adotbrown has quit [Ping timeout: 252 seconds]
<adrien>
avsm: oh, btw, I mentionned a friend of mine worked on a chip with several cpu architectures; I've asked him again on they've got two ARM9, one SH4 and 5 or 6 custom CPUs from ST, on the same die
Cyanure has quit [Remote host closed the connection]
<orbitz>
ggole: Inference cannot actually infer the type I have proeprly (type error), but annotating it works
<orbitz>
ggole: I believ eit's related to an open polymorphic variant being returned
<companion_cube>
thomasga: I think there's a small bug in http://opam.ocamlpro.com/pkg/index.html (the query 'html' does not respond, although ' html' or 'html ' do)
<companion_cube>
(sorry if I'm bothering you for irrelevant things)
srdjan has joined #ocaml
<srdjan>
type 'a gen = unit -> 'a;; type producer = unit gen
<srdjan>
why is 'type producer = unit gen' valid code?
<srdjan>
I thought that 'unit' has to be "alone" in any type declaration
<orbitz>
srdjan: hrm? that ijus thas the type unit -> unit
<orbitz>
what is wrong with that type?
<thomasga>
companion_cube: not sure I understand your issue
<thomasga>
I guess all the packages have html in their contents
<thomasga>
because they all have a link to an html page
<companion_cube>
srdjan: unit is a type parameter here
<thomasga>
companion_cube: I guess the regexp goes to the full row contents and does not go inside links
clintnewsom has joined #ocaml
<srdjan>
orbitz: unit -> unit ?
<orbitz>
Is there any decent way to express an FSM where some states only happen once and to get into the next state you know you can never go back tothe previous one so you don't watch to match against it, but you don't want to do a wildcard match
<orbitz>
srdjan: is that a question?
<srdjan>
orbitz: to me it looks like: unit unit -> 'a
<srdjan>
orbitz: and there is my confusion
<orbitz>
srdjan: type 'a gen = unit -> 'a;; why would replaceing 'a with unit give you (unit unit -> 'a)?
<srdjan>
orbitz: I am not very familiar with ocaml, and that is the reason why I am askin this kind of question (sorry if my questions sound stupid)
jbrown has quit [Remote host closed the connection]
<orbitz>
srdjan: you don't have to know the answers, but you should have some reason why you turned (unit -> 'a) into (unit unit -> 'a)
<srdjan>
orbitz: please, could you explain me why 'type producer = unit gen' is equivalent to 'type producer = unit -> unit'?
<srdjan>
orbitz: good point
<orbitz>
srdjan: because you replace the 'a with the type you gavegen
<orbitz>
gave gen
hkBst has quit [Ping timeout: 258 seconds]
<orbitz>
so replacing 'a with unit is (unit -> unit)
<ggole>
Maybe he got confused because ocaml's type constructor arguments are on the left
<orbitz>
srdjan: Oleg's code might not be the best place to start with learning ocaml
<srdjan>
orbitz: can you translate that doce to haskell?
<srdjan>
orbitz: code*
<orbitz>
no
<srdjan>
orbitz: it is something like: data Gen a = () -> ....
<orbitz>
srdjan: probably
<srdjan>
orbitz: np
<orbitz>
data Gen a = () -> a
<srdjan>
orbitz: and how is the second line?
<orbitz>
srdjan: 'a is a type variable, so when you make a type with it you replace instances of 'a with the type you give it
<orbitz>
srdjan: i don't know I didn't open the .ml file
<orbitz>
srdjan: I know that I been programming non trivial thing sin ocaml and it would take me a godo day of reading and working out that code to really understand it
<ggole>
srdjan, type arguments are on the left
<ggole>
which is... uh, odd
<orbitz>
heh
<orbitz>
I think i must be the only person that likes it :)
<ggole>
It does lead to fewer parens in practice
<ggole>
I dunno if that's worth it
<srdjan>
orbitz: ggole: thanks
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
<orbitz>
ggole: i think i like it becuase it generally emphasisize the type i'm more interested in. It doesn't really matter I guess, maybe i like it just because that 's wehre I started
<ggole>
Yeah, I've gotten used to it. I think the Haskell way is a bit more consistent, but it doesn't really matter much.
<ggole>
I do like OCaml's little ' to indicate a type variable though
<orbitz>
yeah that's cute
<orbitz>
does SML use ' as well?
<ggole>
Yeah
<ggole>
The core of OCaml is very close to SML
ulfdoz has joined #ocaml
SanderM has quit [Remote host closed the connection]
milosn has joined #ocaml
<toolslive>
from the top of my head: SML uses => iso -> and functions have only 1 parameter (so you use tuples)
<ggole>
Records and arithmetic ops are typed a bit differently, too
<ggole>
+ defaults to int, but works for float if there's an annotation (or inference)
srdjan has quit [Quit: Page closed]
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
Yoric has joined #ocaml
q66 has joined #ocaml
darkf has quit [Quit: Leaving]
Neros has joined #ocaml
ttamttam has quit [Ping timeout: 272 seconds]
eikke has quit [Ping timeout: 256 seconds]
eikke has joined #ocaml
ulfdoz has quit [Ping timeout: 260 seconds]
hkBst has quit [Read error: Connection reset by peer]
hkBst has joined #ocaml
mye has joined #ocaml
Neros_ has joined #ocaml
Neros has quit [Read error: Connection reset by peer]
mye has quit [Quit: mye]
beginner42 has joined #ocaml
<beginner42>
how can it be that opam tells me some package is installed, but ocamlfind does not list it?
<zorun>
env vars not being properly defined?
<beginner42>
i pinned this specific package, i had to repeat the installation process a few time, but then the installation completed. Problem is now that my programs do not compile anymore, because that package cant be found
<beginner42>
zorun: how can i verify if my env vars are properly defined or not?
<zorun>
beginner42: hmm, I don't remember exactly which ones you need, but check the doc (and maybe “opam config env” or something similar)
hkBst has quit [Read error: Connection reset by peer]
beckerb has quit [Ping timeout: 245 seconds]
ollehar has joined #ocaml
ulfdoz has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
cago has left #ocaml []
mika1 has quit [Quit: Leaving.]
Neros_ has quit [Ping timeout: 245 seconds]
bru` has quit [Ping timeout: 255 seconds]
mikurubeam has joined #ocaml
Yoric has joined #ocaml
bru` has joined #ocaml
Kakadu has quit []
thomasga has quit [Quit: Leaving.]
Neros has joined #ocaml
bru` has quit [Ping timeout: 245 seconds]
fraggle_ has quit [Read error: Connection reset by peer]
tomprince has joined #ocaml
fraggle_ has joined #ocaml
tomprince has left #ocaml []
ollehar has quit [Ping timeout: 256 seconds]
Neros has quit [Remote host closed the connection]
bru` has joined #ocaml
Kakadu has joined #ocaml
hto has quit [Remote host closed the connection]
hto has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
ttamttam has joined #ocaml
thomasga has joined #ocaml
ontologiae has quit [Ping timeout: 264 seconds]
ohama has quit [Quit: leaving]
<thelema>
beginner42: eval `opam config env`
ohama has joined #ocaml
RagingDave has joined #ocaml
Neros has joined #ocaml
eikke has quit [Ping timeout: 276 seconds]
mcclurmc has quit [Ping timeout: 245 seconds]
bru` has quit [Ping timeout: 264 seconds]
travisbrady has joined #ocaml
jbrown has joined #ocaml
djcoin has joined #ocaml
Neros has quit [Ping timeout: 245 seconds]
<beginner42>
thelema: i have tried that, but that does not fix my problem.
<thelema>
beginner42: which ocamlfind
Yoric has joined #ocaml
<beginner42>
~/.opam/4.00.0/bin/ocamlfind
<thelema>
beginner42: that's good.
<thelema>
ocamlfind printconf <- what is search path?
ulfdoz has quit [Ping timeout: 256 seconds]
chambart has quit [Read error: Operation timed out]
<beginner42>
Effective configuration: Configuration file: /home/me/.opam/4.00.0/lib/findlib.conf Search path: /home/me/.opam/4.00.0/lib Packages will be installed in/removed from: /home/me/.opam/4.00.0/lib META files will be installed in/removed from: the corresponding package directories The standard library is assumed to reside in: /home/me/.opam/4.00.0/lib/ocaml The ld.conf file can be found here: /home/me/.opam/4.00.0/lib/ocaml
<thelema>
ok, and does the package you're trying to access have a folder in /home/me/.opam/4.00.0/lib?
<beginner42>
thelema: no
<thelema>
ok, the package isn't really installed.
<thelema>
what package?
<beginner42>
promela
<beginner42>
i pinned my local version, and did some extensions and then tried to install it
<thelema>
did some extensions?
<beginner42>
added some alternative backend
<beginner42>
opam install promela gives me now this ouptut: ocamlfind: Package promela is already installed
ttamttam has quit [Remote host closed the connection]
<thelema>
maybe ask opam to remove promela before reinstalling it
ttamttam has joined #ocaml
<beginner42>
then i get promela is not installed.
emmanuelux has joined #ocaml
<thelema>
ah, the uninstall fails because the ocamlfind remove fails... hmm
<toolslive>
maybe a silly question, but do you also have a system ocaml installed via apt-get or something similar?
<beginner42>
it says also that the META file in a folder alread exists
<thomasga>
basically, local pinning is just rsync + the commands in that file
<thomasga>
if your path is not clean, you'll hit a bug in oasis which does not update setup.data if it is already there
<beginner42>
can i tell oasis to update?
<thomasga>
?
<thomasga>
does it work now ?
<beginner42>
i deleted the setup.data file, but it s still the same error
notk0 has joined #ocaml
<notk0>
hello
<notk0>
does anyone know why this is defined this way
<notk0>
| Lletrec of (Ident.t * lambda) list * lambda
<thomasga>
what is your error exaclty ?
<thomasga>
are you using a package which depends on your patched promela ?
<beginner42>
thomasga: after i deleted the setup.data file, i removed the pin and pinned it again and now it seems to work :)
<thomasga>
(I guess no, as they are no such packages in opam-repository)
<thomasga>
ha right
<notk0>
a function is function_kind * Ident.t list * lambda, why is let rec different?
<beginner42>
thanks a lot
<thomasga>
in anycase, if you don't have packages depending on promela it's easier to just work in your /pinned/path instead of pinnig
<thomasga>
no pb
<beginner42>
thomasga: promela is like one of my most used packages so basically everything depends on that
<thomasga>
so you have your own repository of packages ?
<beginner42>
on github?
BiDOrD has joined #ocaml
<thomasga>
what I'm saying is you don't need to pin promela if you don't have any packages managed by OPAM depending on it
<thomasga>
but if it works for you that's fine
<thomasga>
anyway, I have to go
<thomasga>
good luck :)
<beginner42>
thanks again
thomasga has quit [Quit: Leaving.]
beginner42 has quit [Quit: irc2go]
xavierm02 has joined #ocaml
xavierm02_ has joined #ocaml
xavierm02 has quit [Client Quit]
xavierm02_ has quit [Client Quit]
xavierm02 has joined #ocaml
ulfdoz has joined #ocaml
mcclurmc has joined #ocaml
yacks has quit [Remote host closed the connection]
xavierm02 has quit [Quit: Cya.]
BiDOrD_ has joined #ocaml
BiDOrD has quit [Ping timeout: 256 seconds]
stephendwyer has joined #ocaml
notk0 has quit [Remote host closed the connection]
Kakadu has quit []
<stephendwyer>
Hello all, first time here. I am having some problems with ocamlfind that I can not seem to resolve. In particular, when I install a package with ocamlfind, all the files go to the correct directory, but when I do "ocamlfind query -l PACKAGENAME" the location is incorrect!
<thelema>
stephendwyer: ocamlfind printconf
<thelema>
there are two configs: search path and packages will be installed/removed from
<stephendwyer>
search path:
<thelema>
if the second isn't a subset of the first, you can have the problem you're having
<thelema>
s/subset/element/
<stephendwyer>
they are the same
<thelema>
that's good. hmmm
<orbitz>
and it's not in ocamlfind list?
<stephendwyer>
it IS in ocamlfind list
<stephendwyer>
everything looks great, except the location in the query is incorrect and then when compiling a project, it can't find the packages
<orbitz>
does the path it give not exist?
<stephendwyer>
I have tried using make install for the package as well as calling ocamlfind install directly
<thelema>
very odd; is your META file for that package weird?
<thelema>
I think the META file can override things
<thelema>
it normally doesn't have any paths in it
<stephendwyer>
correct, the path that query gives does not exist
<stephendwyer>
It could be the META file (I didn't write it, and have extremely limited ocaml experience…. :) )
<stephendwyer>
also, fyi, the end goal is a macport of the package
<thelema>
ah, the "directory = +ivy" is breaking things; remove it from the META
<stephendwyer>
ah ok
<stephendwyer>
will that break anything? assuming findlib is being used?
<thelema>
those META files are for ... hmm, something installed not through ocamlfind, I'd guess
<stephendwyer>
hmm ok
<thelema>
findlib normally uses the directory it installed into as the directory for the package
<stephendwyer>
well i will talk to the guy who wrote those metafiles
<thelema>
He might blame me for their form.
<thelema>
Those META files expect the libraries to be installed to `ocamlc -where`/ivy and glibivy
<stephendwyer>
yes ok, which is where they are installed by default on his debian-based systems
<thelema>
I'm guessing the META files are like that to try to retain compatibility with non-findlib-based build systems
<stephendwyer>
yes, that is the case I think
<stephendwyer>
is there a way to make them compatible with both?
<thelema>
If you can install to that directory, that will be the easiest solution, although not the best. Best is to remove the directory declarations and install to wherever ocamlfind wants, although this will lose backwards compatibility
<thelema>
what he's done is only way to have compatibility with both
<thelema>
install to +ivy, and tell ocamlfind about it.
<stephendwyer>
hmm ok… bummer. I will have a chat and see what the best solution might be
flixr has joined #ocaml
<thelema>
Will you have to keep compatibility with scripts that don't use ocamlfind to locate ivy?
<flixr>
hi
<flixr>
yes... unfortunately..
<stephendwyer>
excellent, yes, removing that line from the META fixes it!
<stephendwyer>
however, using macports, I can just patch the META files in place
<stephendwyer>
I think I will do that
<flixr>
which line? sorry, missed the interesting part ;-)
<thelema>
stephendwyer: then the correct fix is not to remove that line from the META, but to change how you do the install
<orbitz>
direcotry="+ivy"
<thelema>
flixr: the directory=
<flixr>
ah, right
<flixr>
damn
<stephendwyer>
thelema: ok, so patching META just before install should work?
<thelema>
but if you can patch all the makefiles you have to keep compatible with to use ocamlfind, then patching META works
<flixr>
we should change that in the ivy-ocaml svn
<thelema>
flixr: you'd lose compatibility with anything doing "-I +ivy" if you patch the META and let ocamlfind handle install path
<flixr>
probably not... since previously it was not installed to the ivy dir, but directly in the ocaml dir