Re: TypeFamilies vs. etc - TTypeable

2011-06-26 Thread Anthony Clayden
Thank you Oleg I have implemented type-level TYPEREP (along with a small library for higher-order functional programming at the type level). Overlapping instances may indeed be avoided. The library does not use functional dependencies either. So this is essentially the

Re: TypeFamilies vs. etc - restrained instance overlap

2011-06-26 Thread Anthony Clayden
Hi all THE TOPIC: [from the original post] TypeFamilies vs. FunctionalDependencies type-level recursion David Mazieres dm-list-haskell-prime at scs.stanford.edu Sun May 29 20:59:44 CEST 2011 ... GHC is on its way to accepting a ~ b as a constraint that types a and b are equal. If there were

Re: TypeFamilies vs. etc - TTypeable

2011-06-26 Thread dm-list-haskell-prime
At Sun, 26 Jun 2011 23:25:31 +1200, Anthony Clayden wrote: Totally brilliant, and almost impenetrable. If I understand what's going on (big IF), I'm wondering a few things: - You've used type-level NAT to encode the type. What if two different types get encoded as the same NAT? In

Proposal: fix simple pattern binding and declaration group

2011-06-26 Thread dm-list-haskell-prime
The Haskell 2010 report contains ambiguous and sometimes contradictory definitions of the terms simple pattern binding and declaration group. The confusion is compounded by the phrasing of the monomorphism restriction, which is carried over from the Haskell98 report in which a different

RE: Proposal: fix simple pattern binding and declaration group

2011-06-26 Thread Paterson, Ross
A recent thread on the haskell cafe mailing list summarizes the problem: http://www.haskell.org/pipermail/haskell-cafe/2011-June/093488.html To resolve this confusion, I propose applying the following changes to the Haskell 2010 report for the next revision of the language: I think

Re: Proposal: fix simple pattern binding and declaration group

2011-06-26 Thread dm-list-haskell-prime
At Mon, 27 Jun 2011 00:06:09 +0100, Paterson, Ross wrote: I don't believe the definition of depends in Section 4.5.1 needs to change. The Report consistently uses expression type signature for the expression and type signature for the declaration, so it is clear that the latter is meant