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
hdon has joined #ocaml
xuanrui has joined #ocaml
infinity0 has quit [Ping timeout: 264 seconds]
infinity0 has joined #ocaml
cbot has joined #ocaml
cbot_ has quit [Ping timeout: 264 seconds]
hdon has quit [Ping timeout: 256 seconds]
hdon has joined #ocaml
mfp has quit [Ping timeout: 276 seconds]
hdon has quit [Ping timeout: 240 seconds]
lostman has joined #ocaml
hdon has joined #ocaml
jimmyrcom_ has joined #ocaml
isd has joined #ocaml
mengu has quit [Remote host closed the connection]
xuanrui has quit [Quit: Leaving]
hdon has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
hdon has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 256 seconds]
xuanrui has joined #ocaml
jbrown has quit [Ping timeout: 256 seconds]
isd has quit [Quit: Leaving.]
xuanrui has quit [Ping timeout: 240 seconds]
xuanrui has joined #ocaml
xuanrui has quit [Quit: Leaving]
moolc has joined #ocaml
malina has joined #ocaml
xuanrui has joined #ocaml
hdon has quit [Ping timeout: 264 seconds]
govg has quit [Ping timeout: 268 seconds]
xuanrui has quit [Remote host closed the connection]
ousado has quit [Read error: Connection reset by peer]
xuanrui has joined #ocaml
xuanrui has quit [Remote host closed the connection]
xuanrui has joined #ocaml
xuanrui has quit [Remote host closed the connection]
xuanrui has joined #ocaml
xuanrui has quit [Quit: Leaving]
ousado has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
jimmyrcom has quit [Ping timeout: 265 seconds]
govg has joined #ocaml
govg has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
govg has joined #ocaml
breitenj has quit [Ping timeout: 240 seconds]
jao has quit [Ping timeout: 256 seconds]
FreeBirdLjj has quit [Ping timeout: 256 seconds]
breitenj has joined #ocaml
xuanrui has joined #ocaml
pierpa has quit [Quit: Page closed]
pierpal has joined #ocaml
tarptaeya has joined #ocaml
<keep_learning> Hi Everyone, I am getting this error ocamlfind: Package `ppx_tools.metaquot' not found while compiling ocaml-java repo https://github.com/Julow/ocaml-java
<keep_learning> opam list already shows ppx_tools_versioned 5.1 A variant of ppx_tools based on ocaml-migrate-parsetree
<keep_learning> Should I install ppx_tools as well ? (I am asking because I don't want to mess with my opam repo)
mbuf has joined #ocaml
xuanrui has quit [Remote host closed the connection]
hdon has joined #ocaml
hdon has quit [Ping timeout: 240 seconds]
lostman has quit [Quit: Connection closed for inactivity]
tarptaeya has quit [Quit: Konversation terminated!]
jimmyrcom_ has quit [Ping timeout: 240 seconds]
moolc has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
Simn has joined #ocaml
zpe has quit [Remote host closed the connection]
cbot has quit [Quit: Leaving]
hdon has joined #ocaml
<Simn> Hello, our CI started failing on `opam update` with `Fatal error: Stack overflow`: https://travis-ci.org/HaxeFoundation/haxe/jobs/367991587#L1118 Any ideas?
hdon has quit [Ping timeout: 256 seconds]
pierpal has quit [Ping timeout: 264 seconds]
<rgr[m]> keep_learning: you will need to install ppx_tools. You should also suggest to the author to use ppx_tools_versioned.
<keep_learning> rgr[m] Thank you very much.
ygrek has joined #ocaml
muelleme has quit [Ping timeout: 276 seconds]
malina has quit [Ping timeout: 264 seconds]
Haudegen has joined #ocaml
malina has joined #ocaml
baroud has joined #ocaml
zpe has joined #ocaml
moolc has joined #ocaml
zolk3ri has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
argent_smith has joined #ocaml
rwmjones is now known as rwmjones|hols
mfp has joined #ocaml
argent_smith has quit [Quit: Leaving.]
hdon has joined #ocaml
hdon has quit [Ping timeout: 240 seconds]
eagleflo has quit [Ping timeout: 240 seconds]
kmerz has left #ocaml [#ocaml]
freyr has joined #ocaml
<freyr> I have a recursive GADT and a function traversing in
<freyr> it does not compile, 'req type in the recursive call is out of scope
<freyr> is there any way to bypass it?
<freyr> *in Trans case
eagleflo has joined #ocaml
dinosaure[s] has quit [Ping timeout: 240 seconds]
dinosaure[s] has joined #ocaml
spew has joined #ocaml
Kalpatitoo has joined #ocaml
<Kalpatitoo> how would one go on to write a function taking as parameter a polymorphically extended polymorphic variant? i don't know the syntax, but the idea is there: https://pastebin.com/ZupFQhEa
<octachron> freyr, you should use universally quantified locally abstract types, since you call request on different types in its definition
malina has quit [Remote host closed the connection]
<octachron> freyr, i.e. "let rec request: type req resp. (module ...) -> ... "
malina has joined #ocaml
<Fardale> ii/b 16
Bronsa has quit [Remote host closed the connection]
<octachron> Kalpatitoo, what do you dislike in the type inferred by the typechecker if you remove your annotations?
<Kalpatitoo> octachron, a function f that won't pattern-match `A or `B will be deemed as not-exhaustive
<steenuil> shouldn't it be [> variant ] ?
<steenuil> actually I'm not sure if what you want is possible, Kalpatitoo
<steenuil> you might wanna look into the manual https://caml.inria.fr/pub/docs/manual-ocaml/lablexamples.html#sec46
bairui has quit [Ping timeout: 240 seconds]
bairui has joined #ocaml
<Kalpatitoo> steenuil, i haven't found the answer there
<Kalpatitoo> if it's not possible, too bad :(
<steenuil> well yeah, I meant that you should probably find another way to do what you want to do in the manual
sim_n has joined #ocaml
TarVanimelde has joined #ocaml
pierpal has joined #ocaml
<octachron> Kalpatitoo, this is indeed not possible afaik, polymorphic variants are rather coarse in term of set definitions
<octachron> ( and the type of your function would require a polymorphic variant of type anything except `A or `B )
<steenuil> I know of one language that has something like that
TarVanimelde has quit [Client Quit]
Simn has quit [Ping timeout: 256 seconds]
ziyourenxiang has joined #ocaml
<steenuil> and its type signatures get quite... involved
pierpal has quit [Ping timeout: 256 seconds]
<Kalpatitoo> steenuil, i might be interested, at least from a studying perspectiv
<Kalpatitoo> octachron, is this restriction also "static"? Like, can I write "type new_variant = [variant / [`A | `B]]"? Even this would help a lot
<octachron> there is also https://hal.archives-ouvertes.fr/hal-01325644/file/main.pdf for an OCaml extension of polymorphic variant with set-theoretic types
<Kalpatitoo> Oh !
<octachron> (all the sections on practical issues are quite fun to read)
<steenuil> yeah Kalpatitoo, you can "combine" them like [ variant | `C | `D ]
<Kalpatitoo> steenuil, i wrote "/" for set difference, it wasn't a typo
<steenuil> oh, then nope
<octachron> Kalpatitoo, you can only add variant, not remove them I am afraid
<Kalpatitoo> octachron, i think i will enjoy thoroughly that paper, thx
<steenuil> the language I was talking about is called Ur/Web, and it doesn't have polymorphic variants but it does have record field polymorphism
<steenuil> and to have a function that, e.g., adds a field #C to any record "a" that doesn't have a field #C you have to provide a disjointness constraint in the type signature
<steenuil> which is basically a proof that the record "a" doesn't contain the field #C
<steenuil> it's pretty interesting http://www.impredicative.com/ur/tutorial/tlc.html
argent_smith has joined #ocaml
RalfJ has joined #ocaml
<RalfJ> Hi all; is there anything like a release plan for opam 2? I am particularily looking forward to a release that has the fix for https://github.com/ocaml/opam/issues/3262 :D
hdon has joined #ocaml
hdon has quit [Ping timeout: 268 seconds]
baroud has quit [Ping timeout: 256 seconds]
Kalpatitoo_ has joined #ocaml
Kalpatitoo has quit [Ping timeout: 240 seconds]
kakadu has joined #ocaml
<freyr> octachron: thank you, it works. Now I have a function of type `('a, 'b) query -> 'a -> 'b Lwt.t`, and a GADT request type `'a req`.
<freyr> Is there any way to write something of type `(('a, 'b) query -> 'a -> 'b Lwt.t) -> 'b req -> 'b Lwt.t
<freyr> i.e. a function which generates a query
<freyr> without injection of an argument type into `req` (like ('a,'b) req)
<freyr> I've tried to incapsulate query function into a record `type 'result q = { f : 'request. ('request,'result) query -> 'request -> 'result Lwt.t } ;;
<freyr> but the compiler says that the type is too general when I try to wrap a function into a record
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
<octachron> freyr, this is a bit surprising. You could try to write your function ‘f` first, with the right type annotation and then wrap it inside the record
Haudegen has quit [Remote host closed the connection]
spew has quit []
<freyr> octachron: Ah, it seems the problem occured due to the partial aplication
<freyr> now it seems to work)
<freyr> btw why I can't assign a partial app-ed f-on in a forall record?
<octachron> without seeing the code, I would say that the value restriction is the most likely culprit
<mrvn> freyr: 'let f x y = g x y' keeps the generality while 'let f x = g x' looses some of it.
<mrvn> google for value restriction as octachron mentioned
<freyr> octachron: well, my signalures are `val f : type req resp. (module Caqti_lwt.CONNECTION) -> (req, resp) query -> req -> resp Lwt.t`
<freyr> type wrapped = { f : type req resp. (req, resp) query -> req -> resp Lwt.t }
<freyr> let wrapped = { f = f (module Db : Caqti_lwt.CONNECTION) }
<freyr> does not compile, while
<freyr> let wrapped = { f = fun query -> f (module Db : Caqti_lwt.CONNECTION) query }
<freyr> does
<octachron> "let f = g x" is the poster child for value restriction issues
<freyr> it seems I need all parameters to be included at least once
<freyr> cause it is still partially applied
<octachron> freyr, not really: you just need to make the field a value by η-expanding once. At heart it is the same issue as with `let id x = x let not_id = id id`
<freyr> octachron: I feel educated. Thanx
mengu has joined #ocaml
<octachron> (advertisement: there is a chapter in the reference manual on various polymorphism issues: http://caml.inria.fr/pub/docs/manual-ocaml/polymorphism.html)
_andre has joined #ocaml
huglovefan has joined #ocaml
samposm has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
tarptaeya has joined #ocaml
mbuf has quit [Quit: Leaving]
sh0t has joined #ocaml
jbrown has joined #ocaml
jao has joined #ocaml
samposm has joined #ocaml
jbrown has quit [Remote host closed the connection]
baroud has joined #ocaml
jbrown has joined #ocaml
xutux has quit [Ping timeout: 256 seconds]
baroud has quit [Ping timeout: 276 seconds]
xutux has joined #ocaml
nullifidian_ is now known as nullifidian
pierpal has joined #ocaml
jao has quit [Ping timeout: 246 seconds]
gtrak has joined #ocaml
huglovefan has quit [Quit: huglovefan]
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ocaml
moolc has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
shinnya has joined #ocaml
ygrek has joined #ocaml
<ygrek> struct include Default_types module Int = Number end
<ygrek> this doesn't work when Default_types has module Int
jmiven has quit [Quit: co'o]
<ygrek> is there any way around that?
<ygrek> to have module Int "shadow" the previous one?
jmiven has joined #ocaml
<ygrek> include (Default_types : write out signature of Default_types without Int) would probably work but meh
<ygrek> and it works
<ygrek> thanks gasche :]
<ygrek> ftr struct include (Default_types : Types with module Int := Default_types.Int) module Int = Number end
hdon has joined #ocaml
govg has quit [Ping timeout: 268 seconds]
hdon has quit [Ping timeout: 260 seconds]
mfp has quit [Ping timeout: 265 seconds]
djellemah has joined #ocaml
<kit_ty_kate> good ol' gasche
<companion_cube> the best
<ia0> :-)
<Drup> ?
<ia0> see 15:47
<flux[m]> (which timezone)
<Fardale> UTC+2
<ia0> oh right sorry
BitPuffin has joined #ocaml
Asmadeus has quit [Ping timeout: 264 seconds]
theblatt1 is now known as theblatte
freyr has quit [Remote host closed the connection]
zpe has quit [Remote host closed the connection]
hdon has joined #ocaml
FreeBirdLjj has joined #ocaml
hdon has quit [Ping timeout: 240 seconds]
xutux_ has joined #ocaml
barcabuona has quit [Quit: WeeChat 2.1]
xutux has quit [Ping timeout: 256 seconds]
jao has joined #ocaml
ygrek has quit [Ping timeout: 265 seconds]
Haudegen has quit [Remote host closed the connection]
al-damiri has joined #ocaml
tarptaeya has quit [Ping timeout: 240 seconds]
mengu has quit [Quit: Leaving...]
nicoo has quit [Ping timeout: 268 seconds]
Kalpatitoo_ has quit [Ping timeout: 264 seconds]
webshinra has quit [Ping timeout: 256 seconds]
nicoo has joined #ocaml
sh0t has quit [Ping timeout: 265 seconds]
elfring has joined #ocaml
kbit has joined #ocaml
shinnya has quit [Ping timeout: 264 seconds]
tarptaeya has joined #ocaml
cbot has joined #ocaml
letoh_ has joined #ocaml
letoh has quit [Ping timeout: 260 seconds]
<Bluddy[m]> octachron: That polymorphism chapter is extremely good. Great job.
jimmyrcom_ has joined #ocaml
<octachron> Bluddy[m], thanks
moolc has joined #ocaml
mfp has joined #ocaml
Haudegen has joined #ocaml
muelleme has joined #ocaml
xutux_ has quit [Ping timeout: 256 seconds]
letoh_ is now known as letoh
muelleme has quit [Ping timeout: 260 seconds]
sh0t has joined #ocaml
hdon has joined #ocaml
jimmyrcom_ has quit [Ping timeout: 260 seconds]
jbrown has quit [Ping timeout: 264 seconds]
hdon has quit [Changing host]
hdon has joined #ocaml
webshinra has joined #ocaml
unyu has quit [Ping timeout: 256 seconds]
webshinra_ has joined #ocaml
webshinra has quit [Ping timeout: 256 seconds]
jimmyrcom has joined #ocaml
jimmyrcom_ has joined #ocaml
jimmyrcom_ has quit [Ping timeout: 256 seconds]
jimmyrcom_ has joined #ocaml
tarptaeya has quit [Ping timeout: 256 seconds]
tarptaeya has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
zpe has joined #ocaml
muelleme has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
jimmyrcom has quit [Ping timeout: 260 seconds]
jimmyrcom_ has quit [Ping timeout: 264 seconds]
jimmyrcom_ has joined #ocaml
pierpal has quit [Ping timeout: 276 seconds]
cbot_ has joined #ocaml
jimmyrcom has joined #ocaml
zpe has quit [Remote host closed the connection]
Kalpatitoo_ has joined #ocaml
cbot has quit [Ping timeout: 240 seconds]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 246 seconds]
cbot_ has quit [Ping timeout: 256 seconds]
moolc has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
moolc has joined #ocaml
cbot_ has joined #ocaml
SpiceGuid has joined #ocaml
SpiceGuid has quit [Client Quit]
zpe has joined #ocaml
jimmyrcom has quit [Ping timeout: 264 seconds]
xutux_ has joined #ocaml
jack5638 has quit [Ping timeout: 256 seconds]
jack5638 has joined #ocaml
<Bluddy[m]> Is there effectively a difference between `module type of X` and `module type of struct include X end`? The type signatures look identical.
cbot has joined #ocaml
cbot_ has quit [Ping timeout: 268 seconds]
ars23 has joined #ocaml
Kalpatitoo_ has quit [Ping timeout: 264 seconds]
<octachron> Bluddy[m], yes, you should test with X:sig type t end
zolk3ri has quit [Quit: Lost terminal]
<Bluddy[m]> ok so the latter creates aliases?
<Bluddy[m]> cool so if I include the former I copy the type over, whereas if I include the latter I have an alias to the original. Thanks.
<octachron> Bluddy[m], more precisely, include X strengthens the module type before the inclusion: see https://discuss.ocaml.org/t/ocaml-documentation-open-thread/1841/104
jimmyrcom has joined #ocaml
kakadu has joined #ocaml
Haudegen has quit [Remote host closed the connection]
Kalpatitoo_ has joined #ocaml
ars23 has quit [Remote host closed the connection]
Haudegen has joined #ocaml
muelleme has quit [Ping timeout: 256 seconds]
pierpal has joined #ocaml
pierpal has quit [Client Quit]
elfring has quit [Quit: Konversation terminated!]
jbrown has joined #ocaml
pierpal has joined #ocaml
spew has joined #ocaml
Exagone313 has quit [Ping timeout: 276 seconds]
malina has quit [Ping timeout: 240 seconds]
hdon has quit [Ping timeout: 256 seconds]
xutux_ has quit [Ping timeout: 246 seconds]
argent_smith has quit [Quit: Leaving.]
pierpa has joined #ocaml
tarptaeya has quit [Quit: Konversation terminated!]
Exagone313 has joined #ocaml
Kalpatitoo_ has quit [Read error: Connection reset by peer]
hdon has joined #ocaml
bartholin has quit [Ping timeout: 260 seconds]
bartholin has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
SpiceGuid has joined #ocaml
zpe has quit [Read error: No route to host]
zpe has joined #ocaml
spew has quit [Read error: Connection reset by peer]
gtrak has quit [Quit: WeeChat 2.1]
gtrak has joined #ocaml
moolc has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
cbot_ has joined #ocaml
cbot has quit [Ping timeout: 264 seconds]
gtrak has quit [Ping timeout: 256 seconds]
isd has joined #ocaml
SpiceGuid has quit [Quit: ChatZilla 0.9.93 [SeaMonkey 2.49.2/20180205075051]]
<Bluddy[m]> octachron: thanks for the reference. I skipped the discussion when I first saw it, but now I'm trying to really grok modules.
sim_n has quit [Read error: Connection reset by peer]
Fistine has quit [Ping timeout: 240 seconds]
_andre has quit [Quit: leaving]
Fistine has joined #ocaml
Haudegen has quit [Remote host closed the connection]
kbit has quit [Ping timeout: 256 seconds]
Fistine has quit [Ping timeout: 276 seconds]
hdon has quit [Ping timeout: 256 seconds]
hdon has joined #ocaml
kakadu has quit [Ping timeout: 260 seconds]
hdon has quit [Ping timeout: 265 seconds]
Fistine has joined #ocaml
BitPuffin has quit [Remote host closed the connection]
shinnya has joined #ocaml
Asmadeus has joined #ocaml
hdon has joined #ocaml
jao has quit [Ping timeout: 268 seconds]
gtrak has joined #ocaml
gtrak has quit [Ping timeout: 260 seconds]