Haskell as a scripting language

Are there any 1 2 redistributable solutions for loading Haskell 3 scripts from a Haskell program?

1 Statically linked; you don’t need the end user to install ghc or have something special in PATH.

2 i.e. library plus some settings at my end.

3 They are written in Haskell and have access to a certain set of characters exported from the program that performs the download. It is important. I managed to download and run the code snippets with a hint, but I could not get them to see any characters in my program, as script systems usually work.

+3
source share
1 answer

Idea # 1: If you want the code to have access to certain functions, you could just pass those functions as arguments. (May not work well if there are a lot of them.)

Idea # 2: FFI allows you to export characters to C, so you can import them back into Haskell on the other hand. Probably ugly though.

+1
source

All Articles