"s" 在 "sprint" GHCi 命令中是什么意思?

What does "s" mean in the "sprint" GHCi command?

"s" 在 :sprint GHCi 命令的名称中是什么意思? 这里是 the description from the official documentation,为您提供一些背景信息:

sprint : Prints a value without forcing its evaluation. :sprint is similar to :print, with the difference that unevaluated subterms are not bound to new variables, they are simply denoted by ‘_’.

如您所见,GHC 用户指南中 :sprint 的描述并未提及此事。根据 Julie Moronuki 和 Chris Martin 的 :sprint entry typeclasses.com...

The s stands for “simple,” the idea being that :sprint is in some sense a simplified version of the :print command, since :sprint does less work.


could it be 's' for strictness ?

大概不是,:sprint:print 的重点在于,从某种意义上说,它们是

  1. 输入ghci

  2. 输入:?

  3. 您将获得:Commands available from the prompt:

  4. 查找 sprintf: 文档

    :sprint [<name> ...] simplified version of :print