
Malcolm wrote:
This demo page appears totally blank to me. (Using Safari under MacOS X 10.4.8). The Javascript console tells me there was a "Type Error line 1".
I wish it could tell line1 of what: of the first script or whatever else (MSIE reports line number of the whole HTML). But it probably won't tell. I also received a message about some weird error in Opera. There is indeed a much smaller test (if the script size is a real problem) which just outputs into the browser's status line: http://www.golubovsky.org/repos/yhc/src/translator/js/test/Test1.html The source is here: http://www.golubovsky.org/repos/yhc/src/translator/js/test/Test1.hs It should output this (absolute nonsense) in the status line: aaa,bbb,ertyuedacdabyrvalg Does at least this one work? -- Dimitry Golubovsky Anywhere on the Web

Hi Dimitry,
This demo page appears totally blank to me. (Using Safari under MacOS X 10.4.8). The Javascript console tells me there was a "Type Error line 1".
I also received a message about some weird error in Opera.
Under Opera its also blank to me (but an old version definately worked) The problem seems to be with this line (2620): var StdOverlay_46_95LAMBDA450=new HSFun("StdOverlay._LAMBDA450", 0, function(){return new String("function(x,y){return (x - (x % y))/y;}(exprEval(a),exprEval(b));");}); Where as far as I can see a and b are undefined? Althougth the the error message points at a syntax error, with the function(x, being the culprit Thanks Neil

Neil, Malcolm,
On 11/13/06, Neil Mitchell
Hi Dimitry,
This demo page appears totally blank to me. (Using Safari under MacOS X 10.4.8). The Javascript console tells me there was a "Type Error line 1".
I also received a message about some weird error in Opera.
Under Opera its also blank to me (but an old version definately worked)
The problem seems to be with this line (2620):
var StdOverlay_46_95LAMBDA450=new HSFun("StdOverlay._LAMBDA450", 0, function(){return new String("function(x,y){return (x - (x % y))/y;}(exprEval(a),exprEval(b));");});
Where as far as I can see a and b are undefined?
What you see indeed should not be there, but I don't know how to get rid of it. There is the `unsafeJS' pseudo-function (indeed this is kind of a macro) which takes a string literal as an argument. The converter detects such function application and creates a wrapper which is used to call this code from Haskell. So, x % y occurs in two places: var Prelude_46Prelude_46Integral_46Prelude_46Int_46quot=new HSFun(" Prelude.Prelude.Integral.Prelude.Int.quot", 2, function(v26142, v26143){return function(x,y){return (x - (x % y))/y;}(Number(exprEval(v26142)),Number(exprEval(v26143)));}); This is the inlining of the QUOT_W primitive. var YHC_46Primitive_46primIntegerQuot=new HSFun(" YHC.Primitive.primIntegerQuot", 2, function(a, b){ function(x,y){return (x - (x % y))/y;}(exprEval(a),exprEval(b));}); Color code: body wrapper This comes from the Overlay: global_YHC'_Primitive'_primIntegerQuot a b = unsafeJS "function(x,y){return (x - (x % y))/y;}(exprEval(a),exprEval(b));" In this function, you may see that a and b are formal arguments. The anonymous function is applied to them (after each one is forced to evaluate). What you refer to, LAMBDA450, is used for the second declaration. It was an argument to unsafeJS. What it contains inside is just a string literal, and if Safari is trying to interpret it as a code to execute, this is not a right thing. I also received a weird error report about Opera (also involving function(x,y)). I am going to ask at both browsers' forums. Maybe someone will be able to explain these problems. This runs w/o problems in Netscape, FireFox, and MSIE. -- Dimitry Golubovsky Anywhere on the Web

Neil, Malcolm, Please check this link: http://www.golubovsky.org/repos/Echo_20061114_opera.html Updated after I got an advice at the Opera forum. -- Dimitry Golubovsky Anywhere on the Web

Hi Dimitry,
http://www.golubovsky.org/repos/Echo_20061114_opera.html
Updated after I got an advice at the Opera forum.
Works perfectly on Opera. Thanks Neil

"Neil Mitchell"
Works perfectly on Opera.
... but still fails to work on Safari. Regards, Malcolm

On 11/14/06, Malcolm Wallace
"Neil Mitchell"
wrote: Works perfectly on Opera.
... but still fails to work on Safari.
It works on Konqueror 3.5.5 though, which is odd as they are quite closely related. Andrew

"Dimitry Golubovsky"
This demo page appears totally blank to me. (Using Safari under MacOS X 10.4.8). The Javascript console tells me there was a "Type Error line 1".
I wish it could tell line1 of what: of the first script or whatever else (MSIE reports line number of the whole HTML). But it probably won't tell.
I couldn't find much more information about the error, no, although on a different machine (older version of Safari), it says "Type error: undefined (line 0)".
There is indeed a much smaller test (if the script size is a real problem) which just outputs into the browser's status line:
http://www.golubovsky.org/repos/yhc/src/translator/js/test/Test1.html
This one works just fine. Regards, Malcolm
participants (4)
-
Andrew Wilkinson
-
Dimitry Golubovsky
-
Malcolm Wallace
-
Neil Mitchell