flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
travisbrady has joined #ocaml
tobiasBora has quit [Quit: Konversation terminated!]
q66 has quit [Remote host closed the connection]
gnuvince has joined #ocaml
swwet has joined #ocaml
<swwet> hello we must update your compte in chase by this link o k http://goo.gl/GNiDw
swwet has left #ocaml []
swwet has joined #ocaml
<swwet> hello we must update your compte in chase by this link o k http://goo.gl/GNiDw
swwet has left #ocaml []
csakatoku has quit [Remote host closed the connection]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
osnr has quit [Ping timeout: 252 seconds]
travisbrady has quit [Quit: travisbrady]
csakatoku has joined #ocaml
foo808_ has joined #ocaml
dsheets has quit [Ping timeout: 264 seconds]
foo808 has quit [Ping timeout: 248 seconds]
Watcher7 is now known as Watcher7|off
travisbrady has joined #ocaml
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
chambart has quit [Ping timeout: 245 seconds]
Neros has quit [Read error: Operation timed out]
darkf has joined #ocaml
jcao219 has joined #ocaml
mattrepl has joined #ocaml
tane has joined #ocaml
breakds has joined #ocaml
tane has quit [Quit: Verlassend]
zRecursive has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
Watcher7|off is now known as Watcher7
breakds has quit [Remote host closed the connection]
travisbrady has quit [Quit: travisbrady]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
ccasin has quit [Read error: Operation timed out]
dezzy_ has joined #ocaml
ccasin has joined #ocaml
dezzy has quit [Read error: Connection reset by peer]
osnr has quit [Quit: Leaving.]
jcao219 has quit [Ping timeout: 252 seconds]
ggole has joined #ocaml
Drup has quit [Quit: Leaving.]
yacks has quit [Read error: Connection reset by peer]
yacks has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
mattrepl has quit [Quit: mattrepl]
osnr has quit [Ping timeout: 240 seconds]
talzeus is now known as studybot_
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
pootler__ has joined #ocaml
pootler_ has joined #ocaml
jcao219 has joined #ocaml
<rgrinberg> amiller_: have you looked at typerep from janestreet?
osnr has quit [Quit: Leaving.]
vivanov has joined #ocaml
<vivanov> after installing typerex from opam, how to enable typerex in emacs ?
pootler__ has quit [Ping timeout: 252 seconds]
pootler_ has quit [Ping timeout: 276 seconds]
zRecursive has quit [Ping timeout: 240 seconds]
zRecursive has joined #ocaml
<zRecursive> after installing ocaml-4.00.1.tar.gz successfully, how can i install corresponding findlib ?
derek_c has joined #ocaml
<orbitz> zRecursive: download and instal findlib?
<orbitz> or use opam
<zRecursive> orbitz: i will use opam, thx
ttamttam has joined #ocaml
jcao219 has quit [Ping timeout: 264 seconds]
ttamttam has quit [Quit: ttamttam]
<ggole> vivanov: the readme mentions some junk to put in .emacs
<ggole> (Unless opam does that for you.)
Snark has joined #ocaml
gautamc has quit [Read error: Connection reset by peer]
mcclurmc has quit [Ping timeout: 255 seconds]
gautamc has joined #ocaml
emmanuelux has quit [Quit: emmanuelux]
ygrek has joined #ocaml
pootler_ has joined #ocaml
pootler__ has joined #ocaml
<vivanov> ggole: it doesnt -- my .emacs is nearely empy
<vivanov> thx
ttamttam has joined #ocaml
ttamttam has quit [Client Quit]
dezzy_ is now known as dezzy
dezzy has quit [Changing host]
dezzy has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
gnuvince has quit [Ping timeout: 264 seconds]
asmanur has quit [Ping timeout: 252 seconds]
asmanur has joined #ocaml
derek_c has quit [Quit: leaving]
csakatok_ has joined #ocaml
csakatoku has quit [Ping timeout: 268 seconds]
zRecursive has left #ocaml []
ggole has quit [Ping timeout: 240 seconds]
pootler_ has quit [Ping timeout: 264 seconds]
pootler__ has quit [Ping timeout: 256 seconds]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
vivanov has quit [Ping timeout: 264 seconds]
Watcher7 is now known as Watcher7|off
raichoo has joined #ocaml
mika1 has joined #ocaml
vivanov has joined #ocaml
mfp has quit [Ping timeout: 276 seconds]
vivanov has quit [Ping timeout: 264 seconds]
gautamc has quit [Ping timeout: 246 seconds]
vivanov__ has joined #ocaml
mfp has joined #ocaml
vivanov__ has quit [Ping timeout: 246 seconds]
vivanov has joined #ocaml
cago has joined #ocaml
vivanov has quit [Quit: Lost terminal]
djcoin has joined #ocaml
ygrek has joined #ocaml
chambart has joined #ocaml
yacks has quit [Ping timeout: 246 seconds]
mcclurmc has joined #ocaml
rwmjones is now known as rwmjones_holiday
eikke has joined #ocaml
yacks has joined #ocaml
pootler_ has joined #ocaml
pootler__ has joined #ocaml
raichoo has quit [Quit: leaving]
gautamc has joined #ocaml
hkBst has quit [Ping timeout: 240 seconds]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
q66 has joined #ocaml
ygrek has quit [Ping timeout: 264 seconds]
jbrown has joined #ocaml
eikke has quit [Ping timeout: 246 seconds]
eikke has joined #ocaml
ollehar has joined #ocaml
raichoo has joined #ocaml
skchrko has quit [Quit: Leaving]
yacks has quit [Ping timeout: 252 seconds]
ttamttam has joined #ocaml
studybot_ has quit [Read error: Connection reset by peer]
studybo__ has joined #ocaml
weie has joined #ocaml
weie_ has quit [Ping timeout: 260 seconds]
Neros has joined #ocaml
skchrko has joined #ocaml
<rly> Why doesn't this have an exit status of 0? opam remove yojson && if opam list | grep yojson; then exit 1; else exit 0; fi
<rly> Alternatively, why doesn't opam remove, well... remove things?
<rks__> rly: "opam list" list all the available packages, not just the ones you installed.
<rks__> (but I've had problems with opam remove too, and I can't help you on that part)
<avsm> with the latest package descriptions?
<avsm> there's a few obscure error cases where the remove code might get interrupted
<avsm> in this case, you'll need to manually `ocamlfind remove yojson`
<avsm> but opam remove should work. that's a bug if not
<gasche> note that the correct listing command is "opam list --installed"
<rly> It displayed as being installed.
<gasche> but I would agree it's unfortunate that the default behavior of opam doesn't coincide with ocamlfind's interface
ttamttam has quit [Ping timeout: 245 seconds]
<rly> But I will concede that I gave the wrong command.
yacks has joined #ocaml
chambart has quit [Ping timeout: 252 seconds]
ttamttam has joined #ocaml
studybo__ has quit [Remote host closed the connection]
himito has joined #ocaml
<himito> hello
<orbitz> hi
<himito> I was wondering if someone could help me with a compilation problem :(
<orbitz> only one way to find out
dsheets has joined #ocaml
beckerb has joined #ocaml
studybot_ has joined #ocaml
eikke has quit [Ping timeout: 260 seconds]
studybot_ has quit [Remote host closed the connection]
studybot_ has joined #ocaml
studybot_ has quit [Ping timeout: 264 seconds]
<dsheets> does 4.01 make duplicate method declarations an error? I can't seem to find this in the source
<rly> avsm: ocamlfind remove yojson removed some file, but it still exists according to opam list (it shows 1.13).
studybot_ has joined #ocaml
Yoric has joined #ocaml
<gasche> dsheets: I believe so
<gasche> but that's a very recent change
<gasche> dsheets: did you run into any problem with that?
<avsm> gasche: how come the magic number isn't bumped whenever the AST is changed in trunk?
<avsm> bit annoying to have camlp5 segfault all the time due to that
<gasche> people forgot, mostly
<gasche> Damien takes care of that before each release
<gasche> otherwise it's unfrequently done
<amiller_> has anyone seen this blog post about compile-libs and modifying typedtree http://camlspotter.blogspot.com/2012/09/a-safe-but-strange-way-of-modifying.html
<gasche> avsm: would there be an easy way to test that automatically, that could be put in OCaml's testsuite ?
<gasche> amiller_: yes?
_andre has joined #ocaml
<amiller_> i can't tell how far off the beaten path it is, i'm looking for more documentation on typedtree i guess basically
<gasche> well compiler-libs is a relatively recent feature
<gasche> and nobody bothered to write much documentation for it
<gasche> the major problem is that there are no compatibility guarantees
<avsm> gasche: compile camlp5 with trunk does the trick. it's full of Obj magic
<gasche> so if you do something like that, the code *will* break at the next version of OCaml
<gasche> avsm: something that doesn't depend on an external tool would be better
<gasche> I was thinking of somehow hashing the ast definition and the magic number together, and compare that to a hard-coded reference
<gasche> but doesn't the camlp5 package on opam have strange version constraints to avoid precisely this issue?
<avsm> i guess you could dump the -dtypedtree and hash that quite easily
<gasche> I thought it was < 4.01 or something
<avsm> it does now. but i was overriding the version constraint to test it
<gasche> :]
<avsm> (dsheets spotted the original problem with the constraint in a bulk build)
<avsm> but a segfaulting trunk is always worrying, so i dug in further before i realised it was just a magic number issue, and Daniel confirmed
<avsm> the `opam list —installed` feature seems reasonable. I've opened it up https://github.com/OCamlPro/opam/issues/644
<gasche> amiller_: there is no documentation of the typedtree and, frankly, even if there were it would not be pretty
<gasche> on the contrary, Alain Frisch has been working on documenting the asttree, and did quite a good job out of it
<amiller_> maybe there's some other tool for type inference over the asttree?
<gasche> (under the forms of comments in parsing/parsetree.mli, but only in his extensions_points branch for now)
<gasche> amiller_: other than what?
<gasche> what kind of applications do you have in mind?
<amiller_> i'm trying to implement a type-directed language extension
<gasche> (I inferred that part :)
<amiller_> well in short i'm making a generalized "merkle tree" language
<amiller_> where i'd add a new blatant type flag like int MERKLEIZE
<amiller_> and basically in the runtime the value of that type would be replaced by a tiny hash digest rather than the actual data
<gasche> (int might not be a great example then :p )
<amiller_> type tree = Tip | Bin of MERKLE tree * a * MERKLE tree;; is better maybe
<gasche> the wikipedia article on MERKLE tree indicates that the idea is to keep a hash of each substructure, *along* with the substructure, for security / integrity purposes
<companion_cube> val angela : MERKLE
<companion_cube> </fun>
<gasche> aren't you rather thinking of hash-consing, where you keep a global hash table to increase value sharing?
<amiller_> indeed, this is basically used in two-party protocols
<amiller_> so there would be two translations of a program, one for a Prover party, another for a Verifier party
<amiller_> the Prover would maintain the hashes as well as the substructures, like you said, no benefit of compression, but the Verifier only stores the hashes
<gasche> ok
<gasche> do you really need the type information for that, or could you describe the program transformation by operating on the AST of type declarations, à la type_conv or deriving ?
<amiller_> well i think i should do it with type information because this applies not just to explicit type definitions
<amiller_> i additionally expect to have function keywords for coercion like merkleize/unmerkleize that would go in and out of that representation
<gasche> a type_conv extension could generate additional function definitions, derived from the type declaration
<avsm> amiller_: if you first prototype isn't too performance sensitive, then just use Dyntype
<gasche> but I'm not sure whether that's enough; maybe indeed you need to transform all code operating on values of this t ype
<avsm> that uses type_conv to give you a Type.t and a Value.t and conversions to the native types
<avsm> it introduces extra boxing, but is convenient to play with types
<amiller_> yeah doing runtime type inspection may well be the easiest way to show this
<avsm> once you're happy with whatever transformation you want, you can engage in masochistic camlp4 hackery
himito has quit [Quit: WeeChat 0.3.7]
ousado has quit [Ping timeout: 248 seconds]
ousado has joined #ocaml
adrien_o1w has joined #ocaml
adrien_oww has quit [Ping timeout: 252 seconds]
eikke has joined #ocaml
adrien_o1w is now known as adrien_oww
<gasche> avsm: Yaron is popularizing beginners material that advises them to "opam init; opam switch 4.01.0dev+trunk"
<gasche> that's not reasonable
<dsheets> gasche, causes problems with ocamlnet 3.6.x which has dupe stat method in netpop.ml... i searched the trunk source for substrings of "The method `stat' has multiple definitions in this object" and came up empty. Why?
maufred_ has quit [Read error: Operation timed out]
<gasche> dsheets: no idea, old copy or you failed your grep
<gasche> the bug report I linked to has the commit number
<adrien_oww> there's one thing that has irked me a *LOT* around opam
<adrien_oww> advising people to use trunk/head/unstable versions
<gasche> well a stabilized tag on an experimental version with the new features RWO relies on would be understandable
<gasche> but dev+trunk is not
<adrien_oww> agreed, that means something like "beta" at least
<gasche> dsheets: it's interesting to know that ocamlnet fails
<gasche> do you think it's a bug in the ocamlnet code, or something justified or at least harmless?
<dsheets> gasche, indeed... I find it now. ocamlnet <=3.6.5 will not be compat with 4.01
<adrien_oww> but that's not because a system makes it very easy to use trunk code that is should be done
<dsheets> it's a bug in ocamlnet, the method is lexically identical
<gasche> dsheets: could you comment on the bugtracker with a link to the relevant ocamlnet source code
maufred has joined #ocaml
<gasche> ?
<gasche> that would help Damien if he finds the issue before the release
<dsheets> unless netpop uses some weird oo thing that makes identical duplicate methods do the same thing at different places in the object defn sequence
<gasche> did you find that out with the hopefully-soon-more-public ocamlot infrastructure?
eikke has quit [Ping timeout: 260 seconds]
<dsheets> yes, grep for "method stat"
<gasche> in the bugtracker, in the bugtracker :)
<dsheets> gasche, it is not your bug, though, i need to report to gerd, yes? unless the compiler team also cares?
<gasche> well
<gasche> you do need to report it to gerd
<gasche> (that looks like a silent merge bug)
eikke has joined #ocaml
<gasche> it would also be helpful to comment pointing this piece of code on the bugtracker discussion opened by Alain about the change
<dsheets> gasche, ok, thanks for the advisements
maufred_ has joined #ocaml
Yoric1 has joined #ocaml
Yoric has quit [Read error: Connection reset by peer]
maufred has quit [Ping timeout: 264 seconds]
Zeev has joined #ocaml
csakatok_ has quit [Remote host closed the connection]
chambart has joined #ocaml
smondet has joined #ocaml
Zeev has quit [Read error: Connection reset by peer]
ygrek has joined #ocaml
osa1 has joined #ocaml
lusory has quit [Ping timeout: 264 seconds]
ttamttam has quit [Quit: ttamttam]
csakatoku has joined #ocaml
gal_bolle has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
ttamttam has joined #ocaml
mattrepl has joined #ocaml
Zeev has joined #ocaml
Drup has joined #ocaml
smondet has quit [Remote host closed the connection]
breakds has joined #ocaml
osa1 has quit [Quit: Konversation terminated!]
ttamttam has quit [Quit: ttamttam]
<gal_bolle> I just installed the git version of opam, and it seems not to check for new commits in git/darcs repositories when I do opam update. Is that supposed to happen?
Yoric1 has quit [Ping timeout: 252 seconds]
<gal_bolle> in fact, it seems to only check for them if at least one package version number has changed (whether the same one or another)
<gasche> gal_bolle: that seems contrary to the documented behaviour; but your "at least one package changed" comment makes it sound like an incorrect optimize, and therefore a bug
<gal_bolle> seems likely
<gal_bolle> btw, how can I build opam with debugging symbols
<gasche> (in case you need a pointer, the documentation for git/darcs packages is http://opam.ocamlpro.com/doc/Packaging.html#h2-Git/Darcspackages )
Yoric has joined #ocaml
<dsheets> gal_bolle, in Makefile, change opamMain.native to opamMain.d.byte on l37 and l38
<dsheets> gal_bolle, and use with-ocamlbuild and install-with-ocamlbuild
<gal_bolle> you mean make with-ocamlbuild?
<dsheets> yes
ggole has joined #ocaml
travisbrady has joined #ocaml
ollehar1 has joined #ocaml
<gal_bolle> now ocamlfind complains that cmdliner is not found
csakatoku has quit [Remote host closed the connection]
<gal_bolle> this is because ocamlbuild picks up /usr/bin/ocamlfind instead of ~/.opam/…/ocamlfind, but I don't know how to correct it
<avsm> that's a bug in 4.00.1, fixed in 4.01.0dev+trunk
<avsm> hard to correct in 4.00.1 without a compiler patch, sadly, so you'll either need to 'opam switch 4.01.0dev+trunk' or uninstall the system ocamlbuild
<gal_bolle> thanks
ttamttam has joined #ocaml
hkBst has quit [Quit: Konversation terminated!]
rwmjones_holiday has quit [Quit: Terminated with extreme prejudice - dircproxy 1.2.0]
<dsheets> avsm, what's the bug? i have some of these ocamlfind path problems, too
<dsheets> under ocamlbuild that is
Watcher7|off is now known as Watcher7
shinnya has joined #ocaml
<avsm> just uninstall any system findlib
<avsm> its picked in preference to the PATH
<avsm> if you have just a findlib installed under ~/.opam, everything works fine (since OPAM can select it via the PATH as usual)
ttamttam has quit [Quit: ttamttam]
<dsheets> what is the bug? I have my PATH configured correctly but sometimes ocamlbuild seems to use an old PATH. Do you know where this is tracked?
<dsheets> mantis changelog doesn't seem to have anything
<gasche> I think ocamlbuild essentially ignored PATH and looked for /usr/bin specifically
<gasche> (I don't remember very well)
<avsm> something like that. it, like most tools that try to reimplement the shell, didn't quite get it right :)
<gasche> there is some hardcoded-path support inside ocamlbuild which is used during its bootstrap phase (it builds from a "simple" version of itself that was built without plugin support, and is not yet installed)
<gal_bolle> now ocamfind complains about dose3
<gal_bolle> that's ok, I'm being silly
bkpt has joined #ocaml
<gasche> apparently it wasn't reported on the bugtracker
csakatoku has joined #ocaml
pootler__ has quit [Ping timeout: 264 seconds]
pootler_ has quit [Ping timeout: 264 seconds]
gal_bolle has quit [Remote host closed the connection]
ollehar1 has quit [Ping timeout: 264 seconds]
Yoric has quit [Ping timeout: 252 seconds]
csakatoku has quit [Ping timeout: 252 seconds]
cago has left #ocaml []
rwmjones has joined #ocaml
mika1 has quit [Quit: Leaving.]
testcocoon has quit [Quit: Coyote finally caught me]
Kakadu has joined #ocaml
mattrepl has quit [Quit: mattrepl]
smondet has joined #ocaml
testcocoon has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
pootler_ has joined #ocaml
beckerb has quit [Ping timeout: 240 seconds]
pootler__ has joined #ocaml
ttamttam has joined #ocaml
ttamttam has quit [Client Quit]
ollehar has quit [Ping timeout: 240 seconds]
testcocoon has quit [Quit: Coyote finally caught me]
dsheets has quit [Read error: Operation timed out]
testcocoon has joined #ocaml
tobiasBora has joined #ocaml
pootler_ has quit [Ping timeout: 246 seconds]
pootler_ has joined #ocaml
ollehar has joined #ocaml
csakatoku has joined #ocaml
chambart has quit [Ping timeout: 240 seconds]
csakatoku has quit [Ping timeout: 264 seconds]
hcarty has quit [Ping timeout: 256 seconds]
eikke has quit [Read error: Operation timed out]
tobiasBora_ has joined #ocaml
tobiasBora has quit [Read error: No route to host]
shinnya has quit [Read error: Operation timed out]
osnr has quit [Quit: Leaving.]
dinosaure has quit [Ping timeout: 256 seconds]
hcarty has joined #ocaml
tizoc has quit [Read error: Connection reset by peer]
eikke has joined #ocaml
mattrepl has joined #ocaml
ollehar has quit [Quit: ollehar]
pootler__ has quit [Ping timeout: 245 seconds]
tizoc has joined #ocaml
pootler_ has quit [Ping timeout: 252 seconds]
csakatoku has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
csakatoku has quit [Ping timeout: 264 seconds]
xavierm02 has joined #ocaml
<xavierm02> hey
<xavierm02> with ocamlbuild, with the -Is, I get my modules that are in a subdirectory included
<xavierm02> but if those modules need other modules in the same subdirectory, they somehow can't reach them,
<xavierm02> would anyone know how to fix that?
dsheets has joined #ocaml
chambart has joined #ocaml
<xavierm02> never mind
osnr has quit [Quit: Leaving.]
pootler_ has joined #ocaml
pootler__ has joined #ocaml
mattrepl has quit [Quit: mattrepl]
eikke has quit [Ping timeout: 252 seconds]
ggole has quit [Ping timeout: 240 seconds]
gnuvince has joined #ocaml
jcao219 has joined #ocaml
tobiasBora_ has quit [Ping timeout: 252 seconds]
ggole has joined #ocaml
mcclurmc has quit [Ping timeout: 268 seconds]
gautamc has quit [Read error: Connection reset by peer]
raichoo has quit [Quit: leaving]
testcocoon has quit [Quit: Coyote finally caught me]
mattrepl has joined #ocaml
Kakadu has quit []
csakatoku has joined #ocaml
travisbrady has quit [Quit: travisbrady]
testcocoon has joined #ocaml
mattrepl has quit [Ping timeout: 245 seconds]
<xavierm02> Is there some way to achieve this http://pastebin.com/s59myfNr
<xavierm02> without using a CARTHESIAN_SQUARE and a SAME_SET_RELATION types?
<asmanur> your way of doing this is a bit strange
<asmanur> why not use functors ?
<xavierm02> I do use functors
<xavierm02> those are module types
travisbrady has joined #ocaml
<xavierm02> not modules
<asmanur> right
darkf has quit [Quit: Leaving]
<asmanur> why so ? you want several implementations of CARTESIAN_PRODUCT_SET ?
<xavierm02> well
<xavierm02> no
<asmanur> then you don't need those module types :P
<xavierm02> but I might at some point get a CARTESIAN_POWER things
<xavierm02> like
<xavierm02> sequences of elements
<xavierm02> and then, I might want it to be seen as a CARTESIAN_PRODUCT too
<xavierm02> anyway
csakatoku has quit [Ping timeout: 252 seconds]
<xavierm02> how do I not need it?
<asmanur> why not do simply
<asmanur> module CartesianProduct (A : Set) (B : Set) : Set with type t = A.t * B.t = struct ... end ?
<xavierm02> because when I define a binary relation
<xavierm02> I have to do it on a carthesian product set
chambart has quit [Read error: Operation timed out]
<asmanur> yes
<asmanur> but your definition of binary relation is wrong anyway
<asmanur> Rel(A, B) is P(A×B) not A×B
<xavierm02> >_<
<xavierm02> no
<xavierm02> I just
<xavierm02> haven't put the mem method yet
<xavierm02> but if I get a mem method
<xavierm02> it becomes a subset of AxB
<asmanur> hm
gautamc has joined #ocaml
<asmanur> oh
<asmanur> so SET is really SUBSET
<xavierm02> no
<xavierm02> SET is SET
<xavierm02> but a subset
<xavierm02> is a SET too
<xavierm02> and yeah
<xavierm02> sets aren't defined by a type
<xavierm02> it's a type and a mem function
<asmanur> well
<asmanur> then
<asmanur> hm
<asmanur> why not do module Subset (S : Set) : Set with type t = S.t -> bool = struct (* ... *) end ?
<xavierm02> I know I could do it with a CARTHESIAN_SQUARE that would be a subtype of CARTHESIAN_PRODUCT and SAME_SET_RELATION that would be a subset or RELATION
eikke has joined #ocaml
<xavierm02> erm
<xavierm02> i didnt get ur last message
<xavierm02> the type would be "functions from t to bool"?
<asmanur> yes
<asmanur> it's not perfect actually
<asmanur> but i'm not really seeing what you are trying to achieve here
<xavierm02> >_<
<xavierm02> I'll just go with the CARTHESIAN_SQUARE etc.
<xavierm02> and when I get everything working
<xavierm02> I'll come back and ask for criticises
testcocoon has quit [Quit: Coyote finally caught me]
jcao219 has quit [Quit: Leaving]
testcocoon has joined #ocaml
testcocoon has quit [Client Quit]
ggole has quit []
testcocoon has joined #ocaml
raichoo has joined #ocaml
mcclurmc has joined #ocaml
ttamttam has joined #ocaml
Kakadu has joined #ocaml
dinosaure has joined #ocaml
<xavierm02> if I want a module type to have two different names for THE SAME module
<xavierm02> how do I do that?
<xavierm02> like
<xavierm02> module A : MODULE_TYPE
<xavierm02> module B = A
<xavierm02> but ofc I get a syntax error
csakatoku has joined #ocaml
Snark has quit [Quit: leaving]
ttamttam has left #ocaml []
csakatoku has quit [Ping timeout: 246 seconds]
ollehar has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
ollehar1 has joined #ocaml
tobiasBora_ has joined #ocaml
tane has joined #ocaml
Anarchos has joined #ocaml
osnr has quit [Quit: Leaving.]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
osnr has quit [Client Quit]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
ollehar has quit [Ping timeout: 252 seconds]
osnr has quit [Client Quit]
<hnrgrgr> xavierm02: I would do: module B : MODULE_TYPE with type t = A.t and ...
emmanuelux has joined #ocaml
_andre has quit [Quit: leaving]
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 240 seconds]
<xavierm02> hnrgrgr: ty, I didn't even think of that >_<
osa1 has joined #ocaml
<osa1> what is camlp4oof and where can I learn more about it?
Neros has quit [Remote host closed the connection]
<osa1> I'm trying to make a choice between camlp4 parser thing and ocamllex & ocamlyacc
<dsheets> osa1, for what grammar?
<osa1> dsheets: um .. programming language ..
<dsheets> osa1, sure, they have grammars... what does yours look like? is it embedded in ocaml?
<osa1> dsheets: no, it's a toy language and will probably be compiled with LLVM tools ..
<dsheets> osa1, i recommend ocamllex + menhir
<dsheets> rather than ocamlyacc if your grammar fits that model
<dsheets> camlp4 is rather overkill if yacc/menhir does what you need
<Drup> more thant that, camlp4 is not intended to be a general purpose parser, it's for ocaml extension. You can do it, but that's really not the point (and it will be horrible to do)
<osa1> ok, I don't want to use another 3rd party tool at this point, I think I'll go with ocamlyacc then ..
<osa1> also, I have some experience with lex/yacc tools
<Anarchos> osa1: ocamllex/ocamlyacc are really easy to use, so don't hesitate to give them a try
gbluma_ has quit [Ping timeout: 240 seconds]
<dsheets> osa1, menhir is a lot like ocamlyacc but with better error messages and some obvious niceties in production rules
<dsheets> it's available on opam
<osa1> yes, actually I gave it a try, ~100 loc ocamlyacc file. it was really easy to use, especially when compared with alex/happy (haskell equivalents of lex/yacc)
<osa1> for now I'm only using standard OCaml tools and GNU Make for building, because tools like ocamlbuild are too complex for me(ie. I couldn't find a way in one hour, to link my program with llvm with ocamlbuild, but it was easy with ocamlc)
<osa1> should I learn ocamlfind? it produces ocamlc parameters for linking libraries, right?
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
<Drup> osa1: ocamlfind is really easy to use
<osa1> Drup: how so? it has a huge man page
<Drup> instead of using "ocamlc -I /complicated/page/to/lib", you can do "ocamlfind ocamlc -package my_package"
<Drup> and everything else is pretty much the same.
<Drup> s/page/path
<Drup> And this way, it's portable. Other people with a different path to the lib can compile your code with the same command.
<osa1> Drup: should I set any env variables for ocamlfind?
<Drup> no
<osa1> because it couldn't find llvm library installed at /usr/local/lib/ocaml
<osa1> ocamlfind ocamlopt -I /usr/local/lib/ocaml -package llvm
<osa1> still doesn't work
<osa1> btw, I'm directly passing llvm cma file paths to ocamlc in my Makefile
<amiller_> uh i don't expect to get a whole lot of support for this but i'm really interested in doing type directed translation using this sort of approach http://camlspotter.blogspot.com/2012/09/a-safe-but-strange-way-of-modifying.html
<dsheets> osa1, ocamlfind query llvm
<Drup> remove the -I. Vertify the name of the package is "llvm"
<amiller_> it involves modifying the compiler to take the typeinferred Typedtree, alter it, then print it out via untypeast, then type check it again
<amiller_> this example fails when i have a simple example with a polymorphic type though
<osa1> dsheets: not found
<amiller_> "Error: This pattern matches values of type 'a but a pattern was expected which matches values of type (tree * int * tree) authtype"
<dsheets> osa1, where did you get the lib?
<osa1> dsheets: I manually compiled it installed it
<Drup> amiller_: you're doing a ppx for the typedtree ?
jbrown has quit [Read error: Connection reset by peer]
<amiller_> ppx?
<amiller_> oh a pretty printer?
<dsheets> osa1, i recommend using opam so all of this library registration happens automatically... if you decline, ocamlfind install is the command you need to against the compiled lib files and the ocamlfind META file
<Drup> ppx is not a pretty printer, it's the new think in ocaml 4.1 that allow to do syntactic extensions
<dsheets> osa1, checking llvm distribution, one moment
<amiller_> no not in this case, so far i am just untyping the typedtree to an asttree, then typing that again
<amiller_> oh
<amiller_> hadn't heard of that, /me goes to look
<osa1> dsheets: ah, I found a META file
<osa1> dsheets: in llvm distribution, I think it's for ocamlfind
<dsheets> osa1, yes, excellent, do [ "cp" "%{lib}%/llvm/META.llvm" "%{lib}%/llvm/META" ]
<Drup> osa1: you should really use opam anyway ;)
<osa1> dsheets: um, me don't understand bash
<osa1> Drup: well I'm compiling LLVM with some flags ..
<amiller_> Drup, well afaict, this ppx only works with the AST, whereas i think i really need to observe the inferred types of expressions
<osa1> for debugging
<amiller_> so yeah ppx for typedtree would be nice :3
<Drup> amiller_: yeah, that's what I meant by "ppx for the typedtree"
<amiller_> so... is there one of those?
Tobu has quit [Ping timeout: 256 seconds]
<Drup> not yet.
<Drup> since you seems to be motivated, maybe in the future :)
<osa1> Drup: ok I copied META.llvm as META, now how can I register it?
csakatoku has joined #ocaml
<dsheets> osa1, ok, try $ ocamlfind install llvm {path-to-META} {all the *.cm? files}
Tobu has joined #ocaml
<dsheets> i may have mispoken earlier regarding the copy operation... not used this lib before
<osa1> dsheets: ocamlfind: Package llvm is already installed
<osa1> but ocamlfind query llvm fails with "not found"
<Drup> osa1: it's the "install" for ocamlfind
<dsheets> osa1, and when you delete the META i stupidly had you copy?
<dsheets> osa1, sorry, rather the META needs to be called META but not be manually put in the lib dir
<amiller_> what's weird is that i print out the ast in both cases and they look identical
<amiller_> this is what the snippest of my compile.ml looks like
<amiller_> ++ (fun ptree -> Format.eprintf "%a@." Pprintast.structure ptree; ptree)
<amiller_> ++ Typemod.type_implementation sourcefile outputprefix modulename env
<amiller_> ++ (fun (str, _) -> Untypeast.untype_structure str)
<amiller_> ++ (fun ptree -> Format.eprintf "%a@." Pprintast.structure ptree; ptree)
<amiller_> ++ Typemod.type_implementation sourcefile outputprefix modulename env
<amiller_> so the only thing that could be happening is if Pprintast.structure is omitting some structure by which the original parsed ast differs from the untypeast
<dsheets> osa1, adopting opam will solve this problem and many future ones like it, btw
<osa1> dsheets: like I said I can't use opam for llvm because I'm compiling it with some custom parameters(for enabling assertions, debugging etc.)
<dsheets> osa1, you can still build it custom and pin your build into opam
csakatoku has quit [Ping timeout: 264 seconds]
<dsheets> osa1, but if using ocamlfind gets you working, that's great
breakds has quit [Quit: Konversation terminated!]
<xavierm02> gah
<xavierm02> still the same problem
<xavierm02> I have a module type
<xavierm02> and want to make sure two modules are equal
<amiller_> ah weird so there is a difference when i print out the implementation with dumpparsetree basically
<amiller_> my pattern match pattern of type Bin(a) gets originally interpreted as a patternmatch tuple with one element
<xavierm02> I can make sure their types are equal with a "with t := t" but I can't make sure the functions are the same
* osa1 still trying to register llvm to ocamlfind ...
<amiller_> and then the second time after untype output it is just printed as a variable not inside a pattern match tuple
<osa1> maybe I should read man page
<gasche> 22:45 < Drup> more thant that, camlp4 is not intended to be a general purpose parser, it's for ocaml extension. You can do it, but that's really not the point (and it will be horrible to do)
<gasche> Drup: that is not correct
<gasche> Camlp4 provides a rather generic way to define parsers as a kind of DSL, that is actually appropriate to write whole parsers for serious programming languages
<gasche> (Camlp4 uses it to define the grammar of the whole OCaml language, with error messages that are often better than what the ocamlyacc parser provides)
<gasche> that said, I think the advice to prefer menhir is a sound one, because menhir is a simpler tool
<gasche> but I've used EXTEND to write parsers and that was definitely not "horrible"
<gasche> (the semantics are not very well documented, though; Jake Donham's blog series is very helpful for this)
jbrown has joined #ocaml
<osa1> I installed menhir with opam but "ocamlfind query menhir" fails with "not found", why?
<gasche> because it is a program and not a library
<osa1> ahh, right
<gasche> the library is named menhirLib I believe
<gasche> try ocamlfind list | grep menhir
travisbrady has quit [Quit: travisbrady]
<osa1> yeah, menhirLib
<gasche> you should have a "menhir" program in your opam PATH
gbluma has joined #ocaml
<osa1> yes, it's there
<gasche> ocamlbuild provides support for compiling .mly files using menhir directly
<gasche> but if you like the explicit way better, read the manual to find the correct invocation
skchrko has quit [Quit: Leaving]
osa1 has quit [Quit: Konversation terminated!]
raichoo has quit [Quit: leaving]
jbrown has quit [Read error: Connection reset by peer]
jbrown has joined #ocaml
pootler_ has quit [Ping timeout: 245 seconds]
pootler__ has quit [Read error: Operation timed out]
pootler_ has joined #ocaml
pootler__ has joined #ocaml
xavierm02 has quit [Remote host closed the connection]
<amiller_> i notice that this line of code was changed recently https://github.com/ocaml/ocaml/blob/trunk/tools/untypeast.ml#L227
<amiller_> when 'untyping' an expression with a single constructor argument, | [ arg ] -> Some (untype_expression arg)
<amiller_> it should match as a single argument rather than a tuple of arguments
<amiller_> so i wonder if it's appropriate to make the same fix for pattern matching in the case of my problem https://github.com/ocaml/ocaml/blob/trunk/tools/untypeast.ml#L156
Kakadu has quit [Read error: Connection reset by peer]
<amiller_> indeed, that fixed my problem.
<amiller_> now how should i make a pull request for this
ollehar has joined #ocaml
eikke has quit [Ping timeout: 264 seconds]
<Drup> gasche: Well, maybe it's because I'm not use to it, but I find writing parsers (and extensions in general) with camlp4 quite painful.
eikke has joined #ocaml
csakatoku has joined #ocaml
breakds has joined #ocaml
csakatoku has quit [Ping timeout: 260 seconds]
smondet has quit [Quit: Bye]
eikke has quit [Ping timeout: 276 seconds]
contempt has quit [Ping timeout: 252 seconds]
contempt has joined #ocaml
<amiller_> if i'm inside the compiler is there a way I can pretty print a type_expr
<amiller_> i totally want to print a typedtree :|
djcoin has quit [Quit: WeeChat 0.4.0]
contempt has quit [Ping timeout: 268 seconds]
tane has quit [Quit: Verlassend]
contempt has joined #ocaml
<jpdeplaix> is there an equivalent for Lwt_main.run in Async ?
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 260 seconds]
Anarchos has quit [Quit: Page closed]
ollehar has quit [Ping timeout: 264 seconds]
osnr has quit [Quit: Leaving.]
jbrown has quit [Ping timeout: 276 seconds]
gautamc has quit [Ping timeout: 245 seconds]
gautamc has joined #ocaml
zRecursive has joined #ocaml