companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.14.0 released: https://ocaml.org/releases/4.14.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
raskol has quit [Ping timeout: 260 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jpds has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
Haudegen has quit [Ping timeout: 260 seconds]
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
mima has quit [Ping timeout: 260 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
waleee has quit [Ping timeout: 268 seconds]
raskol has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
williewillus has joined #ocaml
rgrinberg has joined #ocaml
raskol has quit [Ping timeout: 252 seconds]
chrisz has quit [Ping timeout: 268 seconds]
chrisz has joined #ocaml
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #ocaml
John_Ivan has quit [Ping timeout: 268 seconds]
gopiandc1 has quit [Read error: Connection reset by peer]
gopiandc1 has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
trev_ has joined #ocaml
trev_ has quit [Remote host closed the connection]
trev has joined #ocaml
motherfsck has quit [Ping timeout: 252 seconds]
ansiwen has quit [Quit: ZNC 1.7.1 - https://znc.in]
ansiwen has joined #ocaml
mbuf has joined #ocaml
bartholin has joined #ocaml
motherfsck has joined #ocaml
bartholin has quit [Quit: Leaving]
motherfs1 has joined #ocaml
motherfsck has quit [Read error: Connection reset by peer]
gopiandc1 has quit [Read error: Connection reset by peer]
gopiandc1 has joined #ocaml
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
williewillus has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
mima has joined #ocaml
<ns12> Hello, in "let f (x : 'a) : int = x + 1", what is the terminology to describe the "'a" and "int" parts?
<ns12> Is it "type annotations" or "type constraints" or "type signature"?
<ns12> I don't think it is "type signature" because the real signature of the function is int -> int, not 'a -> int.
Serpent7776 has joined #ocaml
<sim642> The manual calls them type constraints
<ns12> sim642: Thank you. Where is it explicitly mentioned? I didn't see any explicit definition when I searched for ""type constraints" site:ocaml.org" in a search engine.
<sim642> You can grep this page: https://v2.ocaml.org/manual/expr.html
<sim642> Although it also calls them type annotations in two places
<ns12> sim642: Thank you for the information.
<ns12> What about "type signatures"? Are they the things printed when you evaluate something in the toplevel? Are they the things that you put into "mli" files?
<ns12> For example, when I enter "let f (x : 'a) : int = x + 1;;" into the OCaml toplevel, it prints "val f : int -> int = <fun>".
xgqt has quit [Quit: WeeChat 3.4.1]
xgqt has joined #ocaml
olle has joined #ocaml
gopiandc1 has quit [Read error: Connection reset by peer]
gopiandc1 has joined #ocaml
wonko has joined #ocaml
gopiandc1 has quit [Ping timeout: 252 seconds]
gopiandc1 has joined #ocaml
Haudegen has joined #ocaml
<sim642> I'd say that's just a type because it also applies to non-functions
<sim642> "Signature" would most likely be used for module types in OCaml
gopiandc1 has quit [Ping timeout: 252 seconds]
<sim642> Unless you talk about "function signatures", which could be understood to mean function types
gopiandc1 has joined #ocaml
adanwan has quit [Ping timeout: 268 seconds]
adanwan has joined #ocaml
azimut has quit [Ping timeout: 268 seconds]
jpds has quit [Ping timeout: 268 seconds]
jpds has joined #ocaml
azimut has joined #ocaml
wonko has quit [Ping timeout: 255 seconds]
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
adanwan has quit [Ping timeout: 268 seconds]
adanwan has joined #ocaml
jpds1 has joined #ocaml
jpds has quit [Ping timeout: 268 seconds]
jpds1 has quit [Remote host closed the connection]
jpds1 has joined #ocaml
jpds1 has quit [Remote host closed the connection]
jpds1 has joined #ocaml
adanwan has quit [Remote host closed the connection]
adanwan has joined #ocaml
azimut has quit [Ping timeout: 268 seconds]
gopiandc1 has quit [Ping timeout: 260 seconds]
gopiandc1 has joined #ocaml
spip has joined #ocaml
bobo_ has quit [Ping timeout: 268 seconds]
wonko has joined #ocaml
xgqt has quit [Quit: WeeChat 3.5]
wonko has quit [Ping timeout: 260 seconds]
adanwan has quit [Remote host closed the connection]
adanwan has joined #ocaml
xgqt has joined #ocaml
trev has quit [Quit: trev]
nd__ has joined #ocaml
gopiandc1 has quit [Ping timeout: 268 seconds]
gopiandc1 has joined #ocaml
John_Ivan has joined #ocaml
gopiandc1 has quit [Ping timeout: 268 seconds]
gopiandc1 has joined #ocaml
waleee has joined #ocaml
zebrag has joined #ocaml
gopiandc1 has quit [Ping timeout: 268 seconds]
gopiandc1 has joined #ocaml
amk has quit [Remote host closed the connection]
amk has joined #ocaml
adanwan has quit [Remote host closed the connection]
adanwan has joined #ocaml
gentauro has quit [Read error: Connection reset by peer]
Serpent7776 has quit [Quit: WeeChat 1.9.1]
gentauro has joined #ocaml
gopiandc1 has quit [Ping timeout: 252 seconds]
gopiandc1 has joined #ocaml
gopiandc1 has quit [Ping timeout: 252 seconds]
gopiandc1 has joined #ocaml
rgrinberg has joined #ocaml
mbuf has quit [Quit: Leaving]
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
klu has quit [Read error: Connection reset by peer]
klu has joined #ocaml
klu has quit [Changing host]
klu has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
klu has quit [Read error: Connection reset by peer]
klu has joined #ocaml
klu has joined #ocaml
klu has quit [Changing host]
waleee has quit [Ping timeout: 248 seconds]
noonien has quit [Quit: The Lounge - https://thelounge.chat]
noonien has joined #ocaml
rgrinberg has joined #ocaml
Tuplanolla has joined #ocaml
Serpent7776 has joined #ocaml
azimut has joined #ocaml
emad has joined #ocaml
emad has quit [Remote host closed the connection]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dstein64 has quit [Read error: Connection reset by peer]
dstein64 has joined #ocaml
<olle> Can I improve the stack trace from failwith?
<olle> Using dune etc
<olle> Or from raise
omegatron has quit [Quit: Power is a curious thing. It can be contained, hidden, locked away, and yet it always breaks free.]
waleee has joined #ocaml
<sim642> Improve in what sense?
<olle> sim642: I'm not really getting the exact location when the call is inside List.map or similar
<olle> Other question: Can I pass on a namespace variable here? `List.map infer_stmt stmts,`
<olle> infer_stmt needs to take two args: the statement to infer type of, and a namespace value :d
<olle> Oh, maybe just a new fun x -> infer_stmt x namespace :)
azimut has quit [Remote host closed the connection]
<sim642> or if you swap the arguments of infer_stmt, then you could just have: List.map (infer_stmt namespace) stmts
azimut has joined #ocaml
<olle> sim642: Yeah, but I was using `function` key word
<olle> Removed it now anyway, was weird
sagax has joined #ocaml
noonien has quit [Quit: The Lounge - https://thelounge.chat]
noonien has joined #ocaml
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
<olle> Gah
<olle> I need to coerce a GString type from glib to "string" literal type, but only when a function type expects the literal type
<olle> Can't fit it in my compiler pipeline :d
jpds1 is now known as jpds
<olle> Basically have to loop all expressions in a function call, and add a coerce operation when function type contains String_literal
<olle> Weird
<olle> Wait, this is printf...
<olle> :(
<olle> One of those moments when you have to parse a string literal inside the compiler code...?
<olle> Didn't OCaml do this hard-coded in earlier version?
Serpent7776 has quit [Quit: leaving]
<olle> There is no constructor :: within type Ast.typ
<olle> Bit cryptic, no? :)
waleee has quit [Quit: WeeChat 3.6]
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
omegatron has joined #ocaml
waleee has joined #ocaml
adanwan_ has joined #ocaml
adanwan has quit [Quit: _]
bobo_ has joined #ocaml
spip has quit [Ping timeout: 260 seconds]
gahr_ has joined #ocaml
megeve_ has joined #ocaml
andreypopp_ has joined #ocaml
micro_ has quit [Ping timeout: 240 seconds]
afrosenpai has quit [Ping timeout: 252 seconds]
John_Ivan has quit [Read error: Connection reset by peer]
John_Ivan_ has joined #ocaml
lisq has joined #ocaml
octachron_ has joined #ocaml
xgqtd has joined #ocaml
tristanC_ has joined #ocaml
thizanne` has joined #ocaml
x88x88x has joined #ocaml
olle has quit [Ping timeout: 244 seconds]
sagax has quit [*.net *.split]
xgqt has quit [*.net *.split]
octachron has quit [*.net *.split]
thizanne has quit [*.net *.split]
troydm has quit [*.net *.split]
gahr has quit [*.net *.split]
tristanC has quit [*.net *.split]
andreypopp has quit [*.net *.split]
megeve has quit [*.net *.split]
bronsen has quit [*.net *.split]
rom1504 has quit [*.net *.split]
x22x22x has quit [*.net *.split]
lisq_ has quit [*.net *.split]
megeve_ is now known as megeve
rom1504 has joined #ocaml
troydm has joined #ocaml
azimut has quit [Ping timeout: 268 seconds]
azimut has joined #ocaml
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
afrosenpai has joined #ocaml
micro has joined #ocaml
xgqtd has quit [Quit: WeeChat 3.5]
xgqt has joined #ocaml
rgrinberg has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
adanwan_ has quit [Quit: _]
adanwan has joined #ocaml