[Haskell-cafe] Crazy idea: overloading function application
notation
Stefan Holdermans
stefan at cs.uu.nl
Thu May 31 02:18:05 EDT 2007
Jon,
> This is a crazy idea I've been working on: overload the syntax "x
> y" so it can
> mean function application "f x = f(x)" or multiplication "x y = x*y".
On a related (?) note, but definitely not what you're after: there
are constructor classes that allow you to lift function application
into a functor and equip it with specific semantics:
fmap :: (Functor f) => (a -> b) -> f a -> f b
(<*>) :: (Applicative f) => f (a -> b) -> f a -> f b
(=<<) :: (Monad m) => (a -> m b) -> m a -> m b
Cheers,
Stefan
More information about the Haskell-Cafe
mailing list