Bill Page <[email protected]> writes:

| On Wed, Nov 9, 2011 at 2:45 AM, Ralf Hemmecke wrote:
| > Looking at http://en.wikibooks.org/wiki/Haskell/Category_theory#Monads and
| > my previous attempt to model it in Aldor...
| > http://groups.google.com/group/fricas-devel/msg/38e7d6dca39cc46c
| >
| > Actually, now I believe that
| >
| > #include "aldor"
| > Monad(C: Category, A: C, M: C -> C): Category == with {
| >   unit: A -> M A;
| >   mult: M M A -> M A;
| > }
| >
| > is not the way one would naturally do this in Aldor.
| >
| 
| What precisely do you think is wrong with what you wrote?
| 
| Although objections might be raised about the passing of categories as
| parameters (see Gaby's comments), I think that in principle the syntax
| and semantics of this is well defined even if not necessarily
| implemented in all versions of Axiom.

I suspect the reason why it is not implemented is that the semantics may
not be well-defined in the AXIOM model.  In that model, there is no
category variable/parameter and every category form is evaluated.  See
uses of compMakeCategoryObject to type check domain forms.

One thing that is lost in this discussion is that Haskell does not have
type classes as parameters.  The parameter to Monad is not an arbitrary
function, it is a type constructor.  All attempts I have seen so far
have been busy trying to pass a category (what would be a type class in
Haskell) to a functor.

-- Gaby

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
open-axiom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel

Reply via email to