Re: [Haskell-cafe] Layer on a layer of record syntax in the type synonym?

2012-12-23 Thread Antoine Latter
You could look into the Generic Monoid solution proposed in your other thread, then you wouldn't need your Socket types - you would use the Generic Monoid machinery to make a Monoid instance for whatever type needed it. This approach loses some type-safety, as you might pass on version of a

[Haskell-cafe] Layer on a layer of record syntax in the type synonym?

2012-12-21 Thread Christopher Howard
Using a simple type I gave earlier from my monadic type question... code: data Socket3 a b c = Socket3 a b c deriving (Show) Is it possible somehow to layer on record syntax onto a synonym of the type? The idea would be something like this... code: type SpaceShip =

Re: [Haskell-cafe] Layer on a layer of record syntax in the type synonym?

2012-12-21 Thread Ivan Lazar Miljenovic
On 22 December 2012 00:36, Christopher Howard christopher.how...@frigidcode.com wrote: Using a simple type I gave earlier from my monadic type question... code: data Socket3 a b c = Socket3 a b c deriving (Show) Is it possible somehow to layer on record syntax onto a

Re: [Haskell-cafe] Layer on a layer of record syntax in the type synonym?

2012-12-21 Thread Daniel Trstenjak
Hi Christopher, On Fri, Dec 21, 2012 at 04:36:04AM -0900, Christopher Howard wrote: Using a simple type I gave earlier from my monadic type question... code: data Socket3 a b c = Socket3 a b c deriving (Show) Is it possible somehow to layer on record syntax onto a

Re: [Haskell-cafe] Layer on a layer of record syntax in the type synonym?

2012-12-21 Thread Nicolas Trangez
On Fri, 2012-12-21 at 04:36 -0900, Christopher Howard wrote: Using a simple type I gave earlier from my monadic type question... code: data Socket3 a b c = Socket3 a b c deriving (Show) Is it possible somehow to layer on record syntax onto a synonym of the type?

Re: [Haskell-cafe] Layer on a layer of record syntax in the type synonym?

2012-12-21 Thread Christopher Howard
On 12/21/2012 04:52 AM, Daniel Trstenjak wrote: Why having a Socket3 in the first place, what's the point of it? The idea was to have some generic structures (Sockets) which were already instanced into the Monoids-within-Monoids abstraction, yet could still be made concrete into anything