MicroHs icon indicating copy to clipboard operation
MicroHs copied to clipboard

Use as an interpreter

Open starmonger999 opened this issue 2 years ago • 1 comments

Is there a way to use MicroHs as an embedded interpreter/scripting language inside regular haskell like

import MicroHs
main = putStrLn $ microhs_run "case 1+1 of 2 -> True; _ -> False"

I think this would be great lightweight alternative to lua/hint. I guess this would require the runtime system to be ported to Haskell/MicroHs?

starmonger999 avatar Jan 22 '24 21:01 starmonger999

There is no way right now, but it would be pretty easy to add. But would it be light weight? It would need many MBytes of memory. And to be fast it would also need a saved cache which isn't small.

It's an idea, though. So I'll add it to my TODO list.

augustss avatar Jan 22 '24 23:01 augustss