removing ghc and ghci options.
This commit is contained in:
parent
5e21c71b1e
commit
fb7f0c9802
@ -25,23 +25,14 @@ usage = "ghc-mod version 0.4.0\n"
|
|||||||
|
|
||||||
defaultOptions :: Options
|
defaultOptions :: Options
|
||||||
defaultOptions = Options { convert = toPlain
|
defaultOptions = Options { convert = toPlain
|
||||||
, ghc = "ghc"
|
|
||||||
, ghci = "ghci"
|
|
||||||
, ghcPkg = "ghc-pkg"
|
, ghcPkg = "ghc-pkg"
|
||||||
, outDir = outputDir
|
, outDir = outputDir
|
||||||
, outFile = outputFile
|
|
||||||
}
|
}
|
||||||
|
|
||||||
argspec :: [OptDescr (Options -> Options)]
|
argspec :: [OptDescr (Options -> Options)]
|
||||||
argspec = [ Option "l" ["tolisp"]
|
argspec = [ Option "l" ["tolisp"]
|
||||||
(NoArg (\opts -> opts { convert = toLisp }))
|
(NoArg (\opts -> opts { convert = toLisp }))
|
||||||
"print as a list of Lisp"
|
"print as a list of Lisp"
|
||||||
, Option "g" ["ghc"]
|
|
||||||
(ReqArg (\str opts -> opts { ghc = str }) "ghc")
|
|
||||||
"GHC path"
|
|
||||||
, Option "i" ["ghci"]
|
|
||||||
(ReqArg (\str opts -> opts { ghci = str }) "ghci")
|
|
||||||
"ghci path"
|
|
||||||
, Option "p" ["ghc-pkg"]
|
, Option "p" ["ghc-pkg"]
|
||||||
(ReqArg (\str opts -> opts { ghcPkg = str }) "ghc-pkg")
|
(ReqArg (\str opts -> opts { ghcPkg = str }) "ghc-pkg")
|
||||||
"ghc-pkg path"
|
"ghc-pkg path"
|
||||||
|
3
Param.hs
3
Param.hs
@ -2,11 +2,8 @@ module Param where
|
|||||||
|
|
||||||
data Options = Options {
|
data Options = Options {
|
||||||
convert :: [String] -> String
|
convert :: [String] -> String
|
||||||
, ghc :: FilePath
|
|
||||||
, ghci :: FilePath
|
|
||||||
, ghcPkg :: FilePath
|
, ghcPkg :: FilePath
|
||||||
, outDir :: FilePath
|
, outDir :: FilePath
|
||||||
, outFile :: FilePath
|
|
||||||
}
|
}
|
||||||
|
|
||||||
outputDir :: String
|
outputDir :: String
|
||||||
|
@ -59,13 +59,9 @@
|
|||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(defvar ghc-module-command "ghc-mod")
|
(defvar ghc-module-command "ghc-mod")
|
||||||
(defvar ghc-ghc-command (ghc-which "ghc"))
|
|
||||||
(defvar ghc-ghci-command (ghc-which "ghci"))
|
|
||||||
(defvar ghc-ghc-pkg-command (ghc-which "ghc-pkg"))
|
(defvar ghc-ghc-pkg-command (ghc-which "ghc-pkg"))
|
||||||
|
|
||||||
(defun ghc-module-command-args ()
|
(defun ghc-module-command-args ()
|
||||||
(list "-g" ghc-ghc-command
|
(list "-p" ghc-ghc-pkg-command))
|
||||||
"-i" ghc-ghci-command
|
|
||||||
"-p" ghc-ghc-pkg-command))
|
|
||||||
|
|
||||||
(provide 'ghc-func)
|
(provide 'ghc-func)
|
||||||
|
Loading…
Reference in New Issue
Block a user