Re: [GHC] #1600: Optimisation: CPR the results of IO

#1600: Optimisation: CPR the results of IO
-------------------------------------+-------------------------------------
Reporter: simonmar | Owner:
Type: task | Status: new
Priority: lowest | Milestone: 7.6.2
Component: Compiler | Version: 6.6.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: Runtime | Difficulty: Moderate (less
performance bug | than a day)
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+-------------------------------------
Comment (by nomeata):
Analysing the `typecheck` divergence yields a very interesting example of
how nested CPR can go wrong, which I’d like to document here.
It completely wreak havoc with this innocent function:
{{{
repeat :: x -> [x]
repeat x = x : repeat x
}}}
(This requires nesting of sum types, but just imagine for this example
that `[]` was a stream data type with only one constructor, if you want).
The analyizer figurs out that its demand signature is `DmdType
participants (1)
-
GHC