[project @ 2003-08-19 21:59:40 by krc]
authorkrc <unknown>
Tue, 19 Aug 2003 21:59:40 +0000 (21:59 +0000)
committerkrc <unknown>
Tue, 19 Aug 2003 21:59:40 +0000 (21:59 +0000)
commit0f9750be555082f42ac65a5e8029947bf23fc9e2
treef8438a60c2ee4565be0b8fd92d1a584b80773d8a
parentf3c159a95b436082c12b20063c13ab8ffe3da20a
[project @ 2003-08-19 21:59:40 by krc]
Two issues:

1. According to the spec for External Core, datatype declarations are required
to have at least one data constructor. Previously, if you tried to generate
External Core for a program containing a datatype declaration with no
constructors, generating the Core file would succeed, but compiling it would
result in a parse error. Changed MkExternalCore to signal an error if such
a declaration is encountered while compiling to External Core.

2. Previously, MachLabel literals were translated into Externals when compiling
to External Core. This is wrong -- such literals are not foreign calls and
can't be handled in the same way (compiling any External Core code generated
from code containing literals resulting from "foreign label" declarations would
result in a strange error message). There doesn't seem to be any way to
correctly represent these labels in External Core, so MkExternalCore now
signals an error if one of these is encountered as well.
ghc/compiler/coreSyn/MkExternalCore.lhs