[GHC] #3802: :main in GHCi doesn't do getArgs wildcard expansion

GHC trac at galois.com
Mon Jan 4 12:12:21 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                     
  Resolution:                    |    Keywords:                             
          Os:  Windows           |    Testcase:                             
Architecture:  Unknown/Multiple  |     Failure:  Incorrect result at runtime
---------------------------------+------------------------------------------
Comment (by NeilMitchell):

 Actually, in Windows I believe it is GHC that does the wildcard expansion
 - not the shell. Either way, the intention of :main is to test the program
 as though you were running it from the command line, which means that
 getArgs should really do the expansion.

 I am happy for this to be a Windows only fix, or for it to use the Windows
 expansion GHC defaults to on all platforms. For Unix you could always do
 system ("echo " ++ args) or some similar clever shell trick to expand the
 arguments.

 This bug was seriously confusing to a beginner (on whose behalf I'm
 reporting this).

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3802#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list