diff options
Diffstat (limited to 'compiler/codeGen/CgCon.lhs')
| -rw-r--r-- | compiler/codeGen/CgCon.lhs | 11 | 
1 files changed, 5 insertions, 6 deletions
| diff --git a/compiler/codeGen/CgCon.lhs b/compiler/codeGen/CgCon.lhs index 9049504dca..aff5e468ca 100644 --- a/compiler/codeGen/CgCon.lhs +++ b/compiler/codeGen/CgCon.lhs @@ -72,13 +72,12 @@ cgTopRhsCon id con args          ; when (platformOS (targetPlatform dflags) == OSMinGW32) $                -- Windows DLLs have a problem with static cross-DLL refs.                ASSERT( not (isDllConApp dflags con args) ) return () -        ; ASSERT( args `lengthIs` dataConRepArity con ) return () +        ; ASSERT( args `lengthIs` dataConRepRepArity con ) return ()          -- LAY IT OUT          ; amodes <- getArgAmodes args          ; let -            platform = targetPlatform dflags              name          = idName id              lf_info       = mkConLFInfo con              closure_label = mkClosureLabel name $ idCafInfo id @@ -92,7 +91,7 @@ cgTopRhsCon id con args              payload = map get_lit amodes_w_offsets              get_lit (CmmLit lit, _offset) = lit -            get_lit other = pprPanic "CgCon.get_lit" (pprPlatform platform other) +            get_lit other = pprPanic "CgCon.get_lit" (ppr other)                  -- NB1: amodes_w_offsets is sorted into ptrs first, then non-ptrs                  -- NB2: all the amodes should be Lits! @@ -324,7 +323,7 @@ cgReturnDataCon con amodes        -- for it to be marked as "used" for LDV profiling.    | opt_SccProfilingOn    = build_it_then enter_it    | otherwise -  = ASSERT( amodes `lengthIs` dataConRepArity con ) +  = ASSERT( amodes `lengthIs` dataConRepRepArity con )      do  { EndOfBlockInfo _ sequel <- getEndOfBlockInfo          ; case sequel of              CaseAlts _ (Just (alts, deflt_lbl)) bndr @@ -466,8 +465,8 @@ cgDataCon data_con                                  ; ldvEnter (CmmReg nodeReg)                                  ; body_code } -            arg_reps :: [(CgRep, Type)] -            arg_reps = [(typeCgRep ty, ty) | ty <- dataConRepArgTys data_con] +            arg_reps :: [(CgRep, UnaryType)] +            arg_reps = [(typeCgRep rep_ty, rep_ty) | ty <- dataConRepArgTys data_con, rep_ty <- flattenRepType (repType ty)]              body_code = do {                          -- NB: We don't set CC when entering data (WDP 94/06) | 
