alexyk has quit [Read error: 110 (Connection timed out)]
Associat0r has joined #ocaml
alexyk_ has quit []
alexyk has joined #ocaml
jeddhaberstro has quit []
seafood has joined #ocaml
alexyk has quit []
seafood has quit []
itewsh has joined #ocaml
Camarade_Tux has joined #ocaml
Stefan_vK has joined #ocaml
slash_ has joined #ocaml
ttamttam has joined #ocaml
Stefan_vK1 has quit [Read error: 110 (Connection timed out)]
ygrek has joined #ocaml
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
marmotine has joined #ocaml
Mr_Awesome has joined #ocaml
ikaros has joined #ocaml
mat3schk3 has joined #ocaml
<mat3schk3>
userhost
<mat3schk3>
q
<mat3schk3>
uit
mat3schk3 has quit ["Leaving"]
slash__ has joined #ocaml
slash__ has quit [Client Quit]
kc8pxy has quit [Read error: 110 (Connection timed out)]
slash_ has quit [Read error: 110 (Connection timed out)]
ofaurax has joined #ocaml
slash_ has joined #ocaml
Yoric[DT] has joined #ocaml
<Yoric[DT]>
hi
* Camarade_Tux
waves at Yoric[DT]
Cheshire has joined #ocaml
ched_ has quit [Read error: 54 (Connection reset by peer)]
ched has joined #ocaml
chicco has joined #ocaml
ttamttam has left #ocaml []
Cheshire has quit [Read error: 113 (No route to host)]
Cheshire has joined #ocaml
tripwyre has joined #ocaml
tripwyre has quit [Client Quit]
_fh_ has joined #ocaml
<_fh_>
hello, do you know if there's a yacc specification for ocaml's grammar (or even a subset, I'm mainly interested in arithmetic expressions and function abstraction and application) somewhere?
<oleg|log>
_fh_: parsing/parser.mly
<_fh_>
thank you
ChristopheT has joined #ocaml
Cheshire has quit ["Leaving"]
sporkmonger has joined #ocaml
slash_ has quit ["leaving"]
Cheshire has joined #ocaml
alexyk has joined #ocaml
vovkaii has joined #ocaml
marmotine has quit ["mv marmotine Laurie"]
ikaros has quit [".quit"]
ikaros has joined #ocaml
ttamttam has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
ttamttam has left #ocaml []
alexyk has quit []
elodie4 has joined #ocaml
<elodie4>
salut
<yziquel_>
hi.
alexyk has joined #ocaml
alexyk has quit [Client Quit]
xcx has joined #ocaml
xcx has quit [Read error: 60 (Operation timed out)]
xcx has joined #ocaml
xcx is now known as elodie44
elodie4 has quit [Read error: 110 (Connection timed out)]
alexyk has joined #ocaml
elodie4 has joined #ocaml
elodie44 has quit [Read error: 110 (Connection timed out)]
elodie4 has quit [Read error: 110 (Connection timed out)]
<AxleLonghorn>
would someone care to look over the OCaml code there and tell me how to make it match the SML code better?
<flux>
well, a direct translaction would be let rec merge = function ([], qs) -> qs | (ps, qs) -> ps | ((p, _)::ps, (_, q)::qs) -> (p, q) :: merge (ps, qs)
<flux>
but with multi-argument functions (sml prefers to use tuples instead of currying) the parameters need to be named
<flux>
actuallyhm
<flux>
why do you have Extent constructor there?
<AxleLonghorn>
that's a very good question. The answer is that I don't know how to do it a better way.
<flux>
simply do it the same way in sml. the Extent type there is mostly for a cleaner interface, it doesn't actually do anything.
<AxleLonghorn>
how do I ensure that the type of merge becomes (extent*extent) -> extent, rather than ((float*float) list) * ((float*float) list) -> (float * float) list
<flux>
well, they are the same
<flux>
you can annotate the return type with : extent list if you wish
<flux>
or you can give the types in your interface part (.mli)
<AxleLonghorn>
ocaml wont mind if I call a function with an extent type when it asks for (float*float) list?
<flux>
no
<AxleLonghorn>
good to know
<AxleLonghorn>
I thought it mattered
<flux>
well, if it can know extent is the same as float
<flux>
you can hide that in an interface
<flux>
and after that the types are not convertible without an explicit conversion function
<flux>
type t = float let a (f : t) : t = f let b = a 4.0 will work
<flux>
but, module F : sig type t end = struct type t = float end include F (..and the same lets..) will not compile
<AxleLonghorn>
how do you specify the type of a return value?
<AxleLonghorn>
I've never really had to in the past, just parameters
<AxleLonghorn>
should I do that in a .mli file rather than in the .ml file?
<flux>
you specify interface in an .mli-file
<flux>
you can run ocamlc -i foo.ml to get one
<flux>
you'll probably end up redacting it quite a bit, if the .ml-file is big