Haskellers,
recently I've been looking into the possibility of creating some new
optimisations for GHC. These
would be mostly aimed at list comprehensions. Here's where I need your help:
1. Do you have complex list comprehensions usage examples from real code? By
complex I mean
nested list
Hi Janek,
yes to both -- in a way. See Section 5.3 here for lists:
http://dl.acm.org/citation.cfm?id=2543736
For my usual work, I use stream fusion and manually 'flatten' everything
in all of ADPfusion and rather large bunch of other work building on top
of that. ;-)
Giegerich's original ADP is
Dear all,
while still not understanding kinds and type families well enough, my
random explorations have led me to finding syntax which currently is
accepted in 7.8.3 but seems to be surprising as well. This is to mean
the code is probably bogus, but GHC somehow manages not to notice.
If I write:
This seems to be a bug in GHC. I can write the Show instance manually:
instance (Show c, Show d) = Show (CmpInterval (V c) (V d)) where
show (c `Interval` d) = show c ++ `Interval` ++ show d
Perhaps you should file a bug report -- your code looks sensible to me.
Richard
On Jul 23, 2014, at
Dear GHC-ers,
I'm working on a plugin for GHC that should help compile the library with which
this plugin is to ship. What this plugin does is traverse the CoreProgram(s) to
find things of types defined in my library and optimizes them. I have worked
out how to find things, but I was wondering
Have you considered using HERMIT for this? I think this is a rough
approximation of what you are trying to do (using HERMIT):
import HERMIT.Plugin
import HERMIT.Dictionary
plugin = hermitPlugin $ \ opts - firstPhase $ run $ tryR $ innermostR
$ promoteBindR compileFooBindR
compileFooBindR ::