This commit is contained in:
Aaron Allen 2021-11-21 20:04:20 -06:00
parent 3d151865ea
commit 4a6fff5f82
6 changed files with 21 additions and 21 deletions

View File

@ -1,7 +1,7 @@
# Debugger Plugin
# Graph Trace
A plugin that a creates a log file which can be compiled to a graph for display
with `graphviz` or some other means. Contrary to traditional debug logging
where all output is interleaved into a flat sequence of lines, the graph
structure produced by this plugin takes into account the actual flow of the
program with individual function calls represented as edges in the graph.
A ghc plugin that a creates a log file which can be compiled to a graph for
display with `graphviz` or some other means. Contrary to traditional debug
tracing where all output is interleaved into a flat sequence of lines, the
graph structure produced by this plugin takes into account the actual flow of
the program with individual function calls represented as edges in the graph.

View File

@ -98,15 +98,15 @@ data T f =
, t2 :: f String
}
zzzz :: T FieldUpdate -> T Maybe -> T Maybe
zzzz update orig =
let updater :: (forall a. T a -> a x) -> Maybe x
updater -- | let ?x = 1
= mkUpdater update orig
in MkT
{ t1 = updater t1
, t2 = updater t2
}
-- zzzz :: T FieldUpdate -> T Maybe -> T Maybe
-- zzzz update orig =
-- let updater :: (forall a. T a -> a x) -> Maybe x
-- updater -- | let ?x = 1
-- = mkUpdater update orig
-- in MkT
-- { t1 = updater t1
-- , t2 = updater t2
-- }
-- fzzz :: (?_debug_ip :: Maybe DebugIPTy) => T FieldUpdate -> T Maybe -> T Maybe
-- fzzz update orig = entry $

View File

@ -1,6 +1,6 @@
cabal-version: >=1.10
name: debug-plugin
name: graph-trace
version: 0.1.0.0
-- synopsis:
-- description:
@ -38,15 +38,15 @@ executable exe
other-modules: Class
-- other-extensions:
build-depends: base
, debug-plugin
, graph-trace
, random
-- hs-source-dirs:
default-language: Haskell2010
executable debug-visualizer
executable graph-trace-viz
default-language: Haskell2010
main-is: Main.hs
build-depends: base
, containers
, bytestring
hs-source-dirs: debug-visualizer
hs-source-dirs: graph-trace-viz

View File

@ -2,5 +2,5 @@
rm debug_log.txt
cabal v2-build
cabal v2-exec exe
cabal v2-exec debug-visualizer
cabal v2-exec graph-trace-viz
dot -Tsvg debug.dot > test.svg

View File

@ -172,7 +172,7 @@ modifyClsInstDecl debugNames nameMap
pure inst { Ghc.cid_binds = newBinds }
#if MIN_VERSION_ghc(9,0,0)
#else
modifyClsInstDecl _ _ _ _ x = pure x
modifyClsInstDecl _ _ x = pure x
#endif
-- | Matches on type signatures in order to add the constraint to them.