companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.04.0 release notes: http://ocaml.org/releases/4.04.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
infinity0 has quit [Ping timeout: 240 seconds]
infinity0_ has joined #ocaml
infinity0_ has joined #ocaml
infinity0_ is now known as infinity0
ziyourenxiang has quit [Ping timeout: 240 seconds]
malina has quit [Ping timeout: 240 seconds]
sh0t has joined #ocaml
cranmax has quit [Quit: Connection closed for inactivity]
sgronblo has joined #ocaml
ygrek_ has quit [Remote host closed the connection]
ygrek_ has joined #ocaml
mfp__ has quit [Ping timeout: 240 seconds]
sh0t has quit [Ping timeout: 260 seconds]
sh0t has joined #ocaml
pierpa has quit [Quit: Page closed]
vgrocha has quit [Quit: Leaving]
kevinqiu has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
minn has joined #ocaml
kevinqiu has quit [Ping timeout: 260 seconds]
kakadu_ has quit [Remote host closed the connection]
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ocaml
mengu has quit [Read error: Connection reset by peer]
handlex has joined #ocaml
snowcrshd has quit []
mengu has joined #ocaml
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ocaml
jlam_ has joined #ocaml
jlam1 has joined #ocaml
jlam__ has quit [Ping timeout: 260 seconds]
silver_ has quit [Read error: Connection reset by peer]
jlam_ has quit [Ping timeout: 276 seconds]
gnugnugnu has joined #ocaml
kevinqiu has joined #ocaml
kevinqiu has quit [Ping timeout: 260 seconds]
nomicflux has joined #ocaml
pierpa has joined #ocaml
nomicflux has quit [Quit: nomicflux]
lambda_foo has quit [Quit: Connection closed for inactivity]
ygrek_ has quit [Ping timeout: 260 seconds]
keep_learning has quit [Ping timeout: 260 seconds]
shon_ has quit [Ping timeout: 240 seconds]
sh0t has quit [Remote host closed the connection]
shon has joined #ocaml
kevinqiu has joined #ocaml
kevinqiu has quit [Ping timeout: 260 seconds]
copy_ has quit [Quit: Connection closed for inactivity]
agravier has joined #ocaml
mengu has quit [Quit: Leaving...]
handlex has quit [Quit: handlex]
samrat_ has joined #ocaml
pierpa has quit [Quit: Page closed]
kevinqiu has joined #ocaml
kevinqiu has quit [Ping timeout: 260 seconds]
KeyJoo has joined #ocaml
ryanartecona has joined #ocaml
sgronblo has quit [Ping timeout: 240 seconds]
sgronblo has joined #ocaml
jlam_ has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
govg has quit [Ping timeout: 240 seconds]
jlam1 has quit [Ping timeout: 260 seconds]
govg has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
gnugnugnu has left #ocaml ["WeeChat 1.8"]
olibjerd has joined #ocaml
olibjerd has quit [Client Quit]
olibjerd has joined #ocaml
Muzer has quit [Ping timeout: 276 seconds]
MercurialAlchemi has joined #ocaml
kevinqiu has joined #ocaml
kevinqiu has quit [Ping timeout: 260 seconds]
enterprisey has joined #ocaml
Muzer has joined #ocaml
govg has quit [Ping timeout: 276 seconds]
FreeBirdLjj has joined #ocaml
govg has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
govg has quit [Ping timeout: 240 seconds]
Mercuria1Alchemi has joined #ocaml
kevinqiu has joined #ocaml
kevinqiu has quit [Ping timeout: 260 seconds]
minn has quit [Ping timeout: 240 seconds]
mcfiredr1ll is now known as freedrull
Simn has joined #ocaml
enterprisey has quit [Remote host closed the connection]
alfredo has joined #ocaml
freusque has quit [Ping timeout: 240 seconds]
kevinqiu has joined #ocaml
freusque has joined #ocaml
kevinqiu has quit [Ping timeout: 258 seconds]
ygrek_ has joined #ocaml
cranmax has joined #ocaml
AltGr has joined #ocaml
average has quit [Ping timeout: 258 seconds]
average has joined #ocaml
troydm has quit [Ping timeout: 240 seconds]
kevinqiu has joined #ocaml
toolslive has joined #ocaml
kevinqiu has quit [Ping timeout: 246 seconds]
andreas_ has joined #ocaml
troydm has joined #ocaml
troydm has quit [Ping timeout: 240 seconds]
mfp__ has joined #ocaml
average has quit [Ping timeout: 258 seconds]
troydm has joined #ocaml
average has joined #ocaml
zpe has joined #ocaml
ygrek_ has quit [Ping timeout: 240 seconds]
argent_smith has joined #ocaml
troydm has quit [Ping timeout: 258 seconds]
frefity has joined #ocaml
kevinqiu has joined #ocaml
kevinqiu has quit [Ping timeout: 246 seconds]
sgronblo_ has joined #ocaml
sgronblo has quit [Ping timeout: 246 seconds]
KeyJoo has quit [Ping timeout: 260 seconds]
troydm has joined #ocaml
flux has quit [Ping timeout: 255 seconds]
govg has joined #ocaml
Algebr has joined #ocaml
sgronblo_ has quit [Ping timeout: 276 seconds]
samrat_ has quit [Ping timeout: 276 seconds]
kevinqiu has joined #ocaml
kevinqiu has quit [Ping timeout: 260 seconds]
troydm has quit [Ping timeout: 240 seconds]
flux has joined #ocaml
barcabuona has quit [Ping timeout: 255 seconds]
troydm has joined #ocaml
kakadu has joined #ocaml
barcabuona has joined #ocaml
sgronblo has joined #ocaml
andreas_ has quit [Quit: Connection closed for inactivity]
troydm has quit [Ping timeout: 246 seconds]
agravier has quit [Quit: agravier]
troydm has joined #ocaml
kevinqiu has joined #ocaml
kevinqiu has quit [Ping timeout: 260 seconds]
agravier has joined #ocaml
AltGr has quit [Remote host closed the connection]
ziyourenxiang has joined #ocaml
emias has quit [Quit: Reboot.]
AltGr has joined #ocaml
m4farrel has quit [Ping timeout: 240 seconds]
agravier has quit [Quit: agravier]
troydm has quit [Ping timeout: 260 seconds]
_andre has joined #ocaml
emias has joined #ocaml
cschneid has quit [Ping timeout: 258 seconds]
kevinqiu has joined #ocaml
silver has joined #ocaml
Orion3k has joined #ocaml
dhil has joined #ocaml
kevinqiu has quit [Ping timeout: 258 seconds]
sepp2k has joined #ocaml
m4farrel has joined #ocaml
rdutra has joined #ocaml
cschneid has joined #ocaml
malc_ has joined #ocaml
frefity has quit [Ping timeout: 246 seconds]
andreas_ has joined #ocaml
frefity has joined #ocaml
cthuluh has quit [Ping timeout: 268 seconds]
cthuluh has joined #ocaml
olibjerd has quit [Quit: olibjerd]
dhil has quit [Ping timeout: 276 seconds]
dhil has joined #ocaml
kevinqiu has joined #ocaml
nomicflux has joined #ocaml
nomicflux has quit [Client Quit]
kevinqiu has quit [Ping timeout: 246 seconds]
jlam__ has joined #ocaml
jlam_ has quit [Ping timeout: 246 seconds]
mengu has joined #ocaml
kevinqiu has joined #ocaml
fraggle-boate has joined #ocaml
zpe_ has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
sh0t has joined #ocaml
fraggle-boate has quit [Remote host closed the connection]
jlam_ has joined #ocaml
olibjerd has joined #ocaml
jlam__ has quit [Ping timeout: 276 seconds]
fionnan has joined #ocaml
fraggle-boate has joined #ocaml
fionnan_ has quit [Ping timeout: 240 seconds]
fionnan has quit [Read error: Connection reset by peer]
fionnan has joined #ocaml
fionnan_ has joined #ocaml
fionnan has quit [Ping timeout: 276 seconds]
fionnan_ has quit [Ping timeout: 276 seconds]
fionnan has joined #ocaml
jlam_ has quit [Ping timeout: 260 seconds]
jlam_ has joined #ocaml
fionnan_ has joined #ocaml
fionnan has quit [Ping timeout: 246 seconds]
fionnan_ has quit [Ping timeout: 240 seconds]
fionnan has joined #ocaml
emias has quit [Ping timeout: 276 seconds]
fionnan has quit [Ping timeout: 240 seconds]
troydm has joined #ocaml
fionnan has joined #ocaml
fionnan has quit [Read error: Connection reset by peer]
fionnan has joined #ocaml
fionnan has quit [Read error: Connection reset by peer]
fionnan has joined #ocaml
emias has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
nicooo is now known as nicoo
fionnan_ has joined #ocaml
fionnan has quit [Ping timeout: 260 seconds]
dhil has joined #ocaml
Mercuria1Alchemi has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe_ has quit [Read error: Connection reset by peer]
MercurialAlchemi has joined #ocaml
enterprisey has joined #ocaml
DrWhax_ has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBird_ has joined #ocaml
fionnan has joined #ocaml
malina has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 276 seconds]
fionnan_ has quit [Ping timeout: 260 seconds]
sgronblo has quit [Read error: Connection reset by peer]
fionnan_ has joined #ocaml
jao has joined #ocaml
cthuluh has quit [Ping timeout: 240 seconds]
cthuluh has joined #ocaml
fionnan has quit [Ping timeout: 276 seconds]
copy_ has joined #ocaml
zpe has quit [Remote host closed the connection]
<orbifx[m]> Is it valid to have two polymorphic variants with different parameters when they share the same name? `'A (a * b)` and `'A (c *d)`?
zpe has joined #ocaml
<companion_cube> not in the same type, no
<companion_cube> how would you distinguish them during pattern matching?
cthuluh has quit [Ping timeout: 260 seconds]
<orbifx[m]> I'm trying to figure out what happens in the odd situation where two libraries use the same p.vars. differently.
<Drup> orbifx[m]: as long as they don't end up *in the same values* everything is fine
sgronblo has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
<Drup> otherwise, you just add an extra tag, and that's it
shinnya has quit [Ping timeout: 260 seconds]
<orbifx[m]> extra tag?
<Drup> [`Lib1 of foo1 | `Lib2 of foo2] where foo1 and foo2 contains the conflicting instances of `A
cthuluh has joined #ocaml
ryanartecona has joined #ocaml
alfredo has quit [Quit: Textual IRC Client: www.textualapp.com]
<orbifx[m]> Ok so you nest them inside another pvar?
<Drup> yes
<orbifx[m]> Also, are they still scoped by modules? Does this work Ma.(`A) and Mb.(`A)
<Drup> Polymorphic variants are never scoped by anything
<Drup> Regular variants are scoped
<Drup> Polyvars are platonic, they exists regardless of your actions :p
<octachron> However, hash collisions can affect the set of polyvars visible from a given cavern
<octachron> *cave
cthuluh has quit [Ping timeout: 260 seconds]
cthuluh has joined #ocaml
<zozozo> But the compiler warns when the polyvars shadows overlap
<orbifx[m]> hahah
<orbifx[m]> https://ocsigen.org/lwt/3.0.0/manual/manual @ Section: Mutexes, should it be saying "They are only useful for sequencing operations. " ?
dhil has quit [Ping timeout: 246 seconds]
freusque has quit [Quit: WeeChat 1.7.1]
samrat_ has joined #ocaml
frefity has quit [Ping timeout: 260 seconds]
dhil has joined #ocaml
sgronblo has quit [Ping timeout: 276 seconds]
Merv_ has joined #ocaml
kevinqiu has quit [Ping timeout: 260 seconds]
slash^ has joined #ocaml
Denommus has joined #ocaml
Denommus has quit [Client Quit]
Denommus has joined #ocaml
malc_ has quit [Remote host closed the connection]
jnavila has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
kevinqiu has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
jnavila has quit [Ping timeout: 276 seconds]
shinnya has joined #ocaml
jlam__ has joined #ocaml
jlam_ has quit [Ping timeout: 268 seconds]
MercurialAlchemi has quit [Remote host closed the connection]
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ocaml
dhil has quit [Ping timeout: 255 seconds]
Denommus has quit [Remote host closed the connection]
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ocaml
Denommus has joined #ocaml
maarhart has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
maarhart has quit [Quit: Mutter: www.mutterirc.com]
reynir is now known as DrReynirKingOfTe
DrReynirKingOfTe is now known as reynir
FreeBirdLjj has quit [Ping timeout: 276 seconds]
maarhart has joined #ocaml
mengu has quit [Ping timeout: 260 seconds]
mengu has joined #ocaml
mengu_ has joined #ocaml
mengu has quit [Read error: Connection reset by peer]
shinnya has quit [Ping timeout: 258 seconds]
jnavila has joined #ocaml
maarhart has quit [Ping timeout: 276 seconds]
mengu has joined #ocaml
mengu_ has quit [Read error: Connection reset by peer]
samrat_ has quit [Ping timeout: 255 seconds]
tane has joined #ocaml
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ocaml
KeyJoo has joined #ocaml
slash^ has joined #ocaml
samrat_ has joined #ocaml
ygrek_ has joined #ocaml
davidkrauser_ has joined #ocaml
malina has quit [Ping timeout: 268 seconds]
malina has joined #ocaml
samrat_ has quit [Ping timeout: 255 seconds]
ryanartecona has quit [Quit: ryanartecona]
TheLemonMan has joined #ocaml
dhil has joined #ocaml
Merv__ has joined #ocaml
Merv_ has quit [Ping timeout: 240 seconds]
malina has quit [Ping timeout: 268 seconds]
AltGr has left #ocaml [#ocaml]
kakadu_ has joined #ocaml
malina has joined #ocaml
govg has quit [Quit: leaving]
govg has joined #ocaml
kakadu__ has joined #ocaml
kakadu_ has quit [Ping timeout: 260 seconds]
slash^ has quit [Read error: Connection reset by peer]
malina has quit [Remote host closed the connection]
olibjerd has quit [Quit: olibjerd]
frefity has joined #ocaml
sepp2k has quit [Quit: Leaving.]
average has quit [Remote host closed the connection]
nojb has joined #ocaml
jlam_ has joined #ocaml
_andre has quit [Quit: leaving]
jlam__ has quit [Ping timeout: 240 seconds]
shinnya has joined #ocaml
enterprisey has quit [Read error: Connection reset by peer]
davidkrauser_ has quit [Quit: Leaving]
davidkrauser has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
dhil has quit [Ping timeout: 240 seconds]
frefity has quit [Quit: Ex-Chat]
jnavila has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 240 seconds]
nojb has quit [Remote host closed the connection]
nojb has joined #ocaml
Algebr has quit [Ping timeout: 240 seconds]
rdutra has quit [Quit: Leaving.]
tormen has joined #ocaml
sh0t has quit [Remote host closed the connection]
barcabuona has quit [Ping timeout: 276 seconds]
barcabuona has joined #ocaml
pierpa has joined #ocaml
ryanartecona has joined #ocaml
tane has quit [Quit: Leaving]
Simn has quit [Quit: Leaving]
mlnoob has joined #ocaml
enterprisey has joined #ocaml
nojb has quit [Ping timeout: 260 seconds]
hannes` has joined #ocaml
hannes has quit [Disconnected by services]
hannes` is now known as hannes
<mlnoob> Hi. I am new to Ocaml and I need help understanding the type error. I have implemented (shameless copying) a leftist heap shown here - https://codeshare.io/5ok9NY. Basically, the module LeftistHeap takes a parameter of type ordered. And returns a heap.
<mlnoob> Now, lets say I want to extend this module. E.g. I want to pretty print the contents of a heap of type int. The signature at line 74 shows the module inclusion with destructive substitution.
kevinqiu has quit [Ping timeout: 260 seconds]
<mlnoob> And Ocaml returns the correct signature with the type heap substibuted by the type heap' in the intheap module signature
<mlnoob> However, when I include the module in the implementation, I am getting a signature mismatch error.
<mlnoob> However, when I include the module in the implementation, I am getting a signature mismatch error. See lines 80 - 91
kmicinski has joined #ocaml
<kmicinski> Does anyone have any experience building Z3 on linux and installing the ocaml bindings? I can't get the installed package to be found by ocamlfind.
<octachron> mlnoob, signature constraints applied to a module can only hide information
<octachron> mlnoob, when you write LeftistHeap(Element: …): (HEAP …) = struct … end
<octachron> you are hiding the implementation of the type heap by making it an abstract type
ryanartecona has quit [Quit: ryanartecona]
<octachron> once the implementation of the type head hidden away, you cannot recover it from the exterior of the functor definition
<mlnoob> octachron: Correct. So, what would be the idiomatic way of extending a module?
<mlnoob> I started down this path when I wanted to access the abstract type.
kmicinski has quit [Ping timeout: 260 seconds]
<Drup> the simple answer is that you don't.
<Drup> (access the abstract type)
<Drup> For a printer, for example, the usual way is to use one of the iter functions
john51_ has quit [Ping timeout: 255 seconds]
john51 has joined #ocaml
john51 has quit [Read error: Connection reset by peer]
<mlnoob> Drup: I agree with you. But, lets say I create a queue using the LeftistHeap.fromList method. And this would be shown as an abstract type. Is that correct to say?
<mlnoob> How can I do pattern matching on this abstract type?
<mlnoob> E.g. I want to recursively parse this heap. And I want to match the type constructors E and T.
<octachron> mlnoob, you cannot pattern match an abstract type: an abstract type can only be manipulated through its exposed API
<mlnoob> octachron: I see what you mean.
john51 has joined #ocaml
<mlnoob> So, it is better to fix the Heap signature as compared to what I am trying to do
<Drup> if you really need something to be done under the abstraction boundary, it should indeed be done under the abstraction boundary ;)
<mlnoob> LOL. That makes total sense
<Drup> It does, but so few languages enforces it that your confusion is very understandable
<mlnoob> Exactly. I was going to say that years of oop has polluted my mind.
<mlnoob> octachron: Thanks for the help.
<mlnoob> Drup: Thanks
<octachron> mlnoob, you are welcome
<mlnoob> I have been banging on this since morning and was about to rage quit. It is nice to understand the underlying concept.
mlnoob has left #ocaml [#ocaml]
<orbifx[m]> are OCaml binaries built with ocamlbuild self-contained? or do the have runtime dependencies from the system?
jlam__ has joined #ocaml
jlam_ has quit [Ping timeout: 240 seconds]
cranmax has quit [Quit: Connection closed for inactivity]
kakadu__ has quit [Remote host closed the connection]
cranmax has joined #ocaml
<Drup> orbifx[m]: libc + the lib C against which you dynamically link
<Drup> it doesn't depend on the build system
nojb has joined #ocaml
nojb has quit [Ping timeout: 255 seconds]
<orbifx[m]> ok thanks :)
andreas_ has quit [Quit: Connection closed for inactivity]
silver has quit [Ping timeout: 240 seconds]
Denommus has quit [Ping timeout: 276 seconds]
sgronblo has joined #ocaml
argent_smith has quit [Quit: Leaving.]
gbikal has joined #ocaml
gbikal has left #ocaml [#ocaml]
gbikal has joined #ocaml
sh0t has joined #ocaml
silver has joined #ocaml
nojb has joined #ocaml
sgronblo has quit [Ping timeout: 240 seconds]
nojb has quit [Ping timeout: 260 seconds]
silver has quit [Ping timeout: 240 seconds]
silver has joined #ocaml
sgronblo has joined #ocaml