On Tue, 6 Nov 2001 00:48:12 GMT, Hal Daume wrote:
and whatnot. i'd like to be able to write something like:
#!/usr/local/ghc/bin/ghc main = do putStrLn "foo"
and whatnot, even if I have to explicitely say something like:
#!/usr/local/ghc/bin/ghc module Main(main) where main = do putStrLn "foo"
I guess you want to run ghci or hugs, not ghc. You should be able to implement this easily. I'm not running UNIX/Linux here, so I can't test it, but this should work fine just by specifying the correct executable path. The only problem I'm aware of is that the first line (the #! line) might be included in the input piped into the program, which means that you'll have to run it through a filter. But that filter should be very easy to make using awk or something like that. You could even make it in Haskell, if you want, and you could make it prepend the "module" header, too, for convenience. Salutaciones, JCAB email: jcab@roningames.com ICQ: 101728263 The Rumblings are back: http://www.JCABs-Rumblings.com