11{-# LANGUAGE DeriveGeneric #-}
22{-# LANGUAGE RecordWildCards #-}
33{-# LANGUAGE TemplateHaskell #-}
4+ {-# LANGUAGE TupleSections #-}
45{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
56
67module Distribution.Nixpkgs.Haskell.Derivation
@@ -102,7 +103,7 @@ nullDerivation = MkDerivation
102103
103104makeLenses ''Derivation
104105
105- makeLensesFor [( " _setupDepends " , " dependencies" ), ( " _libraryDepends " , " dependencies " ), ( " _executableDepends" , " dependencies " ), ( " _testDepends" , " dependencies " ), ( " _benchmarkDepends" , " dependencies " )] ''Derivation
106+ makeLensesFor ( fmap (, " dependencies" ) [ " _setupDepends " , " _libraryDepends " , " _executableDepends" , " _testDepends" , " _benchmarkDepends" ]) ''Derivation
106107
107108instance Package Derivation where
108109 packageId = view pkgid
@@ -123,11 +124,11 @@ instance Pretty Derivation where
123124 , boolattr " isLibrary" (not _isLibrary || _isExecutable) _isLibrary
124125 , boolattr " isExecutable" (not _isLibrary || _isExecutable) _isExecutable
125126 , boolattr " enableSeparateDataOutput" _enableSeparateDataOutput _enableSeparateDataOutput
126- , onlyIf (_setupDepends /= mempty ) $ pPrintBuildInfo " setup" _setupDepends
127- , onlyIf (_libraryDepends /= mempty ) $ pPrintBuildInfo " library" _libraryDepends
128- , onlyIf (_executableDepends /= mempty ) $ pPrintBuildInfo " executable" _executableDepends
129- , onlyIf (_testDepends /= mempty ) $ pPrintBuildInfo " test" _testDepends
130- , onlyIf (_benchmarkDepends /= mempty ) $ pPrintBuildInfo " benchmark" _benchmarkDepends
127+ , pPrintBuildInfo " setup" _setupDepends
128+ , pPrintBuildInfo " library" _libraryDepends
129+ , pPrintBuildInfo " executable" _executableDepends
130+ , pPrintBuildInfo " test" _testDepends
131+ , pPrintBuildInfo " benchmark" _benchmarkDepends
131132 , boolattr " enableLibraryProfiling" _enableLibraryProfiling _enableLibraryProfiling
132133 , boolattr " enableExecutableProfiling" _enableExecutableProfiling _enableExecutableProfiling
133134 , boolattr " doHaddock" (not _runHaddock) _runHaddock
0 commit comments