RE: Fundeps and type equality

2013-01-11 Thread Simon Peyton-Jones
...@haskell.org; Simon Peyton-Jones; GHC Users Mailing List Subject: Re: Fundeps and type equality Yes, I finished and pushed in December. A description of the design and how to use the feature is here: http://hackage.haskell.org/trac/ghc/wiki/NewAxioms There's also a section (7.7.2.2 to be exact

Re: Fundeps and type equality

2013-01-11 Thread Richard Eisenberg
; Simon Peyton-Jones; GHC Users Mailing List Subject: Re: Fundeps and type equality Yes, I finished and pushed in December. A description of the design and how to use the feature is here: http://hackage.haskell.org/trac/ghc/wiki/NewAxioms There's also a section (7.7.2.2 to be exact

RE: Class instance specificity order (was Re: Fundeps and type equality)

2013-01-11 Thread Simon Peyton-Jones
| The -XOverlappingInstances flag instructs GHC to allow more than one | instance to match, provided there is a most specific one. For example, | the constraint C Int [Int] matches instances (A), (C) and (D), but the | last is more specific, and hence is chosen. If there is no most-specific |

Re: Fundeps and type equality

2013-01-11 Thread Carter Schonwald
Of *Iavor Diatchki *Sent:* 26 December 2012 02:48 *To:* Conal Elliott *Cc:* glasgow-haskell-b...@haskell.org; GHC Users Mailing List *Subject:* Re: Fundeps and type equality ** ** Hello Conal, ** ** GHC implementation of functional dependencies is incomplete: it will use functional

Re: Fundeps and type equality

