Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000085Core InformPhrases and functional programmingpublic2010-06-21 11:432010-07-01 23:07
ReporterEmacsUser 
Assigned Tograham 
PrioritynormalSeveritycosmeticReproducibilityalways
StatusclosedResolutionfixed 
Platformx86OSMac OS XOS Version10.4
Product Version6E59 
Target VersionFixed in Version6E72 
Summary0000085: Invoking a phrase that cannot be applied unambiguously changes the errors emitted
DescriptionThis source was originally meant to test how Inform would apply a phrase that has different semantics according to whether it is mapped or not. Without the ``when play begins'' code, I think the error message is the correct one, though it doesn't point directly to accepting a list of generics as an argument. But compiling the complete source yields this lengthy complaint:


In Part SR5 - Phrasebook, Section SR5/2/20 - Values - Functional programming in the extension Standard Rules by Graham Nelson:

Problem. You wrote 'let the result be a list of Ls' : but this is a value which can't be given a temporary name, using 'let'.
I was trying to match one of these phrases:

1. let (result - a new name) be (list of ls - description of relations of values to values)
2. let (result - a new name) be (list of ls - name of kind)
3. let (result - a new name) be (list of ls - value)
4. let (result - a temporary named value) be (list of ls - value)
This was what I found out:

result = something unrecognised
list of Ls = a list of lists of lists of numbers
Problem. You wrote 'let the mapped item be the function applied to the item' : again, this is a value which can't be given a temporary name.
I was trying to match one of these phrases:

1. let (mapped item - a new name) be (function applied to the item - description of relations of values to values)
2. let (mapped item - a new name) be (function applied to the item - name of kind)
3. let (mapped item - a new name) be (function applied to the item - value)
4. let (mapped item - a temporary named value) be (function applied to the item - value)
This was what I found out:

mapped item = something unrecognised
function applied to the item = an instruction to work out a list of lists of numbers, which results in a list of lists of numbers
Problem. I am unable to create '<no text>' with the kind of value 'a list of lists of lists of numbers', because this is a kind of value which is not allowed as something to be stored in properties, variables and the like. (See the Kinds index for which kinds of value are available. The ones which aren't available are really for internal use by Inform.)
 See the manual: 4.12 > Values that vary
In the main source text:
Problem. The phrase 'let the output be the input' tries to use 'let' to give a temporary name to the empty list '{ }', but because it's empty, I can't tell what kind of value the list should have. Try 'let X be a list of numbers' (or whatever) instead.
 See the manual: 20.2 > Constant lists
I was trying to match one of these phrases:

1. let (output - a new name) be (input - description of relations of values to values)
2. let (output - a new name) be (input - name of kind)
3. let (output - a new name) be (input - value)
4. let (output - a temporary named value) be (input - value)
This was what I found out:

output = something unrecognised
input = a temporary named value, holding a list of values
Problem. I am unable to create '<no text>' with the kind of value 'a list of Ks', because this is a kind of value which is not allowed as something to be stored in properties, variables and the like. (See the Kinds index for which kinds of value are available. The ones which aren't available are really for internal use by Inform.)
Minimal Source Text To Reproduce
There is a room.	
To decide what list of Ks is flipped (input - a list of values of kind K) (this is flipping):
	let the output be the input;
	reverse the output;
	decide on the output.
When play begins:
	showme flipping applied to { {1, 2} }.
TagsNo tags attached.
Effect(cosmetic) Error message is badly worded
Attached Files

- Relationships

-  Notes
(0000126)
graham (administrator)
2010-06-22 14:29

Yes, the useful problem message was being reported too late - so that in the mean time, bad consequences had occurred, and these produced other and incomprehensible problem messages, and then because those had been issued the compiler never got to the stage at which it would have reported the useful message. I have now caused the useful message to be issued earlier in Inform's run so that this timing issue can't occur.

- Issue History
Date Modified Username Field Change
2010-06-21 11:43 EmacsUser New Issue
2010-06-21 17:23 jmcgrew Status new => confirmed
2010-06-22 14:29 graham Note Added: 0000126
2010-06-22 14:29 graham Status confirmed => resolved
2010-06-22 14:29 graham Resolution open => fixed
2010-06-22 14:29 graham Assigned To => graham
2010-06-30 18:07 jmcgrew Fixed in Version => 6E72
2010-07-01 23:07 jmcgrew Status resolved => closed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker