On Sun, Oct 08, 2006 at 10:57:46PM +1300, [EMAIL PROTECTED] wrote:
> To: haskell-cafe@haskell.org
> From: [EMAIL PROTECTED]
> Date: Sun, 08 Oct 2006 22:57:46 +1300
> Subject: [Haskell-cafe] collection monads
> 
> Matthias Fischmann wrote:
> > > Do you expect the contained type x to change during a
> > > sequence of monadic actions?  e.g. would you ever use
> (>>=)
> > > at the type 'Permutation Int -> (Int -> Permutation
> Bool) ->
> > > Permutation Bool'?
> >
> > no, i don't need that.  but aside from
> > the fact that
> >
> > >     data Permutation k v =
> > >         Permutation [(k, v)]
> > >     instance (Ix k) =>
> > >         Monad (Permutation k)
> >
> > is redundant (i think of the permutation
> > as a function applicable to arbitrary
> > lists): how would that change anything?
> > my definition of return still doesn't
> > work.  or how would you redefine
> > 'return'?
> 
> Ah.  Yes, my approach falls over because it lacks two
> things.  #1: a distinguished value of the Ix-constrained
> type k, to pair off with return's argument.  #2: a purpose. 
> I don't have a clear idea of what a do-block in a
> permutation monad ought to mean.  Whoops!  <font
> color=red>:-]</font>

yes, me neither.  i thought of something like sequencial execution of
permutations, and was hoping it was similar enough to strings and
concat / join.  but it seems it's something else...

ok, permutations are not that monadic, really.  i'll try to live with
it.  (-:


matthias

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to