adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.1 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.07/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml | Due to ongoing spam, you must register your nickname to talk on the channel
Haudegen has quit [Remote host closed the connection]
sodastab has quit [Quit: ZNC - https://znc.in]
sodastab has joined #ocaml
sodastab has quit [Excess Flood]
sodastab has joined #ocaml
eskatrem has joined #ocaml
AtumT has quit [Quit: AtumT]
traviss has quit [Ping timeout: 256 seconds]
syb has joined #ocaml
FreeBirdLjj has joined #ocaml
syb has quit [Quit: Leaving]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
Netsu has joined #ocaml
<Netsu> type r = F : ('a -> 'a) -> r ;; let map_pair (r: r) (p1, p2) = let F f = r in (f p1, f p2) ;;
<Netsu> This expression has type 'a but an expression was expected of type $F_'a The type constructor $F_'a would escape its scope
<Netsu> Why so?
<Netsu> *Trying to use existential from gadt here for rank-n polymorphism workaround
<companion_cube> type r = {f: 'a. 'a -> 'a} ;; let map_pair … = r.f p1, r.f p2
<companion_cube> what you wrote is an existential type, the usual way of having a universal quantifier is records like that
<Netsu> companion_cube: yeah, but isn't gadt have existential type as well? ('a)
<companion_cube> it's existential, and in this case it seems like you want a universal
<Netsu> Hmh..
<companion_cube> existentials are good for pairing values with operations on them, for example
<companion_cube> but here you want a `forall 'a. 'a -> 'a`, don't you?
<Netsu> yeah, afaik there should be way to express universal through existential...
ale64bit has quit [Ping timeout: 255 seconds]
<Netsu> companion_cube: thank you for explanation, anyway
<companion_cube> you can't go from existential to universal :)
q9929t has joined #ocaml
mfp has quit [Ping timeout: 258 seconds]
gravicappa has joined #ocaml
<eskatrem> hi, let's say I have a type like: `type tree = | X | Num of int | Add of tree * tree | Prod of tree * tree;;` is there a way to have a subtype of tree like `Prod of (Num n, X)` ?
cobreadmonster has joined #ocaml
ygrek has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
<Netsu> companion_cube: I'm about https://en.wikipedia.org/wiki/Skolem_normal_form
<companion_cube> eskatrem: I don't think so, subtypes in OCaml are a rare thing
<companion_cube> Netsu: this kind of translation only works in classical logic, afaik, but OCaml types are intuitionistic logic, where you can't go directly between existentials and universals
<Netsu> companion_cube: thanks, a lot of theoretical gaps to fill I must
<companion_cube> 👍
<eskatrem> companion_cube: ok, so I suppose I can use assert or something like that, thanks
pyx has joined #ocaml
q9929t has quit [Remote host closed the connection]
q9929t has joined #ocaml
q9929t has quit [Client Quit]
pyx has quit [Quit: WeeChat 2.4]
tianon has quit [Ping timeout: 246 seconds]
tianon has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
AnAverageHuman has quit [Ping timeout: 256 seconds]
gareppa has joined #ocaml
gareppa has quit [Client Quit]
cobreadmonster has quit [Quit: Connection closed for inactivity]
traviss has joined #ocaml
ggole has joined #ocaml
keep_learning_M has quit [Quit: This computer has gone to sleep]
keep_learning_M has joined #ocaml
keep_learning_M has quit [Quit: This computer has gone to sleep]
keep_learning_M has joined #ocaml
<psacrifice> Hi, can the ocaml compiler work with MSVC toolchain. I have a C++ library compiled with MSVC and am wondering if I'll face binary compatibility issues with the mingw toolchain
kakadu has joined #ocaml
jnavila has joined #ocaml
<pgiarrusso> eskatrem: companion_cube polymorphic variants seem to give that subtyping? See first example in https://v1.realworldocaml.org/v1/en/html/variants.html
mfp has joined #ocaml
Haudegen has joined #ocaml
zolk3ri has joined #ocaml
klntsky has quit [Remote host closed the connection]
klntsky has joined #ocaml
<eskatrem> thanks pgiarrusso
<eskatrem> checking now
picolino has quit [Ping timeout: 258 seconds]
picolino has joined #ocaml
jnavila has quit [Read error: No route to host]
jnavila has joined #ocaml
tane has joined #ocaml
silver has joined #ocaml
<amosbird> What is kerning?
<amosbird> Joe Armstrong [J oe (rip :()]
msvan has joined #ocaml
<eskatrem> Xavier Leroy has lots of time before him
Netsu has quit [Ping timeout: 256 seconds]
themsay has joined #ocaml
unyu has quit [Quit: kernel update]
themsay has quit [Ping timeout: 252 seconds]
themsay has joined #ocaml
unyu has joined #ocaml
AtumT has joined #ocaml
TheLemonMan has joined #ocaml
Birdface has joined #ocaml
Facebird has joined #ocaml
Birdface has quit [Ping timeout: 252 seconds]
pierpal has joined #ocaml
AnAverageHuman has joined #ocaml
FreeBirdLjj has joined #ocaml
pierpal has quit [Ping timeout: 258 seconds]
keep_learning_M has quit [Quit: This computer has gone to sleep]
themsay has quit [Ping timeout: 248 seconds]
silver has quit [Read error: Connection reset by peer]
silver has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
AtumT_ has joined #ocaml
AtumT has quit [Ping timeout: 246 seconds]
keep_learning_M has joined #ocaml
AtumT has joined #ocaml
jmiven has quit [Quit: co'o]
keep_learning_M has quit [Client Quit]
AtumT_ has quit [Ping timeout: 250 seconds]
jmiven has joined #ocaml
eskatrem has quit [Read error: Connection reset by peer]
AnAverageHuman has quit [Quit: leaving]
pierpal has joined #ocaml
al-damiri has joined #ocaml
ziyourenxiang has quit [Ping timeout: 246 seconds]
oni-on-ion has joined #ocaml
jnavila has quit [Ping timeout: 246 seconds]
Serpent7776 has joined #ocaml
oni-on-ion has quit [Read error: Connection reset by peer]
oni-on-ion has joined #ocaml
ale64bit has joined #ocaml
oni-on-ion has quit [Remote host closed the connection]
jnavila has joined #ocaml
Jesin has quit [Quit: Leaving]
jnavila_ has joined #ocaml
jnavila has quit [Ping timeout: 258 seconds]
jnavila_ has quit [Ping timeout: 246 seconds]
new_ocamler has joined #ocaml
<new_ocamler> Using dune, is it possible to restrict a dependency to only one context?
<new_ocamler> In particular, I'm trying to cross compile jst-config without cross compiling dune. jst-config depends on dune.configurator for code generation but not at runtime.
Jesin has joined #ocaml
Jesin has quit [Quit: Leaving]
Facebird has quit [Ping timeout: 252 seconds]
andreas303 has quit [Quit: andreas303]
andreas303 has joined #ocaml
jnavila_ has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
gravicappa has quit [Ping timeout: 252 seconds]
Haudegen has quit [Remote host closed the connection]
ale64bit has quit [Ping timeout: 246 seconds]
Jesin has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
Haudegen has joined #ocaml
andreas303 has quit [Remote host closed the connection]
webshinra has quit [Remote host closed the connection]
andreas303 has joined #ocaml
ggole has quit [Quit: Leaving]
Serpent7776 has quit [Quit: leaving]
jnavila_ has quit [Remote host closed the connection]
pierpal has quit [Ping timeout: 246 seconds]
ale64bit has joined #ocaml
themsay has joined #ocaml
pera has joined #ocaml
ale64bit has quit [Ping timeout: 248 seconds]
tane has quit [Quit: Leaving]
themsay has quit [Quit: Leaving]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
pera has quit [Ping timeout: 250 seconds]
mal`` has quit [Quit: Leaving]
mal`` has joined #ocaml
kakadu has quit [Remote host closed the connection]
Haudegen has quit [Remote host closed the connection]
ale64bit has joined #ocaml
silver has quit [Quit: rakede]