[m-dev.] for review: Mercury Coding Challenge
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Jan 12 17:23:15 AEDT 1999
On 12-Jan-1999, Peter Ross <petdr at cs.mu.OZ.AU> wrote:
> To celebrate the release of Mercury 0.8, the Mercury team is pleased to
> announce a Mercury Coding Challenge.
Here's some comments:
- "io:state" should be "io__state". Please don't encourage people
to use `:' as module separator as this is likely to change in some
future version of Mercury.
- in project.tex, "ai" should be "AI".
- in project.tex, the "\\1"s in the text below are typos, I think:
> You should write a predicate {\tt human\\1} which returns an initial
> human player, just as {\tt silly\\1} returns an initial silly player.
- There are currently some bugs in the Mercury compiler's handling
of exported instance declarations. The instance declaration in silly.m
probably shouldn't be allowed, since the it refers to entites which are
not declared in the module interface. Eventually, you ought to be
able to write just an abstract instance declaration in the interface
:- instance player(silly).
with the instance definition occurring in the implementation section,
but currently we don't support abstract instance declarations.
Given that we don't support abstract instance declarations, I suppose
the fact that we don't report an error for instance declarations
like the one in silly.m could I suppose be considered a feature ;-)
I also just discovered there are some bugs in the current compiler that
mean that intermodule optimization won't work for any module which imports
silly.m.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh> | but source code lives forever"
PGP: finger fjh at 128.250.37.3 | -- leaked Microsoft memo.
More information about the developers
mailing list