summaryrefslogtreecommitdiff
path: root/testsuite/tests/mdo/should_compile/mdo005.hs
blob: 0b6301b8a52a9596e2748f93122f640726b372ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# OPTIONS -XRecursiveDo #-}

-- test scoping

module Main (main) where

import Control.Monad.Fix 
import Data.Maybe ( fromJust )

t = mdo x <- fromJust (mdo x <- Just (1:x)
			   return (take 4 x))
	return x

main :: IO ()
main = print t