Fwd: [Hs-Generics] Support for abstract data types

---------- Forwarded message ----------
From: Alexey Rodriguez
Hi Alexey
Could you please forward my replies to generics@haskell.org? I still can't post and stil haven't got a reply from the administrator :-(
One minor addition:
toQueue (Inl (e :*: q)) = e `prependToQueue` q toQueue (Inr ()) = emptyQueue
What is `prependToQueue'? It is not a queue operation given by a queue interface. I take it is actually "enqueue . reverse". If this is the case, what you propose looks impractical.
I assumed it to be an operation internal to the queue library, remember that the mapping is written by the Queue library writer, not the user. "prependToQueue" does not need to be exposed to the user. What is exposed is the structural representation type and the embedding projection, which the user exploits by using Queue-specialized generic functions. Cheers, Alexey

Dear all, The discussion on the generics list has become a bit quiet recently. I have been busy with teaching and other obligations, and I know reasons why other contributors have been busy as well recently. I want to pick up this work again in January. Not only because I find it interesting and useful, but also because Alexey Rodriguez is returning to Utrecht from an internship in Cambridge, and I have an MSc student that will start working on a common generic library in January as well. So I hope the discussion will start again next year! I support Pablo's suggestion to also address how the different libraries can deal with abstract data types. I'm not sure that the C++ STL is very relevant to this list. I'm probably oversimplifying, but I see the C++ STL as an approach to program against interfaces. But on the other hand, I would like to be able to use generic programs on, for example, abstract iterator types, so in that sense it is relevant. Merry Christmas and a Happy New Year, Johan
participants (2)
-
Alexey Rodriguez
-
Johan Jeuring