From: simonmar Date: Thu, 23 Jan 2003 11:22:50 +0000 (+0000) Subject: [project @ 2003-01-23 11:22:50 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~1251 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=55afc498ef4a0e8ac88e34a672f05caa3fc01139;p=ghc-hetmet.git [project @ 2003-01-23 11:22:50 by simonmar] A nullary constructor in an argument position should refer to the constructor worker, not the wrapper. In most cases they're the same, but when using -funbox-strict-fields (or maybe a context on a data type?) they can be different, leading to a crash. MERGE TO STABLE --- diff --git a/ghc/compiler/stgSyn/CoreToStg.lhs b/ghc/compiler/stgSyn/CoreToStg.lhs index c7c029e..f6033c2 100644 --- a/ghc/compiler/stgSyn/CoreToStg.lhs +++ b/ghc/compiler/stgSyn/CoreToStg.lhs @@ -538,7 +538,7 @@ coreToStgArgs (arg : args) -- Non-type argument fvs = args_fvs `unionFVInfo` arg_fvs stg_arg = case arg' of StgApp v [] -> StgVarArg v - StgConApp con [] -> StgVarArg (dataConWrapId con) + StgConApp con [] -> StgVarArg (dataConWorkId con) StgLit lit -> StgLitArg lit _ -> pprPanic "coreToStgArgs" (ppr arg) in