Skip to content

:main in GHCi doesn't do getArgs wildcard expansion

In GHCi, from a current directory containing some Haskell files:

ghci> import System
ghci> let main = print =<< getArgs
ghci> :main *.hs
["*.hs"]

I would have expected ["foo.hs","bar.hs"]. Running the same thing from the command line (compiled or through runhaskell) gives the expected behaviour.

Trac metadata
Trac field Value
Version 6.12.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information