
Thomas Hoopl works on control flow graphs, whereas Core is lambda calculus. I really don’t think Hoopl is going to be any good for optimising Core. Ask the ghc-devs mailing list too. Someone there has been writing about arrows recently (take a look at the archive). Simon From: Thomas Bereknyei [mailto:tomberek@gmail.com] Sent: 02 March 2015 17:07 To: nr@cs.tufts.edu; Simon Peyton Jones Subject: Hoopl and Arrows I've been interested in Arrows and their optimization recently. I've run into problems during basic tooling so I built a quasiquoter for proc notation (still working on rec and let statements, but the rest of it works) that converts from haskell-src-exts into a desugarred TH format. My original goal was to implement "Casual Commutative Arrows" [1] but to make it more user friendly and to include arrows with effects. I came across Hoopl and at first glance I would think it can help with Arrow optimization, especially with the tuple shuffling from desuggared proc-do notation. In spite of the slogan of "Hoopl: Dataflow Optimization made Simple" and the git repo's testing folder, I'm not 100% clear on Hoopl usage. I would be interested in anything that can get me started or even a thought or two whether it would be worth looking into for Arrows. Simon, regarding [2], my quasiquoter can be rewritten to take `bind`, `bind_`, `fixA`, and `ifThenElseA` from scope rather than being built in. Would that help with #7828? I am not very familiar with GHC internals at the moment, and I am confused about the complexity of dsArrows.hs in contrast with my own parser. It seems I have a good start on it in the Parser module at [3], WARNING: untested and rough draft code, though suggestions and pointers are welcome. I was thinking of sending some of my code to haskell-src-meta because they can't yet translate their version of Exp into TH's ExpQ. -Tom [1] (https://hackage.haskell.org/package/CCA) [2] (https://ghc.haskell.org/trac/ghc/ticket/7828#comment:54) [3] (https://www.fpcomplete.com/user/tomberek/rulestesting)