companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.11 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.11/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
mxns has joined #ocaml
sm2n has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
mxns has quit [Ping timeout: 260 seconds]
sm2n has quit [Ping timeout: 245 seconds]
rock64 has quit [Ping timeout: 240 seconds]
rock64 has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
spiegelau has quit [Quit: leaving]
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 272 seconds]
mbuf has joined #ocaml
Guest12880 has quit [Ping timeout: 240 seconds]
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
mfp has quit [Ping timeout: 276 seconds]
andreas303 has quit [Remote host closed the connection]
andreas303 has joined #ocaml
andreas303 has quit [Remote host closed the connection]
andreas303 has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
webshinra has quit [Remote host closed the connection]
webshinra has joined #ocaml
bjorkintosh has joined #ocaml
vicfred has quit [Quit: Leaving]
sm2n has joined #ocaml
sm2n has quit [Read error: Connection reset by peer]
sm2n has joined #ocaml
waleee-cl has quit [Quit: Connection closed for inactivity]
sm2n has quit [Read error: Connection reset by peer]
sm2n has joined #ocaml
arecaceae has quit [Remote host closed the connection]
arecaceae has joined #ocaml
narimiran has joined #ocaml
ewd has joined #ocaml
shawnw__ has joined #ocaml
sm2n has quit [Ping timeout: 260 seconds]
Haudegen has joined #ocaml
shawnw has joined #ocaml
shawnw__ has quit [Ping timeout: 240 seconds]
TheLemonMan has joined #ocaml
benc has joined #ocaml
benc_ has joined #ocaml
benc has quit [Read error: Connection reset by peer]
bartholin has joined #ocaml
benc_ has quit [Remote host closed the connection]
olle has joined #ocaml
olle_ has joined #ocaml
rwmjones has quit [Quit: ZNC - 1.6.0 - http://znc.in]
rwmjones has joined #ocaml
benc has joined #ocaml
catt has joined #ocaml
catt has quit [Remote host closed the connection]
benc has quit [Remote host closed the connection]
<d_bot> <Manas (prometheansacrifice)> Just making sure I understand this correctly: 4.11.2 doesn't support macos arm64 but 4.12.0 does, correct?
<vsiles> really ?
<vsiles> oh, arm
<vsiles> sorry for the noise, dunno
nullcone has quit [Quit: Connection closed for inactivity]
Haudegen has quit [Quit: Bin weg.]
<d_bot> <octachron> @Manas (prometheansacrifice) : yes. This is mostly a question of keeping new/untested features in the `4.12` branch.
<d_bot> <Manas (prometheansacrifice)> Got it.
<d_bot> <Manas (prometheansacrifice)>
<d_bot> <Manas (prometheansacrifice)> Just letting everyone know - I'd love to test anything OCaml on my M1 Mac. If I should should be on a list of beta testers anywhere, please let me know!
mfp has joined #ocaml
tane has joined #ocaml
benc has joined #ocaml
sm2n has joined #ocaml
benc has quit [Remote host closed the connection]
benc has joined #ocaml
_tjr_ has quit [Quit: quitting]
somya18 has joined #ocaml
_tjr_ has joined #ocaml
somya18 has quit [Quit: Connection closed]
SomyaSrivastava1 has joined #ocaml
SomyaSrivastava1 has quit [Client Quit]
SomyaSrivastava has joined #ocaml
somya_ has joined #ocaml
somya_ has left #ocaml [#ocaml]
SomyaSrivastava has quit [Quit: Connection closed]
Haudegen has joined #ocaml
benc has quit [Remote host closed the connection]
narimiran has quit [Ping timeout: 245 seconds]
andreas303 has quit [Ping timeout: 268 seconds]
andreas303 has joined #ocaml
zebrag has joined #ocaml
shawnw has quit [Ping timeout: 240 seconds]
benc has joined #ocaml
narimiran has joined #ocaml
benc_ has joined #ocaml
benc has quit [Ping timeout: 240 seconds]
benc_ has quit [Ping timeout: 260 seconds]
vicfred has joined #ocaml
arecaceae has quit [Remote host closed the connection]
arecaceae has joined #ocaml
arecaceae has quit [Remote host closed the connection]
arecaceae has joined #ocaml
benc has joined #ocaml
aditi31494 has joined #ocaml
aditi31494 has quit [Ping timeout: 240 seconds]
nullcone has joined #ocaml
mxns has joined #ocaml
aecepoglu[m] has quit [Quit: Idle for 30+ days]
<d_bot> <Saroupille> Is there a way to make the following type declaration well-typed?
<d_bot> <Saroupille> ```ocaml
<d_bot> <Saroupille> type 'a values =
<d_bot> <Saroupille> | E : {
<d_bot> <Saroupille> values_map_module : (module Map.S with type key = 'a and type t = 'b);
<d_bot> <Saroupille> mutable values : 'b;
<d_bot> <Saroupille> }
<d_bot> <Saroupille> -> 'a values
<d_bot> <Saroupille> ```
<d_bot> <antron> @Saroupille can you be more specific? i see multiple issues here, which one are you trying to solve right now?
<d_bot> <Saroupille> I would like that `values` to be of the type `'a M.t` where `M` is the module `values_map_module`
<d_bot> <antron> i don't know yet if ithat's possible or not, but you have a much more immediate issue in that there is no `type t` in `Map.S`, but `type _ t`
alexey has quit [Quit: leaving]
<d_bot> <Saroupille> You are right, sorry. it was one of my numerous attempts I copied.
<d_bot> <antron> can you post some approximately working code? my intent wasnt to get you to insert a literal underscore 😛
<d_bot> <antron> but i suspect you won't be able to express this relationship without an intermediate functor or so
<companion_cube> o/ antron!@
<d_bot> <antron> heya @companion_cube
<companion_cube> how are you doing?
<d_bot> <Saroupille> Here is what I am trying to do:
<d_bot> <Saroupille> ```ocaml
<d_bot> <Saroupille> module S =
<d_bot> <Saroupille> struct
<d_bot> <Saroupille> type 'a t =
<d_bot> <Saroupille> {
<d_bot> <Saroupille> values_map_module : (module Map.S with type key = 'a)
<d_bot> <Saroupille> }
<d_bot> <Saroupille>
<d_bot> <Saroupille> let create (type a) : a -> a t = fun _x ->
<d_bot> <Saroupille> let (values_map_module : (module Map.S with type key = a)) =
<d_bot> <Saroupille> ( module Map.Make (struct
<d_bot> <Saroupille> type t = a
<d_bot> <Saroupille>
<d_bot> <Saroupille> let compare = compare
<d_bot> <Saroupille> end) )
<d_bot> <Saroupille> in
<d_bot> <Saroupille> {
<d_bot> <Saroupille> values_map_module }
<d_bot> <Saroupille>
<d_bot> <Saroupille> let update (type a) : a t -> unit = fun {values_map_module} ->
<d_bot> <Saroupille> let (module Map : Map.S with type key = a) = values_map_module in
<d_bot> <Saroupille> let _map = Map.empty in
<d_bot> <Saroupille> (* I would like to store the map in type `t` directly *)
<d_bot> <Saroupille> (* ... *)
<d_bot> <Saroupille> assert false
<d_bot> <Saroupille> end
<d_bot> <Saroupille> ```
<d_bot> <antron> @Saroupille can you show your error message? because it's weird that i am about to paste it to you, yet you are asking 😛
<d_bot> <antron> this `Error: Invalid package type: parametrized types are not supported` seems pretty conclusive that you won't be able to get `with type _ anything = ...` working in this way
<d_bot> <antron> on 4.11
<d_bot> <antron> @companion_cube doing alright, yourself? 🙂
<d_bot> <Saroupille> The message I have from merlin is:
<d_bot> <Saroupille> But I suspect there is a hacky way to get around this error.
<d_bot> <antron> that error is telling you that you used a type like `t` where a parametrized type like `'a t` was expected
<d_bot> <antron> that's what i was pointing out as the first and most immediate problem
<companion_cube> antron: pretty well :)
<d_bot> <Saroupille> I have the same error message when I use `'a t` actually.
<d_bot> <antron> can you confirm it is literally the same and the compiler is claiming that the `'a t` is also `t`, like it is explicitly clamining in the message you showed?
<d_bot> <octachron> You need to store the values along the module. With just `(module Map.S with type key = 'a)`, you cannot access the type of the corresponding map: https://sketch.sh/s/4Bcbo8lJeg2OofOqYogZSM/
DanC has quit [Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in]
DanC has joined #ocaml
<d_bot> <Saroupille> merlin does not print the same error as `ocamlc`. So I suspect it is a merlin problem.
Haudegen has quit [Quit: Bin weg.]
benc has quit []
Tuplanolla has joined #ocaml
jmiven_ is now known as jmiven
olle_ has quit [Ping timeout: 240 seconds]
olle has quit [Ping timeout: 245 seconds]
thizanne has quit [Remote host closed the connection]
thizanne has joined #ocaml
waleee-cl has joined #ocaml
reynir has quit [Read error: Connection reset by peer]
reynir has joined #ocaml
boxscape has joined #ocaml
bartholin has quit [Quit: Leaving]
thizanne has quit [Quit: WeeChat 2.3]
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
thizanne has joined #ocaml
Haudegen has joined #ocaml
mbuf has quit [Quit: Leaving]
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
alexey has joined #ocaml
alexey has quit [Client Quit]
alexey has joined #ocaml
alexey has quit [Client Quit]
fosred has joined #ocaml
fosred has left #ocaml [#ocaml]
alexey has joined #ocaml
<d_bot> <Divya> Hello! I'm looking forward to contributing to a OCaml Project as a part of Outreachy. It would be of great help if anybody can help me over this.
mxns has quit [Ping timeout: 264 seconds]
mxns has joined #ocaml
<d_bot> <octachron> This year, we are mostly focusing on `ocaml.org` for Outreachy.
ewd has quit [Ping timeout: 264 seconds]
olle has joined #ocaml
vicfred has quit [Quit: Leaving]
freshmaker666 is now known as greeb
olle has quit [Ping timeout: 240 seconds]
_tjr_ has joined #ocaml
_tjr_ has quit [Changing host]
oriba has joined #ocaml
olle has joined #ocaml
narimiran has quit [Ping timeout: 245 seconds]
olle has quit [Ping timeout: 260 seconds]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
tane has quit [Quit: Leaving]
<sleepydog> I'm trying to pretty-print an expression in braces with the opening and closing braces on separate lines, and the content in an indented vbox. I'm doing Fmt.(pf ppf "{@; @[<v 2>%a@]@;}" (list fields)) but the first item is missing one level of indentation. Does anyone know how to do this?
<companion_cube> you could do: `{@[<v2>%a@;<1 -2>@]}` instead
mxns has quit [Ping timeout: 240 seconds]
<companion_cube> indent directly, put the %a, and put } with a -2 indent
<sleepydog> ooh, let me try that
<companion_cube> @;<m n> is kind of tricky but very useful
ptrkriz has joined #ocaml
<sleepydog> yea i just found it had parameters but didn't think to try a negative offset
mxns has joined #ocaml
<sleepydog> this does what i want: "{@;<1 2>@[<v>%a@;<1 -2>@]}"
<sleepydog> i'm definitely gonna forget how that works in a couple months :D
<companion_cube> not sure why you still need the inner box :)
<companion_cube> ah, in my snippet, change the beginning for `{@[<v2>@,%a`
<companion_cube> so as to insert a break
<sleepydog> that takes the indentation from the position of the {
<companion_cube> oh I didn't realize you wanted something else :)
<companion_cube> no outer box, I see now.
<sleepydog> i wanted the second format there
<sleepydog> i can probably make a combinator to make it more readable, but the `print_break` parameters seem to do the trick. thanks!
<companion_cube> yeah that's cool.
<companion_cube> I also favor the second case