
#10288: -flate-dmd-anal triggers "Entered absent arg" -------------------------------------+------------------------------------- Reporter: yongqli | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime crash | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by simonpj): Oh VERY interesting! I have reproduced the problem with 7.10, and it is YET ANOTHER bug in the demand analyser. Here is the offending code {{{ dmdAnal' sigs dmd (App fun (Coercion co)) = (fun_ty, App fun' (Coercion co)) where (fun_ty, fun') = dmdAnal sigs dmd fun }}} The incoming demand `dmd` is not modified before passing it on to `fun`. But that is wrong wrong wrong. That gets the demands from the function out of step, so the wrong demand goes to the wrong argument. It's a miracle that this has not been causing chaos for ages. Horror. Coercions are ''value'' arguments and so they must be treated as such. I think the solution is simply to delete these lines so that coercion arguments are handled uniformly; but I want to tread carefully. Thank you for extracting this example. More anon. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10288#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler