diff options
Diffstat (limited to 'testsuite/tests/ado/ado010.hs')
-rw-r--r-- | testsuite/tests/ado/ado010.hs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/tests/ado/ado010.hs b/testsuite/tests/ado/ado010.hs new file mode 100644 index 0000000000..a48eefa296 --- /dev/null +++ b/testsuite/tests/ado/ado010.hs @@ -0,0 +1,24 @@ +{-# LANGUAGE ApplicativeDo #-} +{-# OPTIONS_GHC -ddump-rn -dsuppress-uniques #-} + +module Test where + +-- Sanity check for a simple expression not involving join. +q1 :: IO () +q1 = do + a <- pure () + b <- pure () + pure $ pureNothing a + where + pureNothing :: a -> () + pureNothing _ = () + +-- Sanity check for a simple expression involving join. +q2 :: IO () +q2 = do + a <- pure () + b <- pure () + doNothing a + where + doNothing :: a -> IO () + doNothing _ = pure () |