[Haskell-cafe] Origins of '$'
jonathanccast at fastmail.fm
Mon Dec 8 13:03:20 EST 2008
On Mon, 2008-12-08 at 09:58 -0800, Mark P. Jones wrote:
> Don Stewart wrote:
> > Which suggests that $ was already in the 1.0 report going to SIGPLAN.
> > Perhaps Paul or Simon could shed light on it? Anyone have the 1.0 report
> > lying around to check if it was in earlier?
> As far as Haskell is concerned, the first "report"-ed occurrence
> of the $ operator was in the Haskell 1.2 report dated March 1992.
> I don't see any mention of the $ operator in either the 1.0 or
> the 1.1 reports (April 1990 and August 1991, respectively).
> The 1.0 report did define the following operator, which is a
> variant of $:
> let :: a -> (a -> b) -> b
> let x k = k x
> This was exported from the prelude, but its definition actually
> appeared in the PreludeIO section of the report, hinting at the
> main motivation for its introduction in support of continuation
> based I/O. (Monadic I/O didn't officially arrive until the 1.3
> report in May 1996.)
Not officially, but `let' as above is in fact the unit of the Cont
monad. And (>>>) from the PreludeIO section of the same report is the
(>>=) for the Cont monad.
So monadic I/O was there, it just seems that no-one noticed (or I
haven't seen this explicitly pointed out)...
More information about the Haskell-Cafe