Re: [Haskell-cafe] Playing with ATs again

2010-08-05 Thread Andrew Coppin
Ivan Lazar Miljenovic wrote: Don't forget, GHC is open source: if this lack really was dumb and annoying you, there was nothing stopping you from rectifying this situation up until now. Except that, in the real world, this is actually completely infeasible. Yes, I know it's the basic

Re: [Haskell-cafe] Playing with ATs again

2010-08-05 Thread Andrew Coppin
Victor Nazarov wrote: I think it is more simple like: class Bijection a b where ... type LeftToRight a = (Bijection a b) = b type RightToLeft b = (Bijection a b) = a Hmm, yes... That looks like it could work. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Playing with ATs again

2010-08-05 Thread Gregory Crosswhite
On 8/4/10 11:40 PM, Andrew Coppin wrote: Ivan Lazar Miljenovic wrote: Don't forget, GHC is open source: if this lack really was dumb and annoying you, there was nothing stopping you from rectifying this situation up until now. Except that, in the real world, this is actually completely

Re: [Haskell-cafe] Playing with ATs again

2010-08-05 Thread Ivan Lazar Miljenovic
On 5 August 2010 16:48, Gregory Crosswhite gcr...@phys.washington.edu wrote:  On 8/4/10 11:40 PM, Andrew Coppin wrote: Ivan Lazar Miljenovic wrote: Don't forget, GHC is open source: if this lack really was dumb and annoying you, there was nothing stopping you from rectifying this situation

Re: [Haskell-cafe] Playing with ATs again

2010-08-05 Thread Andrew Coppin
Ivan Lazar Miljenovic wrote: On 5 August 2010 16:48, Gregory Crosswhite gcr...@phys.washington.edu wrote: On 8/4/10 11:40 PM, Andrew Coppin wrote: Ivan Lazar Miljenovic wrote: Don't forget, GHC is open source: if this lack really was dumb and annoying you, there was nothing

Re: [Haskell-cafe] Playing with ATs again

2010-08-05 Thread Ivan Lazar Miljenovic
Andrew Coppin andrewcop...@btinternet.com writes: Well *I* didn't say that anything was dumb. I was merely pointing out that the much-touched do it yourself benefit of OSS is actually out of most people's reach. There surely can't be many people alive on Earth who actually understand type

Re: [Haskell-cafe] Playing with ATs again

2010-08-05 Thread Ryan Ingram
On Wed, Aug 4, 2010 at 11:55 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 5 August 2010 16:48, Gregory Crosswhite gcr...@phys.washington.edu wrote:  On 8/4/10 11:40 PM, Andrew Coppin wrote: Ivan Lazar Miljenovic wrote: Don't forget, GHC is open source: if this lack really

Re: [Haskell-cafe] Playing with ATs again

2010-08-05 Thread Felipe Lessa
On Thu, Aug 5, 2010 at 7:18 AM, Ryan Ingram ryani.s...@gmail.com wrote: I actually think it's a testament to the quality of GHC that things just work so often that I can be so surprised when they don't. Well said. That's the feeling most Haskellers have, and that's part of the awesomeness of

Re: [Haskell-cafe] Playing with ATs again

2010-08-04 Thread Victor Nazarov
On Tue, Aug 3, 2010 at 9:45 PM, Ryan Ingram ryani.s...@gmail.com wrote: So I believe the final way to do this, which is not yet implemented, works something like this: type family LeftToRight a type family RightToLeft b class (LeftToRight a ~ b, RightToLeft b ~ a) = Bijection a b where  

Re: [Haskell-cafe] Playing with ATs again

2010-08-04 Thread Ivan Lazar Miljenovic
On 4 August 2010 03:45, Ryan Ingram ryani.s...@gmail.com wrote: So I believe the final way to do this, which is not yet implemented, works something like this: type family LeftToRight a type family RightToLeft b class (LeftToRight a ~ b, RightToLeft b ~ a) = Bijection a b where   ... I

[Haskell-cafe] Playing with ATs again

2010-08-03 Thread Andrew Coppin
OK, so if you do something like class Container c where type Element c :: * then we now have a clean and concise way to discover what type of element any given container holds. (Regardless of whether it's element type is parametric, hard-coded, class-constrained or anything else.) I

Re: [Haskell-cafe] Playing with ATs again

2010-08-03 Thread Ryan Ingram
So I believe the final way to do this, which is not yet implemented, works something like this: type family LeftToRight a type family RightToLeft b class (LeftToRight a ~ b, RightToLeft b ~ a) = Bijection a b where ... I agree, the fact that this doesn't work is really dumb. I used a

Re: [Haskell-cafe] Playing with ATs again

2010-08-03 Thread Alexey Khudyakov
On 03.08.2010 21:25, Andrew Coppin wrote: Now suppose that instead of a container type with an associated element type, what we want is several pairs of types having a one-to-one relationship, and we want to be able to traverse that relationship in either direction. What's the best way to do