On 20/09/2013 08:59, Anthony Fox wrote:
1. I’ve noticed a change in evaluation behaviour between PolyML 5.5.0 and 5.5.1. Given the functions: fun foo () = let val () = print "x\n" in SOME end fun bar f = List.mapPartial (Option.compose (Int.~, f ())) [1, 2, 3] then under 5.5.0 “bar foo” gives us x val it = [~1, ~2, ~3]: int list whereas under 5.5.1 we get x x x val it = [~1, ~2, ~3]: int list What’s happening here?
This doesn't look good. I need to investigate further but it looks as though a bug has crept in during the work on the intermediate code optimiser.
2. I’ve installed Poly/ML 5.5.1 using MacPorts (Mac OS 10.8.5). When using polyc I get a couple of warning messages, i.e. $ polyc -o foo foo.o gives me ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in area1 from vimpoly.o. To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie Is there any way to suppress this? When using cc for linking, one can get rid of these messages by adding -Wl,-no_compact_unwind,-no_pie Is this advisable or is there a better solution?
I've done a search on this. It looks as though it has something to do with libffi (_ffi_call_unix64 is certainly part of libffi). I don't know if there's a newer version of libffi around that fixes this.
3. I’ve managed to build HOL4 using 5.5.1 but we have lost our prompt. My understanding is as follows: $ foo | poly suppresses the prompt $ foo | poly -i brings the prompt back. However, if program “bar” is based on using PolyML.rootFunction (as HOL4 is) then we get $ bar prompt $ foo | bar no prompt. Since piping (a quotation filter) is used with HOL4, we get the latter. How do we implement the “-i” option to get our prompt back?
You should just be able to run "bar -i". PolyML.rootFunction decodes the arguments which it gets with CommandLine.arguments. You can, of course, implement your own top-level loop. It's actually very simple: all the real work is done with PolyML.compiler.
David _______________________________________________ polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml