How hard is it to add new things to the stan3 compiler?

I’m building out sparse matrix stuff for stan math and would like to make a branch with a sparse_matrix type in stan3. Is that reasonably feasable?

Looking over some of the code it looks like I would have to

  1. Add sparse_matrix to stuff in lexer.mll , parser.mly and a bunch of other places?
  2. Add (???) to
  3. ???
  4. Sparse Matrix!

I started reading over how ocaml works and the ast/Mir/Stan_math functions.

Can I start hacking away or should I first make the proposal spec?


Have you managed to get anything going on this? Interested in knowing this also, more of a long term thing than any specific short term ideas.

Otherwise just a bump for the thread :)

I’m particularly interested in how to link a high-order math function.