[GHC] #3802: :main in GHCi doesn't do getArgs wildcard expansion
GHC
trac at galois.com
Sun Jan 10 18:22:24 EST 2010
#3802: :main in GHCi doesn't do getArgs wildcard expansion
---------------------------------+------------------------------------------
Reporter: NeilMitchell | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: GHCi | Version: 6.12.1
Keywords: | Difficulty:
Os: Windows | Testcase:
Architecture: Unknown/Multiple | Failure: Incorrect result at runtime
---------------------------------+------------------------------------------
Comment(by simonmar):
On Windows it is true that the program does globbing, but that's because
Windows made an astonishingly bad mistake here. On Windows you can even
use globbing in the arguments to `rawSystem`, but only if the program
you're invoking supports globbing.
Would you expect `:main <foo.txt` to work? I expect not. There's a
slippery slope here, where we could end up implementing more and more
shellisms in `:main` (and which shell syntax?). On the other hand, we
already implement a little shell syntax, in that we do word-splitting and
quoting on the arguments to `:main`.
One interpretation of `:main` is that it is nothing but shorthand for
`withArgs xs $ Main.main`. This interpretation I like, because it is easy
to explain, and is platform-independent.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3802#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list