Re: [Haskell] boilerplate boilerplate

2007-05-22 Thread Alex Jacobson
I'm not sure I understand how this solves my problem. Its possible that I can use Derive not to need all the newtype declarations at all, but, if I do need them, I'm not sure how Derive reduces the overall amount of boilerplate here. Perhaps I should define a TH function that takes $(ne

Re: [Haskell] boilerplate boilerplate

2007-05-22 Thread ajb
G'day all. Quoting Alex Jacobson <[EMAIL PROTECTED]>: > It seems really unnecessarily verbose. Having to add the OPTION header ...which you don't need; this could go on the command line... > It is even more of a beat-down to have to add a deriving > clause for every newtype to make this all wo

Re: [Haskell] boilerplate boilerplate

2007-05-22 Thread Claus Reinke
(For your second, desired code sample, I have a feeling this is where DrIFT or Data.Derive are going to come in... I'm not going to mention those external things!) it wouldn't help to get rid of deriving, but perhaps the new 'standalone deriving' might help to separate out all that deriving stuf

Re: [Haskell] boilerplate boilerplate

2007-05-22 Thread Neil Mitchell
Hi {-# OPTIONS -fglasgow-exts #-} module Blog.Types where import Data.Typeable import Data.Generics data BlogEntry = Entry EpochSeconds Name Email Title Body deriving (Eq,Ord,Read,Show,Typeable) newtype Name = Name String deriving (Eq,Ord,Read,Show,Typeabl

Re: [Haskell] boilerplate boilerplate

2007-05-22 Thread Lennart Augustsson
Oh, so you want the original behaviour of type declarations back. :) In Haskell 1.0, if you didn't specify any deriving, you got as much derived as possible. I quite liked it, but it was changed. -- Lennart On Tue, 22 May 2007, Alex Jacobson wrote: Date: Tue, 22 May 2007 19:07:26 -0

Re: [Haskell] boilerplate boilerplate

2007-05-22 Thread Isaac Dupree
Alex Jacobson wrote: > Consider this module for a blog entry that I will want to put in various > generic collections that require Ord > > {-# OPTIONS -fglasgow-exts #-} > module Blog.Types where > import Data.Typeable > import Data.Generics > > data BlogEntry = Entry EpochSeconds Name

[Haskell] boilerplate boilerplate

2007-05-22 Thread Alex Jacobson
Consider this module for a blog entry that I will want to put in various generic collections that require Ord {-# OPTIONS -fglasgow-exts #-} module Blog.Types where import Data.Typeable import Data.Generics data BlogEntry = Entry EpochSeconds Name Email Title Body

Re: [Haskell] Composing channels

2007-05-22 Thread Bryan O'Sullivan
Setzer, Sebastian (ext) wrote: If you want to respond, it gets difficult. I have a two-way serialising network channel socked away somewhere that uses Data.Binary and lazy ByteStrings, but it's not complete. Looks quite difficult. Are there any simpler solutions for typesafe network-commun

[Haskell] Composing channels

2007-05-22 Thread Setzer, Sebastian (ext)
Hi, Suppose you've got two tasks, A and B, A wants sends a request to B, B sends a response. Both are sent through Control.Concurrent.Chan: +---++---+ | A |<--aChanbChan-->| B | +---++---+ A writes to bChan, B writes to aChan. Because B gets requests fro

[Haskell] Final APLAS'07 CFP

2007-05-22 Thread Henrik Nilsson
On Behalf of Zhong Shao. Sorry for any duplicates! /Henrik -- Title: Final APLAS 2007 CFP (Deadline: June 15, 2007) [Recent updates: (1) Submission site is now open: (2) New info about invited speakers.

[Haskell] Inaugural London HUG meeting; attendee list suggestion

2007-05-22 Thread Bayley, Alistair
Tomorrow evening's London Haskell User Group meeting has a reasonable list of attendees (inferred from the comments): http://www.londonhug.net/2007/04/26/announcement-first-meeting-of-the-lo ndon-haskell-user-group/ I think it'd be a good idea to do what the BCS-SPA does, and maintain a wiki-pag