diff options
Diffstat (limited to 'testsuite/tests/mdo/should_compile')
-rw-r--r-- | testsuite/tests/mdo/should_compile/mdo001.hs | 20 | ||||
-rw-r--r-- | testsuite/tests/mdo/should_compile/mdo002.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/mdo/should_compile/mdo004.hs | 6 | ||||
-rw-r--r-- | testsuite/tests/mdo/should_compile/mdo005.hs | 8 |
4 files changed, 19 insertions, 19 deletions
diff --git a/testsuite/tests/mdo/should_compile/mdo001.hs b/testsuite/tests/mdo/should_compile/mdo001.hs index e193743553..576a7d0e90 100644 --- a/testsuite/tests/mdo/should_compile/mdo001.hs +++ b/testsuite/tests/mdo/should_compile/mdo001.hs @@ -3,14 +3,14 @@ -- test that we have all the promised instances module Main(main) where - -import Control.Monad.Fix + +import Control.Monad.Fix import qualified Control.Monad.ST as SST import qualified Control.Monad.ST.Lazy as LST generic :: MonadFix m => m [Int] generic = mdo xs <- return (1:xs) - return (take 4 xs) + return (take 4 xs) io :: IO [Int] io = generic @@ -20,7 +20,7 @@ sst = generic lst :: LST.ST s [Int] lst = generic - + mb :: Maybe [Int] mb = generic @@ -28,9 +28,9 @@ ls :: [[Int]] ls = generic main :: IO () -main = do - print =<< io - print $ SST.runST sst - print $ LST.runST lst - print $ mb - print $ ls +main = do + print =<< io + print $ SST.runST sst + print $ LST.runST lst + print $ mb + print $ ls diff --git a/testsuite/tests/mdo/should_compile/mdo002.hs b/testsuite/tests/mdo/should_compile/mdo002.hs index 432825749d..3f9533f247 100644 --- a/testsuite/tests/mdo/should_compile/mdo002.hs +++ b/testsuite/tests/mdo/should_compile/mdo002.hs @@ -21,11 +21,11 @@ instance Monad X where (X a) >>= f = f a instance MonadFix X where - mfix f = fix (f . unX) + mfix f = fix (f . unX) where unX ~(X x) = x z :: X [Int] z = mdo x <- return (1:x) - return (take 4 x) + return (take 4 x) main = print z diff --git a/testsuite/tests/mdo/should_compile/mdo004.hs b/testsuite/tests/mdo/should_compile/mdo004.hs index 544ee6cc66..fe405b882b 100644 --- a/testsuite/tests/mdo/should_compile/mdo004.hs +++ b/testsuite/tests/mdo/should_compile/mdo004.hs @@ -1,17 +1,17 @@ {-# OPTIONS -XRecursiveDo #-} --- test let bindings, polymorphism is ok provided they are not +-- test let bindings, polymorphism is ok provided they are not -- isolated in a recursive segment -- NB. this is not what Hugs does! module Main (main) where -import Control.Monad.Fix +import Control.Monad.Fix t :: IO (Int, Int) t = mdo let l [] = 0 l (x:xs) = 1 + l xs - return (l "1", l [1,2,3]) + return (l "1", l [1,2,3]) main :: IO () main = t >>= print diff --git a/testsuite/tests/mdo/should_compile/mdo005.hs b/testsuite/tests/mdo/should_compile/mdo005.hs index 0b6301b8a5..c712c5a01e 100644 --- a/testsuite/tests/mdo/should_compile/mdo005.hs +++ b/testsuite/tests/mdo/should_compile/mdo005.hs @@ -4,12 +4,12 @@ module Main (main) where -import Control.Monad.Fix +import Control.Monad.Fix import Data.Maybe ( fromJust ) t = mdo x <- fromJust (mdo x <- Just (1:x) - return (take 4 x)) - return x + return (take 4 x)) + return x main :: IO () -main = print t +main = print t |