Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
7c837ea5
Commit
7c837ea5
authored
Feb 28, 2008
by
simonpj
Browse files
Test for Trac #2111
parent
a8ccf509
Changes
3
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/arrows/should_fail/T2111.hs
0 → 100644
View file @
7c837ea5
{-# OPTIONS_GHC -XArrows -XRecursiveDo #-}
-- Test Trac #2111
module
Foo
where
foo
=
do
{
rec
{
x
<-
undefined
-<
x
};
undefined
-<
x
}
bar1
=
do
{
rec
{
x
<-
return
(
'a'
:
x
);
};
putStrLn
(
take
20
x
)
}
bar2
=
mdo
{
rec
{
x
<-
return
(
'a'
:
x
);
};
putStrLn
(
take
20
x
)
}
testsuite/tests/ghc-regress/arrows/should_fail/T2111.stderr
0 → 100644
View file @
7c837ea5
T2111.hs:6:11:
Illegal 'rec' stmt in a 'do' expression
In a stmt of a 'do' expression: rec {x <- undefined -< x}
In the expression:
do rec {x <- undefined -< x}
undefined -< x
In the definition of `foo':
foo = do rec {x <- undefined -< x}
undefined -< x
T2111.hs:8:12:
Illegal 'rec' stmt in a 'do' expression
In a stmt of a 'do' expression: rec {x <- return ('a' : x)}
In the expression:
do rec {x <- return ('a' : x)}
putStrLn (take 20 x)
In the definition of `bar1':
bar1 = do rec {x <- return ('a' : x)}
putStrLn (take 20 x)
testsuite/tests/ghc-regress/arrows/should_fail/all.T
View file @
7c837ea5
...
...
@@ -4,3 +4,4 @@ test('arrowfail001', normal, compile_fail, [''])
test
('
arrowfail002
',
normal
,
compile_fail
,
[''])
test
('
arrowfail003
',
normal
,
compile_fail
,
[''])
test
('
arrowfail004
',
normal
,
compile_fail
,
[''])
test
('
T2111
',
normal
,
compile_fail
,
[''])
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment