Hacker News new | ask | show | jobs
by wqsz7xn 2102 days ago
Applicative : minimally complete definition: pure

Huh? Where's (<*>) or liftA2? It's nice having all those types and everything to work over but if the applicative instance is wrong then the monad instance is wrong and then there isn't really a point in using the library? The nice thing about haskell is that all of the laws can be covered by quickcheck. Would be cool if there was something similar here!

1 comments

Aha yes interesting. I would say that I think this is a minor issue in the grand scheme. The meat of this library is, to my eyes, the type system and language features. More concretely, if the implementation of typeclasses is correct, I'm less concerned that the definition of Applicative is not (although I recognise that it doesn't necessarily inspire confidence). Fixing that definition is relatively straightforward.
Yeah I get that, but then again the Semigroup, Monoid, Functor, Applicative and Monad classes should aim to be correct because they form the base of a lot of other typeclasss. Maybe this project is something that I can contribute to in my free time :). I was missing a lot of the functional language features in python. It's a shame that it's still so clunky to work with lambdas etc.