How to set a program's command line arguments for GHCi?

后端 未结 3 691
忘了有多久
忘了有多久 2021-01-31 15:10

Suppose some Haskell file is executed with

runghc Queens.hs gecode_compile

Now, this fails, and I want to debug it with ghci. How

3条回答
  •  自闭症患者
    2021-01-31 15:45

    You can use the :set command:

    Prelude> :set args whatever
    

    This will mean that getArgs returns ["whatever"].

    So in your case you should just do this:

    Prelude> :set args gecode_compile
    

提交回复
热议问题