waouwa / qilang

Automatically exported from code.google.com/p/qilang
0 stars 0 forks source link

Datatype declaration requires spurious newline #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a data type function with 2 variables and no new line after the
last statement. Test b : player and get a type error.

(datatype player
___
w : player ;
___
b : player ; )

2. Change the code to the following and test b : player. It is properly typed.

(datatype player
___
w : player ;
___
b : player ; 
)

3.

What is the expected output? What do you see instead?

You expect the 2 pieces of code to be the same but they unfortunately
produce different results.

Original issue reported on code.google.com by entropyf...@gmail.com on 2 May 2007 at 4:54

GoogleCodeExporter commented 9 years ago
I pasted your datatypes into Qi and the results were the same. Here is the 
script.

Qi 2007, Copyright (C) 2001-2007 Mark Tarver
www.lambdassociates.org
version 7.2

(0-) (tc +)
true

(1+) (datatype player
___
w : player ;
___
b : player ; )
player : unit

(2+)
w : player
w : player

(3+) b : player
b : player

(4+) (datatype player
___
w : player ;
___
b : player ;
)
======> Warning: redefining player can cause type errors.
player : unit

(5+) w : player
w : player

(6+) b : player
b : player

My only guess is that you may have been pasting into the Qi command window from 
within Windows.  There is an issue with doing that in Windows *which is not a 
Qi 
issue but a Windows issue*.  When pasting from Windows you have to be sure to 
include a line of whitespace around multiple line pasted text - otherwise you 
get 
this spurious invisible input.  This does not affect code loaded using 'load' 
in 
Qi.  

Mark

Original comment by dr.mtar...@gmail.com on 4 May 2007 at 9:51

GoogleCodeExporter commented 9 years ago
Windows copy-paste bug.

Original comment by entropyf...@gmail.com on 11 May 2007 at 3:39