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
78c253f6
Commit
78c253f6
authored
May 24, 2005
by
simonpj
Browse files
[project @ 2005-05-24 11:30:35 by simonpj]
Add simplifier loop test
parent
15f347a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/simplCore/should_compile/all.T
View file @
78c253f6
...
...
@@ -12,4 +12,5 @@ test('simpl008', only_compiler_types(['ghc']), compile_fail, [''])
test
('
simpl009
',
normal
,
compile
,
[''])
test
('
simpl010
',
normal
,
compile
,
[''])
test
('
simpl011
',
normal
,
compile
,
[''])
test
('
simpl012
',
normal
,
compile
,
[''])
testsuite/tests/ghc-regress/simplCore/should_compile/simpl012.hs
0 → 100644
View file @
78c253f6
-- This is a version of tc095.hs, which makes the compiler
-- loop (with -O) because of the recursive data-type bug,
-- unless you have the NOINLINE (which Happy does,
-- as it happens).
-- Keywords: diverge, contravariant, fixpoint
module
ShouldSucceed
where
happyParse
=
happyFail
7
7
(
error
"reading EOF!"
)
(
HappyState
happyFail
)
[]
[]
[]
data
HappyState
b
c
=
HappyState
(
Int
->
-- token number
Int
->
-- token number (yes, again)
b
->
-- token semantic value
HappyState
b
c
->
-- current state
[
HappyState
b
c
]
->
-- state stack
c
)
{-# NOINLINE happyFail #-}
happyFail
_
i
tk
st
@
(
HappyState
action
)
sts
stk
=
action
(
-
1
)
(
-
1
)
tk
st
sts
(
stk
)
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