The source of problems come from my hacked together method of quickly creating an XMLParser as described in my My Thoughts on F# post.
XMLParserFS works by using an XMLTextReader to read through a file and create a "construction string" based on the XML file of what object to create. It then "runs" this "construction string" in the style of the java "eval" command. Obviously the way to do this is through reflection - I haven't yet used Reflection really before, and at the time just wanted a quick and dirty way of doing it. Hence I had a little search and found this: http://www.codeproject.com/dotnet/evaluator.asp. This was basically the source code for an eval function string -> object as I required. I decided to use this, and compiled it in the Eval dll. I should have included a note to this effect in there crediting it and posting a link, but this is the reason I didn't include the source code for this binary there - because it wasn't mine.
The evaluator above works by creating a binary in C# from the source code (of the creation string) and then running that binary. Since this binary created needs to be able to access the classes inside RayTracer.fs - in order to be able to construct instances of them to return - I couldn't compile it as a standalone exe, as this prevents external access to your classes (or at least I believe it did at the time of writing.) This explains why I did not take the approach of the first bullet point and why the second bullet point did not work. The third bullet point failed as when eval dynamically creates the code it looks for the fslib and mllib dlls in the location of the other binaries to link the dynamically created binary to.
The source of all the problems here is the method of converting the constructor-string created by the XMLParser into an actual object. The eval dll creates a binary from this source (using CodeCom etc) and then runs it. I haven't yet looked into Reflection to see if there is a better way of doing this (it is on my My Thoughts in F#: Developments list,) but I can still imagine that the classes need to be public for it to work, which prevents standalone linkage. Is it definately the case that standalone static linkage prevents publicly exposing the classes? Does anyone here with a greater understanding of Reflection know of a better way of doing this string-to-object conversion? I will look into it myself at some point.
Thanks for the comments on the code Don :-) I agree that indeed comments for it would be good, as would #light and more intendation, and shall try to do this soon and update the link. It is indeed precisely the .LMC method that prevented me using an interface for CSG. Also I do use lots of lists, but each particular list generally isn't that long so I felt that the linear look-up time wouldn't be that much of an issue (lists of three points for vectors, lists of intervals, lists of objects etc all in general would contain a reasonably small number of elements.) But of course this would be a way of improving performance (as of course would using more compiler optimisation which I didn't do but I see you have above.)