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>
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]