<discocaml>
<darrenldl> is Thread the cheapest way to get lightweight preemption in ocaml 5?
<discocaml>
<octachron> Yes as far as I know.
Techcable has joined #ocaml
bartholin has quit [Quit: Leaving]
waleee has joined #ocaml
spip has joined #ocaml
<discocaml>
<xavierm02> Given the definition of mutually recursive types, what is the simplest way of obtaining a function that interprets them in an arbitrary way (i.e. maps each constructor to a function, and evaluates the result)?
<discocaml>
<xavierm02> I tried building the function in a somewhat modular way by defining each type on its own by making it polymorphic over the other to-be-defined types, but when I combine the definitions, I get an error saying that the definition is cyclic. I then tried taking the to-be-defined types as an argument to a functor, and to then use a recursive module to combine them together. This seems to work, but I'm not entirely happy with it because I need to
<discocaml>
<bnguyenv> I think you just need to write `type thing = Thing of other Thing.t and other = thing Other.t` with a constructor.
<discocaml>
<bnguyenv> For the first version to work.
<discocaml>
<darrenldl> @octachron thanks!
wingsorc has quit [Ping timeout: 240 seconds]
EmmaBonestell has quit [Ping timeout: 268 seconds]
waleee has quit [Remote host closed the connection]
waleee has joined #ocaml
<discocaml>
<xavierm02> @bnguyenv Hm. I'd prefer a solution that doesn't add a superfluous constructor that wasn't there in the initial mutually recursive definition. But this looks far more reasonable than my attempts with recursive modules, and if I can always [@@unboxed] the types. Thanks!
<discocaml>
<xavierm02> I wanted to be a bit more modular. The two inductives are like a normal calculus (ints, addition, ...) and a somewhat orthogonal module-like system, and there is a priori no reason for them to be this tightly coupled.
Serpent7776 has quit [Ping timeout: 268 seconds]
bartholin has joined #ocaml
waleee has quit [Ping timeout: 240 seconds]
waleee has joined #ocaml
waleee has quit [Ping timeout: 258 seconds]
Tuplanolla has joined #ocaml
dhil has quit [Quit: Leaving]
waleee has joined #ocaml
Serpent7776 has joined #ocaml
wingsorc__ has joined #ocaml
<discocaml>
<Et7f3 (@me on reply)> Yay #github-ocaml-feedwe have all github repos 🙂
greaser|q has quit [Changing host]
greaser|q has joined #ocaml
greaser|q is now known as GreaseMonkey
gentauro has quit [Ping timeout: 240 seconds]
Serpent7776 has quit [Ping timeout: 240 seconds]
gentauro has joined #ocaml
ds-ac has quit [Ping timeout: 265 seconds]
szkl has joined #ocaml
bgs has quit [Remote host closed the connection]
bartholin has quit [Quit: Leaving]
SquidDev has quit [Server closed connection]
SquidDev has joined #ocaml
wingsorc__ has quit [Ping timeout: 258 seconds]
<discocaml>
<functionalprogramming> why does this print "what324"