我有一个Haskell项目,我想要在引发异常时获取堆栈跟踪。我使用GHC 8.0.2和模块Graphics.UI.GLUT
,其中GLUT的版本是2.7.0.11。如何在Ubuntu 14.04.5中使用cabal时在Haskell中安装性能分析库?
我已经使用cabal安装了模块。
This page from the official website建议我使用-prof
标志进行编译。但是,我收到以下错误
Failed to load interface for ‘Graphics.UI.GLUT’
Perhaps you haven't installed the profiling libraries for package ‘GLUT-2.7.0.11’?
Use -v to see a list of the files searched for.
我使用的是Ubuntu 14.04.5 LTS。使用this link,我决定运行
sudo apt-get install libghc-glut-prof
然而,这并没有解决问题。我该如何解决这个问题?
谢谢。
如果你真的使用从Ubuntu安装的'Graphics.UI.GLUT'(通过'libghc-glut-dev'包),它应该解决了这个问题。你确定你没有通过'cabal'('cabal install glut')安装'glut'吗? –
@JoachimBreitner我想我使用cabal安装。这种情况下应该怎么解决? – GoodDeeds