<octachron>
May I suggest to ask your question directly rather than in a link? `type a. ... ` is the combined notation for an universally quantified locally abstract type `a`. This notation is mostly useful in recursive functions over GADTs.
<adrianbrink>
@octachron Thank you. What does GADT stand for? I've also seen the same notation with `type kind kind2.` and also with `(type kind)`. What does the last one mean?
<octachron>
`type kind kind2 . ...` introduces two types `kind` and `kind2` that are universally quantified and locally abstract
<octachron>
`(type kind)` introduces a locally abstract type `kind` (note the lack of universal quantification in this case).
<octachron>
Locally abstract types are often needed with GADTs because pattern matching can only refine (add equations) to abstract types.
<octachron>
Similarly, the universal quantification is required when defining polymorphically recursive functions.
<adrianbrink>
Thank you very much. This is very helpful
pierpal has quit [Read error: Connection reset by peer]
<adrianbrink>
Another question which I hard for me to google anywhere.
<adrianbrink>
```
<adrianbrink>
type t = private
<adrianbrink>
| Implicit of Signature.Public_key_hash.t
<adrianbrink>
| Originated of Contract_hash.t
<adrianbrink>
```
<adrianbrink>
What does private mean in this case (it's in an .mli file) and does it matter for a variant whether the first case has a pipe or not?
<octachron>
`private` means that the variant constructed cannot be constructed by hand. One would need to use one of the constructor function provided somewhere else in the module.
<octachron>
However, it is possible to destruct value of type `t`, i.e. you can peek at the value representation but not construct it directly
ostera has quit [Ping timeout: 268 seconds]
<octachron>
Having a pipe or not on the first variant is a stylistic choice.
bartholin has joined #ocaml
<adrianbrink>
Ah, perfect :-)
jbrown has joined #ocaml
<adrianbrink>
I'm trying to understand some source code right now and I have come across this:
<adrianbrink>
```
<adrianbrink>
type 'kind operation_metadata = {
<adrianbrink>
(** Result of applying a {!Operation.t}. Follows the same structure. *)
<adrianbrink>
Does `'kind operation_metadata -> packed_operation_metadata` mean that it is a function? Also is `packed_operation_metadata` a varaint and how is it possible that if it can reference itself?
asymptotically has quit [Ping timeout: 256 seconds]
pierpal has quit [Ping timeout: 240 seconds]
pierpal has joined #ocaml
asymptotically has joined #ocaml
pierpal has quit [Ping timeout: 246 seconds]
<zozozo>
I have a samll problem with dune: even when using the linkall flag and specifying a purely side-effecting module in the (modules (..)) field of an executable stanza, it appear dune doesn't link the purely side-effecting module, :/
ocabot has joined #ocaml
companion_cube has joined #ocaml
mengu has joined #ocaml
spew has joined #ocaml
yawaramin has joined #ocaml
yawaramin has quit [Ping timeout: 250 seconds]
ollehar has joined #ocaml
tane has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
powerbit has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
FreeBirdLjj has joined #ocaml
ollehar has quit [Ping timeout: 258 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
JimmyRcom has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 244 seconds]
FreeBirdLjj has joined #ocaml
ostera has joined #ocaml
ostera has quit [Ping timeout: 268 seconds]
themsay has joined #ocaml
recj has joined #ocaml
waleee has joined #ocaml
jbrown has joined #ocaml
waleee has quit [Ping timeout: 272 seconds]
Serpent7776 has joined #ocaml
ygrek has joined #ocaml
Haudegen has joined #ocaml
steenuil has joined #ocaml
ostera has joined #ocaml
ostera has quit [Ping timeout: 258 seconds]
ostera has joined #ocaml
<cemerick>
I'm giving js_of_ocaml a try, and wondering what I should be expecting in terms of output size? The most basic `print_endline "foo"` produces 11K of javascript, which is a little surprising?
recj has quit [Ping timeout: 250 seconds]
ostera has quit [Ping timeout: 245 seconds]
<cemerick>
fwiw, I'm using dune at the moment, `--profile=release`, and setting `--opt=3` in the JSOO flags
FreeBirdLjj has quit [Remote host closed the connection]
recj has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
ostera has joined #ocaml
ostera has quit [Ping timeout: 268 seconds]
recj has quit [Ping timeout: 258 seconds]
recj has joined #ocaml
Serpent7776 has quit [Read error: Connection reset by peer]
Serpent7776 has joined #ocaml
ostera has joined #ocaml
ostera has quit [Ping timeout: 244 seconds]
ostera has joined #ocaml
<steenuil>
I think I've seen a few people mention that you should run it through uglifyjs or the closure compiler because it doesn't do much dead code elimination
<cemerick>
steenuil: odd given that it claims that it does so explicitly ¯\_(ツ)_/¯ I'll see what the diff ends up being.
<spew>
what's the deal with bucklescript?
ostera has quit [Ping timeout: 246 seconds]
<steenuil>
I might be wrong about that
<cemerick>
spew: the deal, with regard to what?
<cemerick>
I actually started with bucklescript, but not having access to opam isn't great
Denommus has joined #ocaml
gareppa has joined #ocaml
yomimono_ has joined #ocaml
recj has quit [Ping timeout: 272 seconds]
recj has joined #ocaml
r3s1stanc3 has joined #ocaml
kakadu_ has joined #ocaml
recj has quit [Ping timeout: 250 seconds]
recj has joined #ocaml
recj has quit [Ping timeout: 268 seconds]
recj has joined #ocaml
jmiven has joined #ocaml
Spetznaz_ has joined #ocaml
recj has quit [Ping timeout: 240 seconds]
zolk3ri has joined #ocaml
recj has joined #ocaml
timeless has joined #ocaml
<timeless>
anyone know offhand how to install cryptokit using brew (macOS)?
<companion_cube>
install opam, then `opam install cryptokit`? 😇
<timeless>
you left off `opam init` 😜
<companion_cube>
right, right
* timeless
is trying to patch random ocaml w/o really speaking ocaml
<timeless>
it isn't going too badly
zolk3ri has quit [Quit: Lost terminal]
<timeless>
ok, so, it's 'installed', but i apparently didn't add it to my path which means i didn't do myself any favors
<companion_cube>
eval `opam env`
<timeless>
yeah
* timeless
installs `num`
<companion_cube>
what's the random OCaml you're trying to patch?
<timeless>
sks-keyserver
<timeless>
great, it doesn't actually like me even before i try to patch it