Is there a quick-starting Haskell interpreter suitable for scripting?

前端 未结 5 1262
生来不讨喜
生来不讨喜 2021-02-01 06:49

Does anyone know of a quick-starting Haskell interpreter that would be suitable for use in writing shell scripts? Running \'hello world\' using Hugs took 400ms on my old laptop

5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-01 07:37

    You have two parts to this question:

    • you care about performance
    • you want scripting

    If you care about performance, the only serious option is GHC, which is very very fast: http://shootout.alioth.debian.org/u64q/benchmark.php?test=all&lang=all

    If you want something light for Unix scripting, I'd use GHCi. It is about 30x faster than Hugs, but also supports all the libraries on hackage.

    So install GHC now (and get GHCi for free).

提交回复
热议问题