Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
b4f27503
Commit
b4f27503
authored
Apr 11, 2008
by
simonpj
Browse files
Add test for Note [transferPolyIdInfo] in Id.lhs
parent
e322b296
Changes
1
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/eyeball/dmd-on-polymorphic-floatouts.hs
0 → 100644
View file @
b4f27503
{-# OPTIONS_GHC -fglasgow-exts -O -ddump-prep #-}
module
Max
(
result
)
where
foo
ys
=
foldr
(
\
x
xs
->
x
:
reverse
xs
)
[]
ys
result
xs
=
let
stuff
=
[
1
,
1
,
1
,
1
,
1
,
1
]
in
foo
(
reverse
stuff
)
-- What used to happen is that foldr got expanded by main simplification
-- and the resulting "go" function got floated out but because we manufactured
-- a new binder for it in newPolyBndrs we would lose its demand signature!
-- This means that the later application of it in result did not use call by value :-(
-- Eyeball test:
-- Ensure that Max.poly_go has a demand signature
-- Ensure that we use call by value to call Max.poly_go in result
-- i.e. the call to Max.poly_go inside Max.result looks like this:
--
-- case GHC.List.poly_rev @ t1_a6x sat_seb (GHC.Base.[] @ t1_a6x)
-- of sat_sed { __DEFAULT ->
-- Max.poly_go @ t1_a6x sat_sed
-- } } in
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