summaryrefslogtreecommitdiff
path: root/testsuite/tests/ado/T20540.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/ado/T20540.hs')
-rw-r--r--testsuite/tests/ado/T20540.hs19
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/ado/T20540.hs b/testsuite/tests/ado/T20540.hs
new file mode 100644
index 0000000000..5af2be029f
--- /dev/null
+++ b/testsuite/tests/ado/T20540.hs
@@ -0,0 +1,19 @@
+{-# LANGUAGE ApplicativeDo, DerivingStrategies, GeneralizedNewtypeDeriving #-}
+
+module T20540 where
+
+import Data.Functor.Identity
+
+newtype F a = F (Identity a)
+ deriving newtype (Functor, Applicative, Show)
+
+x :: F Int
+x = do
+ return 3
+
+y :: F Int
+y = do
+ let a = 3
+ let b = 4
+ let c = 5
+ return $ a + b + c