cmdargsはargsと同時にhelpを設定するとシぬ
clOptions :: CommandLineOptions
clOptions = CommandLineOptions
{ frontend = "vty" &= help "The frontend to use"
, startOnLine = Nothing &= help "Open the (last) file on line NUM"
, files = [] &= help "FILES..." &= args -- ここ
}
デフォルトの引数をfilesで受けとりたくば、helpを消せ。
さもなくば我々をcmdargsがコロす。
clOptions :: CommandLineOptions
clOptions = CommandLineOptions
{ frontend = "vty" &= help "The frontend to use"
, startOnLine = Nothing &= help "Open the (last) file on line NUM"
, files = [] &= args -- ここ
}
忘れるなよ。