#1232: generalise runhaskell to support arbitrary file names, not just those 
with
.{l}hs extensions
-----------------------------+----------------------------------------------
 Reporter:  Frederik         |          Owner:                  
     Type:  feature request  |         Status:  new             
 Priority:  normal           |      Milestone:                  
Component:  Compiler         |        Version:  6.6             
 Severity:  normal           |     Resolution:                  
 Keywords:  runhaskell       |     Difficulty:  Moderate (1 day)
 Testcase:                   |   Architecture:  Multiple        
       Os:  Unknown          |  
-----------------------------+----------------------------------------------
Comment (by Frederik):

 Yes, that's perhaps a better way of putting it. However, note that since
 for some obscure historical reason, only one option is allowed on the
 command line to an executable after "#!", the solution must not involve
 any extra options, for instance requiring "-x .hs" won't do. For a
 solution to be useful on Unix, there must be a command which will run a
 file with an arbitrary name as Haskell code, without needing extra
 options.

 Also, I was thinking that if runghc is going to compile the code anyway,
 then it might as well keep the compiled version around in the same
 directory as the source, so a script 'test' would cause an executable to
 be written e.g. to '.runghc-test' in the same directory, perhaps
 conditional on an environment variable being set. That would eliminate
 latency issues, if the executable is only recompiled when necessary. I
 could provide a perl script which does this using 'ghc --make'.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1232>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to