[Haskell-cafe] ($) and ApplicativeDo

Alexander V Vershilov alexander.vershilov at gmail.com
Thu Jun 16 16:49:36 UTC 2016


Hello, Tom.

I think you can find this ticket relevant:
https://ghc.haskell.org/trac/ghc/ticket/11835

--
Alexander

On 16 June 2016 at 19:08,  <amindfv at 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 at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe



-- 
Alexander


More information about the Haskell-Cafe mailing list