12 Nov 2012 02:24
How to use `trace` while debuging GHC
Iavor Diatchki <iavor.diatchki <at> gmail.com>
2012-11-12 01:24:06 GMT
2012-11-12 01:24:06 GMT
Hello,
While working on GHC sometimes I find it useful to dump the values of intermediate expressions, perhaps in the middle of pure code, using a combination of `trace` and `ppr`. The issue is that `ppr` returns an `SDoc`, and to turn an `SDoc` into a `String`, I need some `DynFlags`.
There used to be a value called `tracingDynFlags` that I could use to dump values, but it has disappeared... Did it get moved somewhere, or is there a better way to get the same effect?
-Iavor
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users <at> haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RSS Feed