2013-01-11 Thread Richard Eisenberg
2012 02:48 To: Conal Elliott Cc: glasgow-haskell-b...@haskell.org; GHC Users Mailing List Subject: Re: Fundeps and type equality Hello Conal, GHC implementation of functional dependencies is incomplete: it will use functional dependencies during type inference (i.e., to determine

Re: Class instance specificity order (was Re: Fundeps and type equality)

2013-01-11 Thread Tyson Whitehead
On January 11, 2013 13:55:58 Simon Peyton-Jones wrote: | The -XOverlappingInstances flag instructs GHC to allow more than one | instance to match, provided there is a most specific one. For example, | the constraint C Int [Int] matches instances (A), (C) and (D), but the | last is more

Re: Fundeps and type equality

2013-01-11 Thread Carter Schonwald
*To:* Conal Elliott *Cc:* glasgow-haskell-b...@haskell.org; GHC Users Mailing List *Subject:* Re: Fundeps and type equality ** ** Hello Conal, ** ** GHC implementation of functional dependencies is incomplete: it will use functional dependencies during type inference (i.e

Re: Fundeps and type equality

2013-01-10 Thread Richard Eisenberg
: 26 December 2012 02:48 To: Conal Elliott Cc: glasgow-haskell-b...@haskell.org; GHC Users Mailing List Subject: Re: Fundeps and type equality Hello Conal, GHC implementation of functional dependencies is incomplete: it will use functional dependencies during type inference (i.e

Re: Fundeps and type equality

2013-01-10 Thread Carter Schonwald
:* glasgow-haskell-b...@haskell.org; GHC Users Mailing List *Subject:* Re: Fundeps and type equality ** ** Hello Conal, ** ** GHC implementation of functional dependencies is incomplete: it will use functional dependencies during type inference (i.e., to determine the values of free type

Class instance specificity order (was Re: Fundeps and type equality)

2013-01-10 Thread Tyson Whitehead
On January 10, 2013 13:56:02 Richard Eisenberg wrote: Class instances that overlap are chosen among by order of specificity; Sorry to jump in the middle here, but this caught my attention as this sort of specificity determination is exactly what I had in mind when I was working on my The shape

RE: Class instance specificity order (was Re: Fundeps and type equality)

2013-01-10 Thread Simon Peyton-Jones
-haskell-users@haskell.org | Cc: Richard Eisenberg; Martin Sulzmann; Simon Peyton-Jones | Subject: Class instance specificity order (was Re: Fundeps and type equality) | | On January 10, 2013 13:56:02 Richard Eisenberg wrote: | Class instances that overlap are chosen among by order of specificity

RE: Class instance specificity order (was Re: Fundeps and type equality)

2013-01-10 Thread Tyson Whitehead
On Thu, 2013-01-10 at 22:17 +, Simon Peyton-Jones wrote: Is http://www.haskell.org/ghc/docs/latest/html/users_guide/type-class-extensions.html#instance-overlap insufficiently clear? If so, let's clarify it. Thanks for getting back to me Simon. The document says For example, consider

Re: Fundeps and type equality

2013-01-10 Thread Richard Eisenberg
December 2012 02:48 To: Conal Elliott Cc: glasgow-haskell-b...@haskell.org; GHC Users Mailing List Subject: Re: Fundeps and type equality Hello Conal, GHC implementation of functional dependencies is incomplete: it will use functional dependencies during type inference (i.e

Re: Fundeps and type equality

2013-01-10 Thread Martin Sulzmann
...@haskell.org] *On Behalf Of *Iavor Diatchki *Sent:* 26 December 2012 02:48 *To:* Conal Elliott *Cc:* glasgow-haskell-b...@haskell.org; GHC Users Mailing List *Subject:* Re: Fundeps and type equality ** ** Hello Conal, ** ** GHC implementation of functional dependencies

RE: Fundeps and type equality

2013-01-02 Thread Simon Peyton-Jones
: 26 December 2012 02:48 To: Conal Elliott Cc: glasgow-haskell-b...@haskell.org; GHC Users Mailing List Subject: Re: Fundeps and type equality Hello Conal, GHC implementation of functional dependencies is incomplete: it will use functional dependencies during type inference (i.e., to determine

Re: Fundeps and type equality

2013-01-02 Thread Martin Sulzmann
-haskell-bugs-boun...@haskell.org] *On Behalf Of *Iavor Diatchki *Sent:* 26 December 2012 02:48 *To:* Conal Elliott *Cc:* glasgow-haskell-b...@haskell.org; GHC Users Mailing List *Subject:* Re: Fundeps and type equality ** ** Hello Conal, ** ** GHC implementation of functional

Re: Fundeps and type equality

2012-12-26 Thread Conal Elliott
Hi Iavor, Thanks much for the explanation. Before this experiment with FDs, I was using a type family. I tried switching to FDs, because I wanted the compiler to know that the family is injective in order to assist type-checking. Can we declare type families to be injective? Now I see that I ran

Re: Fundeps and type equality

2012-12-26 Thread Roman Cheplyaka
I presume that injectivity of type families is the sole reason why data families exist. Roman * Conal Elliott co...@conal.net [2012-12-26 10:23:46-0800] Hi Iavor, Thanks much for the explanation. Before this experiment with FDs, I was using a type family. I tried switching to FDs,

Re: Fundeps and type equality

2012-12-26 Thread Brent Yorgey
I don't think that's true (though a few minutes of searching has not yet turned up anything describing the original motivation for data families). Sometimes you really do want to construct a family of new data types, instead of just mapping to existing ones. I think everyone agrees that using

Re: Fundeps and type equality

2012-12-26 Thread Roman Cheplyaka
* Brent Yorgey byor...@seas.upenn.edu [2012-12-26 14:49:16-0500] I don't think that's true (though a few minutes of searching has not yet turned up anything describing the original motivation for data families). Sometimes you really do want to construct a family of new data types, instead of

Re: Fundeps and type equality

2012-12-25 Thread Iavor Diatchki
Hello Conal, GHC implementation of functional dependencies is incomplete: it will use functional dependencies during type inference (i.e., to determine the values of free type variables), but it will not use them in proofs, which is what is needed in examples like the one you posted. The reason