import CostCentre ( currentOrSubsumedCCS, dontCareCCS, CostCentreStack,
currentCCS )
import DataCon ( DataCon, dataConName, dataConTag,
- isUnboxedTupleCon, isNullaryDataCon, dataConId, dataConWrapId
+ isUnboxedTupleCon, isNullaryDataCon, dataConId,
+ dataConWrapId, dataConRepArity
)
import Id ( Id, idName, idPrimRep )
import Literal ( Literal(..) )
-> FCode (Id, CgIdInfo)
cgTopRhsCon id con args
= ASSERT(not (isDllConApp con args)) -- checks for litlit args too
+ ASSERT(length args == dataConRepArity con)
let
name = idName id
closure_label = mkClosureLabel name
cgReturnDataCon :: DataCon -> [CAddrMode] -> Code
cgReturnDataCon con amodes
- = getEndOfBlockInfo `thenFC` \ (EndOfBlockInfo args_sp sequel) ->
+ = ASSERT(length amodes == dataConRepArity con)
+ getEndOfBlockInfo `thenFC` \ (EndOfBlockInfo args_sp sequel) ->
case sequel of