Skip to content

Doctest is failing in CI #9307

Closed
Closed
@geekosaur

Description

@geekosaur

It is not clear whether the first error leads to all the others, or if this derives from a change in the doctest CI.

Preprocessing library for Cabal-syntax-3.11.0.0..

when making flags consistent: error: [-Werror]
    Optimization flags conflict with --interactive; optimization flags ignored.
src/Distribution/InstalledPackageInfo.hs:133: failure in expression `let ipi = emptyInstalledPackageInfo { maintainer = "Tester" }'
expected: 
 but got: 
          ^
          <interactive>:35:39: error: Not in scope: ‘maintainer’

src/Distribution/FieldGrammar/Newtypes.hs:137: failure in expression `:t alaList VCat'
expected: alaList VCat :: [a] -> List VCat (Identity a) a
 but got: 
          ^
          <interactive>:1:1: error: Variable not in scope: alaList :: t0 -> t
          
          <interactive>:1:9: error: Data constructor not in scope: VCat

src/Distribution/FieldGrammar/Newtypes.hs:167: failure in expression `:t alaSet VCat'
expected: alaSet VCat :: Set a -> Set' VCat (Identity a) a
 but got: 
          ^
          <interactive>:1:1: error: Variable not in scope: alaSet :: t0 -> t
          
          <interactive>:1:8: error: Data constructor not in scope: VCat

src/Distribution/FieldGrammar/Newtypes.hs:204: failure in expression `:t alaNonEmpty VCat'
expected: alaNonEmpty VCat :: NonEmpty a -> NonEmpty' VCat (Identity a) a
 but got: 
          ^
          <interactive>:1:1: error:
              Variable not in scope: alaNonEmpty :: t0 -> t
          
          <interactive>:1:13: error: Data constructor not in scope: VCat

src/Distribution/License.hs:179: failure in expression `licenseFromSPDX . licenseToSPDX $ BSD3'
expected: BSD3
 but got: 
          ^
          <interactive>:59:1: error:
              Variable not in scope: licenseFromSPDX :: b0 -> c
          
          <interactive>:59:19: error:
              Variable not in scope: licenseToSPDX :: a0 -> b0
          
          <interactive>:59:35: error: Data constructor not in scope: BSD3

src/Distribution/Types/Dependency.hs:81: failure in expression `prettyShow $ Dependency "pkg" anyVersion mainLibSet'
expected: "pkg"
 but got: 
          ^
          <interactive>:65:1: error:
              Variable not in scope: prettyShow :: a0 -> b
          
          <interactive>:65:14: error:
              Data constructor not in scope: Dependency :: t0 -> t1 -> t2 -> a0
          
          <interactive>:65:31: error: Variable not in scope: anyVersion
          
          <interactive>:65:42: error: Variable not in scope: mainLibSet

src/Distribution/Types/Dependency.hs:112: failure in expression `simpleParsec "mylib:sub" :: Maybe Dependency'
expected: Just (Dependency (PackageName "mylib") (OrLaterVersion (mkVersion [0])) (fromNonEmpty (LSubLibName (UnqualComponentName "sub") :| [])))
 but got: 
          ^
          <interactive>:71:35: error:
              Not in scope: type constructor or class ‘Dependency’

src/Distribution/Types/ExeDependency.hs:46: failure in expression `simpleParsec "happy:happy" :: Maybe ExeDependency'
expected: Just (ExeDependency (PackageName "happy") (UnqualComponentName "happy") (OrLaterVersion (mkVersion [0])))
 but got: 
          ^
          <interactive>:77:37: error:
              Not in scope: type constructor or class ‘ExeDependency’

src/Distribution/Types/MungedPackageId.hs:81: failure in expression `import Distribution.Types.Version'
expected: 
 but got: 
          ^
          <no location info>: error:
              Could not load module ‘Distribution.Types.Version’
              It is a member of the hidden package ‘Cabal-syntax-3.8.1.0’.
              Perhaps you need to add ‘Cabal-syntax’ to the build-depends in your .cabal file.

src/Distribution/Types/PackageVersionConstraint.hs:46: failure in expression `simpleParsec "foo" :: Maybe PackageVersionConstraint'
expected: Just (PackageVersionConstraint (PackageName "foo") (OrLaterVersion (mkVersion [0])))
 but got: 
          ^
          <interactive>:91:29: error:
              Not in scope: type constructor or class ‘PackageVersionConstraint’

src/Distribution/Backpack.hs:114: failure in expression `eitherParsec "foobar" :: Either String OpenUnitId'
expected: Right (DefiniteUnitId (DefUnitId {unDefUnitId = UnitId "foobar"}))
 but got: 
          ^
          <interactive>:97:40: error:
              Not in scope: type constructor or class ‘OpenUnitId’

src/Distribution/Backpack.hs:185: failure in expression `eitherParsec "Includes2-0.1.0.0-inplace-mysql:Database.MySQL" :: Either String OpenModule'
expected: Right (OpenModule (DefiniteUnitId (DefUnitId {unDefUnitId = UnitId "Includes2-0.1.0.0-inplace-mysql"})) (ModuleName "Database.MySQL"))
 but got: 
          ^
          <interactive>:103:80: error:
              Not in scope: type constructor or class ‘OpenModule’

src/Distribution/Types/PackageId.hs:43: failure in expression `simpleParsec "foo-bar-0" :: Maybe PackageIdentifier'
expected: Just (PackageIdentifier {pkgName = PackageName "foo-bar", pkgVersion = mkVersion [0]})
 but got: 
          ^
          <interactive>:109:35: error:
              Not in scope: type constructor or class ‘PackageIdentifier’

src/Distribution/Types/Mixin.hs:47: failure in expression `simpleParsec "mylib" :: Maybe Mixin'
expected: Just (Mixin {mixinPackageName = PackageName "mylib", mixinLibraryName = LMainLibName, mixinIncludeRenaming = IncludeRenaming {includeProvidesRn = DefaultRenaming, includeRequiresRn = DefaultRenaming}})
 but got: 
          ^
          <interactive>:115:31: error:
              Not in scope: type constructor or class ‘Mixin’

src/Distribution/SPDX/License.hs:58: failure in expression `eitherParsec "BSD-3-Clause AND MIT" :: Either String License'
expected: Right (License (EAnd (ELicense (ELicenseId BSD_3_Clause) Nothing) (ELicense (ELicenseId MIT) Nothing)))
 but got: 
          ^
          <interactive>:121:54: error:
              Not in scope: type constructor or class ‘License’

src/Distribution/SPDX/LicenseId.hs:515: failure in expression `eitherParsec "BSD-3-Clause" :: Either String LicenseId'
expected: Right BSD_3_Clause
 but got: 
          ^
          <interactive>:127:46: error:
              Not in scope: type constructor or class ‘LicenseId’

src/Distribution/SPDX/LicenseId.hs:536: failure in expression `licenseIdMigrationMessage "BSD3"'
expected: "Do you mean BSD-3-Clause?"
 but got: 
          ^
          <interactive>:133:1: error:
              Variable not in scope: licenseIdMigrationMessage :: t0 -> t

src/Distribution/Types/Flag.hs:254: failure in expression `simpleParsec "" :: Maybe FlagAssignment'
expected: Just (fromList [])
 but got: 
          ^
          <interactive>:139:26: error:
              Not in scope: type constructor or class ‘FlagAssignment’

src/Distribution/Types/MungedPackageName.hs:69: failure in expression `prettyShow $ MungedPackageName "servant" LMainLibName'
expected: "servant"
 but got: 
          ^
          <interactive>:153:1: error:
              Variable not in scope: prettyShow :: a0 -> b
          
          <interactive>:153:14: error:
              Data constructor not in scope: MungedPackageName :: t0 -> t1 -> a0
          
          <interactive>:153:42: error:
              Data constructor not in scope: LMainLibName

src/Distribution/Types/MungedPackageName.hs:82: failure in expression `simpleParsec "servant" :: Maybe MungedPackageName'
expected: Just (MungedPackageName (PackageName "servant") LMainLibName)
 but got: 
          ^
          <interactive>:1[61](https://github.com/haskell/cabal/actions/runs/6396526848/job/17362485036?pr=9306#step:9:62):33: error:
              Not in scope: type constructor or class ‘MungedPackageName’

src/Distribution/Types/MungedPackageName.hs:99: failure in expression `decodeCompatPackageName "z-servant-z-lackey"'
expected: MungedPackageName (PackageName "servant") (LSubLibName (UnqualComponentName "lackey"))
 but got: 
          ^
          <interactive>:169:1: error:
              Variable not in scope: decodeCompatPackageName :: t0 -> t

src/Distribution/Types/MungedPackageName.hs:106: failure in expression `encodeCompatPackageName $ MungedPackageName "servant" (LSubLibName "lackey")'
expected: PackageName "z-servant-z-lackey"
 but got: 
          ^
          <interactive>:177:1: error:
              Variable not in scope: encodeCompatPackageName :: a0 -> b
          
          <interactive>:177:27: error:
              Data constructor not in scope: MungedPackageName :: t1 -> t2 -> a0
          
          <interactive>:177:56: error:
              Data constructor not in scope: LSubLibName :: t0 -> t2

src/Distribution/Types/PkgconfigVersion.hs:46: failure in expression `simpleParsec "1.0.2n" :: Maybe PkgconfigVersion'
expected: Just (PkgconfigVersion "1.0.2n")
 but got: 
          ^
          <interactive>:183:32: error:
              Not in scope: type constructor or class ‘PkgconfigVersion’

src/Distribution/Types/VersionRange/Internal.hs:244: failure in expression `fmap pretty (simpleParsec' CabalSpecV1_6 "== 3.2.*" :: Maybe VersionRange)'
expected: Just >=3.2 && <3.3
 but got: 
          ^
          <interactive>:189:[62](https://github.com/haskell/cabal/actions/runs/6396526848/job/17362485036?pr=9306#step:9:63): error:
              Not in scope: type constructor or class ‘VersionRange’

src/Distribution/Types/VersionRange/Internal.hs:299: failure in expression `simpleParsec "^>= 3.4" :: Maybe VersionRange'
expected: Just (MajorBoundVersion (mkVersion [3,4]))
 but got: 
          ^
          <interactive>:195:33: error:
              Not in scope: type constructor or class ‘VersionRange’

src/Distribution/Fields/Parser.hs:350: failure in expression `readFields "foo: \223"'
expected: Right [Field (Name (Position 1 1) "foo") [FieldLine (Position 1 6) "\223"]]
 but got: 
          ^
          <interactive>:213:1: error:
              Variable not in scope: readFields :: t0 -> t
              Suggested fix: Perhaps use ‘readFile’ (imported from Prelude)

src/Distribution/CabalSpecVersion.hs:120: failure in expression `cabalSpecMinimumLibraryVersion CabalSpecV3_0'
expected: [2,5]
 but got: 
          ^
          <interactive>:219:1: error:
              Variable not in scope: cabalSpecMinimumLibraryVersion :: t0 -> t
          
          <interactive>:219:32: error:
              Data constructor not in scope: CabalSpecV3_0

src/Distribution/Compat/Lens.hs:110: failure in expression `(3 :: Int) ^. getting (+2) . getting show'
expected: "5"
 but got: 
          ^
          <interactive>:225:12: error:
              Variable not in scope: (^.) :: Int -> (a2 -> c0) -> t
              Suggested fix:
                Perhaps use one of these:
                  ‘.’ (imported from Prelude), ‘^’ (imported from Prelude),
                  ‘^^’ (imported from Prelude)
          
          <interactive>:225:15: error:
              Variable not in scope: getting :: (a1 -> a1) -> b0 -> c0
              Suggested fix: Perhaps use ‘getLine’ (imported from Prelude)
          
          <interactive>:225:30: error:
              Variable not in scope: getting :: (a0 -> String) -> a2 -> b0
              Suggested fix: Perhaps use ‘getLine’ (imported from Prelude)

src/Distribution/Utils/Generic.hs:301: failure in expression `safeTail $ Data.List.dropWhileEnd (<3) [undefined, 5, 4, 3, 2, 1]'
expected: *** Exception: Prelude.undefined
          ...
 but got: 
          ^
          <interactive>:243:1: error:
              Variable not in scope: safeTail :: [a0] -> b

src/Distribution/Utils/Generic.hs:357: failure in expression `ordNub [1,2,1] :: [Int]'
expected: [1,2]
 but got: 
          ^
          <interactive>:253:1: error:
              Variable not in scope: ordNub :: [a0] -> [Int]

src/Distribution/Utils/Generic.hs:374: failure in expression `listUnion [1,2,3,4,3] [2,1,1]'
expected: [1,2,3,4,3]
 but got: 
          ^
          <interactive>:2[63](https://github.com/haskell/cabal/actions/runs/6396526848/job/17362485036?pr=9306#step:9:64):1: error:
              Variable not in scope: listUnion :: [a0] -> [a1] -> t

src/Distribution/Utils/Generic.hs:418: failure in expression `lowercase "Foobar"'
expected: "foobar"
 but got: 
          ^
          <interactive>:273:1: error:
              Variable not in scope: lowercase :: t0 -> t

src/Distribution/Utils/Generic.hs:435: failure in expression `isAsciiAlphaNum 'a''
expected: True
 but got: 
          ^
          <interactive>:283:1: error:
              Variable not in scope: isAsciiAlphaNum :: Char -> t

src/Distribution/Utils/Generic.hs:454: failure in expression `breakMaybe (readMaybe :: String -> Maybe Int) ["foo", "bar", "1", "2", "quu"]'
expected: (["foo","bar"],Just (1,["2","quu"]))
 but got: 
          ^
          <interactive>:293:1: error:
              Variable not in scope:
                breakMaybe :: (String -> Maybe Int) -> [a0] -> t
              Suggested fix: Perhaps use ‘readMaybe’ (imported from Text.Read)

src/Distribution/Utils/Generic.hs:471: failure in expression `spanMaybe listToMaybe [[1,2],[3],[],[4,5],[6,7]]'
expected: ([1,3],[[],[4,5],[6,7]])
 but got: 
          ^
          <interactive>:303:1: error:
              Variable not in scope:
                spanMaybe :: ([a0] -> Maybe a0) -> [[a1]] -> t

src/Distribution/Utils/Generic.hs:486: failure in expression `take 5 $ unfoldrM (\b r -> Just (r + b, b + 1)) (1 :: Int) 2'
expected: [3,4,5,6,7]
 but got: 
          ^
          <interactive>:313:10: error:
              Variable not in scope:
                unfoldrM :: (b0 -> b0 -> Maybe (b0, b0)) -> Int -> t0 -> [a]

src/Distribution/Utils/Generic.hs:503: failure in expression `unsnoc [1, 2, 3]'
expected: Just ([1,2],3)
 but got: 
          ^
          <interactive>:323:1: error:
              Variable not in scope: unsnoc :: [a0] -> t

src/Distribution/Utils/Generic.hs:518: failure in expression `unsnocNE (1 :| [2, 3])'
expected: ([1,2],3)
 but got: 
          ^
          <interactive>:333:1: error:
              Variable not in scope: unsnocNE :: t1 -> t
          
          <interactive>:333:13: error:
              Data constructor not in scope: (:|) :: t0 -> [a0] -> t1
              Suggested fix: Perhaps use variable ‘||’ (imported from Prelude)

src/Distribution/Utils/MD5.hs:30: failure in expression `showMD5 (Fingerprint 123 456)'
expected: "000000000000007b00000000000001c8"
 but got: 
          ^
          <interactive>:339:1: error:
              Variable not in scope: showMD5 :: t2 -> t
          
          <interactive>:339:10: error:
              Data constructor not in scope: Fingerprint :: t0 -> t1 -> t2

src/Distribution/Utils/MD5.hs:[64](https://github.com/haskell/cabal/actions/runs/6396526848/job/17362485036?pr=9306#step:9:65): failure in expression `showMD5 $ md5FromInteger 0x37eff01866ba3f538421b30b7cbefcac'
expected: "37eff01866ba3f538421b30b7cbefcac"
 but got: 
          ^
          <interactive>:345:1: error:
              Variable not in scope: showMD5 :: a0 -> b
          
          <interactive>:345:11: error:
              Variable not in scope: md5FromInteger :: t0 -> a0
              Suggested fix: Perhaps use ‘fromInteger’ (imported from Prelude)

src/Distribution/Compat/Newtype.hs:[68](https://github.com/haskell/cabal/actions/runs/6396526848/job/17362485036?pr=9306#step:9:69): failure in expression `ala Sum foldMap [1, 2, 3, 4 :: Int]'
expected: 10
 but got: 
          ^
          <interactive>:351:1: error:
              Variable not in scope:
                ala :: t0 -> ((a0 -> m0) -> t1 a0 -> m0) -> [Int] -> t
              Suggested fix: Perhaps use ‘all’ (imported from Prelude)
          
          <interactive>:351:5: error:
              Data constructor not in scope: Sum
              Suggested fix: Perhaps use variable ‘sum’ (imported from Prelude)

src/Distribution/Compat/Newtype.hs:80: failure in expression `alaf Sum foldMap length ["cabal", "install"]'
expected: 12
 but got: 
          ^
          <interactive>:357:1: error:
              Variable not in scope:
                alaf
                  :: t0 -> ((a0 -> m0) -> t1 a0 -> m0) -> (t2 a1 -> Int) -> [a2] -> t
          
          <interactive>:357:6: error:
              Data constructor not in scope: Sum
              Suggested fix: Perhaps use variable ‘sum’ (imported from Prelude)

Examples: [136](https://github.com/haskell/cabal/actions/runs/6396526848/job/17362485036?pr=9306#step:9:137)  Tried: 49  Errors: 0  Failures: 42
Error: cabal: repl failed for Cabal-syntax-3.11.0.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions