mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-11 02:01:36 +03:00
Add --source-dir to CLI
This commit is contained in:
parent
67cdbd3ce4
commit
21a1245c10
@ -50,6 +50,8 @@ data CLOpt
|
||||
SetCG String |
|
||||
||| Don't implicitly import Prelude
|
||||
NoPrelude |
|
||||
||| Set source directory
|
||||
SourceDir String |
|
||||
||| Set build directory
|
||||
BuildDir String |
|
||||
||| Set output directory
|
||||
@ -153,6 +155,8 @@ options = [MkOpt ["--check", "-c"] [] [CheckOnly]
|
||||
(Just $ "Set code generator " ++ showDefault (codegen defaultSession)),
|
||||
MkOpt ["--package", "-p"] [Required "package"] (\f => [PkgPath f])
|
||||
(Just "Add a package as a dependency"),
|
||||
MkOpt ["--source-dir"] [Required "dir"] (\d => [SourceDir d])
|
||||
(Just $ "Set source directory"),
|
||||
MkOpt ["--build-dir"] [Required "dir"] (\d => [BuildDir d])
|
||||
(Just $ "Set build directory"),
|
||||
MkOpt ["--output-dir"] [Required "dir"] (\d => [OutputDir d])
|
||||
|
@ -74,6 +74,9 @@ preOptions (SetCG e :: opts)
|
||||
preOptions (PkgPath p :: opts)
|
||||
= do addPkgDir p
|
||||
preOptions opts
|
||||
preOptions (SourceDir d :: opts)
|
||||
= do setSourceDir (Just d)
|
||||
preOptions opts
|
||||
preOptions (BuildDir d :: opts)
|
||||
= do setBuildDir d
|
||||
preOptions opts
|
||||
|
Loading…
Reference in New Issue
Block a user