ApplicativeDo: `return` sometimes not allowed
Steps to reproduce
The following program is rejected, because "No instance for (Monad F) arising from a use of ‘return’".
-- F is an Applicative but not a Monad x :: F Int x = do let a = 3 return a
However, it is accepted if
let a = 3 is changed to
a <- pure 3.
In an ado-block, the last statement can be
return, so the above program should be accepted.
- GHC version used: 9.3.20210913