2 ms·
Inside the boxes, you might use a (State SymbolTable) monad to carry around the symbol table: type SymbolTable = Map String Symbol Me and a codeveloper are
by Peaker 13y ago
Inside the boxes, you might use a (State SymbolTable) monad to carry around the symbol table:
type SymbolTable = Map String Symbol
Me and a codeveloper are working on a type system in Haskell, where our current code has iterative computation, until it reaches a fixpoint.
Here's the iterative code:
https://github.com/Peaker/lamdu/blob/master/Lamdu/Data/Expression/Infer.hs#L286 https://github.com/Peaker/lamdu/blob/master/Lamdu/Data/Expre...
If you need to internally carry state, you just use a State monad to thread around the state purely.