On 19 October 2016 at 14:51, Kurt Pagani <[email protected]> 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 in functional programming" > in the page of the last link will describe what I meant with "partial" > (admittedly an unhappy invention of mine). I had to look for the link some > time but now we'll see that it essentially is an IO monad as oldk already > pointed out. > I think it might be useful to implement it in this generality because the > usual "maybe" is included and there are other interesting cases besides IO > (I used it once in Pure to implement the Martelli-Montanari unification > algorithm w. side effects). > > So don't be confused by the "partial" notion.
Ah, OK that makes sense. I thought perhaps you meant something along this line ... https://www.reddit.com/r/haskell/comments/1bjfx9/partial_function_maybe/c98fd8h > > On 19 October 2016 at 04:40, Bill Page <[email protected]> wrote: >> >> On 17 October 2016 at 12:27, Kurt Pagani <[email protected]> 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 >> > evaluates the two programs in sequence and combines their Q output. >> > Example: Q=(String, conctenation). >> > >> >> Doesn't that conflate two different ideas? E.g. a partial function >> like division by 0, versus a function whose definition is such that >> attempting to compute it may never return such as general equality of >> functions? Or perhaps I am not properly understanding these Haskellish >> notions. >> -- 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 email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.
