Skip to content

Commit

Permalink
Docs and modest safety improvements.
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Z. Yang <[email protected]>
  • Loading branch information
ezyang committed Aug 11, 2016
1 parent ef32044 commit a9fee60
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cabal-install/Distribution/Client/BuildTarget.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
-- Maintainer : [email protected]
--
-- Handling for user-specified build targets
-- Unlike "Distribution.Simple.BuildTarget" these build
-- targets also handle package qualification (so, up to
-- four levels of qualification, as opposed to the former's
-- three.)
-----------------------------------------------------------------------------
module Distribution.Client.BuildTarget (

Expand Down Expand Up @@ -433,7 +437,9 @@ showUserBuildTarget = intercalate ":" . components

showBuildTarget :: QualLevel -> BuildTarget PackageInfo -> String
showBuildTarget ql = showUserBuildTarget . forgetFileStatus
. head . renderBuildTarget ql
. hd . renderBuildTarget ql
where hd [] = error "showBuildTarget: head"
hd (x:_) = x


-- ------------------------------------------------------------
Expand Down

0 comments on commit a9fee60

Please sign in to comment.