Commit db86a583 authored by simonpj's avatar simonpj
Browse files

[project @ 2002-10-10 14:10:14 by simonpj]

Add mdo test
parent 55367ee4
TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
# These tests try test the rebindable-syntax feature of GHC,
# which you get when you use -fno-implicit-prelude
#
# No point in doing anything except the normal way
setTestOpts(only_ways(['normal']));
test('mdo001', normal, compile_and_run, [''])
{-# OPTIONS -fglasgow-exts #-}
module Main(main) where
import Control.Monad.Fix
t :: IO Int
t = mdo x <- return (l "1")
let l [] = 0
l (x:xs) = 1 + l xs
return x
main :: IO ()
main = t >>= print
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment