There appears to be a bug with datatype replication when the to-be-replicated type is brought into scope by an open.
[fluet@shadow tmp]$ poly Poly/ML 5.3 Release candidate 1
structure S1 = struct open Date datatype t = datatype weekday end;
Exception- InternalError: codeVal - Formal raised while compiling
Exception- InternalError: codeVal - Formal raised while compiling
Also, the Definition allows binding non-datatypes with datatype replication, so the following should be accepted:
[fluet@shadow tmp]$ poly
Poly/ML 5.3 Release candidate 1
structure S2 = struct datatype t = datatype char end;
Error-char is not a datatype Found near datatype t = datatype char Static Errors
Matthew Fluet wrote:
There appears to be a bug with datatype replication when the to-be-replicated type is brought into scope by an open.
[fluet@shadow tmp]$ poly Poly/ML 5.3 Release candidate 1
structure S1 = struct open Date datatype t = datatype weekday end;
Exception- InternalError: codeVal - Formal raised while compiling
Exception- InternalError: codeVal - Formal raised while compiling
Thanks. Now fixed.
Also, the Definition allows binding non-datatypes with datatype replication, so the following should be accepted:
[fluet@shadow tmp]$ poly
Poly/ML 5.3 Release candidate 1
structure S2 = struct datatype t = datatype char end;
Error-char is not a datatype Found near datatype t = datatype char Static Errors
I think you're right and I've removed this check so it's now allowed. The Definition seems to allow an arbitrary type structure to be replicated so the following is also legal: type 'a t = 'a * 'a; datatype s = datatype t;
David
David,
As I am not using the X Windows support at the moment, everything is OK for me on Snow Leopard with Poly/ML at revision 881. However, configure is still not recognising that X is present as we discussed in:
http://lists.inf.ed.ac.uk/mailman/private/polyml/2009-September/000579.html
I have also tried revision 882 on Ubuntu 8.04 running on a 32 bit Pentium. That's OK for ProofPower, but there is a different problem with the X Window support. configure does detect X, but if I use --with-x, the compilation fails as follows:
Error- in 'mlsource/extra/XWindows/ml_bind.ML', line 2447. Value or constructor (PrettyString) has not been declared in structure PolyML Found near let val R = DestructRect(r) in PolyML.PrettyString(^( "Rect ", ...(...))) end Error- in 'mlsource/extra/XWindows/ml_bind.ML', line 2450. Value or constructor (addPrettyPrinter) has not been declared in structure PolyML Found near let open XWindows; fun ...(...) = let ... in ... end in PolyML.addPrettyPrinter(printRect) end mlsource/extra/XWindows was not declared make[2]: *** [polyexport.o] Error 1 make[2]: Leaving directory `/home/rda/poly/latest/polyml/polyml' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/rda/poly/latest/polyml/polyml' make: *** [all] Error 2
Regards,
Rob.
Rob,
Rob Arthan wrote:
As I am not using the X Windows support at the moment, everything is OK for me on Snow Leopard with Poly/ML at revision 881. However, configure is still not recognising that X is present as we discussed in:
http://lists.inf.ed.ac.uk/mailman/private/polyml/2009-September/000579.html
Quoting that message:
One thing that won't hurt me at the moment, but may affect other users is that the configure script is not finding the X Windows installation that comes with MacOS X. As far as I can see this is just because the test it uses needs to specify -L/usr/X11R6/lib.
configure.ac uses the AC_PATH_X macro to set the include and library path. I can't find /usr/X11R6/lib hardcoded anywhere. See http://www.gnu.org/software/autoconf/manual/html_node/System-Services.html I don't know why this isn't working.
The link I sent says:
? Macro: AC_PATH_X
Try to locate the X Window System include files and libraries. If the user gave the command line options --x-includes=dir and --x-libraries=dir, use those directories.
If either or both were not given, get the missing values by running xmkmf (or an executable pointed to by the XMKMF environment variable) on a trivial Imakefile and examining the makefile that it produces. Setting XMKMF to ?false? disables this method.
If this method fails to find the X Window System, configure looks for the files in several directories where they often reside. If either method is successful, set the shell variables x_includes and x_libraries to their locations, unless they are in directories the compiler searches by default.
If both methods fail, or the user gave the command line option --without-x, set the shell variable no_x to ?yes?; otherwise set it to the empty string.
Did you look at xmkmf to see what it was producing? The configure script does essentially the following:
mkdir tempdir cd tempdir mkdir conftest.dir tr '#' '\t' <<'EOF' >Imakefile incroot: #@echo incroot='${INCROOT}' usrlibdir: #@echo usrlibdir='${USRLIBDIR}' libdir: #@echo libdir='${LIBDIR}' EOF xmkmf make incroot make usrlibdir make libdir
On my machine that produces: david@dunedin:/tmp/tempdir$ make incroot incroot=/usr/include david@dunedin:/tmp/tempdir$ make usrlibdir usrlibdir=/usr/lib david@dunedin:/tmp/tempdir$ make libdir libdir=/usr/lib/X11
Could you run this on your machine and see what it says?
I have also tried revision 882 on Ubuntu 8.04 running on a 32 bit Pentium. That's OK for ProofPower, but there is a different problem with the X Window support. configure does detect X, but if I use --with-x, the compilation fails as follows:
Error- in 'mlsource/extra/XWindows/ml_bind.ML', line 2447. Value or constructor (PrettyString) has not been declared in structure PolyML Found near let val R = DestructRect(r) in PolyML.PrettyString(^( "Rect ", ...(...))) end Error- in 'mlsource/extra/XWindows/ml_bind.ML', line 2450. Value or constructor (addPrettyPrinter) has not been declared in structure PolyML Found near let open XWindows; fun ...(...) = let ... in ... end in PolyML.addPrettyPrinter(printRect) end mlsource/extra/XWindows was not declared make[2]: *** [polyexport.o] Error 1 make[2]: Leaving directory `/home/rda/poly/latest/polyml/polyml' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/rda/poly/latest/polyml/polyml' make: *** [all] Error 2
It was trying to install a pretty printer for the XRectangle type. I've commented it out, at least for the moment so it should build on both 5.2 and 5.3. I don't know if that's something you use.
Regards, David
David,
On Sunday 04 Oct 2009 2:58 pm, David Matthews wrote:
Rob,
Rob Arthan wrote:
As I am not using the X Windows support at the moment, everything is OK for me on Snow Leopard with Poly/ML at revision 881. However, configure is still not recognising that X is present as we discussed in:
http://lists.inf.ed.ac.uk/mailman/private/polyml/2009-September/000579.ht ml
Quoting that message:
One thing that won't hurt me at the moment, but may affect other users is that the configure script is not finding the X Windows installation that comes with MacOS X. As far as I can see this is just because the test it uses needs to specify -L/usr/X11R6/lib.
configure.ac uses the AC_PATH_X macro to set the include and library path. I can't find /usr/X11R6/lib hardcoded anywhere. See http://www.gnu.org/software/autoconf/manual/html_node/System-Services.htm l I don't know why this isn't working.
The link I sent says:
? Macro: AC_PATH_X
Try to locate the X Window System include files and libraries. If
the user gave the command line options --x-includes=dir and --x-libraries=dir, use those directories.
If either or both were not given, get the missing values by running
xmkmf (or an executable pointed to by the XMKMF environment variable) on a trivial Imakefile and examining the makefile that it produces. Setting XMKMF to ?false? disables this method.
If this method fails to find the X Window System, configure looks
for the files in several directories where they often reside. If either method is successful, set the shell variables x_includes and x_libraries to their locations, unless they are in directories the compiler searches by default.
If both methods fail, or the user gave the command line option
--without-x, set the shell variable no_x to ?yes?; otherwise set it to the empty string.
Did you look at xmkmf to see what it was producing? The configure script does essentially the following:
mkdir tempdir cd tempdir mkdir conftest.dir tr '#' '\t' <<'EOF' >Imakefile incroot: #@echo incroot='${INCROOT}' usrlibdir: #@echo usrlibdir='${USRLIBDIR}' libdir: #@echo libdir='${LIBDIR}' EOF xmkmf make incroot make usrlibdir make libdir
On my machine that produces: david@dunedin:/tmp/tempdir$ make incroot incroot=/usr/include david@dunedin:/tmp/tempdir$ make usrlibdir usrlibdir=/usr/lib david@dunedin:/tmp/tempdir$ make libdir libdir=/usr/lib/X11
Could you run this on your machine and see what it says?
It says "xmkmf: command not found", which certainly explains the problem. It is a bit surprising that xmkmf is not there, but I don't know whether that's a a general problem with X on Snow Leopard or not. I did have to reinstall X at least once because the first time it (apparently) silently failed to install everything. Unfortunately, I don't have the media to hand to try again today. I think it is entirely reasonable to view this as a problem with the platform and not a problem with Poly/ML.
I have also tried revision 882 on Ubuntu 8.04 running on a 32 bit Pentium. That's OK for ProofPower, but there is a different problem with the X Window support. configure does detect X, but if I use --with-x, the compilation fails as follows:
Error- in 'mlsource/extra/XWindows/ml_bind.ML', line 2447. Value or constructor (PrettyString) has not been declared in structure PolyML Found near let val R = DestructRect(r) in PolyML.PrettyString(^( "Rect ", ...(...))) end Error- in 'mlsource/extra/XWindows/ml_bind.ML', line 2450. Value or constructor (addPrettyPrinter) has not been declared in structure PolyML Found near let open XWindows; fun ...(...) = let ... in ... end in PolyML.addPrettyPrinter(printRect) end mlsource/extra/XWindows was not declared make[2]: *** [polyexport.o] Error 1 make[2]: Leaving directory `/home/rda/poly/latest/polyml/polyml' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/rda/poly/latest/polyml/polyml' make: *** [all] Error 2
It was trying to install a pretty printer for the XRectangle type. I've commented it out, at least for the moment so it should build on both 5.2 and 5.3. I don't know if that's something you use.
Thanks, it builds on the Ubuntu system with --with-x now. The lack of a pretty-printer for the XRectangle type wouldn't have mattered in the developments with X that I have done in the past (and as I said I don't currently have any live code that uses the X Windows support).
Regards,
Rob.
Regards, David _______________________________________________ polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
Rob,
It says "xmkmf: command not found", which certainly explains the problem. It is a bit surprising that xmkmf is not there, but I don't know whether that's a a general problem with X on Snow Leopard or not. I did have to reinstall X at least once because the first time it (apparently) silently failed to install everything. Unfortunately, I don't have the media to hand to try again today. I think it is entirely reasonable to view this as a problem with the platform and not a problem with Poly/ML.
It seems that xmkmf has been dropped from Snow Leopard. See http://wiki.finkproject.org/index.php/Fink:xmkmf . This mentions autoconf as one of the problem areas and says: The "autoconf" ones are probably easy to fix (autoconf-2.62 has a fallback detection...
I built the configure script on Debian stable (lenny) which uses autoconf-2.61 . I'll try updating one of my machines to "testing" (squeeze) which includes autoconf 2.64 and see if that produces a configure script that works.
Regards, David
David,
To give you a break from bug reports, I am happy to report that hamlet both compiles and then bootstraps under the latest version of Poly/ML.
Regards,
Rob.
Rob,
David Matthews wrote:
It says "xmkmf: command not found", which certainly explains the problem. It is a bit surprising that xmkmf is not there, but I don't know whether that's a a general problem with X on Snow Leopard or not. I did have to reinstall X at least once because the first time it (apparently) silently failed to install everything. Unfortunately, I don't have the media to hand to try again today. I think it is entirely reasonable to view this as a problem with the platform and not a problem with Poly/ML.
It seems that xmkmf has been dropped from Snow Leopard. See http://wiki.finkproject.org/index.php/Fink:xmkmf . This mentions autoconf as one of the problem areas and says: The "autoconf" ones are probably easy to fix (autoconf-2.62 has a fallback detection...
I built the configure script on Debian stable (lenny) which uses autoconf-2.61 . I'll try updating one of my machines to "testing" (squeeze) which includes autoconf 2.64 and see if that produces a configure script that works.
I've now installed an updated version of the configure script built with autoconf 2.64. Could you test it to see if this detects X-windows correctly? I've also installed an official version of config.guess rather than my patched version. This ought to detect 64-bit on Snow Leopard. Can you let me know if that works as well?
Regards, David
David,
Revision 887 compiles fine on Snow Leopard with just --prefix specified on the configure command, but it is still not detecting X Windows.
Regards,
Rob.
On 6 Oct 2009, at 11:16, David Matthews wrote:
Rob,
David Matthews wrote:
It says "xmkmf: command not found", which certainly explains the problem. It is a bit surprising that xmkmf is not there, but I don't know whether that's a a general problem with X on Snow Leopard or not. I did have to reinstall X at least once because the first time it (apparently) silently failed to install everything. Unfortunately, I don't have the media to hand to try again today. I think it is entirely reasonable to view this as a problem with the platform and not a problem with Poly/ML.
It seems that xmkmf has been dropped from Snow Leopard. See http://wiki.finkproject.org/index.php/Fink:xmkmf . This mentions autoconf as one of the problem areas and says: The "autoconf" ones are probably easy to fix (autoconf-2.62 has a fallback detection... I built the configure script on Debian stable (lenny) which uses autoconf-2.61 . I'll try updating one of my machines to "testing" (squeeze) which includes autoconf 2.64 and see if that produces a configure script that works.
I've now installed an updated version of the configure script built with autoconf 2.64. Could you test it to see if this detects X- windows correctly? I've also installed an official version of config.guess rather than my patched version. This ought to detect 64-bit on Snow Leopard. Can you let me know if that works as well?
Regards, David _______________________________________________ polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
Rob,
Rob Arthan wrote:
Revision 887 compiles fine on Snow Leopard with just --prefix specified on the configure command, but it is still not detecting X Windows.
Since I don't have access to a machine where I can really test any further at the moment this I would prefer to leave this. I can build X-windows support on Debian (lenny) with xmkmf deliberately disabled but that may be because the X-libraries are in a fairly obvious location.
I would guess you could explicitly specify the include and library paths if you needed to.
Regards, David