adelbertc has quit [Quit: Connection closed for inactivity]
M-Illandan has joined #ocaml
relrod_ has joined #ocaml
relrod_ has quit [Changing host]
relrod_ has joined #ocaml
wolfcore has joined #ocaml
yegods has joined #ocaml
relrod_ is now known as relrod
copy` has quit [Quit: Connection closed for inactivity]
JacobEdelman_ has joined #ocaml
dsheets has joined #ocaml
Algebr has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
mfp has quit [Read error: Connection reset by peer]
mfp has joined #ocaml
iorivur has quit [Ping timeout: 268 seconds]
yegods has quit [Ping timeout: 250 seconds]
iorivur has joined #ocaml
ygrek_ has quit [Ping timeout: 246 seconds]
mfp has quit [Ping timeout: 268 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
yegods has joined #ocaml
mfp has joined #ocaml
ygrek has joined #ocaml
mrvn has quit [Ping timeout: 244 seconds]
mrvn has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
antkong has quit [Quit: antkong]
antkong has joined #ocaml
antkong has quit [Client Quit]
yegods has quit [Ping timeout: 244 seconds]
mistermetaphor has quit [Remote host closed the connection]
johnelse has quit [Ping timeout: 240 seconds]
antkong has joined #ocaml
johnelse has joined #ocaml
Reshi has joined #ocaml
johnelse has quit [Ping timeout: 246 seconds]
johnelse has joined #ocaml
johnelse has quit [Ping timeout: 276 seconds]
johnelse has joined #ocaml
struktured has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 244 seconds]
JacobEdelman_ has quit [Quit: Connection closed for inactivity]
FreeBirdLjj has joined #ocaml
MercurialAlchemi has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
antkong has quit [Quit: antkong]
luzie has quit [Ping timeout: 276 seconds]
antkong has joined #ocaml
mattg_ has joined #ocaml
mattg has quit [Ping timeout: 250 seconds]
mattg_ is now known as mattg
luzie has joined #ocaml
luzie has quit [Read error: Connection reset by peer]
luzie has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 268 seconds]
luzie has quit [Ping timeout: 250 seconds]
dsheets has joined #ocaml
vcfg has joined #ocaml
A1977494 has joined #ocaml
dsheets has quit [Ping timeout: 240 seconds]
MercurialAlchemi has joined #ocaml
dsheets has joined #ocaml
luzie has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
mistermetaphor has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
TheLemonMan has joined #ocaml
kushal has quit [Quit: Leaving]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
Reshi has quit [Quit: WeeChat 1.4]
pierpa has joined #ocaml
kushal has joined #ocaml
<reynir>
Yesterday, I was bitten by shadowing: [let f b = Foo.(a b c)], Foo.b existed and I wasn't aware. \o/
manizzle has joined #ocaml
<adrien>
with the stdlib only, Format can do that :)
<adrien>
(fairly easily)
pierpa has quit [Ping timeout: 240 seconds]
AlexRussia has quit [Ping timeout: 250 seconds]
struktured has quit [Ping timeout: 268 seconds]
pierpa has joined #ocaml
toolslive has quit [Remote host closed the connection]
wolfcore has quit [Ping timeout: 276 seconds]
wolfcore has joined #ocaml
Simn has joined #ocaml
<flux>
reynir, it seems there is no warning for open expression shadowing
<flux>
the syntax let open! .. is valid, but I guess there is no corresponding syntax for Foo.(..)
silver has joined #ocaml
<reynir>
Ah, I wasn't aware of [let open!], thanks
dsheets has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
<flux>
I don't see how to trigger warnings from let open, so for now it's perhaps just a good habbit to pick?
destrius has quit [Quit: leaving]
dsheets_ has joined #ocaml
dsheets has quit [Ping timeout: 276 seconds]
destrius has joined #ocaml
seangrove has joined #ocaml
dsheets_ is now known as dsheets
jwatzman|work has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
mal`` has quit [Ping timeout: 260 seconds]
k1000 has quit [Ping timeout: 244 seconds]
k1000 has joined #ocaml
mal`` has joined #ocaml
mistermetaphor has quit [Remote host closed the connection]
antkong has quit [Quit: antkong]
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
freehck has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<Drup>
44 Open statement shadows an already defined identifier.
<Drup>
flux, reynir ^
mistermetaphor has joined #ocaml
<reynir>
thx <3
seangrove has quit [Ping timeout: 276 seconds]
mistermetaphor has quit [Ping timeout: 250 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
seangrove has joined #ocaml
Kakadu has joined #ocaml
snhmib has joined #ocaml
antkong_ has joined #ocaml
seangrove has quit [Ping timeout: 244 seconds]
antkong_ has quit [Client Quit]
noddy has quit [Ping timeout: 276 seconds]
copy` has joined #ocaml
kushal has quit [Quit: Leaving]
seangrove has joined #ocaml
pierpa` has joined #ocaml
Simn has quit [Quit: Leaving]
tobiasBo1 has joined #ocaml
pierpa has quit [Ping timeout: 276 seconds]
tobiasBora has quit [Ping timeout: 276 seconds]
pierpa` has quit [Read error: Connection reset by peer]
pierpa` has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
mal`` has quit [Ping timeout: 260 seconds]
mal`` has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
dsheets has quit [Remote host closed the connection]
noddy has joined #ocaml
sh0t has joined #ocaml
bba has joined #ocaml
noddy has quit [Ping timeout: 240 seconds]
jwatzman|work has joined #ocaml
seangrove has quit [Ping timeout: 268 seconds]
sh0t has quit [Remote host closed the connection]
yegods has joined #ocaml
kushal has joined #ocaml
BitPuffin has joined #ocaml
<zozozo>
where can I report issues with menhir ?
mistermetaphor has joined #ocaml
<Drup>
bug-reports: menhir-list@yquem.inria.fr
<Drup>
old style bug tracker :D
bba has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zozozo>
ok
mistermetaphor has quit [Ping timeout: 246 seconds]
<zozozo>
btw, the problem I have is the following, when naming a symbol in a rule and using it only to get its position in the semantic action, the compilation of the produced ml justly warns about unused variable, do you have a workaround ?
<thizanne>
remove unused variable warning for parser.ml
dsheets has joined #ocaml
<zozozo>
meh, doesn't seem very practical
<zozozo>
since I don't really see a good way to automate it
octahcron has joined #ocaml
yegods_ has joined #ocaml
yegods has quit [Read error: Connection reset by peer]
Stalkr has joined #ocaml
noddy has joined #ocaml
seangrove has joined #ocaml
<flux>
drup, but it says "statements"?-(
<flux>
drup, regardless I was unable to get a warning with 'let open', maybe I messed up with the test (I used ocamlc -w +a)
kushal has quit [Ping timeout: 260 seconds]
<Drup>
the identifiers need to be used to get a warning
sh0t has joined #ocaml
<flux>
testcase: module Foo = struct let a = 42 end let foo a b = let open Foo in a let _ = foo 42 42
<flux>
I guess not a super test case given all numbers are 42.. :)
<Drup>
I get a warning 44 with that
<flux>
hmm. 4.03? I have 4.02.3
<Drup>
no, 4.02.3
<flux>
ah, I got it
<flux>
ocamlc foo.ml -w +a is different from ocamlc -w +a foo.ml
<Drup>
*sight*
<Drup>
indeed, it is
FreeBird_ has joined #ocaml
<flux>
I'm not sure if it's a feature.. :)
<flux>
even if it does allow choosing warning flags per file..
FreeBirdLjj has quit [Ping timeout: 268 seconds]
FreeBird_ has quit [Ping timeout: 250 seconds]
yegods_ has quit [Read error: Connection reset by peer]
MercurialAlchemi has quit [Remote host closed the connection]
yegods has joined #ocaml
MercurialAlchemi has joined #ocaml
seangrove has quit [Remote host closed the connection]
seangrove has joined #ocaml
mettekou has joined #ocaml
sepp2k has joined #ocaml
dsheets has quit [Remote host closed the connection]
bba has joined #ocaml
dsheets has joined #ocaml
toolslive has joined #ocaml
seangrove has quit [Ping timeout: 260 seconds]
vcfg has quit [Quit: Page closed]
<toolslive>
has anybody ever succeeded in writing his own Lwt engine ?
sepp2k has quit [Quit: Leaving.]
sepp2k has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
yegods has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
mistermetaphor has joined #ocaml
Simn has joined #ocaml
hcarty1 has joined #ocaml
mistermetaphor has quit [Ping timeout: 260 seconds]
sh0t has quit [Ping timeout: 268 seconds]
yegods has joined #ocaml
seangrove has joined #ocaml
Stalkr^ has joined #ocaml
Stalkr has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
mistermetaphor has joined #ocaml
please_help has quit [Ping timeout: 276 seconds]
mistermetaphor has quit [Ping timeout: 276 seconds]
please_help has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
seangrove has quit [Ping timeout: 244 seconds]
AlexRussia has joined #ocaml
kushal has joined #ocaml
kolko has quit [Ping timeout: 246 seconds]
MercurialAlchemi has joined #ocaml
kolko has joined #ocaml
sepp2k has quit [Ping timeout: 268 seconds]
yegods has quit [Ping timeout: 240 seconds]
rgrinberg has joined #ocaml
mistermetaphor has joined #ocaml
cdidd has quit [Remote host closed the connection]
jeffmo has joined #ocaml
cdidd has joined #ocaml
g4143 has joined #ocaml
slash^ has joined #ocaml
g4143 has quit [Client Quit]
yegods has joined #ocaml
sepp2k has joined #ocaml
ygrek has joined #ocaml
aantron has quit [Ping timeout: 250 seconds]
Stalkr^ has quit [Read error: Connection reset by peer]
Stalkr has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
Stalkr has quit [Read error: Connection reset by peer]
dsheets has quit [Remote host closed the connection]
toolslive has quit [Remote host closed the connection]
dsheets has joined #ocaml
mistermetaphor has quit [Remote host closed the connection]
yegods has quit [Read error: Connection reset by peer]
mistermetaphor has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
darkf has quit [Quit: Leaving]
yomimono has joined #ocaml
noddy has quit [Ping timeout: 240 seconds]
yegods has joined #ocaml
dsheets has quit [Remote host closed the connection]
bobry has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
mistermetaphor has quit [Remote host closed the connection]
__y has joined #ocaml
mistermetaphor has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
__y has quit [Quit: Ce n’est pas une blague, ça, c’est une corde.]
ollehar has joined #ocaml
hyperboreean has quit [Read error: Connection reset by peer]
sigjuice has quit [Ping timeout: 268 seconds]
nullcatxxx_ has quit [Ping timeout: 268 seconds]
jkni has quit [Ping timeout: 268 seconds]
sigjuice has joined #ocaml
cnu_ has joined #ocaml
aantron has joined #ocaml
jkni has joined #ocaml
picolino has quit [Ping timeout: 268 seconds]
luigy has quit [Ping timeout: 268 seconds]
cnu- has quit [Ping timeout: 268 seconds]
averell has quit [Ping timeout: 268 seconds]
nullcatxxx_ has joined #ocaml
sh0t has joined #ocaml
luigy has joined #ocaml
vodkaInf1rno has joined #ocaml
bitbckt has quit [Ping timeout: 268 seconds]
Madars_ has quit [Ping timeout: 268 seconds]
vodkaInferno has quit [Ping timeout: 268 seconds]
bitbckt has joined #ocaml
chris2 has quit [Ping timeout: 268 seconds]
picolino has joined #ocaml
bitbckt has quit [Changing host]
bitbckt has joined #ocaml
mattg has quit [Ping timeout: 268 seconds]
iorivur has quit [Ping timeout: 268 seconds]
iorivur has joined #ocaml
Madars_ has joined #ocaml
hyperboreean has joined #ocaml
hxegon has joined #ocaml
Algebr` has joined #ocaml
mattg has joined #ocaml
Algebr has quit [Read error: Connection reset by peer]
avsej has quit [Ping timeout: 297 seconds]
avsej has joined #ocaml
avsej has quit [Changing host]
avsej has joined #ocaml
copy` has joined #ocaml
pierpa`` has joined #ocaml
pierpa` has quit [Ping timeout: 275 seconds]
dsheets has joined #ocaml
yegods has quit [Ping timeout: 244 seconds]
jimt_ has joined #ocaml
twobitsp1ite has joined #ocaml
atsampso1 has joined #ocaml
jknick_ has joined #ocaml
mhinz_ has joined #ocaml
natimic2 has joined #ocaml
bobry_ has joined #ocaml
johnelse_ has joined #ocaml
jkni_ has joined #ocaml
pyon has quit [Disconnected by services]
pyon has joined #ocaml
artart78_ has joined #ocaml
pierpa`` has quit [Ping timeout: 268 seconds]
rgrinberg1 has joined #ocaml
anoisz has joined #ocaml
jkni has quit [*.net *.split]
ollehar has quit [*.net *.split]
bobry has quit [*.net *.split]
rgrinberg has quit [*.net *.split]
kushal has quit [*.net *.split]
johnelse has quit [*.net *.split]
fraggle_ has quit [*.net *.split]
jimt has quit [*.net *.split]
jknick has quit [*.net *.split]
natimic has quit [*.net *.split]
lokien has quit [*.net *.split]
twobitsprite has quit [*.net *.split]
adrien_znc has quit [*.net *.split]
cantstanya has quit [*.net *.split]
atsampson has quit [*.net *.split]
artart78 has quit [*.net *.split]
mhinz has quit [*.net *.split]
adrien_znc has joined #ocaml
jkni_ is now known as jkni
bobry_ is now known as bobry
Ch0c0late has joined #ocaml
yomimono has quit [Ping timeout: 276 seconds]
yegods has joined #ocaml
cantstanya has joined #ocaml
fraggle_ has joined #ocaml
lokien has joined #ocaml
aantron has quit [Remote host closed the connection]
kushal has joined #ocaml
pierpa`` has joined #ocaml
ollehar has joined #ocaml
Sorella has joined #ocaml
octahcron has quit [Ping timeout: 250 seconds]
chris2 has joined #ocaml
hcarty2 has joined #ocaml
kushal has quit [Read error: Connection reset by peer]
hcarty1 has quit [Ping timeout: 250 seconds]
hcarty2 is now known as hcarty
<hcarty>
jtmcf: Just saw your question from a couple days ago... Arlington VA
<hcarty>
jtmcf: Clarendon
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 244 seconds]
Kyo9142 has joined #ocaml
pierpa`` is now known as pierpa
Kakadu has quit [Quit: Page closed]
yegods has quit [Ping timeout: 244 seconds]
dsheets has joined #ocaml
anoisz has quit [Read error: Connection reset by peer]
seangrove has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
Ninja123 has joined #ocaml
yegods has joined #ocaml
<apache2>
can `module type S = sig end` take a parameter, like `module type S (F : sig end) = sig end` ?
ygrek has joined #ocaml
aantron has joined #ocaml
<lyxia>
apache2: module type S = functor (G : sig end) -> sig end;;
<lyxia>
you can learn the syntax of types by defining a module and looking at ocaml's answer
<jtmcf>
hcarty: there's ocaml meetups in Clarendon?
<jtmcf>
i was at north side social last night heh
<companion_cube>
apache2: in general you just put `module F : sig end` inside the signature of S
<companion_cube>
you can also, if that's really what you want, `module type S = functor(F : sig end) -> sig end`
<apache2>
aha, thanks!
<apache2>
the functor (G: sig end) was what I was looking for
ollehar has quit [Quit: ollehar]
toolslive has joined #ocaml
bobry has quit [Quit: Connection closed for inactivity]
Kyo9142 has quit [Ping timeout: 252 seconds]
octachron has joined #ocaml
<octachron>
for Ocaml ≥ 4.03, module type s = sig end -> sig end will be another possibility for some cases
sepp2k has quit [Quit: Leaving.]
govg has joined #ocaml
yegods has quit [Ping timeout: 250 seconds]
slash^ has quit [Read error: Connection reset by peer]
<hcarty>
jtmcf: There will be :-)
BitPuffin has quit [Remote host closed the connection]
matason has joined #ocaml
yegods has joined #ocaml
<hcarty>
Hopefully there's enough interest in the area to do something regularly
Anarchos has joined #ocaml
govg has quit [Ping timeout: 240 seconds]
Kakadu has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<Anarchos>
hi kakadu
govg has joined #ocaml
<jtmcf>
hcarty: yeah definitely, i have a friedn or two who would join too, let me know when this is starting up
<jtmcf>
friend*
cross has quit [Ping timeout: 276 seconds]
seangrove has quit [Ping timeout: 268 seconds]
yegods has quit [Read error: Connection reset by peer]
Ch0c0late has quit [Read error: Connection reset by peer]
yegods has joined #ocaml
Algebr` has quit [Remote host closed the connection]
Algebr` has joined #ocaml
Ch0c0late has joined #ocaml
SomeDamnBody has joined #ocaml
<SomeDamnBody>
Hey I keep getting ocamlbuild warnings about ext_obj, ext_lib, and ext_dll
<SomeDamnBody>
how do I get rid of them?
noddy has joined #ocaml
dsheets has joined #ocaml
<Kakadu>
Anarchos: hey
<SomeDamnBody>
hey
dsheets has quit [Ping timeout: 250 seconds]
yegods has quit [Remote host closed the connection]
yegods has joined #ocaml
Anarchos has quit [Ping timeout: 268 seconds]
Ch0c0late has quit [Ping timeout: 260 seconds]
octachron has quit [Quit: Leaving]
adelbertc has joined #ocaml
seangrove has joined #ocaml
govg has quit [Ping timeout: 250 seconds]
Ch0c0late has joined #ocaml
mettekou has quit [Ping timeout: 246 seconds]
Anarchos has joined #ocaml
SomeDamnBody has quit [Remote host closed the connection]
Kyo9142 has joined #ocaml
seangrov` has joined #ocaml
Ch0c0late has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ch0c0late has joined #ocaml
seangrove has quit [Ping timeout: 276 seconds]
yegods has quit [Read error: Connection reset by peer]
yegods has joined #ocaml
sh0t has quit [Ping timeout: 260 seconds]
therac25 has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 276 seconds]
therac25 has left #ocaml [#ocaml]
seangrov` has quit [Ping timeout: 244 seconds]
manud has joined #ocaml
rgrinberg1 is now known as rgrinberg
rgrinberg has quit [Quit: WeeChat 1.4]
rgrinberg has joined #ocaml
matason has quit [Ping timeout: 240 seconds]
sh0t has joined #ocaml
hxegon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Anarchos has quit [Ping timeout: 250 seconds]
hxegon has joined #ocaml
yegods has quit [Remote host closed the connection]
yegods has joined #ocaml
Kyo9142 has quit [Ping timeout: 244 seconds]
struktured has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
Ch0c0late has quit [Ping timeout: 250 seconds]
mistermetaphor has quit [Remote host closed the connection]
aantron_ has joined #ocaml
aantron has quit [Ping timeout: 268 seconds]
yegods has quit [Ping timeout: 250 seconds]
hcarty has quit [Ping timeout: 246 seconds]
yegods has joined #ocaml
shinnya has joined #ocaml
Kyo9142 has joined #ocaml
rgrinberg has quit [Quit: WeeChat 1.4]
mettekou has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
Kakadu has quit [Remote host closed the connection]
sh0t has quit [Ping timeout: 276 seconds]
A19774941 has joined #ocaml
bba has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
A1977494 has quit [Ping timeout: 260 seconds]
struktured has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
yegods has quit [Ping timeout: 276 seconds]
<dr_toboggan>
http://pastebin.com/6a0KsNw9 any suggestions on what i'm doing wrong here? i can't see any inherent contradictions between these two types
yegods has joined #ocaml
<manud>
dr_toboggan: the question mark indicates optional arguments…. so they are indeed different types… how do you call that function ?
<dr_toboggan>
i know it could be called differently
<dr_toboggan>
but the way it's called doesn't have any inconsistencies
jeffmo has quit [Quit: jeffmo]
<dr_toboggan>
like, if i precede the use of it in this case with: let func ~include_docs ~key () = func ~include_docs ~key ()
<dr_toboggan>
it works
<dr_toboggan>
but that seems like it shouldn't be necessary
<_y>
because syntax is hiding what is going on
<dr_toboggan>
_y: my solution is hiding what's going on?
<dr_toboggan>
(or rather, i know it's hiding what's going on, to some extent. but this is intended behavior?)
<_y>
pass a mandatory named argument to a function is really different from passing it an optional argument
<dr_toboggan>
i think i've encountered something like this before
<dr_toboggan>
where
<dr_toboggan>
(foo (bar ())) works
<dr_toboggan>
but bar () |> foo
<dr_toboggan>
doesn't
<dr_toboggan>
because foo has some optional arguments
<_y>
although both are written ‘f ~arg:value’
<_y>
a mandatory named argument is just like a regular argument, but optional argument is actually an option value (names are well chosen ^^) under the hood
<dr_toboggan>
oh huh
dsheets has joined #ocaml
<dr_toboggan>
from my perspective, those signatures should be compatible, like unless you do something. like, the caller is calling the function properly
<dr_toboggan>
i'm not sure why those type signatures aren't compatible
<dr_toboggan>
er, i miswrote that
madroach has quit [Ping timeout: 244 seconds]
<dr_toboggan>
the caller is using the function correctly. is there information missing from the type signature?
<_y>
dr_toboggan, but a function of type ‘~x:int -> int’ is physically different from a function of type ‘?x:int -> int’
<_y>
they are compiled differently
madroach has joined #ocaml
<dr_toboggan>
i can understand that much, but i view type signatures as "this is a promise that you can use it this way"
<_y>
so you need a conversion operation to view the first one as the second
<dr_toboggan>
so when i can't use it that way, i'm confused
<dr_toboggan>
is there a technical reason those conversion operations can't be done automatically?
dsheets has quit [Ping timeout: 250 seconds]
<_y>
a compatible type would mean that you can safely view one as another *without actually doing anything at runtime*
<dr_toboggan>
_y: aren't there some runtime requirements for polymorphic variants?
<dr_toboggan>
i might be thinking of something else
<_y>
<dr_toboggan> is there a technical reason those conversion operations can't be done automatically? → you can indeed conceive a language with implicit conversions (eg the one discussed here, or int → float…), c++ does it, but ocaml does not
<_y>
this gets a mess very quickly
<dr_toboggan>
_y: i think that's a different kind of conversion though
<_y>
dr_toboggan, in both cases those are runtime conversions based on the actual and expected type
<dr_toboggan>
_y: well, i mean, with closures, there's the implicit environment function that top level functions (the very tippy top) might not have
<dr_toboggan>
just to give a goofy sort of example
govg has joined #ocaml
<dr_toboggan>
*implicit environment argument
<_y>
dr_toboggan, no, polymorphic variants are all determined at compile‐time too
<dr_toboggan>
ok
Simn has quit [Quit: Leaving]
<dr_toboggan>
it just seems to me that the question the typechecker should be asking is: can the caller call it this way? is that correct?
<_y>
a type like [< `A | `B | `C ] is not simply compiled into `A = 0, `B = 1, `C = 2`
<Algebr`>
its not, the runtime has a hash of it
<_y>
otherwise, indeed, you would need runtime conversions for subtyping (e·g· ‘`C : [< `A | `B | `C ] :> [ `A | `C]’ would have to be mapped from 2 to 1)