rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
hackinghorn has quit [Ping timeout: 240 seconds]
rgrinberg has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
mro has joined #ocaml
vicfred has quit [Quit: Leaving]
rgrinberg has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
zebrag has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
rgrinberg has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
mro has quit [Quit: Leaving...]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hackinghorn has joined #ocaml
bartholin has quit [Quit: Leaving]
ymherklotz has joined #ocaml
<d_bot>
<EduardoRFS> Could OCaml allow the following? It would make working with big GADTs a lot easier
<d_bot>
<EduardoRFS>
<d_bot>
<EduardoRFS> ```ocaml
<d_bot>
<EduardoRFS> type 'a t = 'a constraint 'a = int -> int
<d_bot>
<EduardoRFS> let f (type a) (x: a t) = ()
<d_bot>
<EduardoRFS> ```
<d_bot>
<EduardoRFS> something as this would also help
<d_bot>
<EduardoRFS> ```ocaml
<d_bot>
<EduardoRFS> let f (x: ((int -> int) as y) t) = ()
<d_bot>
<EduardoRFS> ```
<d_bot>
<Et7f3> Where will this be useful ?
<d_bot>
<Et7f3> Why not just `type 'a t = { v: 'a } [@unboxed]` and then: `type f = (int -> int) t` ?
<d_bot>
<Et7f3> And for second part 🤨🤨🤨if you know it is int -> int why do you need as ?
<d_bot>
<NULL> I think this is for wider type identification and abstraction purposes
<d_bot>
<EduardoRFS> the idea is to avoid noise
<d_bot>
<NULL> If you want to pass type variable a (or y) to modules or even maybe objects/classes, it can be useful
<d_bot>
<EduardoRFS> I'm doing logical gates with GADTs right now, and it get's very noise, just because I cannot do `x = a -> b -> a`
<d_bot>
<EduardoRFS> thought about using equality witness better, but still very verbose, problem is that on call site it get's annoying `fun (type t) (Eq: (t, int -> int) eq) (x: t): t -> x`