3 ms·
I wonder whether Haskell is on their todo list. GHC's LLVM backend [1] might be helpful. [1] http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backe
by jstepien 15y ago
I wonder whether Haskell is on their todo list. GHC's LLVM backend [1] might be helpful.
[1] http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler...
- max99x 15y agoI've spoken a little about the reason we couldn't use GHC among other things, at https://github.com/replit/repl.it/issues/43 https://github.com/replit/repl.it/issues/43. In short, we need an interpreter rather than a compiler or a JIT, and we need the interpreter itself to run in the browser.
- jstepien 15y agoThanks for a quick reply. So having GHCi - the GHC's REPL - successfully emscripted could make adding Haskell support possible, right?
- max99x 15y agoIf it uses a JIT internally, it will produce x86 machine code, which is meaningless to us since we aren't emulating the whole machine. If it doesn't, then emscripting it should work.
- WildUtah 15y agoHaskell won't run in a repl, will it? GHCi and Hugs demand that functions be specified in a script file and not at the prompt. Without functions, you really don't have very much of the Haskell language available. It's a partial repl with a fraction of the language at best.
- jstepien 15y agoNot necessarily. You can define functions in GHCi using let. $ ghci Prelude> let fact x = if x == 0 then 1 else x * fact (x - 1) Prelude> fact 6 720