[Haskell-beginners] debugging help

Thomas Jakway tjakway at nyu.edu
Sat Dec 5 17:11:57 UTC 2015


I wouldn't approach this from that perspective.  If it's just a small 
codebase you might want to just grep -R "printf" . and look through each 
statement.  To be honest I've never really used ghci for debugging (I'm 
definitely a beginner) but getting a stack trace seems like overkill and 
I'd be willing to bet ghci would be more productive anyway.  If you 
really want to though the flag is -prof. To compile the library with it 
you could edit the .cabal file and add it under ghc-options.
or cabal build --ghc-options="-prof" would probably also work.

(if I'm wrong about any of the above I'd really appreciate it if someone 
more experienced than me would correct me so I don't make the same 
mistakes!)

On 12/4/15 7:50 PM, Dennis Raddle wrote:
> I'm getting an error, printf not having enough arguments. I need to 
> find where this is happening, and I understand there are ways of 
> getting a stack trace, but apparently I need to compile for profiling. 
> That means I need to compile my one library dependency 
> (Text.XML.Light) for profiling, I believe. How do I do this? I'm on 
> Windows and have only installed libraries in the past with cabal.
>
> D
>
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20151205/9e6abc66/attachment.html>


More information about the Beginners mailing list