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
c1d4cd7e
Commit
c1d4cd7e
authored
May 22, 2013
by
Simon Peyton Jones
Browse files
Test Trac
#7924
parent
78618d45
Changes
3
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/simplCore/should_run/T7924.hs
0 → 100644
View file @
c1d4cd7e
{-# LANGUAGE DeriveDataTypeable #-}
module
Main
where
import
Control.Exception
(
throwIO
,
Exception
)
import
Control.Monad
(
when
)
import
Data.Typeable
(
Typeable
)
data
Boom
=
Boom
deriving
(
Show
,
Typeable
)
instance
Exception
Boom
main
=
do
args
<-
return
[]
-- Should throw this exception.
when
(
length
args
/=
1
)
(
throwIO
Boom
)
-- With -O, instead throws this one from head [].
let
n
=
read
(
head
args
)
print
(
n
::
Int
)
return
()
\ No newline at end of file
testsuite/tests/simplCore/should_run/T7924.stderr
0 → 100644
View file @
c1d4cd7e
T7924: Boom
testsuite/tests/simplCore/should_run/all.T
View file @
c1d4cd7e
...
...
@@ -57,3 +57,5 @@ test('T5915', only_ways(['normal','optasm']), compile_and_run, [''])
test
('
T5920
',
only_ways
(['
normal
','
optasm
']),
compile_and_run
,
[''])
test
('
T5997
',
normal
,
compile_and_run
,
[''])
test
('
T7101
',
normal
,
compile_and_run
,
[''])
test
('
T7924
',
exit_code
(
1
),
compile_and_run
,
[''])
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