polin8 has quit [Read error: 54 (Connection reset by peer)]
polin8 has joined #ocaml
Zadeh has quit [Read error: 60 (Operation timed out)]
lament has quit [Remote closed the connection]
seth has joined #ocaml
osmin626 has joined #ocaml
mattam has joined #ocaml
hitachi has left #ocaml []
osmin626 has quit ["Client Exiting"]
lament has joined #ocaml
whee has quit ["Leaving"]
lament has quit ["Well shirigim duraham da..."]
mattam has quit [leguin.freenode.net irc.freenode.net]
polin8 has quit [leguin.freenode.net irc.freenode.net]
cm has quit [leguin.freenode.net irc.freenode.net]
docelic has quit [leguin.freenode.net irc.freenode.net]
emu has quit [leguin.freenode.net irc.freenode.net]
lus|wazze has quit [leguin.freenode.net irc.freenode.net]
async has quit [leguin.freenode.net irc.freenode.net]
pattern_ has quit [leguin.freenode.net irc.freenode.net]
mattam has joined #ocaml
polin8 has joined #ocaml
lus|wazze has joined #ocaml
emu has joined #ocaml
docelic has joined #ocaml
cm has joined #ocaml
pattern_ has joined #ocaml
async has joined #ocaml
asqui has quit [Excess Flood]
asquii has joined #ocaml
asquii is now known as asqui
asqui has quit [leguin.freenode.net irc.freenode.net]
mattam has quit [leguin.freenode.net irc.freenode.net]
polin8 has quit [leguin.freenode.net irc.freenode.net]
cm has quit [leguin.freenode.net irc.freenode.net]
docelic has quit [leguin.freenode.net irc.freenode.net]
emu has quit [leguin.freenode.net irc.freenode.net]
async has quit [leguin.freenode.net irc.freenode.net]
pattern_ has quit [leguin.freenode.net irc.freenode.net]
lus|wazze has quit [leguin.freenode.net irc.freenode.net]
asqui has joined #ocaml
mattam has joined #ocaml
polin8 has joined #ocaml
lus|wazze has joined #ocaml
emu has joined #ocaml
docelic has joined #ocaml
cm has joined #ocaml
pattern_ has joined #ocaml
async has joined #ocaml
asquii has joined #ocaml
asqui has quit [Excess Flood]
asquii is now known as asqui
mattam has quit [leguin.freenode.net irc.freenode.net]
polin8 has quit [leguin.freenode.net irc.freenode.net]
cm has quit [leguin.freenode.net irc.freenode.net]
docelic has quit [leguin.freenode.net irc.freenode.net]
emu has quit [leguin.freenode.net irc.freenode.net]
async has quit [leguin.freenode.net irc.freenode.net]
pattern_ has quit [leguin.freenode.net irc.freenode.net]
lus|wazze has quit [leguin.freenode.net irc.freenode.net]
mattam has joined #ocaml
polin8 has joined #ocaml
lus|wazze has joined #ocaml
async has joined #ocaml
pattern_ has joined #ocaml
cm has joined #ocaml
docelic has joined #ocaml
emu has joined #ocaml
asqui has quit [Excess Flood]
asquii has joined #ocaml
TachYon has joined #ocaml
TachYon has quit [leguin.freenode.net irc.freenode.net]
TachYon has joined #ocaml
async has quit [leguin.freenode.net irc.freenode.net]
lus|wazze has quit [leguin.freenode.net irc.freenode.net]
pattern_ has quit [leguin.freenode.net irc.freenode.net]
lus|wazze has joined #ocaml
pattern_ has joined #ocaml
async has joined #ocaml
TachYon has quit [leguin.freenode.net irc.freenode.net]
TachYon has joined #ocaml
TachYon has quit ["Client Exiting"]
docelic has quit [Excess Flood]
docelic has joined #ocaml
Yurik has quit ["Client exiting"]
maurice has joined #ocaml
maurice has quit []
systems has joined #ocaml
mattam has quit [Read error: 110 (Connection timed out)]
systems has quit [Read error: 110 (Connection timed out)]
lus|wazze has quit ["\o/ *liephab* \o/"]
lus|wazze has joined #ocaml
hitachi has joined #ocaml
hitachi is now known as hitachi-away
iusris_ has quit ["leaving"]
hitachi-away is now known as hitach
hitach is now known as hitachi
lus|wazze has quit ["\o/ *liephab* \o/"]
Psion has joined #ocaml
Smerdyakov has quit [Killed (NickServ (Nickname Enforcement))]
Smerdyakov has joined #ocaml
Smerdyakov has quit [Killed (NickServ (Nickname Enforcement))]
Smerdyakov has joined #ocaml
Smerdyakov has quit [Killed (NickServ (Nickname Enforcement))]
Psion is now known as Smerdyakov
Psion has joined #ocaml
Smerdyakov has quit [Client Quit]
Psion is now known as Smerdyakov
liyang_ has joined #ocaml
liyang has quit [Read error: 104 (Connection reset by peer)]
asquii has quit [Read error: 104 (Connection reset by peer)]
<seth>
when I get a message "This expression has type foo but is here used with type bar" (in a function call), which type is the function parameter type?
<pattern_>
bar
<pattern_>
you're passing a foo to a function expecting bar
hitachi has left #ocaml []
<seth>
pattern_: thanks. I'm trying to unravel a type problem.
<pattern_>
i gathered that ;)
<seth>
pattern_: now I fixed it. instead of a type error I get a syntax error. :)
<pattern_>
yay!
Yurik has joined #ocaml
<seth>
ok. this is somewhat interesting. I have a "while true do ... done" loop, which is exited when the function called from the body of the while loop raises an exception. This is confusing the compiler about the type of the method (the method that has the while loop). The while loop is the end of the method, except for the with clause to handle the exception.
<pattern_>
sorry, i haven't gotten around to learning ocaml's oo system... maybe someone else here can help
<seth>
pattern_: I found the problem. What I forgot (which my question said nothing about as I wasn't looking in the right place) is that in a series of pattern matches, the first pattern sets the type for all subsequent expressions for the rest of the patterns.
<seth>
that is, if I have match foo with bar -> x | bar2 -> y, the type of y is inferred to be the same as the type of x
<pattern_>
yep
<pattern_>
it can only return one type, so it assumes your match is the type you want to return
<pattern_>
i mean, it assumes your first match is the type you want to return
asqui has joined #ocaml
<seth>
pattern_: right.
<seth>
pattern_: although in this case the pattern is in the _caller_, which makes it a bit more difficult to spot.
<pattern_>
yeah, i've noticed that types can get kind of convoluted in ocaml
rox has quit [Read error: 110 (Connection timed out)]
rox has joined #ocaml
lament has joined #ocaml
rox has quit [Read error: 60 (Operation timed out)]