Re: [fricas-devel] Haskell, Functor, Monad, Maybe

2016-10-19 Thread Bill Page
On 19 October 2016 at 14:51, Kurt Pagani wrote: > A great source where my half-baken knowledge about monads comes from is: > > https://ncatlab.org/nlab/show/monad > https://ncatlab.org/nlab/show/monad+%28in+computer+science%29 > > Especially the section "For imperative programs

Re: [fricas-devel] Haskell, Functor, Monad, Maybe

2016-10-19 Thread Kurt Pagani
A great source where my half-baken knowledge about monads comes from is: https://ncatlab.org/nlab/show/monad https://ncatlab.org/nlab/show/monad+%28in+computer+science%29 Especially the section "For imperative programs in functional programming" in the page of the last link will describe what I

Re: [fricas-devel] Haskell, Functor, Monad, Maybe

2016-10-18 Thread Bill Page
On 17 October 2016 at 12:27, Kurt Pagani wrote: > ... On the other hand I'd rather like a "partial" monad instead of "maybe" > (which usually means a single terminal symbol "failed"), that is a product > type M(T)=T x Q, where Q is a monoid, such that the Kleisli composition >

Re: [fricas-devel] Haskell, Functor, Monad, Maybe

2016-10-18 Thread oldk1331
> On the other hand I'd rather like a > "partial" monad instead of "maybe" (which usually means a single terminal > symbol > "failed"), that is a product type M(T)=T x Q, where Q is a monoid, such that > the > Kleisli composition evaluates the two programs in sequence and combines their > Q >

Re: [fricas-devel] Haskell, Functor, Monad, Maybe

2016-10-17 Thread Kurt Pagani
Am 17.10.2016 um 11:13 schrieb Martin Baker: > I suspect this is all a bit academic because I get the impression that the > FriCAS compiler is too unpredictable to make the changes to the type system > that > would be required for a more general category theoretic structures. Please > tell > me

Re: [fricas-devel] Haskell, Functor, Monad, Maybe

2016-10-17 Thread Bill Page
On 17 October 2016 at 10:52, oldk1331 wrote: >> Rather than Haskell per se, personally I am most interested in >> the "category theory" approach summarized in Martin's email, therefore >> I prefer the alternative definition of monads as a domain satisfying >> Functor >> >>

Re: [fricas-devel] Haskell, Functor, Monad, Maybe

2016-10-17 Thread oldk1331
> Rather than Haskell per se, personally I am most interested in > the "category theory" approach summarized in Martin's email, therefore > I prefer the alternative definition of monads as a domain satisfying > Functor > > map :: (a -> b) -> M a -> M b > > with these two additional

Re: [fricas-devel] Haskell, Functor, Monad, Maybe

2016-10-17 Thread Bill Page
On 16 October 2016 at 22:26, oldk1331 wrote: > Bill, you were in the previous Monad discussion thread, > what do you think of the Monad this time? > As you can see, everyone is already quite fixed in their opinions therefore I am very happy for your interest and in your

Re: [fricas-devel] Haskell, Functor, Monad, Maybe

2016-10-17 Thread Martin Baker
It seems to me that there are two possible reasons for implementing category theoretic structures in FriCAS: 1) Because FriCAS should implement as many mathematical structures as possible and because much of modern mathematics is done in the language of categories and FriCAS should reflect

Re: [fricas-devel] Haskell, Functor, Monad, Maybe

2016-10-17 Thread oldk1331
On Mon, Oct 17, 2016 at 3:53 PM, Ralf Hemmecke wrote: >>> Functor is quite loaded name and may lead to confusion. >> >> Yes, the name is a problem. OpenAxiom uses "Functorial". >> But I think Functor is fine, given the context that Haskell is >> using this name. > > BTW, in

Re: [fricas-devel] Haskell, Functor, Monad, Maybe

2016-10-17 Thread Ralf Hemmecke
>> Functor is quite loaded name and may lead to confusion. > > Yes, the name is a problem. OpenAxiom uses "Functorial". > But I think Functor is fine, given the context that Haskell is > using this name. BTW, in Aldor the "Maybe" domain is called "Partial".

Re: [fricas-devel] Haskell, Functor, Monad, Maybe

2016-10-16 Thread oldk1331
> We have more than 50 packages named '*Functions2' which > implement 'map' between two domains. I am not suggesting replace those packages that deals with more than two domains. I'm talking about map : (S->S, %) -> % , where % has a parameter S There are about 15 map signatures like this.

Re: [fricas-devel] Haskell, Functor, Monad, Maybe

2016-10-16 Thread Waldek Hebisch
oldk1331 wrote: > > Use Functor category to abstract the 'map' function, > to reduce the number of ')display op map', what do > you think? We have more than 50 packages named '*Functions2' which implement 'map' between two domains. In principle they could use single signature from single

Re: [fricas-devel] Haskell, Functor, Monad, Maybe

2016-10-16 Thread oldk1331
Bill, you were in the previous Monad discussion thread, what do you think of the Monad this time? -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an

Re: [fricas-devel] Haskell, Functor, Monad, Maybe

2016-10-16 Thread Bill Page
On 16 October 2016 at 22:12, oldk1331 wrote: > Use Functor category to abstract the 'map' function, > to reduce the number of ')display op map', what do > you think? > +1 -- You received this message because you are subscribed to the Google Groups "FriCAS - computer

Re: [fricas-devel] Haskell, Functor, Monad, Maybe

2016-10-16 Thread oldk1331
Use Functor category to abstract the 'map' function, to reduce the number of ')display op map', what do you think? -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from

Re: [fricas-devel] Haskell, Functor, Monad, Maybe

2016-10-15 Thread oldk1331
> You seem to want to use '>>' to convert functions from > T to Union(T, "failed") into functions from > Union(T, "failed") to Union(T, "failed"). No, it doesn't create new functions, just "combine" them. Say we want to apply a series of functions, first f, then g: x:INT, f:INT->INT, g:INT->INT

Re: [fricas-devel] Haskell, Functor, Monad, Maybe

2016-10-15 Thread Waldek Hebisch
oldk1331 wrote: > > There's a long thread in 2011 talking about monad, > but that discussion is not very clear and not what > I am going to talk about. > https://groups.google.com/d/msg/fricas-devel/UCFkQGgOOf0/oj9-FygocVgJ > > The motivation get me into this topic is simple: > In OpenAxiom, I