分析选项不适用于光泽度,即使安装了光泽度并启用了库分析~/.cabal/config
,
示例:Test.hs
import Graphics.Gloss
main = display (InWindow "test" (800, 600) (200, 200)) black blank
编译和运行:
$ ghc Test.hs
[1 of 1] Compiling Test ( Test.hs, Test.o )
Linking Test ...
$ ./Test +RTS -s
然后我用窗口的 x 按钮关闭窗口,但没有任何 gc 输出。
如果我将 Test.hs 更改为main = print "test"
并重复这些步骤,它会输出一些与垃圾收集相关的信息,这就是应该发生的情况。