
28 Jul
2009
28 Jul
'09
1:16 p.m.
"Ryan" == Ryan Ingram
writes:
Ryan> Along those lines, what about being able to elide class Ryan> names when they can be unambiguously determined from the Ryan> functions defined? Ryan> instance _ [] where fmap = map pure x = [x] fs <*> xs = [ f Ryan> x | f <- fs, x <- xs ] return x = [x] m >>= f = concatMap f Ryan> m Ryan> This would define Functor, Applicative, and Monad for []. What happens if I define a class Foo with a method named fmap? If this were in scope then Functor would no longer be defined for []. Could this situation cause a problem? -- Colin Adams Preston Lancashire