Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
2baf8aa7
Commit
2baf8aa7
authored
Aug 13, 2010
by
simonpj
Browse files
Test Trac
#3983
parent
6f3fc74a
Changes
5
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/simplCore/should_run/T3983.hs
0 → 100644
View file @
2baf8aa7
module
Main
where
import
T3983_Foo
import
T3983_Bar
main
=
catchX
(
foo
False
True
)
>>=
print
\ No newline at end of file
testsuite/tests/ghc-regress/simplCore/should_run/T3983.stdout
0 → 100644
View file @
2baf8aa7
False
testsuite/tests/ghc-regress/simplCore/should_run/T3983_Bar.hs
0 → 100644
View file @
2baf8aa7
{-# LANGUAGE DeriveDataTypeable #-}
module
T3983_Bar
where
import
Data.Dynamic
import
Control.Exception
import
Control.Monad
(
unless
)
type
Assertion
=
IO
()
data
X
=
X
String
deriving
(
Show
,
Typeable
)
instance
Exception
X
throwX
=
throw
.
X
catchX
action
=
do
{
action
;
return
True
;
}
`
catches
`
[
Handler
(
\
(
X
_
)
->
return
False
)]
\ No newline at end of file
testsuite/tests/ghc-regress/simplCore/should_run/T3983_Foo.hs
0 → 100644
View file @
2baf8aa7
module
T3983_Foo
where
import
Control.Monad
(
unless
)
import
Control.Exception
import
T3983_Bar
foo
::
Bool
->
Bool
->
IO
()
foo
a
b
=
unless
a
$
throwX
(
if
b
then
""
else
""
)
testsuite/tests/ghc-regress/simplCore/should_run/all.T
View file @
2baf8aa7
...
...
@@ -33,3 +33,9 @@ test('SeqRule', only_ways(['optc','optasm']), compile_and_run, [''])
test
('
T3403
',
normal
,
compile_and_run
,
['
-package containers
'])
test
('
T3591
',
normal
,
compile_and_run
,
[''])
# Run this test *without* optimisation too
test
('
T3983
',
[
only_ways
(['
normal
','
optc
','
optasm
']),
extra_clean
(['
T3983_Foo.hi
','
T3983_Foo.o
','
T3983_Bar.hi
','
T3983_Bar.o
',])],
multimod_compile_and_run
,
['
T3983
',''])
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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