[Haskell-cafe] Splitting off many/some from Alternative
Ivan Lazar Miljenovic
ivan.miljenovic at gmail.com
Wed Dec 14 07:40:20 CET 2011
On 14 December 2011 17:08, Gregory Crosswhite <gcrosswhite at gmail.com> wrote:
>
> On Dec 13, 2011, at 5:09 AM, Bryan O'Sullivan wrote:
>
> Correct. And your example of "some (Just 1)" inflooping was not a
> counterargument, but rather an illustration that perhaps some people (and
> I'm not trying to imply you here, don't worry) don't understand what some
> and many are supposed to do.
>
>
> But if you can't determine whether you can use certain methods of a
> typeclass without first knowing more about what type you are working with,
> then that breaks the abstraction since you can no longer treat a typeclass
> as a promise that given set of methods can be applied to a type.
Doesn't this already apply to much of "Monadic" code? Apart from some
basic combinators in Control.Monad or the definitions of monad
transformers, how much of what you write in do-blocks is applicable to
some generic Monad instance as opposed to a specific Monad?
--
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com
More information about the Haskell-Cafe
mailing list