On 11/10/06, Pablo Nogueira <pirelo@googlemail.com
> wrote:
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