
tor 2003-04-24 klockan 04.19 skrev Isaac Jones:
Python seems to have a very promising approach to this same issue which is (IMO) more in line with what SimonPJ and SimonMar have said. I don't really use Python much, though so don't count on my being 100% correct here: http://www.python.org/sigs/distutils-sig/doc/
Indeed, distutils is great. I have written pure python modules and C extension modules, and mixed modules, and it all works like a charm. Plus, you have the full power of python in your setup.py script so you can do lots of neat things.
In particular, see the requirements of this system below [1]. Based on the post I'm replying to, Simon Marlow might disagree with some of these requirements, and distutils doesn't seem to implement anything having to do with selecting compilers. HMake could help fill in the gap there.
What do you mean distutils not selecting compilers? It finds gcc on my linux machine and on Solaris, and I think it probes for some windows compilers too. I don't know about e.g. macos.
There might be a "bootstrapping" issue here that isn't an issue with Python since a "Setup.hs" script won't necessarily know which compiler is installed. One solution is for the compilers to standardized on something like "/usr/bin/runhaskell", but then the user would need a way to choose a default. "hmake interactive" might get us there, if there were a way to invoke it like runhugs, and hmake already has the idea of a default compiler.
Not all compilers *have* an interactive mode, do they? I thought nhc98 was just a compiler? This makes it tricky. Another problem is that when you run 'hugs File.hs' or 'ghci File.hs', they start interactive mode, 'python file.py' runs the program. Are there flags to all interpreters that run main automatically? I know there's runhugs for example, but what about ghc(i)? What about nhc98? /Martin -- Martin Sjögren sjogren@debian.org -- marvin@dum.chalmers.se GPG key: http://www.mdstud.chalmers.se/~md9ms/gpg.html let hello = "hello" : hello in putStr (unlines hello)