[Git][ghc/ghc][wip/nr/wasm-control-flow] 2 commits: add the two key graph modules from Martin Erwig's FGL
Norman Ramsey (@nrnrnr)
gitlab at gitlab.haskell.org
Tue Aug 9 19:48:05 UTC 2022
Norman Ramsey pushed to branch wip/nr/wasm-control-flow at Glasgow Haskell Compiler / GHC
Commits:
3670bad8 by Norman Ramsey at 2022-08-09T15:46:39-04:00
add the two key graph modules from Martin Erwig's FGL
Martin Erwig's FGL (Functional Graph Library) provides an "inductive"
representation of graphs. A general graph has labeled nodes and
labeled edges. The key operation on a graph is to decompose it by
removing one node, together with the edges that connect the node to
the rest of the graph. There is also an inverse composition
operation.
The decomposition and composition operations make this representation
of graphs exceptionally well suited to implement graph algorithms in
which the graph is continually changing, as alluded to in #21259.
This commit adds `GHC.Data.Graph.Inductive.Graph`, which defines the
interface, and `GHC.Data.Graph.Inductive.PatriciaTree`, which provides
an implementation. Both modules are taken from `fgl-5.7.0.3` on
Hackage, with these changes:
- Copyright and license text have been copied into the files
themselves, not stored separately.
- Some calls to `error` have been replaced with calls to `panic`.
- Conditional-compilation support for older versions of GHC,
`containers`, and `base` has been removed.
- - - - -
e523867d by Norman Ramsey at 2022-08-09T15:47:16-04:00
add new modules for reducibility and WebAssembly translation
also includes an emitter for GNU assembler code and some regression tests
- - - - -
30 changed files:
- + compiler/GHC/Cmm/Reducibility.hs
- + compiler/GHC/Data/Graph/Collapse.hs
- + compiler/GHC/Data/Graph/Inductive/Graph.hs
- + compiler/GHC/Data/Graph/Inductive/PatriciaTree.hs
- + compiler/GHC/Wasm/ControlFlow.hs
- + compiler/GHC/Wasm/ControlFlow/FromCmm.hs
- + compiler/GHC/Wasm/ControlFlow/ToAsm.hs
- compiler/ghc.cabal.in
- testsuite/tests/linters/notes.stdout
- + testsuite/tests/wasm/should_run/control-flow/ActionsAndObservations.hs
- + testsuite/tests/wasm/should_run/control-flow/BitConsumer.hs
- + testsuite/tests/wasm/should_run/control-flow/CmmPaths.hs
- + testsuite/tests/wasm/should_run/control-flow/ControlTestMonad.hs
- + testsuite/tests/wasm/should_run/control-flow/EntropyTransducer.hs
- + testsuite/tests/wasm/should_run/control-flow/LoadCmmGroup.hs
- + testsuite/tests/wasm/should_run/control-flow/README.md
- + testsuite/tests/wasm/should_run/control-flow/RunCmm.hs
- + testsuite/tests/wasm/should_run/control-flow/RunWasm.hs
- + testsuite/tests/wasm/should_run/control-flow/WasmControlFlow.hs
- + testsuite/tests/wasm/should_run/control-flow/WasmControlFlow.stdout
- + testsuite/tests/wasm/should_run/control-flow/all.T
- + testsuite/tests/wasm/should_run/control-flow/src/Church.hs
- + testsuite/tests/wasm/should_run/control-flow/src/Closure.hs
- + testsuite/tests/wasm/should_run/control-flow/src/FailingLint.hs
- + testsuite/tests/wasm/should_run/control-flow/src/Irr.hs
- + testsuite/tests/wasm/should_run/control-flow/src/Irr2.hs
- + testsuite/tests/wasm/should_run/control-flow/src/Irr3.hs
- + testsuite/tests/wasm/should_run/control-flow/src/Irr4.hs
- + testsuite/tests/wasm/should_run/control-flow/src/Length.hs
- + testsuite/tests/wasm/should_run/control-flow/src/Map.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c430e47069cef278914f48ee671dbc70d8965737...e523867ddfb385fb0dc4a65e2fc7c06d4dbe4ac6
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c430e47069cef278914f48ee671dbc70d8965737...e523867ddfb385fb0dc4a65e2fc7c06d4dbe4ac6
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20220809/df9b7b13/attachment-0001.html>
More information about the ghc-commits
mailing list