Not in only could be embedded, but also compiled into dynamically linked library.
(Shameless plug) I've collected examples of this here: https://github.com/drdaeman/haskell-library-ffi-example
The nice thing about this example is that you only need GHC to create the shared library, and then GCC can do the rest with just the .so file produced.
Doesn't Haskell compile first to C and then to native?
Not since GHC 7.0: http://www.haskell.org/ghc/docs/7.4.2/html/users_guide/code-...
Re:TLS/SSL implementation in Haskell
by stefantalpalaru on Wednesday April 09, 2014 @06:08AM
(#7558507)
More critically, it would only be useful to Haskell code. Haskell, unless C, cannot be embedded. Having a version in Rust - which does not rely on the runtime - ought to be safe from this kind of issue (baring any problem in Rust itself) while being still embeddable from external code. It would still be somewhat slower than C, and of course Rust is far from mature.