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)]
<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
<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
<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`
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.