Commit 17d0b84e authored by Simon Marlow's avatar Simon Marlow
Browse files

Add -package-env to the flags reference

parent 9a3df1f8
......@@ -1323,10 +1323,15 @@ environment specifies precisely which packages should be visible.
Note that for the ``package-db`` directive, if a relative path is given it
must be relative to the location of the package environment file.
.. ghc-flag:: -package-env ⟨file⟩|⟨name⟩
Use the package environment in ⟨file⟩, or in
``$HOME/.ghc/arch-os-version/environments/⟨name⟩``
In order, ``ghc`` will look for the package environment in the following
locations:
- File ⟨file⟩ if you pass the option ``-package-env file``.
- File ⟨file⟩ if you pass the option :ghc-flag:`-package-env file`.
- File ``$HOME/.ghc/arch-os-version/environments/name`` if you pass the
option ``-package-env name``.
......
......@@ -4,11 +4,11 @@ import Types
packagesOptions :: [Flag]
packagesOptions =
[ flag { flagName = "-this-unit-id⟨P⟩"
[ flag { flagName = "-this-unit-id ⟨P⟩"
, flagDescription = "Compile to be part of unit (i.e. package) ⟨P⟩"
, flagType = DynamicFlag
}
, flag { flagName = "-package⟨P⟩"
, flag { flagName = "-package ⟨P⟩"
, flagDescription = "Expose package ⟨P⟩"
, flagType = DynamicSettableFlag
}
......@@ -16,15 +16,15 @@ packagesOptions =
, flagDescription = "Hide all packages by default"
, flagType = DynamicFlag
}
, flag { flagName = "-hide-package⟨name⟩"
, flag { flagName = "-hide-package ⟨name⟩"
, flagDescription = "Hide package ⟨P⟩"
, flagType = DynamicSettableFlag
}
, flag { flagName = "-ignore-package⟨name⟩"
, flag { flagName = "-ignore-package ⟨name⟩"
, flagDescription = "Ignore package ⟨P⟩"
, flagType = DynamicSettableFlag
}
, flag { flagName = "-package-db⟨file⟩"
, flag { flagName = "-package-db ⟨file⟩"
, flagDescription = "Add ⟨file⟩ to the package db stack."
, flagType = DynamicFlag
}
......@@ -52,11 +52,11 @@ packagesOptions =
, flagDescription = "Don't automatically link in the base and rts packages."
, flagType = DynamicFlag
}
, flag { flagName = "-trust⟨P⟩"
, flag { flagName = "-trust ⟨P⟩"
, flagDescription = "Expose package ⟨P⟩ and set it to be trusted"
, flagType = DynamicSettableFlag
}
, flag { flagName = "-distrust⟨P⟩"
, flag { flagName = "-distrust ⟨P⟩"
, flagDescription = "Expose package ⟨P⟩ and set it to be distrusted"
, flagType = DynamicSettableFlag
}
......@@ -64,4 +64,8 @@ packagesOptions =
, flagDescription = "Distrust all packages by default"
, flagType = DynamicSettableFlag
}
, flag { flagName = "-package-env ⟨file⟩|⟨name⟩"
, flagDescription = "Use the specified package environment."
, flagType = DynamicFlag
}
]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment