Re: GADTs in the wild

2012-08-15 Thread Yitzchak Gale
Simon Peyton-Jones wrote: > This message is to invite you to send me your favourite example of using a > GADT to get the job done. Ideally I’d like to use examples that are (a) > realistic, drawn from practice (b) compelling and (c) easy to present > without a lot of background. Last year I prese

Re: GADTs in the wild

2012-08-15 Thread Christian Maeder
Am 15.08.2012 17:58, schrieb Felipe Almeida Lessa: On Wed, Aug 15, 2012 at 12:54 PM, Christian Maeder wrote: Well, "Either" was an adhoc choice and should be application specific. Another h98 solution would be to keep the common part in a single constructor: data UserOrAppData = AppData | U

Re: GADTs in the wild

2012-08-15 Thread Felipe Almeida Lessa
On Wed, Aug 15, 2012 at 12:54 PM, Christian Maeder wrote: > Well, "Either" was an adhoc choice and should be application specific. > Another h98 solution would be to keep the common part in a single > constructor: > > data UserOrAppData = AppData | UserData UserId UTCTime > data AccessToken =

Re: GADTs in the wild

2012-08-15 Thread Christian Maeder
Well, "Either" was an adhoc choice and should be application specific. Another h98 solution would be to keep the common part in a single constructor: data UserOrAppData = AppData | UserData UserId UTCTime data AccessToken = AccessToken UserOrAppData AccessTokenData or: data AccessToken a =