Re: Records in Haskell: Type-Indexed Records (another proposal)

2012-03-06 Thread AntC
Matthew Farkas-Dyck strake888 at gmail.com writes: I think you don't want all those type vars in your record decls -- but only vars for the mutatable types, like this: type R c = { X ::. Int, Y::. String, Z ::. c, ... } Then you don't need a Quasifunctor instance for every field,

Re: Records in Haskell: Type-Indexed Records (another proposal)

2012-03-05 Thread Matthew Farkas-Dyck
On 03/03/2012, AntC anthony_clay...@clear.net.nz wrote: Apart from the Quasifunctor bit, I think you'll find your proposal is a rather cut-down version of DORF, just using different syntactic sugar. (Oh, and with the arguments to Has in a different order, just to be confusing.) Not so. I

Records in Haskell: Type-Indexed Records (another proposal)

2012-03-03 Thread Matthew Farkas-Dyck
Hello all. I wrote a new proposal for the Haskell record system. It can be found at http://hackage.haskell.org/trac/ghc/wiki/Records/TypeIndexedRecords Records are indexed by arbitrary Haskell types. Scope is controlled as scope of key types. No fieldLabel declarations needed (as in DORF).

Re: Records in Haskell: Type-Indexed Records (another proposal)

2012-03-03 Thread AntC
Matthew Farkas-Dyck strake888 at gmail.com writes: Hello all. I wrote a new proposal for the Haskell record system. It can be found at http://hackage.haskell.org/trac/ghc/wiki/Records/TypeIndexedRecords Records are indexed by arbitrary Haskell types. Scope is controlled as scope of key