Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/haskell/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Haskell 如何使用stack和GHCI获取stacktraces?_Haskell_Ghci_Haskell Stack - Fatal编程技术网

Haskell 如何使用stack和GHCI获取stacktraces?

Haskell 如何使用stack和GHCI获取stacktraces?,haskell,ghci,haskell-stack,Haskell,Ghci,Haskell Stack,与 我得到: stack ghci --profile --ghci-options '+RTS -xc -RTS' 哪个程序不是用-prof构建的,为什么 ghc: the flag -xc requires the program to be built with -prof 以上内容似乎对我有效(确实需要几秒钟才能开始)。我必须将以下内容添加到我的堆栈中。yaml: stack ghci --profile app --ghci-options "-fexternal-interpre

我得到:

stack ghci --profile --ghci-options '+RTS -xc -RTS'
哪个程序不是用
-prof
构建的,为什么

ghc: the flag -xc requires the program to be built with -prof
以上内容似乎对我有效(确实需要几秒钟才能开始)。我必须将以下内容添加到我的
堆栈中。yaml

stack ghci --profile app --ghci-options "-fexternal-interpreter -prof"
更多信息:


我可能实际运行了一些额外的命令,可能是
堆栈构建--enable library profiling

,我猜没有使用profiling构建的程序是ghc。如果您想评测您的程序,您需要将
-xc
传递给您的程序,而不是ghci。我明白了。是否可以为解释代码及其运行的库启用
xc
标志?我认为不可能分析解释代码。
build:
  library-profiling: true
  executable-profiling: true