<discocaml>
<deepspacejohn> Reference PVar with the module namespace, F.PVar
<dh`>
well yes, that much is obvious
<dh`>
(what I said)
<discocaml>
<deepspacejohn> because formula is an extensible variant, there could be multiple "PVar" constructors defined for it in different modules. That's why the compiler can't disambiguate it based on the type information like it could with a normal variant.
<Anarchos>
<discocaml> <deepspacejohn> thanks for this clear explanation
<discocaml>
<emiletrotignon> This one has an option, I am sure.
<discocaml>
<emiletrotignon> I do not know if there is an option for that. This should probably be an option, for me parenthesis removal is one of the great features of ocamlformat because it remove the need to know about priority (it even teaches the priority of operations to some degree). Your need also seem legit.
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
Tuplanolla has joined #ocaml
Absalom has quit [Quit: Ping timeout (120 seconds)]
Absalom has joined #ocaml
Anarchos has quit [Ping timeout: 248 seconds]
Anarchos has joined #ocaml
bartholin has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Anarchos has joined #ocaml
toastal has left #ocaml [Disconnected: Hibernating too long]
olle_ has joined #ocaml
Serpent7776 has quit [Ping timeout: 246 seconds]
<Anarchos>
is it possible to have a.mly grammar whose token type is an extensible variant defined in a module A , to use the parser inside A ?
olle_ has quit [Ping timeout: 252 seconds]
<discocaml>
<contificate> You may be interested in the `--external-tokens` flag you can pass to menhir. That roughly lets you use a module that has a token type that you define. How flexible it is, I am unsure.
olle__ has joined #ocaml
<Anarchos>
<discocaml> <contificate>it is not menhir but it seems i can't use an extensible variant from within a module : https://0x0.st/X6zD.txt
<discocaml>
<contificate> I don't think you can use polymorphic variants as constructors for menhir tokens anyway. I'm unfamiliar with dypgen but you can basically guarantee it'll be more inflexible than menhir.
raskol has quit [Ping timeout: 252 seconds]
<Anarchos>
contificate, yes it seems i can't define the parser inside the module. I wanted it to have signature 'type t = .. ;; val of_string : string -> t val to_string : t-> string'
bartholin has joined #ocaml
moe_ has joined #ocaml
moe_ has quit [Client Quit]
olle__ has quit [Ping timeout: 272 seconds]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Anarchos has joined #ocaml
<Anarchos>
Can A.ml{i} depends on B.mli and B.ml depends on module A ?
<discocaml>
<deepspacejohn> No. You'd have to take the parts they both depend on and move it to a third module.
raskol has joined #ocaml
pi3ce_ has quit [Read error: Connection reset by peer]
pi3ce has joined #ocaml
<discocaml>
<getzapped.> are there any ppx derivers out there for binary serialisation and deserialisation for custom types
bartholin has quit [Quit: Leaving]
<discocaml>
<getzapped.> or is the easiest option just compressed sexp strings
ygrek has quit [Remote host closed the connection]
<Anarchos>
<discocaml> <deepspacejohn> i find it weird cause A.ml{i} would only depends on B.cmi and B.ml just constains a renaming of a A.function
<discocaml>
<gooby_clown> ocaml-protoc does binary as well iirc
<Anarchos>
my usual trick is to use to circumvent recursive .ml files is to instantiate the concerned values to " ref None" that i instantiante later in the cycle
<discocaml>
<gooby_clown> It's not a ppx but still
<companion_cube>
Yes, protobuf does binary, thankfully
<discocaml>
<gooby_clown> I think that was the whole point of the protocol
<discocaml>
<gooby_clown> But I might be mistaken
<companion_cube>
Absolutely, it has a json backend but more as a backup really
<companion_cube>
Protobuf is the more efficient format
Anarchos has quit [Quit: Vision[]: i've been blurred!]
<discocaml>
<darrenldl> @emiletrotignon not sure i follow why parenthesis removes the need to know about priority
Tuplanolla has quit [Quit: Leaving.]
eilvelia has quit [Quit: eilvelia]
YuGiOhJCJ has joined #ocaml
<discocaml>
<darrenldl> *parenthesis removal removes the need ...