mfurr 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/
kinners has joined #ocaml
mrsolo_ has joined #ocaml
zzorn has quit ["........"]
shawn_ has joined #ocaml
cryptilox has joined #ocaml
Submarine has quit ["Leaving"]
shawn has quit [Read error: 110 (Connection timed out)]
det has quit [Read error: 104 (Connection reset by peer)]
det has joined #ocaml
mattam has quit [Read error: 110 (Connection timed out)]
vezenchio has joined #ocaml
gim has quit ["bye"]
cryptilox has left #ocaml []
quamaretto has quit [Read error: 60 (Operation timed out)]
quamaretto has joined #ocaml
quamaretto has quit [""...people who aren't capable of reading adult books shouldn't talk about them." - C.S. Lewis"]
kinners has quit ["leaving"]
m3ga has joined #ocaml
m3ga has quit ["Client exiting"]
mrvn_ has joined #ocaml
dan2 has quit [Nick collision from services.]
dan2_ has joined #ocaml
dan2_ is now known as dan2
mrvn has quit [Read error: 110 (Connection timed out)]
ne1 has quit ["To understand recursion, you must first understand recursion."]
solarwind has joined #ocaml
jourdechance has quit [Read error: 242 (No route to host)]
mlh has quit [Client Quit]
Riastradh has quit ["sleep"]
det has quit [Read error: 60 (Operation timed out)]
det has joined #ocaml
m3ga has joined #ocaml
m3ga has quit ["Client exiting"]
Submarine has joined #ocaml
Lemmih has joined #ocaml
mrsolo_ has quit [Read error: 104 (Connection reset by peer)]
mrsolo_ has joined #ocaml
smimou has joined #ocaml
Lemmih has left #ocaml []
Submarine has quit ["Leaving"]
pango has quit [Remote closed the connection]
pango has joined #ocaml
mrsolo_ has quit [Read error: 113 (No route to host)]
mlh has joined #ocaml
vezenchio has quit [Read error: 110 (Connection timed out)]
mlh has quit [Client Quit]
pango has quit ["Client exiting"]
gim has joined #ocaml
pango has joined #ocaml
Submarine has joined #ocaml
hangman4 has joined #ocaml
zzorn has joined #ocaml
CosmicRay has joined #ocaml
vezenchio has joined #ocaml
zac1 has joined #ocaml
zac1 has left #ocaml []
mrvn_ is now known as mrvn
mrsolo_ has joined #ocaml
pango has quit ["Leaving"]
Submarine has quit ["Leaving"]
vezenchio has quit ["haibane · renmei"]
mrsolo_ has quit [Success]
pango has joined #ocaml
__DL__ has joined #ocaml
Submarine has joined #ocaml
Kevin_ has joined #ocaml
gim has quit [Read error: 110 (Connection timed out)]
gim has joined #ocaml
ofranja has joined #ocaml
mrsolo_ has joined #ocaml
stef_ has quit [Read error: 60 (Operation timed out)]
stef_ has joined #ocaml
mrsolo_ has quit [No route to host]
mattam has joined #ocaml
_DL_ has joined #ocaml
__DL__ has quit ["Bye Bye"]
_DL_ is now known as __DL__
Axioplase has joined #ocaml
<Axioplase> good Evening
<Axioplase> Has anyone ever done a type unification program?
<__DL__> I've think about it, but I've not done it. Why ?
<Axioplase> (and it's not a "please do my homework" :P)
<Axioplase> because I have some trouble impplementing it...
<Axioplase> I have "apply_substitution" which, given a type and a substitution returns the new type. ie apply_sub [(A,Int)] A->Bool returns Int->Bool
<Axioplase> and then the unification one that apllies the subs to the rest of the type as it encounters them
<Axioplase> but no way to manage "unify a->b->c b->c->a"
<Axioplase> hence my disapointment
<__DL__> well, For type variable, I would generate a fresh one each time.
<__DL__> So it would be something like :
Kevin_ has quit [Read error: 110 (Connection timed out)]
<__DL__> apply_sub [((Var 10),Int)] (Var 10)->Bool
<__DL__> the usage of 'a 'b and 'c would be only when printing the type and reading it..
<smimou> another way to cheat would be to use freshocaml
<__DL__> yes, may be it would be more clean
<Axioplase> __DL__: in fact, i have this types: type typ = Bool |Int | Star of typ*typ | Arrow of typ*ty | Var of string
<Axioplase> and no a,b,c's...
<mattam> is the problem with unifying a->b->c and b->c->a or ?
<Axioplase> it is
<Axioplase> can unify inductive or "weirdly" recursive types
<mattam> you mean your unification function does not work for these types then ?
<Axioplase> But at least, I raise an exception when not unifiable
<Axioplase> mattam: yes, that's what i meant. sorry if i wasn't clear enough
<Axioplase> (gosh i lag... 797seconds to sync with this channel)
<__DL__> well, you have not given us a lot of information, but the idea (as I see it) is that unifying should be some recursive function that give not only the type, but the unification that have been done
<Axioplase> well... unify (arrow(Var a, Bool)) (Arrow (Int,Var b)) shuold return [(Var a, Int);(Var b, Bool)] (which it does with such a simple test)
<__DL__> what does it does on unify (Var a) (Var b) ?
<Axioplase> [(Var a, Var b)]
<__DL__> well, I don't see where is the probleme then...
<Axioplase> unification (Fleche (Var"a",Var"b")) (Fleche (Int,Var"b"));; gives (typ * typ) list = [(Var "a", Int); (Var "b", Var "b")]
<Axioplase> That is a problem... (fleche means "Arrow" but whatever)
<Axioplase> errr
<Axioplase> stupid me
<Axioplase> __DL__: ok, unify ((a->b)->c)*a ((b->c)->a)*Int returns a=b, b=c, c=a, a=Int if i remove the Not_unifiable exception check, ot raises the exception. *Now* that is not a normal behaviour
<__DL__> Bon, ben je vais te laisser a tes probleme d'unification, moi demain, je vais topologicet complet, mais tot... bonne nuit et bon courage...
Riastradh has joined #ocaml
__DL__ has quit ["it's late here, good night"]
<Axioplase> merci
Submarine is now known as chaton
chaton is now known as Submarine
CosmicRay has quit ["Client exiting"]
monochrom has joined #ocaml
mlh has joined #ocaml
smimou has quit ["?"]