Add assertion for arity match (checks Trac #2844)
authorsimonpj@microsoft.com <unknown>
Mon, 8 Dec 2008 17:32:41 +0000 (17:32 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 8 Dec 2008 17:32:41 +0000 (17:32 +0000)
commit60881299e5fbceff0eec48fa58bc0eff24640ba3
tree4f7c20862cd498b7ea17301f947e68bf2495011e
parenta25bbd11544e29225ebb260306fe00b7108a3024
Add assertion for arity match (checks Trac #2844)

The exported arity of a function must match the arity for the
STG function.  Trac #2844 was a pretty obscure manifestation of
the failure of this invariant. This patch doesn't cure the bug;
rather it adds an assertion to CoreToStg to check the invariant
so we should get an earlier and less obscure warning if this
fails in future.
compiler/stgSyn/CoreToStg.lhs