Hi Sebastian Sebastian Hanowski wrote:
But as the program doesn't elaborate as a whole, i'm not sure wether i did make a mistake and Epigram just accepts it in its too liberal interactive mode, an issue which Peters latest posting led me to think about.
I just tried your file, and it worked when I elaborated the sheds you left one at a time. Once it was complete, I copied it away and tried to reload it in one go, which also works. Mysterious. Can anybody else reproduce the problem?
The issue of interactive versus batch boils down to this: Epigram uses different code to generate and to reload left-hand-sides. The former just prints a known lhs over a context with known names, but it (wrongly) doesn't check which names from the context actually appear in the lhs; the latter checks the correspondence between a desired pattern and a supplied pattern, starting with inaccessible names but renaming whenever something gets used. Hence, interactively, it's unfortunately possible to use names on the right which aren't bound on the left.
Now, a sensible implementation would, I suspect, generate left-hand sides as concrete syntax (this has to be done anyway, so they can be sent to the editor for display), then load them as if they had come from the programmer. Moreover, an improved language design would provide some means to access information which is present in the context but not showing up in patterns...
Cheers Conor