summaryrefslogtreecommitdiff
path: root/testsuite/tests/ado/ado005.hs
blob: 97dbeedcb5e959edc311373ad22fc3ca18a9d260 (plain)
1
2
3
4
5
6
7
8
9
10
{-# LANGUAGE ApplicativeDo #-}
{-# OPTIONS_GHC -ddump-types #-}
module Test where

-- This should fail to typecheck because it needs Monad
test :: Applicative f => (Int -> f Int) -> f Int
test f = do
  x <- f 3
  y <- f x
  return (x + y)