<_habnabit>
The error I was getting said that I had to have 'x' and 'y' on both sides of the |
dnolen has quit [Quit: dnolen]
<tautologico>
yes, when you have multiple cases
<tautologico>
None | Some x -> ...
<_habnabit>
yes, but I only want/need it in the 'when'
<tautologico>
because both can match the input, the pattern matching system wouldn't know how to bind the x
<_habnabit>
I don't need it bound
<tautologico>
but the pattern matching system doesn't know you just want the binding to do a test
<_habnabit>
So there's no way to indicate that
<tautologico>
any variable bound in a pattern will be available in the right hand side
<tautologico>
no
<tautologico>
the best way would be if the pattern matcher could verify that two variables have the same value, as in unification (as done in prolog)
<tautologico>
so you'd be able to have a pattern Some x, Some x
<tautologico>
and the matcher would verify both x bind to the same value, so you wouldn't need the condition
<_habnabit>
It would still want x on the all parts of the lhs, wouldn't it?
<tautologico>
yes
<tautologico>
because if it is None, how would it bind x?
<_habnabit>
yes I understand that part, but it doesn't solve my problem
<_habnabit>
Oh well
<tautologico>
unless there was a way to tell the system you don't want to bind it, just verify they're the same
<tautologico>
but that's a very specific case
fraggle_ has quit [Ping timeout: 276 seconds]
fraggle_ has joined #ocaml
joewilliams is now known as joewilliams_away
joewilliams_away is now known as joewilliams
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 240 seconds]
ulfdoz_ is now known as ulfdoz
ymasory_ has joined #ocaml
joewilliams is now known as joewilliams_away
fraggle_ has quit [Read error: Connection reset by peer]
fraggle_ has joined #ocaml
wormphlegm has joined #ocaml
bzzbzz has quit [Quit: leaving]
BiDOrD has quit [Quit: No Ping reply in 180 seconds.]
lopex has quit []
BiDOrD_ has joined #ocaml
dnolen has joined #ocaml
groovy2shoes has joined #ocaml
mjonsson has joined #ocaml
groovy2shoes has quit [Remote host closed the connection]
groovy2shoes has joined #ocaml
groovy2shoes has quit [Client Quit]
dnolen has quit [Quit: dnolen]
groovy2shoes has joined #ocaml
groovy2shoes has quit [Read error: Connection reset by peer]
groovy2shoes has joined #ocaml
vivanov has joined #ocaml
groovy2shoes has quit [Read error: Connection reset by peer]
groovy2shoes has joined #ocaml
groovy2shoes has quit [Client Quit]
wormphlegm has quit [Read error: Connection reset by peer]
wormphlegm has joined #ocaml
enthymeme has joined #ocaml
mcclurmc has quit [Ping timeout: 248 seconds]
mcclurmc has joined #ocaml
f[x] has quit [Ping timeout: 260 seconds]
f[x] has joined #ocaml
tautologico has quit [Quit: tautologico]
ankit9 has joined #ocaml
wormphlegm has quit [Quit: leaving]
ankit9 has quit [Ping timeout: 264 seconds]
mcclurmc has quit [Ping timeout: 248 seconds]
smrz has joined #ocaml
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
jderque has joined #ocaml
smrz has quit [Quit: Computer has gone to sleep.]
penryu has joined #ocaml
ymasory_ has quit [Ping timeout: 240 seconds]
Snark has joined #ocaml
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
Snark has quit [Quit: Ex-Chat]
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
Tobu has quit [Remote host closed the connection]
zorun has quit [Quit: leaving]
Tobu has joined #ocaml
zorun has joined #ocaml
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
Tobu has quit [Remote host closed the connection]
Yoric has joined #ocaml
Tobu has joined #ocaml
Derander has quit [Read error: Operation timed out]
Derander has joined #ocaml
edwin has joined #ocaml
lpereira has joined #ocaml
zorun has quit [Quit: leaving]
zorun has joined #ocaml
zorun has quit [Quit: leaving]
zorun has joined #ocaml
Vinnipeg has joined #ocaml
Vinnipeg has quit [Quit: Konversation terminated!]
ikaros has joined #ocaml
lopex has joined #ocaml
lopex has quit []
Associat0r has joined #ocaml
oriba has joined #ocaml
oriba has left #ocaml []
iris1 has joined #ocaml
<iris1>
Dear experts, I have a question. I have defined a custom type like "type my_type = Foo | Bar". How can I iterate over all elements of the type? In this case, I mean iterating over the list [ Foo; Bar ]. (This is needed for a unit test I am trying to write.) Thank you!
<rproust>
iris1: the deriving syntax extension makes this possible
<rproust>
you do type t = Foo | Bar deriving (Enum)
ikaros has quit [Quit: Leave the magic to Houdini]
eikke has joined #ocaml
rwmjones has quit [Read error: Operation timed out]
Vinnipeg has quit [Quit: Konversation terminated!]
Yoric has quit [Quit: Yoric]
pdhborges has joined #ocaml
rwmjones has joined #ocaml
Yoric has joined #ocaml
<pdhborges>
so guys who's going to defend the caml community at the google code jam?
DimitryKakadu has joined #ocaml
<flux>
when is it?
<pdhborges>
today
<pdhborges>
O.O
ftrvxmtrx has quit [Quit: Leaving]
<adrien>
:o
ankit9 has joined #ocaml
<pdhborges>
read_line and scanf don't mix very well
<pdhborges>
I just tried to read some ints from a line with scanf and then
<pdhborges>
read teh rest of the line with read_line
<pdhborges>
and the function throwed and eof error
jderque has joined #ocaml
nejimban has quit [Ping timeout: 276 seconds]
nejimban has joined #ocaml
lpereira has quit [Read error: Connection reset by peer]
ankit9 has quit [Read error: Connection reset by peer]
ankit9 has joined #ocaml
eikke has quit [Ping timeout: 248 seconds]
alpounet has quit [Ping timeout: 248 seconds]
Pepe_ has quit [Ping timeout: 248 seconds]
tautologico has joined #ocaml
ikaros has joined #ocaml
dnolen has joined #ocaml
ftrvxmtrx has joined #ocaml
bzzbzz has joined #ocaml
dnolen has quit [Quit: dnolen]
ankit9 has quit [Read error: Connection reset by peer]
Lectus has quit [Ping timeout: 240 seconds]
rwmjones has quit [Read error: Operation timed out]
jderque has quit [Quit: leaving]
dnolen has joined #ocaml
lopex has joined #ocaml
rwmjones has joined #ocaml
Ppjet6 has joined #ocaml
Ppjet6 has left #ocaml []
Associat0r has quit [Quit: Associat0r]
Snark has joined #ocaml
ikaros has quit [Remote host closed the connection]
<adrien>
bah, I had "lib.ml", "lib.mli" and "liblib.mli", in lib.ml I use "include Liblib" and I changed the interface of Liblib but didn't change the .mli; ocamlbuild's rebuild order was backward and ocaml was expecting another file to still use the old interface =/
alexgordon has quit [Read error: Operation timed out]
chegibari has joined #ocaml
<chegibari>
Hello. Can anybody help me to understand what does exactly "head position" mean in a lambda expression?
chegibari has quit []
ankit9 has joined #ocaml
sku has joined #ocaml
ankit9 has quit [Quit: Leaving]
ftrvxmtrx has quit [Quit: Leaving]
alexgordon has joined #ocaml
the_fco has joined #ocaml
Snark has quit [Quit: Ex-Chat]
the_fco has quit [Quit: the_fco]
the_fco has joined #ocaml
oriba has joined #ocaml
oriba has left #ocaml []
ulfdoz has quit [Quit: kernel-upgrade]
ulfdoz has joined #ocaml
impy has quit [Ping timeout: 258 seconds]
Smerdyakov has joined #ocaml
vivanov has quit [Ping timeout: 240 seconds]
sku has quit [Quit: Leaving]
rwmjones has quit [Read error: Operation timed out]
Cyanure has joined #ocaml
philtor has joined #ocaml
ftrvxmtrx has joined #ocaml
rwmjones has joined #ocaml
<philtor>
going through the lwt tutorial.
<philtor>
trying: Lwt_io.read_char;;
<philtor>
getting: Error: Reference to undefined global `Lwt_io'
<philtor>
(in toplevel)
<philtor>
I was able to do:
<philtor>
#require "lwt" ;;
<philtor>
(and lwt is installed)
<_habnabit>
#package "lwt" ;;
<philtor>
_habnabit: Unknown directive `package'
<_habnabit>
oh, whoops, #require is the one I was thinking of
<_habnabit>
not sure how I got that confused
<philtor>
yeah, I did that.
<philtor>
It did not complain.
<philtor>
I see lwt_io.mli in: ~/godi-3.12/lib/ocaml/pkg-lib/lwt
<philtor>
(my godi installation)
Smerdyakov has quit [Quit: Leaving]
<philtor>
I also tried to run lwt-toplevel but could not type anything into that toplevel.