adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.06.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.06/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
Jesin has quit [Ping timeout: 256 seconds]
shinnya has joined #ocaml
objmagic_ has joined #ocaml
objmagic has quit [Ping timeout: 240 seconds]
troydm has joined #ocaml
cbot has joined #ocaml
shinnya has quit [Ping timeout: 264 seconds]
ziyourenxiang_ has quit [Ping timeout: 276 seconds]
shinnya has joined #ocaml
zolk3ri has quit [Quit: Lost terminal]
bartholin has quit [Ping timeout: 256 seconds]
silver has quit [Quit: rakede]
bartholin has joined #ocaml
mcspud has joined #ocaml
isd has quit [Ping timeout: 260 seconds]
shinnya has quit [Ping timeout: 256 seconds]
Denommus` has quit [Read error: Connection reset by peer]
mfp has quit [Ping timeout: 248 seconds]
objmagic_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Jesin has joined #ocaml
opios has quit [Ping timeout: 260 seconds]
tormen_ has joined #ocaml
tormen has quit [Ping timeout: 264 seconds]
isd has joined #ocaml
alphor has quit [Ping timeout: 256 seconds]
caw________ has quit [Ping timeout: 256 seconds]
caw________ has joined #ocaml
alphor has joined #ocaml
objmagic has joined #ocaml
pierpa has quit [Quit: Page closed]
unyu has quit [Quit: brb]
unyu has joined #ocaml
pierpal has joined #ocaml
fwx has joined #ocaml
fwx has quit [Ping timeout: 256 seconds]
isd has quit [Ping timeout: 264 seconds]
isd has joined #ocaml
VermillionAzure has quit [Ping timeout: 260 seconds]
shinnya has joined #ocaml
yomimono has joined #ocaml
yomimono_ has joined #ocaml
objmagic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yomimono has quit [Ping timeout: 276 seconds]
malina has quit [Ping timeout: 260 seconds]
MercurialAlchemi has joined #ocaml
cbot has quit [Quit: Leaving]
mbuf has joined #ocaml
tane has joined #ocaml
caltelt has quit [Ping timeout: 240 seconds]
ozzymcduff has joined #ocaml
isd has quit [Quit: Leaving.]
Haudegen has joined #ocaml
tarptaeya has joined #ocaml
jaar has joined #ocaml
ozzymcduff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tane has quit [Quit: Leaving]
tarptaeya has quit [Remote host closed the connection]
dhil has joined #ocaml
ozzymcduff has joined #ocaml
argent_smith has joined #ocaml
tarptaeya has joined #ocaml
jaar has quit [Ping timeout: 256 seconds]
C-16 has joined #ocaml
jaar has joined #ocaml
jaar has quit [Remote host closed the connection]
jaar has joined #ocaml
ziyourenxiang_ has joined #ocaml
mk9 has joined #ocaml
mfp has joined #ocaml
zolk3ri has joined #ocaml
Haudegen has quit [Ping timeout: 255 seconds]
C-16 has quit [Ping timeout: 240 seconds]
mbuf has quit [Ping timeout: 255 seconds]
zolk3ri has quit [Ping timeout: 276 seconds]
zolk3ri has joined #ocaml
<Leonidas> I have two types, a and b and they have the same constructors. But when I try to make a functior, and copy their common declaration to `type t = …` and in the functor argument set type t = a, it complains that the kinds do not match
<Leonidas> but a and b are even declared in the same (protobuf) file and the compiler accepts these as apparently the same
<discord3> <Christophe> They have all the same constructors ?
<Leonidas> yes, Login_res of login_cookies | Error_res of login_error
<Leonidas> I was surprised two ADTs can share constructors, but I guess it is possible if the types are identical
<Leonidas> which makes sense since Base Result.t is the same as the built in result type
<octachron> no, variant types are nominal
<octachron> type a = A and type b = A defines two unrelated types
<Leonidas> hmm. is there a way to make the compiler aware they should be the same?
<ZirconiumX> Type aliasing, I think
<octachron> Yes, there is the abbreviation + constructor reexport way: "type ('a,'b) result = ('a,'b) Pervasives.result = Ok of 'a | Error of 'b "
<ZirconiumX> Like that, yeah
<octachron> and the simple abbreviation "type ('a,'b) result = ('a,'b) Pervasives.result "
<octachron> and concerning the sharing of constructors, the constructors themselves are never shared but their names can overlap, requiring type-directed disambiguation to distinguish them
opios has joined #ocaml
opios has joined #ocaml
opios has quit [Changing host]
<octachron> The difference between the two type abbreviations is that in the first case if the type abbreviation is defined in M, then opening M brings the constructors in scope
<Leonidas> hmm. Now I am not sure what I am trying is even possible
<Leonidas> because to export it I'd have to make the protobuf types a and b be the same, which I can't.
<ZirconiumX> I do think this is what the result type is for, though
<octachron> Leonidas, if you have two types that should be equal, you can also export a bijection as two functions "a -> b * b -> a"
<Leonidas> ZirconiumX: it is not about the result type, I was just thinking that it works in a structural way due to how I see result type to be identical.
<Leonidas> but it is not
mk9 has quit [Quit: mk9]
JimmyRcom_ has joined #ocaml
kakadu has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 268 seconds]
jaar has quit [Ping timeout: 264 seconds]
silver has joined #ocaml
jaar has joined #ocaml
MercurialAlchemi has joined #ocaml
_andre has joined #ocaml
JimmyRcom_ has quit [Ping timeout: 268 seconds]
sh0t has joined #ocaml
spew has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 248 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
mcspud has quit [Ping timeout: 256 seconds]
dhil has quit [Ping timeout: 276 seconds]
mcspud has joined #ocaml
dhil has joined #ocaml
xqb16141 has joined #ocaml
xqb16141 is now known as ioan
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
MercurialAlchemi has joined #ocaml
neatonk has quit [Quit: neatonk]
neatonk has joined #ocaml
ygrek has joined #ocaml
trevorriles has joined #ocaml
mk9 has joined #ocaml
mk9 has quit [Ping timeout: 256 seconds]
shinnya has quit [Ping timeout: 248 seconds]
dhil has quit [Ping timeout: 240 seconds]
malina has joined #ocaml
ozzymcduff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
malina has quit [Quit: Throwing apples of Montserrat]
tane has joined #ocaml
jaar has quit [Ping timeout: 264 seconds]
FreeBirdLjj has joined #ocaml
jaar has joined #ocaml
johnelse1 is now known as johnel_away
johnel_away is now known as johnelse1
weird_error has joined #ocaml
jaar has quit [Read error: Connection reset by peer]
jaar has joined #ocaml
ioan is now known as carton
MercurialAlchemi has quit [Ping timeout: 265 seconds]
yomimono_ has quit [Ping timeout: 264 seconds]
trevorriles has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
trevorriles has joined #ocaml
<Drup> rgr[m]: do you have an example of dune+ctypes now ?
<Armael> Drup: I have one myself, depending of what you want?
<Drup> link plz ? :p
weird_error has quit [Ping timeout: 240 seconds]
ozzymcduff has joined #ocaml
benizac has quit []
webshinra has quit [Remote host closed the connection]
orbitz has quit [Read error: Connection reset by peer]
stux|RC-- has joined #ocaml
webshinra has joined #ocaml
orbitz has joined #ocaml
stux|RC has quit [Ping timeout: 256 seconds]
objmagic has joined #ocaml
stux|RC-- has quit [Read error: Connection reset by peer]
stux|RC has joined #ocaml
aciniglio has joined #ocaml
fwx has joined #ocaml
fwx has quit [Remote host closed the connection]
trevorriles has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yomimono has joined #ocaml
yomimono has quit [Ping timeout: 240 seconds]
JimmyRcom_ has joined #ocaml
yomimono has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
weird_error has joined #ocaml
aciniglio has quit [Ping timeout: 240 seconds]
zolk3ri has quit [Quit: leaving]
zolk3ri has joined #ocaml
objmagic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
isd has joined #ocaml
objmagic has joined #ocaml
Haudegen has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
jaar has quit [Ping timeout: 240 seconds]
pierpal has quit [Read error: Connection reset by peer]
weird_error has quit [Quit: weird_error]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
trevorriles has joined #ocaml
JimmyRcom_ has quit [Ping timeout: 260 seconds]
objmagic_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 265 seconds]
objmagic has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
tane has quit [Quit: Leaving]
trevorriles has quit [Ping timeout: 276 seconds]
dhil has joined #ocaml
<Leonidas> that's also what I use as example
FreeBirdLjj has quit [Remote host closed the connection]
isd has quit [Quit: Leaving.]
tarptaeya has quit [Quit: Konversation terminated!]
pierpal has joined #ocaml
JimmyRcom_ has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
dhil has quit [Ping timeout: 264 seconds]
JimmyRcom_ has quit [Ping timeout: 264 seconds]
dhil has joined #ocaml
kakadu has joined #ocaml
jmiven has quit [Quit: co'o]
jmiven has joined #ocaml
pierpal has joined #ocaml
femi has joined #ocaml
pierpa has joined #ocaml
ozzymcduff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roygbiv has joined #ocaml
demonimin has quit [Remote host closed the connection]
demonimin has joined #ocaml
_andre has quit [Quit: leaving]
JimmyRcom_ has joined #ocaml
sh0t has quit [Remote host closed the connection]
argent_smith has quit [Quit: Leaving.]
larhat has joined #ocaml
malina has joined #ocaml
Haudegen has quit [Remote host closed the connection]
objmagic has joined #ocaml
objmagic_ has quit [Read error: Connection reset by peer]
kakadu has quit [Remote host closed the connection]
spew has quit [Quit: Connection closed for inactivity]
neatonk has quit [Ping timeout: 265 seconds]
objmagic_ has joined #ocaml
objmagic has quit [Read error: Connection reset by peer]
objmagic has joined #ocaml
objmagic_ has quit [Ping timeout: 260 seconds]
dhil has quit [Ping timeout: 276 seconds]
objmagic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
larhat has quit [Quit: Leaving.]
zmt00 has quit [Quit: Leaving]
weird_error has joined #ocaml