Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use as an interpreter #29

Open
starmonger999 opened this issue Jan 22, 2024 · 1 comment
Open

Use as an interpreter #29

starmonger999 opened this issue Jan 22, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@starmonger999
Copy link

starmonger999 commented Jan 22, 2024

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?

@augustss
Copy link
Owner

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 augustss added the enhancement New feature or request label Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants