#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)
Os: Unknown | Testcase:
Architecture: Multiple |
--------------------------------+-------------------------------------------
Changes (by Isaac Dupree):
* cc: [EMAIL PROTECTED] => [EMAIL PROTECTED],
[EMAIL PROTECTED]
Comment:
It bothers me that some cabal projects have `Setup.lhs`, some `Setup.hs`.
Unfortunately, rather than helping, this might add a third possibility,
`Setup`, which is incompatible with `ghc --make`'s naming scheme for the
produced executable!
Also it is impossible to infer .hs vs. .lhs, because files exist that are
both valid literate and non-literate haskell, that does different things
each way (of course real code would never look like this). A horrible
example I made sometime:
{{{
module Main where {
import Prelude hiding ((>)); (++)
> main = putStrLn ("Hello " ++ "literate world") >> main
; main = (\s1 s2 -> s1 ++ drop 9 s2) > (putStrLn "Done.")
}
}}}
(although more plausible in an actual file is
{{{
some non-literate code
blah blah
{- for example:
> some literate code
> blah blah
-}
{- or
\begin{code}
some literate code
\end{code}
-}
}}}
We could allow -xhs and -xlhs (or -x.hs, -x.lhs), so it's just one (short)
option, and require this -x option to be present for (run)ghc to accept a
file that doesn't end in .hs or .lhs.
Re: Frederik, See #1281 for the issue of which ghc is invoked by
runghc/runhaskell.
--
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