Looking for list comprehensions use cases

2014-07-23 Thread Jan Stolarek
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

Re: Looking for list comprehensions use cases

2014-07-23 Thread Christian Höner zu Siederdissen
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

Re: Type family stopped compiling on upgrade from GHC 7.6.3 to 7.8.3

2014-07-23 Thread cheater00 .
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:

Re: Type family stopped compiling on upgrade from GHC 7.6.3 to 7.8.3

2014-07-23 Thread Richard Eisenberg
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

GhcPlugin-writing and finding things

2014-07-23 Thread p.k.f.holzenspies
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

Re: GhcPlugin-writing and finding things

2014-07-23 Thread Andrew Farmer
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 ::