
#14521: Infinite loop at runtime -------------------------------------+------------------------------------- Reporter: OlivierSohn | Owner: (none) Type: bug | Status: closed Priority: high | Milestone: 8.2.3 Component: Compiler | Version: 8.2.2 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by OlivierSohn): Replying to [comment:21 simonpj]:
In this case the relevant optimisation is eta-expansion. If you do manual eta-expansion on `animate'`, then it converges, always: {{{ animate' :: Animator a -> Tree -> Animation -> IO (Maybe Animation) animate' (Animator pure_ io_) t a = animate pure_ io_ t a }}}
Thank you for your analysis, I think I understand why making the record field non-strict fixes the problem, but I don't understand why the eta- expansion also fixes it, could you explain me or point me to a resource explaining this point? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14521#comment:22 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler