turn off lazy evaluation in haskell

前端 未结 7 2031
长发绾君心
长发绾君心 2020-12-14 19:03

Is it possible to turn off lazy evaluation in Haskell?

Is there a specific compiler flag of library to facilitate this?

I wanted to try something new with

7条回答
  •  Happy的楠姐
    2020-12-14 19:21

    In addition to what Daniel Wagner listed you may want to take a look at a similar question Is there a Haskell compiler or preprocessor that uses strict evaluation?.

    • Answers include the DDC compiler which attempts to make an strict version of haskell and only lazy explicitly
    • ghc plugin described in monad.reader 12
    • "Using nfdata and rnf everywhere" - solrize
    • and more

    The predominate suggestion is to use profiling tools and learn how to optimize Haskell as it is however, since most would consider it a different language with non-strict evaluation turned off.

提交回复
热议问题