[Haskell-cafe] ($) and ApplicativeDo

amindfv at gmail.com amindfv at gmail.com
Thu Jun 16 16:08:00 UTC 2016


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


More information about the Haskell-Cafe mailing list