>
> > The X-Windows/Motif code still builds as far as I'm aware but that's as
> > far as it goes. I would say it was better to use something else through
> > CInterface.
> >
> > The Poly/ML interactive environment (read-eval-print loop or REPL) is
> > usually the easiest way to develop and test your code. It prints the
> > types and values of top-level expressions. When building an application
> > it is probably easier to use "polyc". This is really a wrapper script
> > for "poly" which compiles, exports and links a stand-alone application.
> > You need to define a function called "main" that is the root function
> > of your application.
> >
> > $ cat > testme.ML
> > fun main() = print "Hello World\n";
> > $ polyc testme.ML
> > $ ./a.out
> > Hello World
> >
> > David Matthews
> >
>
> > > Thanks for your reply David, I will look into using CInterface. That
> > > makes me think that another approach could be to use an imperative
> > language
> > > for the GUI and link in the ML functions! That way existing GUI
> builders
> > > could be used. I will experiment.
> > >
I did get the interactive version of the sample Motif code to work OK, but
failed to get it to build stand-alone (i.e. using polyc). Perhaps the
polyc script doesn't include the needed Motif libraries? But also, my
limited understanding of how to incorporate that GUI code into a main
function may be to blame. I will keep trying, but after more reading, I am
beginning to think that my idea to use the CInterface backwards: calling ML
code from C rather than the other way around is not going to work! I had
been thinking that instead of wrapping some new GUI library around ML (like
the Motif code which seems to be obsolete), I could use existing C/C++ GUI
frameworks and have the logic of the program be in ML, but that means
calling ML functions from C. Can that be done?
What surprises me is that all these years of people using ML, but no one
has felt the need to write stand-alone programs for end-users that have a
GUI?
I don't see any example code that does that (I did see Polychrome within a
web browser). ...and some examples that mention Isabelle has an IDE -- not
PolyML though, just SML/NJ? and with Java required?)
-Dave