Re: Closed Type Families: type checking dumbness? [was: separate instance groups]

2015-06-07 Thread Richard Eisenberg
This is all expected behavior. GHC's lazy overlap checking for class instances simply cannot apply to type families -- it would be unsound. I'm afraid I don't see what can be improved here. Richard On Jun 6, 2015, at 2:04 AM, AntC anthony_clay...@clear.net.nz wrote: From: AntC Date:

Re: Closed Type Families: type checking dumbness? [was: separate instance groups]

2015-06-07 Thread adam vogt
Hi, AntC's f can be done without -XOverlappingInstances http://lpaste.net/7559485273839501312, using the trick didn't work in #9918. I'm not sure extra syntax is justified to clean up this rare case. Regards, Adam On Sun, Jun 7, 2015 at 11:12 AM, Dan Doel dan.d...@gmail.com wrote: It

Re: Closed Type Families: type checking dumbness? [was: separate instance groups]

2015-06-07 Thread Richard Eisenberg
That's right. You're suggesting instance chains [1][2]. [1]: https://ghc.haskell.org/trac/ghc/ticket/9334 [2]: http://web.cecs.pdx.edu/~mpj/pubs/instancechains.pdf Richard On Jun 7, 2015, at 11:12 AM, Dan Doel dan.d...@gmail.com wrote: It seems to me the problem is that there's no way to

Re: Closed Type Families: type checking dumbness? [was: separate instance groups]

2015-06-07 Thread Dan Doel
It seems to me the problem is that there's no way to define classes by consecutive cases to match the family definitions. I don't know what a good syntax for that would be, since 'where' syntax is taken for those. But it seems like it would correspond fill the hole here. On Sun, Jun 7, 2015 at