turn off lazy evaluation in haskell

前端 未结 7 2024
长发绾君心
长发绾君心 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条回答
  •  自闭症患者
    2020-12-14 19:20

    You can enable the Strict pragma in a module, which will cause everything to be strict by default.

    https://ghc.haskell.org/trac/ghc/wiki/StrictPragma

提交回复
热议问题