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 presented the following simple puzzle to the community: http://www.haskell.org/pipermail/haskell-cafe/2011-February/089719.html That puzzle actually came up in a real-life software project in Haskell that I was working on. Several solutions were submitted that used various Haskell extensions such as rank N types and generics, as well as a rather cumbersome Haskell 98 solution. But in my opinion, by far the best solution, using only GADTs, was submitted by Eric Mertens: http://hpaste.org/44469/software_stack_puzzle Eric's solution could now be simplified even further using data kinds. Yitz _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users