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