On Tuesday 15 Nov 2011 13:37:04 Bill Page wrote:
> Martin,
>
> I would be glad if you could add "more information about the
> relationship between 'functors' and 'type constructors'.

Bill,

I really don't feel qualified to do this, as I will try to explain by
demonstrating my ignorance:

What I had in mind was an explanation starting with a mathematical
approach. That is in the same way that morphisms compare certain
concrete categories (preserve certain elements of structure) then
functors generalise this to allow us to compare different categories.

When we try to implement this in SPAD then all sorts of issues start
to arise:
1) Are we representing a category-theoretic-category with a SPAD-
category and what are the conditions for doing that?
2) How do we relate the concepts of category, type and domain?

At some stage we appear to move from functors comparing categories to
functors 'generating' one category from another:
3) Is this valid? That is might there be some elements of structure
that are not related by the structure?
4) If we generate an SPAD-category in code then I assume that domain
will also have to be generated in code?

I get the impression that we are not modelling functors in general
here but only specific endofunctors which 'generate' hierarchical
types. So in the case of list-monad we start with built-in List rather
than generating it? So if a SPAD programmer wants to implement their
own monad then I assume they would have to start by defining an
inductively defined type? I think there need to be advise to potential
users on how to go about this.

Once all this is clarified then I think it would be good to preserve
all the Nuggets of information in the conversations between Bill, Gaby
and Waldek on this topic. I certainly would not dare to attempt that.

There is something else I would like to ask here. When Googling this
subject there is masses of stuff around  monads and Haskell. I get the
impression that Haskell monads are not derived from functors but
people seem to think they should be (and in some libraries they are).
Haskell also seems to have the concept of 'applicative functors' which
are half way between functors and monads. I have only seen these terms
defined in a Haskell context by giving examples. Has anyone come
across the terms:
1) Applicative functor
2) Generative functor
3) Generative type
in this more general context? Would they be useful here? How would you
define them?

It seems to me that, if this code is ever going to go into the SPAD
library then this type of information need to be available for end
users and maintainers of the code - otherwise its no use to anyone, so
why not do it now while it is clearer in your mind? As I think I have
demonstrated above I am not really qualified to do it. I'm prepared to
do my share but I'm not looking for the role of chief documenter.

Martin

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to fricas-devel@googlegroups.com.
To unsubscribe from this group, send email to 
fricas-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to