Re: scripts on unix

2007-03-15 Thread Sven Panne
On Thursday 15 March 2007 15:50, I wrote: > [...] Same question for runhugs, as the corresponding executable is called > hugs98. [...] Oops, I mixed up the RPM package name and the executable name. The former is hugs98, the latter simply hugs, so runhugs is totally OK. Cheers, S.

Re: scripts on unix

2007-03-15 Thread Sven Panne
On Thursday 15 March 2007 15:27, Malcolm Wallace wrote: > Sven Panne <[EMAIL PROTECTED]> wrote: > > And 'runhs' is actually not a very good name to run nhc98, > > runnhc or runnhc98 would be much better IMHO. > > Well, I chose 'runhs', because it can equally well invoke ghc, hbc, yhc > nhc98,

Re: scripts on unix

2007-03-15 Thread Malcolm Wallace
Sven Panne <[EMAIL PROTECTED]> wrote: > And 'runhs' is actually not a very good name to run nhc98, > runnhc or runnhc98 would be much better IMHO. Well, I chose 'runhs', because it can equally well invoke ghc, hbc, yhc nhc98, or whatever. It is an extension of hmake, which is compiler-inde

Re: scripts on unix

2007-03-15 Thread Dinko Tenev
FWIW, I used to employ a combination of environment vars and registry entries (for file associations) on Windows in order to be able to work with multiple GHC versions. The environment vars (e.g. for PATH or LIB inclusion) would all depend on a GHC_HOME var, which could be redefined to point to t

Re: scripts on unix

2007-03-15 Thread Frederik Eaton
Is there an alternative? I try not to couple interface with implementation, and since not everything I write is in Haskell that is an aspect of the implementation. On Thu, Mar 15, 2007 at 12:16:09AM +0300, Bulat Ziganshin wrote: > Hello Frederik, > > Wednesday, March 14, 2007, 10:31:55 PM, you wr

Re: scripts on unix

2007-03-15 Thread Sven Panne
On Thursday 15 March 2007 10:56, Malcolm Wallace wrote: > [...] If you install hmake, and change 'runhaskell' to runhs, it works. This reminds me of something, at least for the Linux world: No Haskell compiler/interpreter should directly install 'runhaskell'. Instead of that, it should only dire

Re: scripts on unix

2007-03-15 Thread Malcolm Wallace
Frederik Eaton <[EMAIL PROTECTED]> wrote: > What is the proper technique for creating a Haskell script on a Unix > system? > > $ cat test > #!/usr/bin/env runhaskell > module Main where > main = do > putStrLn "hello world" If you install hmake, and change 'runhaskell' to runhs, it works. Re

Re: scripts on unix

2007-03-14 Thread David Brown
Frederik Eaton wrote: > Scripts are tidy, since they're also a source file and you don't have > to worry about keeping a separate binary executable up to date. I'm > sure this topic has been well discussed on the vast internet. For > instance, look at Setup.hs in Cabal. That could be called a scrip

Re: scripts on unix

2007-03-14 Thread Matthew Danish
On Wed, Mar 14, 2007 at 07:31:55PM +, Frederik Eaton wrote: > Hello, > > What is the proper technique for creating a Haskell script on a Unix > system? File.lhs: #!/usr/bin/env runhaskell \begin{code} ... \end{code} With a literate code file, the #! should cause no issues. -- -- Matthew D

Re: scripts on unix

2007-03-14 Thread Frederik Eaton
Scripts are tidy, since they're also a source file and you don't have to worry about keeping a separate binary executable up to date. I'm sure this topic has been well discussed on the vast internet. For instance, look at Setup.hs in Cabal. That could be called a script, because it is rarely compil

Re: scripts on unix

2007-03-14 Thread Bulat Ziganshin
Hello Frederik, Wednesday, March 14, 2007, 10:31:55 PM, you wrote: > What is the proper technique for creating a Haskell script on a Unix > system? try to give them a .hs extension :) -- Best regards, Bulatmailto:[EMAIL PROTECTED] _

Re: scripts on unix

2007-03-14 Thread Seth Kurtzberg
I compile the programs, instead of trying to run them as scripts. Is there any reason you prefer to interpret the scripts? I'm not saying it's not a legitimate thing to do, just wondering why you prefer to do it that way. Seth Kurtzberg On Wed, 14 Mar 2007 19:31:55 + Frederik Eaton <[EMA