[GHC] #1232: generalise runhaskell to support arbitrary file names, not just those with .{l}hs extensions

GHC trac at galois.com
Sun Apr 22 14:03:45 EDT 2007


#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:  6.8        
Component:  Compiler         |        Version:  6.6        
 Severity:  normal           |     Resolution:             
 Keywords:  runhaskell       |     Difficulty:  Easy (1 hr)
 Testcase:                   |   Architecture:  Multiple   
       Os:  Unknown          |  
-----------------------------+----------------------------------------------
Comment (by guest):

 We are not suggesting that runhaskell should support a leading #! line -
 it already does. The argument is about whether it should support files
 that don't have an extension.

 Also, this is a tangent, but: for "files" that start with #!, I generally
 read the lines following the first line as the "real" file. I.e., if a
 file is being interpreted via the #! mechanism by runhaskell (or any other
 interpreter), then the interpreter should consider everything following
 the initial line to be the "real file" for the purposes of code parsing.
 If the interpreter doesn't know whether it is being run via "#!" or not,
 then it can simply check the first two characters of the file - if they
 are "#!" (which no legal haskell file starts with) then it should be safe
 to assume that it is. I don't really understand why a change to the
 language specification would be necessary in order for us to feel
 comfortable doing this. The only requirement for the specification need be
 that a leading '#!' should not have an alternative meaning, which I'm
 reasonably certain it never will.

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


More information about the Glasgow-haskell-bugs mailing list