vezenchio has quit [""Under democracy one party always devotes its chief energies to trying to prove that the other party is unfit to rule—and bot]
CosmicRay has joined #ocaml
CosmicRay has left #ocaml []
vivek has joined #ocaml
vivek is now known as tintin
ulfdoz_ has joined #ocaml
ulfdoz has quit [Read error: 60 (Operation timed out)]
cjohnson is now known as cj|sleep
__DL__ has joined #ocaml
eviltoylet has joined #ocaml
<eviltoylet>
i'm trying to write a pattern match, but it seems to be telling me that one match case is unused. the case that it refers to is one right below a match i'm trying to do with a variable. can anyone help?
__DL__ has quit [Remote closed the connection]
__DL__ has joined #ocaml
Sonarman has joined #ocaml
<eviltoylet>
in other words .. if i have a function called numberOne that takes 'a and returns 'a ... and i want to match numberOne var with var -> [] | x -> ["yay"];;
<eviltoylet>
it tells me that the case x -> ["yay"] will be unused... i'm thinking its not matching with the value in 'var' .. can anyone help?
Snark has joined #ocaml
<Sonarman>
matching numberOne var with var doesn't match numerOne var with the value stored in var
<Sonarman>
instead it binds var to the result of numberOne var
<Sonarman>
you could use a guard
<Snark>
slt
<eviltoylet>
could you explain to me what that is Sonarman?
<Snark>
lablgtk2 question
<eviltoylet>
Snark: ?
<Snark>
I have a GText.tag
<eviltoylet>
i have no idea what that is
<Snark>
I have connected the event event with a callback
<Snark>
and would like to use it to show a popup
<Snark>
the problem is that the event is an any event
<Snark>
and although I can detect it is a button press (GdkEvent.get_type event = `BUTTON_PRESS), I don't know how to get which button
<eviltoylet>
oh. you're asking a question.
<Snark>
GdkEvent.Button.button event of course doesn't work
<eviltoylet>
>_< never mind then.
<Snark>
eviltoylet: yes :-)
<eviltoylet>
Sonarman: are there any other alternatives to using the guard? Perhaps a different approach?
Sonarman_ has joined #ocaml
Sonarman has quit [Nick collision from services.]
Sonarman_ is now known as Sonarman
<eviltoylet>
Sonarman: timeed out?
<Sonarman>
eviltoylet: sorry, i don't think so. you could always use an if-statement, but that sort of defeats the purpose
<Sonarman>
i don't know ocaml very well
<Sonarman>
kicked the cord out of the modem :)
<eviltoylet>
oh lol. got too excited? :)
<Sonarman>
i suggest you read a good ocaml primer if you want to learn how to use guards and the other useful features of the language
<Sonarman>
yes; that must have been it :)
* Snark
is stuck
<Snark>
this Gdk.Tags.event_type Gdk.event is a GdkEvent.Button.types Gdk.event... :-/
<Snark>
GdkEvent.cast [`BUTTON_PRESS] event !!!
Herrchen has joined #ocaml
Submarine has joined #ocaml
Herrchen has quit ["bye"]
tintin has quit [Read error: 104 (Connection reset by peer)]
eviltoylet has quit [Read error: 110 (Connection timed out)]