fusion-plugin
fusion-plugin copied to clipboard
GHC plugin to make stream fusion more predictable
We have stopped supporting ghc-8.4.4 in streamly, can drop support here as well.
- Made separate modules for each ghc version in the hopes that maintaining them would become easier than the many nested if, else we have in cpp right now. -...
When I turn this on, haskell-language-server just says `Simplifier phase 0/"main" not found` and gives none of the other hints. Is there some additional setup required to get this to...
GHCJS-8.4 build failed here: https://app.circleci.com/pipelines/github/composewell/streamly/1398/workflows/c3b2c7b0-8af4-4000-948f-8126db769927/jobs/5089 when fusion-plugin was added to the cabal file.
We report: ``` fusion-plugin: Check unfused (final)... In $sfoldOnce_spag binders ["$sgo_sqbe"] SCRUTINIZE data types annotated with Fuse $sfoldOnce_spag/$sgo_sqbe: Yield $sfoldOnce_spag/$sgo_sqbe: Partial In lvl_sp7I binders ["lvl_sp7I"] CONSTRUCT data types annotated with...
We should have an option to report the functions/constructors that did not get fused. This will be a big aid to programmers to know where the performance problems might be....
1) Currently with the `dump-core` option we place the core files in the same directory as the source file. It pollutes the source directory. We can instead create a directory...
See [this note](https://github.com/composewell/streamly/blob/ad05792d0b361c4629fc3009f69e21988eeaae88/design/inlining.md#inlining-higher-order-functions) in streamly docs. It would be nice if we can infer the phase information by analyzing the program. If a higher order function is consuming another function...
The [`drain` combinator](https://github.com/composewell/streamly/blob/0d586750a769b358943c355ca0447a799fc17e65/src/Streamly/Internal/Data/Stream/Prelude.hs#L104) is marked to be inlined in phase 2. See [this commit](https://github.com/composewell/streamly/commit/0d586750a769b358943c355ca0447a799fc17e65) in the streamly repo. If the `readDrain` function is annotated plainly as `INLINE` then GHC is...
Currently, after the mark inline phase we run the simplifier on the whole program. Can it have some undesired consequences and slow down the code? Can we run the simplifier...