<d_bot>
<inkbottle> It is strange to me that "the (`type typeconstr-name`) syntax construction by itself does not make polymorphic the type variable it introduces". https://ocaml.org/manual/locallyabstract.html (locally abstract types vs explicit polymorphism doesn't return many hits)
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
bartholin has joined #ocaml
spip has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
bobo has quit [Ping timeout: 272 seconds]
Techcable has quit [Ping timeout: 240 seconds]
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Anarchos has joined #ocaml
<Anarchos>
hello
<companion_cube>
mclovin: the "vidéo" links are broken
<companion_cube>
on the OUPS website
<d_bot>
<nave01314> Not sure if this helps, but I have always thought of ‘type’ syntax as a “there exists” rather than “for all”
<companion_cube>
at least the recent ones
<companion_cube>
slides neither actually :/
vicfred has joined #ocaml
<d_bot>
<inkbottle> Yes, thanks. Every bit of information is helping. And the "exists" formulation is evocative.
mro has quit [Remote host closed the connection]
<d_bot>
<NULL> If you're still curious, I had this discussion a few months ago
<d_bot>
<NULL> (IRC users: I don't know how to point to an earlier message that can pass the bridge)
<d_bot>
<NULL> a way to point that can pass*
<d_bot>
<inkbottle> I've found the discussion, giving it a look.
<d_bot>
<NULL> I mean, you're not on IRC, so I'd hope my pointer works for you
<d_bot>
<inkbottle> yes, found it, thanks
Tuplanolla has joined #ocaml
<d_bot>
<ec> What's a good name for a "getter" function that extracts a sub-value from a record?
<d_bot>
<NULL> `fun r -> r.field` ?
<d_bot>
<NULL> You rarely name those
<d_bot>
<ec> ```ocaml
<d_bot>
<ec> type 'errors t = {
<d_bot>
<ec> error : 'errors;
<d_bot>
<ec> context : string list; }
<d_bot>
<ec>
<d_bot>
<ec> val name_this : 'errors t -> 'errors
<d_bot>
<ec> ```
<d_bot>
<NULL> Watch out when you paste code blocks, it spams IRC (though 7 lines is fine apparently)
<sim642>
The common thing is to just name them same as the field
rgrinberg has joined #ocaml
<d_bot>
<NULL> `get_error` would seem adequate, but if the type is public you don't really need to wrap `fun r -> r.error`
<d_bot>
<NULL> Unless you always want to access this field, in which case a prefix notation may be useful
<d_bot>
<ec> type is indeed going to be private, i suspect
<d_bot>
<ec> thanks!
waleee has quit [Ping timeout: 256 seconds]
Haudegen has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 276 seconds]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
<d_bot>
<KW78> ocamlformat is doing eta-expansion (transforming `let f x = fun y -> ...` to `let f x y -> ...` I spent way too much time already but could not find an option to avoid this ?
<d_bot>
<KW78> (posted on #editor-support discord but I believe more people are on irc)
rgrinberg has joined #ocaml
<qwr>
imho this isn't eta-expansion with curring that ocaml uses, these two should be literally equivalent
bartholin has quit [Quit: Leaving]
vicfred has quit [Quit: Leaving]
<d_bot>
<KW78> Sure (except value restriction), but the point is about readability. Sometimes I want to convey fact that this binding is a thunk/suspended computation
<sim642>
Maybe give a return type to f which is itself a function type?
mro has joined #ocaml
waleee has joined #ocaml
<d_bot>
<KW78> that works, a bit on the heavy side
bobo has joined #ocaml
spip has quit [Ping timeout: 272 seconds]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
mro has quit [Read error: Connection reset by peer]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
bobo has quit [Ping timeout: 240 seconds]
spip has joined #ocaml
szkl has quit [Quit: Connection closed for inactivity]
olle has quit [Ping timeout: 240 seconds]
bobo has joined #ocaml
spip has quit [Ping timeout: 276 seconds]
mro has quit [Remote host closed the connection]
mro has joined #ocaml
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
gravicappa has quit [Ping timeout: 276 seconds]
spip has joined #ocaml
bobo has quit [Ping timeout: 256 seconds]
epony has quit [Ping timeout: 260 seconds]
Serpent7776 has quit [Quit: leaving]
vicfred has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]