17 Jun
2016
17 Jun
'16
12:24 a.m.
Think of the types of pure x And pure $ x -- -- Sent from an expensive device which will be obsolete in a few months! :D Casey On Jun 16, 2016 9:06 AM, <amindfv@gmail.com> wrote:
foo :: Applicative f => f String foo = do x <- pure "this works" pure x
... but replace "pure x" with "pure $ x" and it doesn't typecheck: a monad instance is required!
Tom _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe