Skip to content

Commit

Permalink
Fix cabal tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fendor committed Jul 28, 2021
1 parent 80440b2 commit 9567d55
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
8 changes: 7 additions & 1 deletion Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import Distribution.ModuleName
import Distribution.Simple.Compiler (DebugInfoLevel (..), OptimisationLevel (..), PackageDB (..), ProfDetailLevel (..), knownProfDetailLevels)
import Distribution.Simple.Flag (Flag (..))
import Distribution.Simple.InstallDirs
import Distribution.Simple.Setup (HaddockTarget (..), TestShowDetails (..))
import Distribution.Simple.Setup (HaddockTarget (..), TestShowDetails (..), DumpBuildInfo)
import Distribution.SPDX
import Distribution.System
import Distribution.Types.Dependency
Expand Down Expand Up @@ -486,6 +486,12 @@ instance Arbitrary PackageDB where
, SpecificPackageDB <$> arbitraryShortToken
]

-------------------------------------------------------------------------------
-- DumpBuildInfo
-------------------------------------------------------------------------------

instance Arbitrary DumpBuildInfo where
arbitrary = arbitraryBoundedEnum

-------------------------------------------------------------------------------
-- Helpers
Expand Down
2 changes: 2 additions & 0 deletions Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import Distribution.Simple.Setup (HaddockTarget, TestShowDetai
import Distribution.System
import Distribution.Types.AbiHash (AbiHash)
import Distribution.Types.ComponentId (ComponentId)
import Distribution.Types.DumpBuildInfo (DumpBuildInfo)
import Distribution.Types.PackageVersionConstraint
import Distribution.Types.UnitId (DefUnitId, UnitId)
import Distribution.Utils.NubList (NubList)
Expand Down Expand Up @@ -74,6 +75,7 @@ instance ToExpr CompilerId
instance ToExpr ComponentId
instance ToExpr DebugInfoLevel
instance ToExpr DefUnitId
instance ToExpr DumpBuildInfo
instance ToExpr ExeDependency
instance ToExpr Executable
instance ToExpr ExecutableScope
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ instance Arbitrary PackageConfig where
<*> arbitrary <*> arbitrary
<*> arbitrary <*> arbitrary
<*> arbitrary <*> arbitrary
<*> arbitrary <*> arbitrary
<*> arbitrary <*> arbitrary <*> arbitrary
<*> arbitrary <*> arbitrary
<*> arbitraryFlag arbitraryShortToken
<*> arbitrary
Expand Down Expand Up @@ -616,6 +616,7 @@ instance Arbitrary PackageConfig where
, packageConfigCoverage = x25
, packageConfigRelocatable = x26
, packageConfigDebugInfo = x27
, packageConfigDumpBuildInfo = x27_1
, packageConfigRunTests = x28
, packageConfigDocumentation = x29
, packageConfigHaddockHoogle = x30
Expand Down Expand Up @@ -671,6 +672,7 @@ instance Arbitrary PackageConfig where
, packageConfigCoverage = x25'
, packageConfigRelocatable = x26'
, packageConfigDebugInfo = x27'
, packageConfigDumpBuildInfo = x27_1'
, packageConfigRunTests = x28'
, packageConfigDocumentation = x29'
, packageConfigHaddockHoogle = x30'
Expand Down Expand Up @@ -700,7 +702,7 @@ instance Arbitrary PackageConfig where
(x10', x11', x12', x13', x14'),
(x15', x16', x17', x18', x19')),
((x20', x20_1', x21', x22', x23', x24'),
(x25', x26', x27', x28', x29'),
(x25', x26', x27', x27_1', x28', x29'),
(x30', x31', x32', (x33', x33_1'), x34'),
(x35', x36', x37', x38', x43', x39'),
(x40', x41'),
Expand All @@ -714,7 +716,7 @@ instance Arbitrary PackageConfig where
map NonEmpty x18,
x19)),
((x20, x20_1, x21, x22, x23, x24),
(x25, x26, x27, x28, x29),
(x25, x26, x27, x27_1, x28, x29),
(x30, x31, x32, (x33, x33_1), x34),
(x35, x36, fmap NonEmpty x37, x38, x43, fmap NonEmpty x39),
(x40, x41),
Expand Down

0 comments on commit 9567d55

Please sign in to comment.