zetah11 / zippy

a smol functional/imperative programming language
MIT License
2 stars 0 forks source link

monomorphisation is bugged #18

Open zetah11 opened 1 year ago

zetah11 commented 1 year ago

There are two main problems with monomorphisation at the moment:

  1. There's no reuse of monomorphic functions with similar types
  2. Recursive functions mess up the monomorphiser

Basically we need some way to cache which instantiations we have, as well as a stack of which functions we are currently monomorphising.