tav`` has quit [carter.openprojects.net irc.openprojects.net]
smkl has quit [carter.openprojects.net irc.openprojects.net]
timmy has quit [carter.openprojects.net irc.openprojects.net]
scipient has quit [carter.openprojects.net irc.openprojects.net]
emu has quit [carter.openprojects.net irc.openprojects.net]
lyongu has quit [carter.openprojects.net irc.openprojects.net]
Dieb has quit [carter.openprojects.net irc.openprojects.net]
physarum has quit [carter.openprojects.net irc.openprojects.net]
skylan has quit [carter.openprojects.net irc.openprojects.net]
Taaus has quit [carter.openprojects.net irc.openprojects.net]
smkl has joined #ocaml
physarum has joined #ocaml
skylan has joined #ocaml
Dieb has joined #ocaml
lyongu has joined #ocaml
Taaus has joined #ocaml
emu has joined #ocaml
timmy has joined #ocaml
scipient has joined #ocaml
tav`` has joined #ocaml
tav`` is now known as tav-
graydon_ has left #ocaml []
tav- has quit [Read error: 104 (Connection reset by peer)]
tav- has joined #ocaml
Yurik has joined #ocaml
emu has quit [Read error: 110 (Connection timed out)]
Demitar has joined #ocaml
emu has joined #ocaml
<Yurik>
guys, is there any OCaml implementation on top of JVM?
Demitar has quit []
lyongu has quit [Remote closed the connection]
Yurik has quit ["reboot"]
Yurik has joined #ocaml
Yurik_ has joined #ocaml
Yurik_ has quit [Client Quit]
Yurik has quit ["Client Exiting"]
Yurik has joined #ocaml
Yurik has quit ["Client Exiting"]
Yurik has joined #ocaml
Yurik has quit ["Client Exiting"]
gene9 has joined #ocaml
gene9 has quit ["b"]
gene9 has joined #ocaml
gene9 has quit [Read error: 104 (Connection reset by peer)]
emu has quit [Connection timed out]
emu has joined #ocaml
Fab|o has joined #ocaml
<Fab|o>
hi there
<Fab|o>
[]
<Fab|o>
waassssssssup?
Fab|o has quit ["Client Exiting"]
malc has joined #ocaml
<timmy>
if i'm doing pattern matching, can i specify the type of a match without using 'type' earlier on to declare the types (section 1-4 in this tutorial)
<malc>
i dont really follow, show an example
<timmy>
#type number = Int of int | Float of float | Error;;
<timmy>
# match (n1, n2) with
<timmy>
# (Int i1, Int i2) -> ...
<timmy>
so i wanted to know if it was possible to do something like
<timmy>
match 1234 with a:int -> a+1
<timmy>
without having to make that number type
<malc>
you can use polymorphic variants
<malc>
match moo with `Int i -> i | `Float f -> int_of_float f
<malc>
and so on
<timmy>
hmm i thought i saw a chapter about that somewhere
<timmy>
new feature in 3?
<timmy>
i think i found it
<malc>
it came from the merger with olabl at 2.99
<timmy>
i don't think i understand how i can use the polymorphic variants to make it so i don't have to do type number = ...
<malc>
well, just face it, you dont need to explicitly type them