companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.0 released(!!1!): https://ocaml.org/releases/5.0.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
Tuplanolla has quit [Ping timeout: 265 seconds]
Stumpfenstiel has quit [Ping timeout: 255 seconds]
Haudegen has quit [Ping timeout: 248 seconds]
chrisz has quit [Ping timeout: 265 seconds]
chrisz has joined #ocaml
spip has quit [Quit: Konversation terminated!]
waleee has quit [Ping timeout: 248 seconds]
azimut_ has quit [Ping timeout: 255 seconds]
trev has joined #ocaml
Haudegen has joined #ocaml
bartholin has joined #ocaml
Serpent7776 has joined #ocaml
spip has joined #ocaml
grobe0ba has quit [Quit: ZNC 1.8.2 - https://znc.in]
grobe0ba has joined #ocaml
kakadu has joined #ocaml
grobe0ba has quit [Ping timeout: 248 seconds]
grobe0ba has joined #ocaml
Tuplanolla has joined #ocaml
olle has joined #ocaml
azimut has joined #ocaml
neiluj has joined #ocaml
<neiluj> hi! have a library expose some types; but when used outside the type have the form Lib_Inner.t
<neiluj> instead of Lib.t
<neiluj> that's what merlin shows
<neiluj> is it normal?
<neiluj> if there is an open Lib, then t is equal to Lib_Inner.t
cedric has joined #ocaml
cedric has quit [Client Quit]
<masterbuilder> is the bridge down?
bartholin has quit [Quit: Leaving]
<companion_cube> Ah, maybe
discocaml has joined #ocaml
<companion_cube> hmm
<discocaml> <companion_cube> bridge should be back
<discocaml> <Kali> oh, nevermind; i was confusing it with application, you are correct
<discocaml> <NULL> This is not associativity of *composition*, but of *application*, which is indeed false
<neiluj> given a variant type 'a t, it's not possible to match on the 'a right?
<neiluj> *polymorphic type
<discocaml> <NULL> Generally, you don't match on types
<neiluj> right
<neiluj> thx!
<discocaml> <NULL> If it's a GADT, you can do different stuff based on the type, but only as far as the constructors have different types and that you can match on those
<discocaml> <Kali> only if you match the surrounding type, then match the contents which contain `'a`
<discocaml> <Kali> if you had a `'b option option`, then to match on the `
<discocaml> <Kali> oops, i sent that too early
<discocaml> <Kali> if you had a `int option`, then to match on the value of `int`, you would first have to match on the option and get `Some ([value of int])`, otherwise you could not match on the `int` as there would be `None`
<discocaml> <Kali> unless you mean matching on the type itself
<discocaml> <Kali> not the value of the type
<discocaml> <Kali> in which case what i said is irrelevant
<neiluj> yeah I think what I want is to match on values, not types, thanks for the concrete example
<neiluj> trying to encode the relationships between some math objects: type _ t = Nat: gen -> nat t | Fp: gen -> ffield t | F: gen -> field t | Poly: gen -> ('a t) poly t
<neiluj> Two questions: 1. is it possible to refine the Poly constructor so that here 'a can either be nat, field or ffield?
<neiluj> 2. is it possible express "inclusions", ie. ffield t can be promoted to a field t
<octachron> `'a t poly t` means all `'a`.
<octachron> 2. Not in this way.
<neiluj> 2. can it be achieved without objects?
<octachron> You can use a common base constructor to be able to expression of the type `'a gen_field t`
<neiluj> oh thanks for the precision
<octachron> Objects at the type level matter mostly for subtyping, but since GADTs are not compatible with subtyping there are less helpful that one might think with GADTs.
<neiluj> ah gosh! so would you advocate the use of objects here? or GADT is fine
<octachron> I am not sure why you are thinking that I am suggesting using objects?
<neiluj> hmm I don't know either, I saw that for instance sagemath uses objects alot for subtyping
<neiluj> so was thinking maybe use this approach
<octachron> OCaml objects are not a good fit for small algebraic types.
<octachron> (too much method overhead)
<companion_cube> I mean, compared to python, it's still reasonable overhead... 😅
<neiluj> lol
motherfsck has quit [Ping timeout: 246 seconds]
motherfsck has joined #ocaml
bartholin has joined #ocaml
wingsorc has joined #ocaml
wingsorc__ has quit [Read error: Connection reset by peer]
neiluj has quit [Ping timeout: 260 seconds]
motherfsck has quit [Ping timeout: 248 seconds]
Stumpfenstiel has joined #ocaml
kakadu has quit [Remote host closed the connection]
bgs has joined #ocaml
neiluj has joined #ocaml
neiluj has quit [Ping timeout: 252 seconds]
Stumpfenstiel has quit [Quit: No Ping reply in 180 seconds.]
Stumpfenstiel has joined #ocaml
oriba has joined #ocaml
Stumpfenstiel has quit [Quit: No Ping reply in 180 seconds.]
Stumpfenstiel has joined #ocaml
azimut has quit [Ping timeout: 255 seconds]
azimut has joined #ocaml
waleee has joined #ocaml
Serpent7776 has quit [Ping timeout: 252 seconds]
trev has quit [Remote host closed the connection]
xd1le has joined #ocaml
olle has quit [Ping timeout: 248 seconds]
bartholin has quit [Quit: Leaving]
dh` has joined #ocaml
wingsorc has quit [Remote host closed the connection]
wingsorc has joined #ocaml
wingsorc__ has joined #ocaml
wingsorc has quit [Read error: Connection reset by peer]
Tuplanolla has quit [Quit: Leaving.]