#1232: unix-compatible interpreter needed for ghc (desperately)
-------------------------+--------------------------------------------------
    Reporter:  Frederik  |       Owner:         
        Type:  bug       |      Status:  new    
    Priority:  normal    |   Milestone:         
   Component:  Compiler  |     Version:  6.6    
    Severity:  normal    |    Keywords:         
  Difficulty:  Unknown   |    Testcase:         
Architecture:  Unknown   |          Os:  Unknown
-------------------------+--------------------------------------------------
The GHC installation should include an executable (either a binary or e.g.
 /bin/sh script) which can be used at the top of files with the unix "#!"
 mechanism to create an executable script. Malcolm Wallace points out that
 runhs from the hmake distribution can be used for this, but it should
 really be part of GHC.

 http://www.haskell.org/pipermail/glasgow-haskell-users/2007-
 March/012172.html

 Now that Simon Marlow (?) has implemented the '-x' option to allow files
 to use arbitrary extensions, this should be as easy as a 2 or 3 line shell
 script, although I don't know if runghc recognises -x so maybe there is a
 bit more work to be done.

 I would suggest that the name of the executable be 'runhs-ghc' and that a
 link should be created called 'runhs' (similar to 'runhaskell'; also
 included in /etc/alternatives/ in Debian) which can be shared with other
 compilers/interpreters.

 For instance, if runghc recognised -x then the following would work as the
 contents of runhs-ghc:

 #!/bin/sh
 /path/to/runghc -x hs "$@"

 (The /path/to/runghc should point to the runghc which is installed at the
 same time as the above script is installed, so it will not be as simple as
 copying the script into place - some variable substitution will be needed
 - I think this is standard practice, see the 'firefox' script on a Linux
 distro for an example of such binding)

 Thanks,

 Frederik

-- 
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
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to