From 7a256363dcb1f4836fbfe6f7c28ddac759d69ddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Tue, 28 Oct 2025 21:29:45 +0800 Subject: [PATCH 01/60] proof of concept --- .../Distribution/PackageDescription/FieldGrammar.hs | 13 ++++++++----- .../src/Distribution/PackageDescription/Parsec.hs | 8 +++++--- .../Distribution/PackageDescription/PrettyPrint.hs | 5 +++-- Cabal-syntax/src/Distribution/Types/Library.hs | 3 +++ .../Distribution/PackageDescription/Check/Target.hs | 1 + Cabal/src/Distribution/Simple/Build.hs | 1 + 6 files changed, 21 insertions(+), 10 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index 24861389b8f..f6814889d35 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -187,10 +187,13 @@ libraryFieldGrammar , c (MQuoted Language) ) => LibraryName + -> [String] + -- ^ names of common stanza imports -> g Library Library -libraryFieldGrammar n = +libraryFieldGrammar n imports = Library n - <$> monoidalFieldAla "exposed-modules" formatExposedModules L.exposedModules + <$> pure imports + <*> monoidalFieldAla "exposed-modules" formatExposedModules L.exposedModules <*> monoidalFieldAla "reexported-modules" (alaList CommaVCat) L.reexportedModules <*> monoidalFieldAla "signatures" (alaList' VCat MQuoted) L.signatures ^^^ availableSince CabalSpecV2_0 [] @@ -205,8 +208,8 @@ libraryFieldGrammar n = LSubLibName _ -> optionalFieldDef "visibility" L.libVisibility LibraryVisibilityPrivate ^^^ availableSince CabalSpecV3_0 LibraryVisibilityPrivate -{-# SPECIALIZE libraryFieldGrammar :: LibraryName -> ParsecFieldGrammar' Library #-} -{-# SPECIALIZE libraryFieldGrammar :: LibraryName -> PrettyFieldGrammar' Library #-} +{-# SPECIALIZE libraryFieldGrammar :: LibraryName -> [String] -> ParsecFieldGrammar' Library #-} +{-# SPECIALIZE libraryFieldGrammar :: LibraryName -> [String] -> PrettyFieldGrammar' Library #-} ------------------------------------------------------------------------------- -- Foreign library @@ -897,7 +900,7 @@ _syntaxFieldNames = sort $ mconcat [ fieldGrammarKnownFieldList packageDescriptionFieldGrammar - , fieldGrammarKnownFieldList $ libraryFieldGrammar LMainLibName + , fieldGrammarKnownFieldList $ libraryFieldGrammar LMainLibName [] , fieldGrammarKnownFieldList $ executableFieldGrammar "exe" , fieldGrammarKnownFieldList $ foreignLibFieldGrammar "flib" , fieldGrammarKnownFieldList testSuiteFieldGrammar diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index c7e327ddb7f..84cdbb247e0 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -291,7 +291,8 @@ goSections specVer = traverse_ process commonStanzas <- use stateCommonStanzas let name'' = LMainLibName - lib <- lift $ parseCondTree' (libraryFieldGrammar name'') (libraryFromBuildInfo name'') commonStanzas fields + importNames = Map.keys commonStanzas + lib <- lift $ parseCondTree' (libraryFieldGrammar name'' importNames) (libraryFromBuildInfo name'') commonStanzas fields -- -- TODO check that not set stateGpd . L.condLibrary ?= lib @@ -302,7 +303,8 @@ goSections specVer = traverse_ process commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args let name'' = LSubLibName name' - lib <- lift $ parseCondTree' (libraryFieldGrammar name'') (libraryFromBuildInfo name'') commonStanzas fields + importNames = Map.keys commonStanzas + lib <- lift $ parseCondTree' (libraryFieldGrammar name'' importNames) (libraryFromBuildInfo name'') commonStanzas fields -- TODO check duplicate name here? stateGpd . L.condSubLibraries %= snoc (name', lib) @@ -925,7 +927,7 @@ data Syntax = OldSyntax | NewSyntax -- TODO: libFieldNames :: [FieldName] -libFieldNames = fieldGrammarKnownFieldList (libraryFieldGrammar LMainLibName) +libFieldNames = fieldGrammarKnownFieldList (libraryFieldGrammar LMainLibName []) ------------------------------------------------------------------------------- -- Supplementary build information diff --git a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs index 15c2c15fe09..6902c59ad29 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs @@ -145,12 +145,13 @@ ppCondLibrary _ Nothing = mempty ppCondLibrary v (Just condTree) = pure $ PrettySection () "library" [] $ - ppCondTree2 v (libraryFieldGrammar LMainLibName) condTree + -- TODO(leana8959): change the grammar + ppCondTree2 v (libraryFieldGrammar LMainLibName []) condTree ppCondSubLibraries :: CabalSpecVersion -> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)] -> [PrettyField ()] ppCondSubLibraries v libs = [ PrettySection () "library" [pretty n] $ - ppCondTree2 v (libraryFieldGrammar $ LSubLibName n) condTree + ppCondTree2 v (libraryFieldGrammar (LSubLibName n) []) condTree | (n, condTree) <- libs ] diff --git a/Cabal-syntax/src/Distribution/Types/Library.hs b/Cabal-syntax/src/Distribution/Types/Library.hs index fd4b89b6a6a..aa486c2df50 100644 --- a/Cabal-syntax/src/Distribution/Types/Library.hs +++ b/Cabal-syntax/src/Distribution/Types/Library.hs @@ -21,6 +21,7 @@ import qualified Distribution.Types.BuildInfo.Lens as L data Library = Library { libName :: LibraryName + , libImports :: [String] , exposedModules :: [ModuleName] , reexportedModules :: [ModuleReexport] , signatures :: [ModuleName] @@ -44,6 +45,7 @@ emptyLibrary :: Library emptyLibrary = Library { libName = LMainLibName + , libImports = mempty , exposedModules = mempty , reexportedModules = mempty , signatures = mempty @@ -67,6 +69,7 @@ instance Semigroup Library where a <> b = Library { libName = combineLibraryName (libName a) (libName b) + , libImports = combine libImports , exposedModules = combine exposedModules , reexportedModules = combine reexportedModules , signatures = combine signatures diff --git a/Cabal/src/Distribution/PackageDescription/Check/Target.hs b/Cabal/src/Distribution/PackageDescription/Check/Target.hs index 0010d1f4116..521ae83fb98 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Target.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Target.hs @@ -54,6 +54,7 @@ checkLibrary ads lib@( Library libName_ + _libImports_ _exposedModules_ reexportedModules_ signatures_ diff --git a/Cabal/src/Distribution/Simple/Build.hs b/Cabal/src/Distribution/Simple/Build.hs index 0d41eadb2c4..8afe8a4aa2f 100644 --- a/Cabal/src/Distribution/Simple/Build.hs +++ b/Cabal/src/Distribution/Simple/Build.hs @@ -814,6 +814,7 @@ testSuiteLibV09AsLibAndExe lib = Library { libName = LMainLibName + , libImports = [] , exposedModules = [m] , reexportedModules = [] , signatures = [] From 6150135d65dec14b5a5c0046acb0743c381724bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 29 Oct 2025 20:37:48 +0800 Subject: [PATCH 02/60] retain imports for foreignLib section --- .../PackageDescription/FieldGrammar.hs | 17 +++++++++-------- .../Distribution/PackageDescription/Parsec.hs | 3 ++- .../PackageDescription/PrettyPrint.hs | 2 +- .../src/Distribution/Types/ForeignLib.hs | 4 ++++ .../PackageDescription/Check/Target.hs | 1 + 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index f6814889d35..867b301eebd 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -191,9 +191,8 @@ libraryFieldGrammar -- ^ names of common stanza imports -> g Library Library libraryFieldGrammar n imports = - Library n - <$> pure imports - <*> monoidalFieldAla "exposed-modules" formatExposedModules L.exposedModules + Library n imports + <$> monoidalFieldAla "exposed-modules" formatExposedModules L.exposedModules <*> monoidalFieldAla "reexported-modules" (alaList CommaVCat) L.reexportedModules <*> monoidalFieldAla "signatures" (alaList' VCat MQuoted) L.signatures ^^^ availableSince CabalSpecV2_0 [] @@ -240,17 +239,19 @@ foreignLibFieldGrammar , c (MQuoted Language) ) => UnqualComponentName + -> [String] + -- ^ retained common stanzas -> g ForeignLib ForeignLib -foreignLibFieldGrammar n = - ForeignLib n +foreignLibFieldGrammar n imports = + ForeignLib n imports <$> optionalFieldDef "type" L.foreignLibType ForeignLibTypeUnknown <*> monoidalFieldAla "options" (alaList FSep) L.foreignLibOptions <*> blurFieldGrammar L.foreignLibBuildInfo buildInfoFieldGrammar <*> optionalField "lib-version-info" L.foreignLibVersionInfo <*> optionalField "lib-version-linux" L.foreignLibVersionLinux <*> monoidalFieldAla "mod-def-file" (alaList' FSep RelativePathNT) L.foreignLibModDefFile -{-# SPECIALIZE foreignLibFieldGrammar :: UnqualComponentName -> ParsecFieldGrammar' ForeignLib #-} -{-# SPECIALIZE foreignLibFieldGrammar :: UnqualComponentName -> PrettyFieldGrammar' ForeignLib #-} +{-# SPECIALIZE foreignLibFieldGrammar :: UnqualComponentName -> [String] -> ParsecFieldGrammar' ForeignLib #-} +{-# SPECIALIZE foreignLibFieldGrammar :: UnqualComponentName -> [String] -> PrettyFieldGrammar' ForeignLib #-} ------------------------------------------------------------------------------- -- Executable @@ -902,7 +903,7 @@ _syntaxFieldNames = [ fieldGrammarKnownFieldList packageDescriptionFieldGrammar , fieldGrammarKnownFieldList $ libraryFieldGrammar LMainLibName [] , fieldGrammarKnownFieldList $ executableFieldGrammar "exe" - , fieldGrammarKnownFieldList $ foreignLibFieldGrammar "flib" + , fieldGrammarKnownFieldList $ foreignLibFieldGrammar "flib" [] , fieldGrammarKnownFieldList testSuiteFieldGrammar , fieldGrammarKnownFieldList benchmarkFieldGrammar , fieldGrammarKnownFieldList $ flagFieldGrammar (error "flagname") diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index 84cdbb247e0..efcc8de9432 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -312,7 +312,8 @@ goSections specVer = traverse_ process | name == "foreign-library" = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args - flib <- lift $ parseCondTree' (foreignLibFieldGrammar name') (fromBuildInfo' name') commonStanzas fields + let importNames = Map.keys commonStanzas + flib <- lift $ parseCondTree' (foreignLibFieldGrammar name' importNames) (fromBuildInfo' name') commonStanzas fields let hasType ts = foreignLibType ts /= foreignLibType mempty unless (onAllBranches hasType flib) $ diff --git a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs index 6902c59ad29..dd756750f64 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs @@ -158,7 +158,7 @@ ppCondSubLibraries v libs = ppCondForeignLibs :: CabalSpecVersion -> [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)] -> [PrettyField ()] ppCondForeignLibs v flibs = [ PrettySection () "foreign-library" [pretty n] $ - ppCondTree2 v (foreignLibFieldGrammar n) condTree + ppCondTree2 v (foreignLibFieldGrammar n []) condTree | (n, condTree) <- flibs ] diff --git a/Cabal-syntax/src/Distribution/Types/ForeignLib.hs b/Cabal-syntax/src/Distribution/Types/ForeignLib.hs index c8a1472ca56..d137d06c64f 100644 --- a/Cabal-syntax/src/Distribution/Types/ForeignLib.hs +++ b/Cabal-syntax/src/Distribution/Types/ForeignLib.hs @@ -42,6 +42,8 @@ import qualified Distribution.Types.BuildInfo.Lens as L data ForeignLib = ForeignLib { foreignLibName :: UnqualComponentName -- ^ Name of the foreign library + , foreignLibImports :: [String] + -- ^ Retained imports for exact printing , foreignLibType :: ForeignLibType -- ^ What kind of foreign library is this (static or dynamic). , foreignLibOptions :: [ForeignLibOption] @@ -144,6 +146,7 @@ instance Semigroup ForeignLib where a <> b = ForeignLib { foreignLibName = combineNames a b foreignLibName "foreign library" + , foreignLibImports = combine foreignLibImports , foreignLibType = combine foreignLibType , foreignLibOptions = combine foreignLibOptions , foreignLibBuildInfo = combine foreignLibBuildInfo @@ -160,6 +163,7 @@ instance Monoid ForeignLib where mempty = ForeignLib { foreignLibName = mempty + , foreignLibImports = mempty , foreignLibType = ForeignLibTypeUnknown , foreignLibOptions = [] , foreignLibBuildInfo = mempty diff --git a/Cabal/src/Distribution/PackageDescription/Check/Target.hs b/Cabal/src/Distribution/PackageDescription/Check/Target.hs index 521ae83fb98..c029b586c14 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Target.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Target.hs @@ -117,6 +117,7 @@ checkForeignLib :: Monad m => ForeignLib -> CheckM m () checkForeignLib ( ForeignLib foreignLibName_ + _foreignLibImports_ _foreignLibType_ _foreignLibOptions_ foreignLibBuildInfo_ From cf672ab73f257f38dcd5e9710e01684015922e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 29 Oct 2025 20:44:57 +0800 Subject: [PATCH 03/60] retain imports for executable section --- .../Distribution/PackageDescription/FieldGrammar.hs | 12 +++++++----- .../src/Distribution/PackageDescription/Parsec.hs | 3 ++- .../Distribution/PackageDescription/PrettyPrint.hs | 2 +- Cabal-syntax/src/Distribution/Types/Executable.hs | 4 ++++ .../Distribution/PackageDescription/Check/Target.hs | 1 + Cabal/src/Distribution/Simple/Build.hs | 3 +++ Cabal/src/Distribution/Simple/Haddock.hs | 2 ++ 7 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index 867b301eebd..39a09cf09f0 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -283,16 +283,18 @@ executableFieldGrammar , c (MQuoted Language) ) => UnqualComponentName + -> [String] + -- ^ retained imports -> g Executable Executable -executableFieldGrammar n = - Executable n +executableFieldGrammar n imports = + Executable n imports -- main-is is optional as conditional blocks don't have it <$> optionalFieldDefAla "main-is" RelativePathNT L.modulePath (modulePath mempty) <*> optionalFieldDef "scope" L.exeScope ExecutablePublic ^^^ availableSince CabalSpecV2_0 ExecutablePublic <*> blurFieldGrammar L.buildInfo buildInfoFieldGrammar -{-# SPECIALIZE executableFieldGrammar :: UnqualComponentName -> ParsecFieldGrammar' Executable #-} -{-# SPECIALIZE executableFieldGrammar :: UnqualComponentName -> PrettyFieldGrammar' Executable #-} +{-# SPECIALIZE executableFieldGrammar :: UnqualComponentName -> [String] -> ParsecFieldGrammar' Executable #-} +{-# SPECIALIZE executableFieldGrammar :: UnqualComponentName -> [String] -> PrettyFieldGrammar' Executable #-} ------------------------------------------------------------------------------- -- TestSuite @@ -902,7 +904,7 @@ _syntaxFieldNames = mconcat [ fieldGrammarKnownFieldList packageDescriptionFieldGrammar , fieldGrammarKnownFieldList $ libraryFieldGrammar LMainLibName [] - , fieldGrammarKnownFieldList $ executableFieldGrammar "exe" + , fieldGrammarKnownFieldList $ executableFieldGrammar "exe" [] , fieldGrammarKnownFieldList $ foreignLibFieldGrammar "flib" [] , fieldGrammarKnownFieldList testSuiteFieldGrammar , fieldGrammarKnownFieldList benchmarkFieldGrammar diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index efcc8de9432..ff86cba7575 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -332,7 +332,8 @@ goSections specVer = traverse_ process | name == "executable" = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args - exe <- lift $ parseCondTree' (executableFieldGrammar name') (fromBuildInfo' name') commonStanzas fields + let importNames = Map.keys commonStanzas + exe <- lift $ parseCondTree' (executableFieldGrammar name' importNames) (fromBuildInfo' name') commonStanzas fields -- TODO check duplicate name here? stateGpd . L.condExecutables %= snoc (name', exe) | name == "test-suite" = do diff --git a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs index dd756750f64..e543e7ccdd7 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs @@ -165,7 +165,7 @@ ppCondForeignLibs v flibs = ppCondExecutables :: CabalSpecVersion -> [(UnqualComponentName, CondTree ConfVar [Dependency] Executable)] -> [PrettyField ()] ppCondExecutables v exes = [ PrettySection () "executable" [pretty n] $ - ppCondTree2 v (executableFieldGrammar n) condTree + ppCondTree2 v (executableFieldGrammar n []) condTree | (n, condTree) <- exes ] diff --git a/Cabal-syntax/src/Distribution/Types/Executable.hs b/Cabal-syntax/src/Distribution/Types/Executable.hs index 2017a9ba8d2..f0db2ca24c9 100644 --- a/Cabal-syntax/src/Distribution/Types/Executable.hs +++ b/Cabal-syntax/src/Distribution/Types/Executable.hs @@ -22,6 +22,8 @@ import qualified Distribution.Types.BuildInfo.Lens as L data Executable = Executable { exeName :: UnqualComponentName + , exeImports :: [String] + -- ^ Retained for exact print , modulePath :: RelativePath Source File , exeScope :: ExecutableScope , buildInfo :: BuildInfo @@ -39,6 +41,7 @@ instance Monoid Executable where mempty = Executable { exeName = mempty + , exeImports = mempty , modulePath = unsafeMakeSymbolicPath "" , exeScope = mempty , buildInfo = mempty @@ -49,6 +52,7 @@ instance Semigroup Executable where a <> b = Executable { exeName = combineNames a b exeName "executable" + , exeImports = combine exeImports , modulePath = unsafeMakeSymbolicPath $ combineNames a b (getSymbolicPath . modulePath) "modulePath" , exeScope = combine exeScope , buildInfo = combine buildInfo diff --git a/Cabal/src/Distribution/PackageDescription/Check/Target.hs b/Cabal/src/Distribution/PackageDescription/Check/Target.hs index c029b586c14..26a66e88531 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Target.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Target.hs @@ -140,6 +140,7 @@ checkExecutable ads exe@( Executable exeName_ + _exeImports_ symbolicModulePath_ _exeScope_ buildInfo_ diff --git a/Cabal/src/Distribution/Simple/Build.hs b/Cabal/src/Distribution/Simple/Build.hs index 8afe8a4aa2f..bb5e52cbc10 100644 --- a/Cabal/src/Distribution/Simple/Build.hs +++ b/Cabal/src/Distribution/Simple/Build.hs @@ -767,6 +767,7 @@ testSuiteExeV10AsExe :: TestSuite -> Executable testSuiteExeV10AsExe test@TestSuite{testInterface = TestSuiteExeV10 _ mainFile} = Executable { exeName = testName test + , exeImports = mempty , modulePath = mainFile , exeScope = ExecutablePublic , buildInfo = testBuildInfo test @@ -778,6 +779,7 @@ benchmarkExeV10asExe :: Benchmark -> Executable benchmarkExeV10asExe bm@Benchmark{benchmarkInterface = BenchmarkExeV10 _ mainFile} = Executable { exeName = benchmarkName bm + , exeImports = mempty , modulePath = mainFile , exeScope = ExecutablePublic , buildInfo = benchmarkBuildInfo bm @@ -861,6 +863,7 @@ testSuiteLibV09AsLibAndExe exe = Executable { exeName = mkUnqualComponentName $ stubName test + , exeImports = mempty , modulePath = makeRelativePathEx $ stubFilePath test , exeScope = ExecutablePublic , buildInfo = diff --git a/Cabal/src/Distribution/Simple/Haddock.hs b/Cabal/src/Distribution/Simple/Haddock.hs index b24ee8da5af..b39d9d073fc 100644 --- a/Cabal/src/Distribution/Simple/Haddock.hs +++ b/Cabal/src/Distribution/Simple/Haddock.hs @@ -994,6 +994,7 @@ compToExe comp = Just Executable { exeName = testName test + , exeImports = mempty , modulePath = f , exeScope = ExecutablePublic , buildInfo = testBuildInfo test @@ -1002,6 +1003,7 @@ compToExe comp = Just Executable { exeName = benchmarkName bench + , exeImports = mempty , modulePath = f , exeScope = ExecutablePublic , buildInfo = benchmarkBuildInfo bench From a2cd919a219a471ca07e2d409812f009134c0075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 29 Oct 2025 20:48:57 +0800 Subject: [PATCH 04/60] retain imports for test-suite --- .../PackageDescription/FieldGrammar.hs | 17 +++++++++++------ .../Distribution/PackageDescription/Parsec.hs | 5 +++-- .../PackageDescription/PrettyPrint.hs | 2 +- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index 39a09cf09f0..67d28d66ea8 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -303,7 +303,9 @@ executableFieldGrammar n imports = -- | An intermediate type just used for parsing the test-suite stanza. -- After validation it is converted into the proper 'TestSuite' type. data TestSuiteStanza = TestSuiteStanza - { _testStanzaTestType :: Maybe TestType + { _testStanzaImports :: [String] + , _testStanzaTestType :: Maybe TestType + -- ^ Retained imports for exact printing , _testStanzaMainIs :: Maybe (RelativePath Source File) , _testStanzaTestModule :: Maybe ModuleName , _testStanzaBuildInfo :: BuildInfo @@ -357,9 +359,11 @@ testSuiteFieldGrammar , c (List VCat Token String) , c (MQuoted Language) ) - => g TestSuiteStanza TestSuiteStanza -testSuiteFieldGrammar = - TestSuiteStanza + => [String] + -- ^ retained imports + -> g TestSuiteStanza TestSuiteStanza +testSuiteFieldGrammar imports = + TestSuiteStanza imports <$> optionalField "type" testStanzaTestType <*> optionalFieldAla "main-is" RelativePathNT testStanzaMainIs <*> optionalField "test-module" testStanzaTestModule @@ -434,7 +438,8 @@ validateTestSuite cabalSpecVersion pos stanza = case testSuiteType of unvalidateTestSuite :: TestSuite -> TestSuiteStanza unvalidateTestSuite t = TestSuiteStanza - { _testStanzaTestType = ty + { _testStanzaImports = mempty + , _testStanzaTestType = ty , _testStanzaMainIs = ma , _testStanzaTestModule = mo , _testStanzaBuildInfo = testBuildInfo t @@ -906,7 +911,7 @@ _syntaxFieldNames = , fieldGrammarKnownFieldList $ libraryFieldGrammar LMainLibName [] , fieldGrammarKnownFieldList $ executableFieldGrammar "exe" [] , fieldGrammarKnownFieldList $ foreignLibFieldGrammar "flib" [] - , fieldGrammarKnownFieldList testSuiteFieldGrammar + , fieldGrammarKnownFieldList $ testSuiteFieldGrammar [] , fieldGrammarKnownFieldList benchmarkFieldGrammar , fieldGrammarKnownFieldList $ flagFieldGrammar (error "flagname") , fieldGrammarKnownFieldList $ sourceRepoFieldGrammar (error "repokind") diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index ff86cba7575..d7b7940e2aa 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -339,7 +339,8 @@ goSections specVer = traverse_ process | name == "test-suite" = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args - testStanza <- lift $ parseCondTree' testSuiteFieldGrammar (fromBuildInfo' name') commonStanzas fields + let importNames = Map.keys commonStanzas + testStanza <- lift $ parseCondTree' (testSuiteFieldGrammar importNames) (fromBuildInfo' name') commonStanzas fields testSuite <- lift $ traverse (validateTestSuite specVer pos) testStanza let hasType ts = testInterface ts /= testInterface mempty @@ -624,7 +625,7 @@ instance FromBuildInfo ForeignLib where fromBuildInfo' n bi = set L.foreignLibNa instance FromBuildInfo Executable where fromBuildInfo' n bi = set L.exeName n $ set L.buildInfo bi emptyExecutable instance FromBuildInfo TestSuiteStanza where - fromBuildInfo' _ bi = TestSuiteStanza Nothing Nothing Nothing bi [] + fromBuildInfo' _ bi = TestSuiteStanza [] Nothing Nothing Nothing bi [] instance FromBuildInfo BenchmarkStanza where fromBuildInfo' _ bi = BenchmarkStanza Nothing Nothing Nothing bi diff --git a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs index e543e7ccdd7..84f05946257 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs @@ -172,7 +172,7 @@ ppCondExecutables v exes = ppCondTestSuites :: CabalSpecVersion -> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)] -> [PrettyField ()] ppCondTestSuites v suites = [ PrettySection () "test-suite" [pretty n] $ - ppCondTree2 v testSuiteFieldGrammar (fmap FG.unvalidateTestSuite condTree) + ppCondTree2 v (testSuiteFieldGrammar []) (fmap FG.unvalidateTestSuite condTree) | (n, condTree) <- suites ] From ffa581992847b80981acef97a9c0a913f19f3eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 29 Oct 2025 20:52:46 +0800 Subject: [PATCH 05/60] retain imports for benchmark --- .../PackageDescription/FieldGrammar.hs | 17 +++++++++++------ .../Distribution/PackageDescription/Parsec.hs | 5 +++-- .../PackageDescription/PrettyPrint.hs | 2 +- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index 67d28d66ea8..c322e3564bf 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -458,7 +458,9 @@ unvalidateTestSuite t = -- | An intermediate type just used for parsing the benchmark stanza. -- After validation it is converted into the proper 'Benchmark' type. data BenchmarkStanza = BenchmarkStanza - { _benchmarkStanzaBenchmarkType :: Maybe BenchmarkType + { _benchmarkStanzaImports :: [String] + -- ^ retained imports + , _benchmarkStanzaBenchmarkType :: Maybe BenchmarkType , _benchmarkStanzaMainIs :: Maybe (RelativePath Source File) , _benchmarkStanzaBenchmarkModule :: Maybe ModuleName , _benchmarkStanzaBuildInfo :: BuildInfo @@ -506,9 +508,11 @@ benchmarkFieldGrammar , c (List VCat Token String) , c (MQuoted Language) ) - => g BenchmarkStanza BenchmarkStanza -benchmarkFieldGrammar = - BenchmarkStanza + => [String] + -- ^ retained imports + -> g BenchmarkStanza BenchmarkStanza +benchmarkFieldGrammar imports = + BenchmarkStanza imports <$> optionalField "type" benchmarkStanzaBenchmarkType <*> optionalFieldAla "main-is" RelativePathNT benchmarkStanzaMainIs <*> optionalField "benchmark-module" benchmarkStanzaBenchmarkModule @@ -570,7 +574,8 @@ validateBenchmark cabalSpecVersion pos stanza = case benchmarkStanzaType of unvalidateBenchmark :: Benchmark -> BenchmarkStanza unvalidateBenchmark b = BenchmarkStanza - { _benchmarkStanzaBenchmarkType = ty + { _benchmarkStanzaImports = mempty + , _benchmarkStanzaBenchmarkType = ty , _benchmarkStanzaMainIs = ma , _benchmarkStanzaBenchmarkModule = mo , _benchmarkStanzaBuildInfo = benchmarkBuildInfo b @@ -912,7 +917,7 @@ _syntaxFieldNames = , fieldGrammarKnownFieldList $ executableFieldGrammar "exe" [] , fieldGrammarKnownFieldList $ foreignLibFieldGrammar "flib" [] , fieldGrammarKnownFieldList $ testSuiteFieldGrammar [] - , fieldGrammarKnownFieldList benchmarkFieldGrammar + , fieldGrammarKnownFieldList $ benchmarkFieldGrammar [] , fieldGrammarKnownFieldList $ flagFieldGrammar (error "flagname") , fieldGrammarKnownFieldList $ sourceRepoFieldGrammar (error "repokind") , fieldGrammarKnownFieldList $ setupBInfoFieldGrammar True diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index d7b7940e2aa..b361ae875c7 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -368,7 +368,8 @@ goSections specVer = traverse_ process | name == "benchmark" = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args - benchStanza <- lift $ parseCondTree' benchmarkFieldGrammar (fromBuildInfo' name') commonStanzas fields + let importNames = Map.keys commonStanzas + benchStanza <- lift $ parseCondTree' (benchmarkFieldGrammar importNames) (fromBuildInfo' name') commonStanzas fields bench <- lift $ traverse (validateBenchmark specVer pos) benchStanza let hasType ts = benchmarkInterface ts /= benchmarkInterface mempty @@ -628,7 +629,7 @@ instance FromBuildInfo TestSuiteStanza where fromBuildInfo' _ bi = TestSuiteStanza [] Nothing Nothing Nothing bi [] instance FromBuildInfo BenchmarkStanza where - fromBuildInfo' _ bi = BenchmarkStanza Nothing Nothing Nothing bi + fromBuildInfo' _ bi = BenchmarkStanza [] Nothing Nothing Nothing bi parseCondTreeWithCommonStanzas :: forall src a diff --git a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs index 84f05946257..165407e6a60 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs @@ -179,7 +179,7 @@ ppCondTestSuites v suites = ppCondBenchmarks :: CabalSpecVersion -> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)] -> [PrettyField ()] ppCondBenchmarks v suites = [ PrettySection () "benchmark" [pretty n] $ - ppCondTree2 v benchmarkFieldGrammar (fmap FG.unvalidateBenchmark condTree) + ppCondTree2 v (benchmarkFieldGrammar []) (fmap FG.unvalidateBenchmark condTree) | (n, condTree) <- suites ] From d7fd48b2c7a03082bc616611a825719d409582c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 30 Oct 2025 16:24:49 +0800 Subject: [PATCH 06/60] attepmt to insert used imports and not all imports --- Cabal-syntax/Cabal-syntax.cabal | 1 + .../PackageDescription/FieldGrammar.hs | 82 +++++++------ .../Distribution/PackageDescription/Parsec.hs | 112 +++++++++++------- .../PackageDescription/PrettyPrint.hs | 13 +- .../src/Distribution/Types/BuildInfo.hs | 24 +++- .../src/Distribution/Types/CondTree.hs | 21 ++++ .../src/Distribution/Types/Executable.hs | 16 +++ .../src/Distribution/Types/ForeignLib.hs | 16 +++ .../Types/GenericPackageDescription.hs | 5 + .../src/Distribution/Types/Imports.hs | 22 ++++ .../src/Distribution/Types/Library.hs | 16 +++ 11 files changed, 244 insertions(+), 84 deletions(-) create mode 100644 Cabal-syntax/src/Distribution/Types/Imports.hs diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal index 85137dc147c..de3d2adcde0 100644 --- a/Cabal-syntax/Cabal-syntax.cabal +++ b/Cabal-syntax/Cabal-syntax.cabal @@ -160,6 +160,7 @@ library Distribution.Types.Library.Lens Distribution.Types.LibraryName Distribution.Types.LibraryVisibility + Distribution.Types.Imports Distribution.Types.MissingDependency Distribution.Types.MissingDependencyReason Distribution.Types.Mixin diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index c322e3564bf..791f8d7bbb3 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -26,6 +26,7 @@ module Distribution.PackageDescription.FieldGrammar , testSuiteFieldGrammar , validateTestSuite , unvalidateTestSuite + , insertTestSuiteStanzaImports -- ** Lenses , testStanzaTestType @@ -38,6 +39,7 @@ module Distribution.PackageDescription.FieldGrammar , benchmarkFieldGrammar , validateBenchmark , unvalidateBenchmark + , insertBenchmarkStanzaImports -- * Field grammars , formatDependencyList @@ -187,11 +189,9 @@ libraryFieldGrammar , c (MQuoted Language) ) => LibraryName - -> [String] - -- ^ names of common stanza imports -> g Library Library -libraryFieldGrammar n imports = - Library n imports +libraryFieldGrammar n = + Library n [] {- imports are later filled in -} <$> monoidalFieldAla "exposed-modules" formatExposedModules L.exposedModules <*> monoidalFieldAla "reexported-modules" (alaList CommaVCat) L.reexportedModules <*> monoidalFieldAla "signatures" (alaList' VCat MQuoted) L.signatures @@ -207,8 +207,8 @@ libraryFieldGrammar n imports = LSubLibName _ -> optionalFieldDef "visibility" L.libVisibility LibraryVisibilityPrivate ^^^ availableSince CabalSpecV3_0 LibraryVisibilityPrivate -{-# SPECIALIZE libraryFieldGrammar :: LibraryName -> [String] -> ParsecFieldGrammar' Library #-} -{-# SPECIALIZE libraryFieldGrammar :: LibraryName -> [String] -> PrettyFieldGrammar' Library #-} +{-# SPECIALIZE libraryFieldGrammar :: LibraryName -> ParsecFieldGrammar' Library #-} +{-# SPECIALIZE libraryFieldGrammar :: LibraryName -> PrettyFieldGrammar' Library #-} ------------------------------------------------------------------------------- -- Foreign library @@ -239,19 +239,17 @@ foreignLibFieldGrammar , c (MQuoted Language) ) => UnqualComponentName - -> [String] - -- ^ retained common stanzas -> g ForeignLib ForeignLib -foreignLibFieldGrammar n imports = - ForeignLib n imports +foreignLibFieldGrammar n = + ForeignLib n [] <$> optionalFieldDef "type" L.foreignLibType ForeignLibTypeUnknown <*> monoidalFieldAla "options" (alaList FSep) L.foreignLibOptions <*> blurFieldGrammar L.foreignLibBuildInfo buildInfoFieldGrammar <*> optionalField "lib-version-info" L.foreignLibVersionInfo <*> optionalField "lib-version-linux" L.foreignLibVersionLinux <*> monoidalFieldAla "mod-def-file" (alaList' FSep RelativePathNT) L.foreignLibModDefFile -{-# SPECIALIZE foreignLibFieldGrammar :: UnqualComponentName -> [String] -> ParsecFieldGrammar' ForeignLib #-} -{-# SPECIALIZE foreignLibFieldGrammar :: UnqualComponentName -> [String] -> PrettyFieldGrammar' ForeignLib #-} +{-# SPECIALIZE foreignLibFieldGrammar :: UnqualComponentName -> ParsecFieldGrammar' ForeignLib #-} +{-# SPECIALIZE foreignLibFieldGrammar :: UnqualComponentName -> PrettyFieldGrammar' ForeignLib #-} ------------------------------------------------------------------------------- -- Executable @@ -283,18 +281,16 @@ executableFieldGrammar , c (MQuoted Language) ) => UnqualComponentName - -> [String] - -- ^ retained imports -> g Executable Executable -executableFieldGrammar n imports = - Executable n imports +executableFieldGrammar n = + Executable n [] -- main-is is optional as conditional blocks don't have it <$> optionalFieldDefAla "main-is" RelativePathNT L.modulePath (modulePath mempty) <*> optionalFieldDef "scope" L.exeScope ExecutablePublic ^^^ availableSince CabalSpecV2_0 ExecutablePublic <*> blurFieldGrammar L.buildInfo buildInfoFieldGrammar -{-# SPECIALIZE executableFieldGrammar :: UnqualComponentName -> [String] -> ParsecFieldGrammar' Executable #-} -{-# SPECIALIZE executableFieldGrammar :: UnqualComponentName -> [String] -> PrettyFieldGrammar' Executable #-} +{-# SPECIALIZE executableFieldGrammar :: UnqualComponentName -> ParsecFieldGrammar' Executable #-} +{-# SPECIALIZE executableFieldGrammar :: UnqualComponentName -> PrettyFieldGrammar' Executable #-} ------------------------------------------------------------------------------- -- TestSuite @@ -312,6 +308,17 @@ data TestSuiteStanza = TestSuiteStanza , _testStanzaCodeGenerators :: [String] } +insertTestSuiteStanzaImports + :: CondTree ConfVar [Dependency] (WithImportNames TestSuiteStanza) + -> CondTree ConfVar [Dependency] TestSuiteStanza +insertTestSuiteStanzaImports = mapCondTree f id id + where + f :: WithImportNames TestSuiteStanza -> TestSuiteStanza + f a = + let imports = importNames a + ts = unImportNames a + in ts{_testStanzaImports=imports} + instance L.HasBuildInfo TestSuiteStanza where buildInfo = testStanzaBuildInfo @@ -359,11 +366,9 @@ testSuiteFieldGrammar , c (List VCat Token String) , c (MQuoted Language) ) - => [String] - -- ^ retained imports - -> g TestSuiteStanza TestSuiteStanza -testSuiteFieldGrammar imports = - TestSuiteStanza imports + => g TestSuiteStanza TestSuiteStanza +testSuiteFieldGrammar = + TestSuiteStanza [] <$> optionalField "type" testStanzaTestType <*> optionalFieldAla "main-is" RelativePathNT testStanzaMainIs <*> optionalField "test-module" testStanzaTestModule @@ -466,6 +471,17 @@ data BenchmarkStanza = BenchmarkStanza , _benchmarkStanzaBuildInfo :: BuildInfo } +insertBenchmarkStanzaImports + :: CondTree ConfVar [Dependency] (WithImportNames BenchmarkStanza) + -> CondTree ConfVar [Dependency] BenchmarkStanza +insertBenchmarkStanzaImports = mapCondTree f id id + where + f :: WithImportNames BenchmarkStanza -> BenchmarkStanza + f a = + let imports = importNames a + bs = unImportNames a + in bs{_benchmarkStanzaImports=imports} + instance L.HasBuildInfo BenchmarkStanza where buildInfo = benchmarkStanzaBuildInfo @@ -508,11 +524,9 @@ benchmarkFieldGrammar , c (List VCat Token String) , c (MQuoted Language) ) - => [String] - -- ^ retained imports - -> g BenchmarkStanza BenchmarkStanza -benchmarkFieldGrammar imports = - BenchmarkStanza imports + => g BenchmarkStanza BenchmarkStanza +benchmarkFieldGrammar = + BenchmarkStanza [] <$> optionalField "type" benchmarkStanzaBenchmarkType <*> optionalFieldAla "main-is" RelativePathNT benchmarkStanzaMainIs <*> optionalField "benchmark-module" benchmarkStanzaBenchmarkModule @@ -614,7 +628,7 @@ buildInfoFieldGrammar ) => g BuildInfo BuildInfo buildInfoFieldGrammar = - BuildInfo + BuildInfo [] <$> booleanFieldDef "buildable" L.buildable True <*> monoidalFieldAla "build-tools" (alaList CommaFSep) L.buildTools ^^^ deprecatedSince @@ -913,11 +927,11 @@ _syntaxFieldNames = sort $ mconcat [ fieldGrammarKnownFieldList packageDescriptionFieldGrammar - , fieldGrammarKnownFieldList $ libraryFieldGrammar LMainLibName [] - , fieldGrammarKnownFieldList $ executableFieldGrammar "exe" [] - , fieldGrammarKnownFieldList $ foreignLibFieldGrammar "flib" [] - , fieldGrammarKnownFieldList $ testSuiteFieldGrammar [] - , fieldGrammarKnownFieldList $ benchmarkFieldGrammar [] + , fieldGrammarKnownFieldList $ libraryFieldGrammar LMainLibName + , fieldGrammarKnownFieldList $ executableFieldGrammar "exe" + , fieldGrammarKnownFieldList $ foreignLibFieldGrammar "flib" + , fieldGrammarKnownFieldList $ testSuiteFieldGrammar + , fieldGrammarKnownFieldList $ benchmarkFieldGrammar , fieldGrammarKnownFieldList $ flagFieldGrammar (error "flagname") , fieldGrammarKnownFieldList $ sourceRepoFieldGrammar (error "repokind") , fieldGrammarKnownFieldList $ setupBInfoFieldGrammar True diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index b361ae875c7..32509d2c82b 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -1,4 +1,5 @@ {-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE TupleSections #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -60,6 +61,7 @@ import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as BS8 import qualified Data.Map.Strict as Map import qualified Data.Set as Set +import Distribution.Types.Imports import qualified Distribution.Compat.Newtype as Newtype import qualified Distribution.Compat.NonEmptySet as NES import qualified Distribution.Types.BuildInfo.Lens as L @@ -263,7 +265,7 @@ goSections specVer = traverse_ process -> Map String CondTreeBuildInfo -- \^ common stanzas -> [Field Position] - -> ParseResult src (CondTree ConfVar [Dependency] a) + -> ParseResult src (CondTree ConfVar [Dependency] (WithImportNames a)) parseCondTree' = parseCondTreeWithCommonStanzas specVer parseSection :: Name Position -> [SectionArg Position] -> [Field Position] -> SectionParser src () @@ -275,9 +277,10 @@ goSections specVer = traverse_ process commonStanzas <- use stateCommonStanzas name' <- lift $ parseCommonName pos args biTree <- lift $ parseCondTree' buildInfoFieldGrammar id commonStanzas fields + let biTree' = insertBuildInfoImports biTree case Map.lookup name' commonStanzas of - Nothing -> stateCommonStanzas .= Map.insert name' biTree commonStanzas + Nothing -> stateCommonStanzas .= Map.insert name' biTree' commonStanzas Just _ -> lift $ parseFailure pos $ @@ -290,12 +293,12 @@ goSections specVer = traverse_ process "Multiple main libraries; have you forgotten to specify a name for an internal library?" commonStanzas <- use stateCommonStanzas - let name'' = LMainLibName - importNames = Map.keys commonStanzas - lib <- lift $ parseCondTree' (libraryFieldGrammar name'' importNames) (libraryFromBuildInfo name'') commonStanzas fields + let name' = LMainLibName + lib <- lift $ parseCondTree' (libraryFieldGrammar name') (libraryFromBuildInfo name') commonStanzas fields + let lib' = insertLibImports lib -- -- TODO check that not set - stateGpd . L.condLibrary ?= lib + stateGpd . L.condLibrary ?= lib' -- Sublibraries -- TODO: check cabal-version @@ -303,20 +306,20 @@ goSections specVer = traverse_ process commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args let name'' = LSubLibName name' - importNames = Map.keys commonStanzas - lib <- lift $ parseCondTree' (libraryFieldGrammar name'' importNames) (libraryFromBuildInfo name'') commonStanzas fields + lib <- lift $ parseCondTree' (libraryFieldGrammar name'') (libraryFromBuildInfo name'') commonStanzas fields + let lib' = insertLibImports lib -- TODO check duplicate name here? - stateGpd . L.condSubLibraries %= snoc (name', lib) + stateGpd . L.condSubLibraries %= snoc (name', lib') -- TODO: check cabal-version | name == "foreign-library" = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args - let importNames = Map.keys commonStanzas - flib <- lift $ parseCondTree' (foreignLibFieldGrammar name' importNames) (fromBuildInfo' name') commonStanzas fields + flib <- lift $ parseCondTree' (foreignLibFieldGrammar name') (fromBuildInfo' name') commonStanzas fields + let flib' = insertForeignLibImports flib let hasType ts = foreignLibType ts /= foreignLibType mempty - unless (onAllBranches hasType flib) $ + unless (onAllBranches hasType flib') $ lift $ parseFailure pos $ concat @@ -328,20 +331,20 @@ goSections specVer = traverse_ process ] -- TODO check duplicate name here? - stateGpd . L.condForeignLibs %= snoc (name', flib) + stateGpd . L.condForeignLibs %= snoc (name', flib') | name == "executable" = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args - let importNames = Map.keys commonStanzas - exe <- lift $ parseCondTree' (executableFieldGrammar name' importNames) (fromBuildInfo' name') commonStanzas fields + exe <- lift $ parseCondTree' (executableFieldGrammar name') (fromBuildInfo' name') commonStanzas fields + let exe' = insertExeImports exe -- TODO check duplicate name here? - stateGpd . L.condExecutables %= snoc (name', exe) + stateGpd . L.condExecutables %= snoc (name', exe') | name == "test-suite" = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args - let importNames = Map.keys commonStanzas - testStanza <- lift $ parseCondTree' (testSuiteFieldGrammar importNames) (fromBuildInfo' name') commonStanzas fields - testSuite <- lift $ traverse (validateTestSuite specVer pos) testStanza + testStanza <- lift $ parseCondTree' testSuiteFieldGrammar (fromBuildInfo' name') commonStanzas fields + let testStanza' = insertTestSuiteStanzaImports testStanza + testSuite <- lift $ traverse (validateTestSuite specVer pos) testStanza' let hasType ts = testInterface ts /= testInterface mempty unless (onAllBranches hasType testSuite) $ @@ -368,9 +371,9 @@ goSections specVer = traverse_ process | name == "benchmark" = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args - let importNames = Map.keys commonStanzas - benchStanza <- lift $ parseCondTree' (benchmarkFieldGrammar importNames) (fromBuildInfo' name') commonStanzas fields - bench <- lift $ traverse (validateBenchmark specVer pos) benchStanza + benchStanza <- lift $ parseCondTree' benchmarkFieldGrammar (fromBuildInfo' name') commonStanzas fields + let benchStanza' = insertBenchmarkStanzaImports benchStanza + bench <- lift $ traverse (validateBenchmark specVer pos) benchStanza' let hasType ts = benchmarkInterface ts /= benchmarkInterface mempty unless (onAllBranches hasType bench) $ @@ -488,9 +491,10 @@ parseCondTree -> (a -> [Dependency]) -- ^ condition extractor -> [Field Position] - -> ParseResult src (CondTree ConfVar [Dependency] a) + -> ParseResult src (CondTree ConfVar [Dependency] (WithImportNames a)) parseCondTree v hasElif grammar commonStanzas fromBuildInfo cond = go where + go :: [Field Position] -> ParseResult src (CondTree ConfVar [Dependency] (WithImportNames a)) go fields0 = do (fields, endo) <- if v >= CabalSpecV3_0 @@ -500,9 +504,9 @@ parseCondTree v hasElif grammar commonStanzas fromBuildInfo cond = go let (fs, ss) = partitionFields fields x <- parseFieldGrammar v fs grammar branches <- concat <$> traverse parseIfs ss - return $ endo $ CondNode x (cond x) branches + return $ endo $ CondNode ([], x) (cond x) branches - parseIfs :: [Section Position] -> ParseResult src [CondBranch ConfVar [Dependency] a] + parseIfs :: [Section Position] -> ParseResult src [CondBranch ConfVar [Dependency] (WithImportNames a)] parseIfs [] = return [] parseIfs (MkSection (Name pos name) test fields : sections) | name == "if" = do test' <- parseConditionConfVar (startOfSection (incPos 2 pos) test) test @@ -515,7 +519,7 @@ parseCondTree v hasElif grammar commonStanzas fromBuildInfo cond = go parseElseIfs :: [Section Position] - -> ParseResult src (Maybe (CondTree ConfVar [Dependency] a), [CondBranch ConfVar [Dependency] a]) + -> ParseResult src (Maybe (CondTree ConfVar [Dependency] (WithImportNames a)), [CondBranch ConfVar [Dependency] (WithImportNames a)]) parseElseIfs [] = return (Nothing, []) parseElseIfs (MkSection (Name pos name) args fields : sections) | name == "else" = do unless (null args) $ @@ -532,7 +536,7 @@ parseCondTree v hasElif grammar commonStanzas fromBuildInfo cond = go (elseFields, sections') <- parseElseIfs sections -- we parse an empty 'Fields', to get empty value for a node a <- parseFieldGrammar v mempty grammar - return (Just $ CondNode a (cond a) [CondBranch test' fields' elseFields], sections') + return (Just $ CondNode ([], a) (cond a) [CondBranch test' fields' elseFields], sections') parseElseIfs (MkSection (Name pos name) _ _ : sections) | name == "elif" = do parseWarning pos PWTInvalidSubsection $ "invalid subsection \"elif\". You should set cabal-version: 2.2 or larger to use elif-conditionals." (,) Nothing <$> parseIfs sections @@ -642,7 +646,7 @@ parseCondTreeWithCommonStanzas -> Map String CondTreeBuildInfo -- ^ common stanzas -> [Field Position] - -> ParseResult src (CondTree ConfVar [Dependency] a) + -> ParseResult src (CondTree ConfVar [Dependency] ([String], a)) parseCondTreeWithCommonStanzas v grammar fromBuildInfo commonStanzas fields = do (fields', endo) <- processImports v fromBuildInfo commonStanzas fields x <- parseCondTree v hasElif grammar commonStanzas fromBuildInfo (view L.targetBuildDepends) fields' @@ -659,7 +663,10 @@ processImports -> Map String CondTreeBuildInfo -- ^ common stanzas -> [Field Position] - -> ParseResult src ([Field Position], CondTree ConfVar [Dependency] a -> CondTree ConfVar [Dependency] a) + -> ParseResult src + ( [Field Position] + , CondTree ConfVar [Dependency] (WithImportNames a) -> CondTree ConfVar [Dependency] (WithImportNames a) + ) processImports v fromBuildInfo commonStanzas = go [] where hasCommonStanzas = specHasCommonStanzas v @@ -667,6 +674,21 @@ processImports v fromBuildInfo commonStanzas = go [] getList' :: List CommaFSep Token String -> [String] getList' = Newtype.unpack + -- | only attach import annotation on root + attachImportsOnRoot + :: forall v c a' + . [String] + -> CondTree v c a' + -> CondTree v c (WithImportNames a') + attachImportsOnRoot imports = mapTreeData' (withImportNames imports) withNoImports + + go + :: [CondTree ConfVar [Dependency] (WithImportNames BuildInfo)] + -> [Field Position] + -> ParseResult src + ( [Field Position] + , CondTree ConfVar [Dependency] (WithImportNames a) -> CondTree ConfVar [Dependency] (WithImportNames a) + ) go acc (Field (Name pos name) _ : fields) | name == "import" , hasCommonStanzas == NoCommonStanzas = do @@ -675,15 +697,15 @@ processImports v fromBuildInfo commonStanzas = go [] -- supported: go acc (Field (Name pos name) fls : fields) | name == "import" = do names <- getList' <$> runFieldParser pos parsec v fls - names' <- for names $ \commonName -> + trees <- for names $ \commonName -> case Map.lookup commonName commonStanzas of Nothing -> do parseFailure pos $ "Undefined common stanza imported: " ++ commonName pure Nothing Just commonTree -> - pure (Just commonTree) + pure (Just (attachImportsOnRoot [commonName] commonTree)) - go (acc ++ catMaybes names') fields + go (acc ++ catMaybes trees) fields -- parse actual CondTree go acc fields = do @@ -700,19 +722,29 @@ warnImport v (Field (Name pos name) _) | name == "import" = do warnImport _ f = pure (Just f) mergeCommonStanza - :: L.HasBuildInfo a + :: forall a + . L.HasBuildInfo a => (BuildInfo -> a) - -> CondTree ConfVar [Dependency] BuildInfo - -> CondTree ConfVar [Dependency] a - -> CondTree ConfVar [Dependency] a + -> CondTree ConfVar [Dependency] (WithImportNames BuildInfo) + -> CondTree ConfVar [Dependency] (WithImportNames a) + -> CondTree ConfVar [Dependency] (WithImportNames a) mergeCommonStanza fromBuildInfo (CondNode bi _ bis) (CondNode x _ cs) = - CondNode x' (x' ^. L.targetBuildDepends) cs' + CondNode x' (unImportNames x' ^. L.targetBuildDepends) cs' where -- new value is old value with buildInfo field _prepended_. - x' = x & L.buildInfo %~ (bi <>) + x' :: WithImportNames a + x' = + let + xImports = importNames x + biImports = importNames bi + in + ( biImports <> xImports + , unImportNames x & L.buildInfo %~ (unImportNames bi <>) + ) -- tree components are appended together. - cs' = map (fmap fromBuildInfo) bis ++ cs + cs' :: [CondBranch ConfVar [Dependency] (WithImportNames a)] + cs' = map (mapData fromBuildInfo <$>) bis ++ cs ------------------------------------------------------------------------------- -- Branches @@ -931,7 +963,7 @@ data Syntax = OldSyntax | NewSyntax -- TODO: libFieldNames :: [FieldName] -libFieldNames = fieldGrammarKnownFieldList (libraryFieldGrammar LMainLibName []) +libFieldNames = fieldGrammarKnownFieldList (libraryFieldGrammar LMainLibName) ------------------------------------------------------------------------------- -- Supplementary build information diff --git a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs index 165407e6a60..9d3072719f4 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs @@ -145,41 +145,40 @@ ppCondLibrary _ Nothing = mempty ppCondLibrary v (Just condTree) = pure $ PrettySection () "library" [] $ - -- TODO(leana8959): change the grammar - ppCondTree2 v (libraryFieldGrammar LMainLibName []) condTree + ppCondTree2 v (libraryFieldGrammar LMainLibName) condTree ppCondSubLibraries :: CabalSpecVersion -> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)] -> [PrettyField ()] ppCondSubLibraries v libs = [ PrettySection () "library" [pretty n] $ - ppCondTree2 v (libraryFieldGrammar (LSubLibName n) []) condTree + ppCondTree2 v (libraryFieldGrammar (LSubLibName n)) condTree | (n, condTree) <- libs ] ppCondForeignLibs :: CabalSpecVersion -> [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)] -> [PrettyField ()] ppCondForeignLibs v flibs = [ PrettySection () "foreign-library" [pretty n] $ - ppCondTree2 v (foreignLibFieldGrammar n []) condTree + ppCondTree2 v (foreignLibFieldGrammar n) condTree | (n, condTree) <- flibs ] ppCondExecutables :: CabalSpecVersion -> [(UnqualComponentName, CondTree ConfVar [Dependency] Executable)] -> [PrettyField ()] ppCondExecutables v exes = [ PrettySection () "executable" [pretty n] $ - ppCondTree2 v (executableFieldGrammar n []) condTree + ppCondTree2 v (executableFieldGrammar n) condTree | (n, condTree) <- exes ] ppCondTestSuites :: CabalSpecVersion -> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)] -> [PrettyField ()] ppCondTestSuites v suites = [ PrettySection () "test-suite" [pretty n] $ - ppCondTree2 v (testSuiteFieldGrammar []) (fmap FG.unvalidateTestSuite condTree) + ppCondTree2 v testSuiteFieldGrammar (fmap FG.unvalidateTestSuite condTree) | (n, condTree) <- suites ] ppCondBenchmarks :: CabalSpecVersion -> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)] -> [PrettyField ()] ppCondBenchmarks v suites = [ PrettySection () "benchmark" [pretty n] $ - ppCondTree2 v (benchmarkFieldGrammar []) (fmap FG.unvalidateBenchmark condTree) + ppCondTree2 v benchmarkFieldGrammar (fmap FG.unvalidateBenchmark condTree) | (n, condTree) <- suites ] diff --git a/Cabal-syntax/src/Distribution/Types/BuildInfo.hs b/Cabal-syntax/src/Distribution/Types/BuildInfo.hs index e68fcbc5c22..b9c4ae54645 100644 --- a/Cabal-syntax/src/Distribution/Types/BuildInfo.hs +++ b/Cabal-syntax/src/Distribution/Types/BuildInfo.hs @@ -14,6 +14,7 @@ module Distribution.Types.BuildInfo , hcSharedOptions , hcProfSharedOptions , hcStaticOptions + , insertBuildInfoImports ) where import Distribution.Compat.Prelude @@ -23,6 +24,9 @@ import Distribution.Types.Dependency import Distribution.Types.ExeDependency import Distribution.Types.LegacyExeDependency import Distribution.Types.Mixin +import Distribution.Types.Imports +import Distribution.Types.CondTree +import Distribution.Types.ConfVar import Distribution.Types.PkgconfigDependency import Distribution.Utils.Path @@ -32,7 +36,8 @@ import Language.Haskell.Extension -- Consider refactoring into executable and library versions. data BuildInfo = BuildInfo - { buildable :: Bool + { buildInfoImports :: [String] + , buildable :: Bool -- ^ component is buildable here , buildTools :: [LegacyExeDependency] -- ^ Tools needed to build this bit. @@ -152,10 +157,22 @@ instance Binary BuildInfo instance Structured BuildInfo instance NFData BuildInfo where rnf = genericRnf +insertBuildInfoImports + :: CondTree ConfVar [Dependency] (WithImportNames BuildInfo) + -> CondTree ConfVar [Dependency] BuildInfo +insertBuildInfoImports = mapCondTree f id id + where + f :: WithImportNames BuildInfo -> BuildInfo + f a = + let imports = importNames a + bi = unImportNames a + in bi{buildInfoImports=imports} + instance Monoid BuildInfo where mempty = BuildInfo - { buildable = True + { buildInfoImports = [] + , buildable = True , buildTools = [] , buildToolDepends = [] , cppOptions = [] @@ -209,7 +226,8 @@ instance Monoid BuildInfo where instance Semigroup BuildInfo where a <> b = BuildInfo - { buildable = buildable a && buildable b + { buildInfoImports = combine buildInfoImports + , buildable = buildable a && buildable b , buildTools = combine buildTools , buildToolDepends = combine buildToolDepends , cppOptions = combine cppOptions diff --git a/Cabal-syntax/src/Distribution/Types/CondTree.hs b/Cabal-syntax/src/Distribution/Types/CondTree.hs index c74ffdf6395..0fb035fadae 100644 --- a/Cabal-syntax/src/Distribution/Types/CondTree.hs +++ b/Cabal-syntax/src/Distribution/Types/CondTree.hs @@ -13,6 +13,7 @@ module Distribution.Types.CondTree , mapTreeConstrs , mapTreeConds , mapTreeData + , mapTreeData' , traverseCondTreeV , traverseCondBranchV , traverseCondTreeC @@ -123,6 +124,26 @@ mapTreeConds f = mapCondTree id id f mapTreeData :: (a -> b) -> CondTree v c a -> CondTree v c b mapTreeData f = mapCondTree f id id +-- | Transform data and branches differently +mapTreeData' + :: (a -> b) + -- ^ transform root + -> (a -> b) + -- ^ transform subtrees + -> CondTree v c a + -> CondTree v c b +mapTreeData' f g n = + n + { condTreeData = f (condTreeData n) + , condTreeComponents = map g' (condTreeComponents n) + } + where + g' (CondBranch cond ifTrue ifFalse) = + CondBranch + (cond) + (mapTreeData' g g $ ifTrue) + (mapTreeData' g g <$> ifFalse) + -- | @@Traversal@@ for the variables traverseCondTreeV :: L.Traversal (CondTree v c a) (CondTree w c a) v w traverseCondTreeV f (CondNode a c ifs) = diff --git a/Cabal-syntax/src/Distribution/Types/Executable.hs b/Cabal-syntax/src/Distribution/Types/Executable.hs index f0db2ca24c9..f1074e66328 100644 --- a/Cabal-syntax/src/Distribution/Types/Executable.hs +++ b/Cabal-syntax/src/Distribution/Types/Executable.hs @@ -7,6 +7,7 @@ module Distribution.Types.Executable , emptyExecutable , exeModules , exeModulesAutogen + , insertExeImports ) where import Distribution.Compat.Prelude @@ -14,6 +15,10 @@ import Prelude () import Distribution.ModuleName import Distribution.Types.BuildInfo +import Distribution.Types.Imports +import Distribution.Types.CondTree +import Distribution.Types.ConfVar +import Distribution.Types.Dependency import Distribution.Types.ExecutableScope import Distribution.Types.UnqualComponentName import Distribution.Utils.Path @@ -30,6 +35,17 @@ data Executable = Executable } deriving (Generic, Show, Read, Eq, Ord, Data) +insertExeImports + :: CondTree ConfVar [Dependency] (WithImportNames Executable) + -> CondTree ConfVar [Dependency] Executable +insertExeImports = mapCondTree f id id + where + f :: WithImportNames Executable -> Executable + f a = + let imports = importNames a + exe = unImportNames a + in exe{exeImports=imports} + instance L.HasBuildInfo Executable where buildInfo f l = (\x -> l{buildInfo = x}) <$> f (buildInfo l) diff --git a/Cabal-syntax/src/Distribution/Types/ForeignLib.hs b/Cabal-syntax/src/Distribution/Types/ForeignLib.hs index d137d06c64f..d1238becfd5 100644 --- a/Cabal-syntax/src/Distribution/Types/ForeignLib.hs +++ b/Cabal-syntax/src/Distribution/Types/ForeignLib.hs @@ -14,6 +14,7 @@ module Distribution.Types.ForeignLib , libVersionNumber , libVersionNumberShow , libVersionMajor + , insertForeignLibImports ) where import Distribution.Compat.Prelude @@ -25,6 +26,10 @@ import Distribution.Pretty import Distribution.System import Distribution.Types.BuildInfo import Distribution.Types.ForeignLibOption +import Distribution.Types.Imports +import Distribution.Types.Dependency +import Distribution.Types.CondTree +import Distribution.Types.ConfVar import Distribution.Types.ForeignLibType import Distribution.Types.UnqualComponentName import Distribution.Utils.Path @@ -67,6 +72,17 @@ data ForeignLib = ForeignLib data LibVersionInfo = LibVersionInfo Int Int Int deriving (Data, Eq, Generic) +insertForeignLibImports + :: CondTree ConfVar [Dependency] (WithImportNames ForeignLib) + -> CondTree ConfVar [Dependency] ForeignLib +insertForeignLibImports = mapCondTree f id id + where + f :: WithImportNames ForeignLib -> ForeignLib + f a = + let imports = importNames a + flib = unImportNames a + in flib{foreignLibImports=imports} + instance Ord LibVersionInfo where LibVersionInfo c r _ `compare` LibVersionInfo c' r' _ = case c `compare` c' of diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index 97f4ed8cccb..044ecb1c6e8 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -1,4 +1,5 @@ {-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE TupleSections #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -6,6 +7,9 @@ module Distribution.Types.GenericPackageDescription ( GenericPackageDescription (..) , emptyGenericPackageDescription + , WithImportNames + , importNames + , unImportNames ) where import Distribution.Compat.Prelude @@ -22,6 +26,7 @@ import Distribution.Types.Benchmark import Distribution.Types.CondTree import Distribution.Types.ConfVar import Distribution.Types.Executable +import Distribution.Types.Imports import Distribution.Types.Flag import Distribution.Types.ForeignLib import Distribution.Types.Library diff --git a/Cabal-syntax/src/Distribution/Types/Imports.hs b/Cabal-syntax/src/Distribution/Types/Imports.hs new file mode 100644 index 00000000000..174daa243fa --- /dev/null +++ b/Cabal-syntax/src/Distribution/Types/Imports.hs @@ -0,0 +1,22 @@ +{-# LANGUAGE TupleSections #-} + +module Distribution.Types.Imports where + +import qualified Data.Bifunctor as Bi + +type WithImportNames a = ([String], a) + +unImportNames :: WithImportNames a -> a +unImportNames = snd + +importNames :: WithImportNames a -> [String] +importNames = fst + +mapData :: (a -> b) -> WithImportNames a -> WithImportNames b +mapData = Bi.second + +withImportNames :: [String] -> a -> WithImportNames a +withImportNames = (,) + +withNoImports :: a -> WithImportNames a +withNoImports = ([],) diff --git a/Cabal-syntax/src/Distribution/Types/Library.hs b/Cabal-syntax/src/Distribution/Types/Library.hs index aa486c2df50..1daf1bffbd1 100644 --- a/Cabal-syntax/src/Distribution/Types/Library.hs +++ b/Cabal-syntax/src/Distribution/Types/Library.hs @@ -6,6 +6,7 @@ module Distribution.Types.Library , emptyLibrary , explicitLibModules , libModulesAutogen + , insertLibImports ) where import Distribution.Compat.Prelude @@ -16,6 +17,10 @@ import Distribution.Types.BuildInfo import Distribution.Types.LibraryName import Distribution.Types.LibraryVisibility import Distribution.Types.ModuleReexport +import Distribution.Types.Imports +import Distribution.Types.CondTree +import Distribution.Types.ConfVar +import Distribution.Types.Dependency import qualified Distribution.Types.BuildInfo.Lens as L @@ -34,6 +39,17 @@ data Library = Library } deriving (Generic, Show, Eq, Ord, Read, Data) +insertLibImports + :: CondTree ConfVar [Dependency] (WithImportNames Library) + -> CondTree ConfVar [Dependency] Library +insertLibImports = mapCondTree f id id + where + f :: WithImportNames Library -> Library + f a = + let imports = importNames a + lib = unImportNames a + in lib{libImports=imports} + instance L.HasBuildInfo Library where buildInfo f l = (\x -> l{libBuildInfo = x}) <$> f (libBuildInfo l) From ed82ab69a2fda6a977240a24d66562df7f2ccf86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Tue, 4 Nov 2025 18:52:19 +0800 Subject: [PATCH 07/60] use newtype --- .../PackageDescription/FieldGrammar.hs | 19 +++---- .../Distribution/PackageDescription/Parsec.hs | 49 +++++++++---------- .../src/Distribution/Types/BuildInfo.hs | 9 ++-- .../src/Distribution/Types/Executable.hs | 9 ++-- .../src/Distribution/Types/ForeignLib.hs | 9 ++-- .../Types/GenericPackageDescription.hs | 4 -- .../src/Distribution/Types/Imports.hs | 25 +++------- .../src/Distribution/Types/Library.hs | 9 ++-- 8 files changed, 50 insertions(+), 83 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index 791f8d7bbb3..b0d5ad2ab1a 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -86,6 +86,7 @@ import Distribution.Parsec import Distribution.Pretty (Pretty (..), prettyShow, showToken) import Distribution.Utils.Path import Distribution.Version (Version, VersionRange) +import Distribution.Types.Imports import qualified Data.ByteString.Char8 as BS8 import qualified Distribution.Compat.CharParsing as P @@ -309,15 +310,12 @@ data TestSuiteStanza = TestSuiteStanza } insertTestSuiteStanzaImports - :: CondTree ConfVar [Dependency] (WithImportNames TestSuiteStanza) + :: CondTree ConfVar [Dependency] (WithImports TestSuiteStanza) -> CondTree ConfVar [Dependency] TestSuiteStanza insertTestSuiteStanzaImports = mapCondTree f id id where - f :: WithImportNames TestSuiteStanza -> TestSuiteStanza - f a = - let imports = importNames a - ts = unImportNames a - in ts{_testStanzaImports=imports} + f :: WithImports TestSuiteStanza -> TestSuiteStanza + f (WithImports importNames ts) = ts{_testStanzaImports=importNames} instance L.HasBuildInfo TestSuiteStanza where buildInfo = testStanzaBuildInfo @@ -472,15 +470,12 @@ data BenchmarkStanza = BenchmarkStanza } insertBenchmarkStanzaImports - :: CondTree ConfVar [Dependency] (WithImportNames BenchmarkStanza) + :: CondTree ConfVar [Dependency] (WithImports BenchmarkStanza) -> CondTree ConfVar [Dependency] BenchmarkStanza insertBenchmarkStanzaImports = mapCondTree f id id where - f :: WithImportNames BenchmarkStanza -> BenchmarkStanza - f a = - let imports = importNames a - bs = unImportNames a - in bs{_benchmarkStanzaImports=imports} + f :: WithImports BenchmarkStanza -> BenchmarkStanza + f (WithImports importNames bs) = bs{_benchmarkStanzaImports=importNames} instance L.HasBuildInfo BenchmarkStanza where buildInfo = benchmarkStanzaBuildInfo diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index 32509d2c82b..221473ec87b 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -265,7 +265,7 @@ goSections specVer = traverse_ process -> Map String CondTreeBuildInfo -- \^ common stanzas -> [Field Position] - -> ParseResult src (CondTree ConfVar [Dependency] (WithImportNames a)) + -> ParseResult src (CondTree ConfVar [Dependency] (WithImports a)) parseCondTree' = parseCondTreeWithCommonStanzas specVer parseSection :: Name Position -> [SectionArg Position] -> [Field Position] -> SectionParser src () @@ -491,10 +491,10 @@ parseCondTree -> (a -> [Dependency]) -- ^ condition extractor -> [Field Position] - -> ParseResult src (CondTree ConfVar [Dependency] (WithImportNames a)) + -> ParseResult src (CondTree ConfVar [Dependency] (WithImports a)) parseCondTree v hasElif grammar commonStanzas fromBuildInfo cond = go where - go :: [Field Position] -> ParseResult src (CondTree ConfVar [Dependency] (WithImportNames a)) + go :: [Field Position] -> ParseResult src (CondTree ConfVar [Dependency] (WithImports a)) go fields0 = do (fields, endo) <- if v >= CabalSpecV3_0 @@ -504,9 +504,9 @@ parseCondTree v hasElif grammar commonStanzas fromBuildInfo cond = go let (fs, ss) = partitionFields fields x <- parseFieldGrammar v fs grammar branches <- concat <$> traverse parseIfs ss - return $ endo $ CondNode ([], x) (cond x) branches + return $ endo $ CondNode (noImports x) (cond x) branches - parseIfs :: [Section Position] -> ParseResult src [CondBranch ConfVar [Dependency] (WithImportNames a)] + parseIfs :: [Section Position] -> ParseResult src [CondBranch ConfVar [Dependency] (WithImports a)] parseIfs [] = return [] parseIfs (MkSection (Name pos name) test fields : sections) | name == "if" = do test' <- parseConditionConfVar (startOfSection (incPos 2 pos) test) test @@ -519,7 +519,7 @@ parseCondTree v hasElif grammar commonStanzas fromBuildInfo cond = go parseElseIfs :: [Section Position] - -> ParseResult src (Maybe (CondTree ConfVar [Dependency] (WithImportNames a)), [CondBranch ConfVar [Dependency] (WithImportNames a)]) + -> ParseResult src (Maybe (CondTree ConfVar [Dependency] (WithImports a)), [CondBranch ConfVar [Dependency] (WithImports a)]) parseElseIfs [] = return (Nothing, []) parseElseIfs (MkSection (Name pos name) args fields : sections) | name == "else" = do unless (null args) $ @@ -536,7 +536,8 @@ parseCondTree v hasElif grammar commonStanzas fromBuildInfo cond = go (elseFields, sections') <- parseElseIfs sections -- we parse an empty 'Fields', to get empty value for a node a <- parseFieldGrammar v mempty grammar - return (Just $ CondNode ([], a) (cond a) [CondBranch test' fields' elseFields], sections') + -- TODO(leana8959): investigate this + return (Just $ CondNode (noImports a) (cond a) [CondBranch test' fields' elseFields], sections') parseElseIfs (MkSection (Name pos name) _ _ : sections) | name == "elif" = do parseWarning pos PWTInvalidSubsection $ "invalid subsection \"elif\". You should set cabal-version: 2.2 or larger to use elif-conditionals." (,) Nothing <$> parseIfs sections @@ -646,7 +647,7 @@ parseCondTreeWithCommonStanzas -> Map String CondTreeBuildInfo -- ^ common stanzas -> [Field Position] - -> ParseResult src (CondTree ConfVar [Dependency] ([String], a)) + -> ParseResult src (CondTree ConfVar [Dependency] (WithImports a)) parseCondTreeWithCommonStanzas v grammar fromBuildInfo commonStanzas fields = do (fields', endo) <- processImports v fromBuildInfo commonStanzas fields x <- parseCondTree v hasElif grammar commonStanzas fromBuildInfo (view L.targetBuildDepends) fields' @@ -665,7 +666,7 @@ processImports -> [Field Position] -> ParseResult src ( [Field Position] - , CondTree ConfVar [Dependency] (WithImportNames a) -> CondTree ConfVar [Dependency] (WithImportNames a) + , CondTree ConfVar [Dependency] (WithImports a) -> CondTree ConfVar [Dependency] (WithImports a) ) processImports v fromBuildInfo commonStanzas = go [] where @@ -679,15 +680,15 @@ processImports v fromBuildInfo commonStanzas = go [] :: forall v c a' . [String] -> CondTree v c a' - -> CondTree v c (WithImportNames a') - attachImportsOnRoot imports = mapTreeData' (withImportNames imports) withNoImports + -> CondTree v c (WithImports a') + attachImportsOnRoot imports = mapTreeData' (WithImports imports) noImports go - :: [CondTree ConfVar [Dependency] (WithImportNames BuildInfo)] + :: [CondTree ConfVar [Dependency] (WithImports BuildInfo)] -> [Field Position] -> ParseResult src ( [Field Position] - , CondTree ConfVar [Dependency] (WithImportNames a) -> CondTree ConfVar [Dependency] (WithImportNames a) + , CondTree ConfVar [Dependency] (WithImports a) -> CondTree ConfVar [Dependency] (WithImports a) ) go acc (Field (Name pos name) _ : fields) | name == "import" @@ -725,26 +726,22 @@ mergeCommonStanza :: forall a . L.HasBuildInfo a => (BuildInfo -> a) - -> CondTree ConfVar [Dependency] (WithImportNames BuildInfo) - -> CondTree ConfVar [Dependency] (WithImportNames a) - -> CondTree ConfVar [Dependency] (WithImportNames a) + -> CondTree ConfVar [Dependency] (WithImports BuildInfo) + -> CondTree ConfVar [Dependency] (WithImports a) + -> CondTree ConfVar [Dependency] (WithImports a) mergeCommonStanza fromBuildInfo (CondNode bi _ bis) (CondNode x _ cs) = CondNode x' (unImportNames x' ^. L.targetBuildDepends) cs' where -- new value is old value with buildInfo field _prepended_. - x' :: WithImportNames a + x' :: WithImports a x' = - let - xImports = importNames x - biImports = importNames bi - in - ( biImports <> xImports - , unImportNames x & L.buildInfo %~ (unImportNames bi <>) - ) + WithImports + (getImportNames bi <> getImportNames x) + (unImportNames x & L.buildInfo %~ (unImportNames bi <>)) -- tree components are appended together. - cs' :: [CondBranch ConfVar [Dependency] (WithImportNames a)] - cs' = map (mapData fromBuildInfo <$>) bis ++ cs + cs' :: [CondBranch ConfVar [Dependency] (WithImports a)] + cs' = map (fmap fromBuildInfo <$>) bis ++ cs ------------------------------------------------------------------------------- -- Branches diff --git a/Cabal-syntax/src/Distribution/Types/BuildInfo.hs b/Cabal-syntax/src/Distribution/Types/BuildInfo.hs index b9c4ae54645..7738ec3471b 100644 --- a/Cabal-syntax/src/Distribution/Types/BuildInfo.hs +++ b/Cabal-syntax/src/Distribution/Types/BuildInfo.hs @@ -158,15 +158,12 @@ instance Structured BuildInfo instance NFData BuildInfo where rnf = genericRnf insertBuildInfoImports - :: CondTree ConfVar [Dependency] (WithImportNames BuildInfo) + :: CondTree ConfVar [Dependency] (WithImports BuildInfo) -> CondTree ConfVar [Dependency] BuildInfo insertBuildInfoImports = mapCondTree f id id where - f :: WithImportNames BuildInfo -> BuildInfo - f a = - let imports = importNames a - bi = unImportNames a - in bi{buildInfoImports=imports} + f :: WithImports BuildInfo -> BuildInfo + f (WithImports importNames bi) = bi{buildInfoImports=importNames} instance Monoid BuildInfo where mempty = diff --git a/Cabal-syntax/src/Distribution/Types/Executable.hs b/Cabal-syntax/src/Distribution/Types/Executable.hs index f1074e66328..ac584abec70 100644 --- a/Cabal-syntax/src/Distribution/Types/Executable.hs +++ b/Cabal-syntax/src/Distribution/Types/Executable.hs @@ -36,15 +36,12 @@ data Executable = Executable deriving (Generic, Show, Read, Eq, Ord, Data) insertExeImports - :: CondTree ConfVar [Dependency] (WithImportNames Executable) + :: CondTree ConfVar [Dependency] (WithImports Executable) -> CondTree ConfVar [Dependency] Executable insertExeImports = mapCondTree f id id where - f :: WithImportNames Executable -> Executable - f a = - let imports = importNames a - exe = unImportNames a - in exe{exeImports=imports} + f :: WithImports Executable -> Executable + f (WithImports importNames exe) = exe{exeImports=importNames} instance L.HasBuildInfo Executable where buildInfo f l = (\x -> l{buildInfo = x}) <$> f (buildInfo l) diff --git a/Cabal-syntax/src/Distribution/Types/ForeignLib.hs b/Cabal-syntax/src/Distribution/Types/ForeignLib.hs index d1238becfd5..153a4ece569 100644 --- a/Cabal-syntax/src/Distribution/Types/ForeignLib.hs +++ b/Cabal-syntax/src/Distribution/Types/ForeignLib.hs @@ -73,15 +73,12 @@ data ForeignLib = ForeignLib data LibVersionInfo = LibVersionInfo Int Int Int deriving (Data, Eq, Generic) insertForeignLibImports - :: CondTree ConfVar [Dependency] (WithImportNames ForeignLib) + :: CondTree ConfVar [Dependency] (WithImports ForeignLib) -> CondTree ConfVar [Dependency] ForeignLib insertForeignLibImports = mapCondTree f id id where - f :: WithImportNames ForeignLib -> ForeignLib - f a = - let imports = importNames a - flib = unImportNames a - in flib{foreignLibImports=imports} + f :: WithImports ForeignLib -> ForeignLib + f (WithImports importNames flib) = flib{foreignLibImports=importNames} instance Ord LibVersionInfo where LibVersionInfo c r _ `compare` LibVersionInfo c' r' _ = diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index 044ecb1c6e8..4a96ffc0740 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -7,9 +7,6 @@ module Distribution.Types.GenericPackageDescription ( GenericPackageDescription (..) , emptyGenericPackageDescription - , WithImportNames - , importNames - , unImportNames ) where import Distribution.Compat.Prelude @@ -26,7 +23,6 @@ import Distribution.Types.Benchmark import Distribution.Types.CondTree import Distribution.Types.ConfVar import Distribution.Types.Executable -import Distribution.Types.Imports import Distribution.Types.Flag import Distribution.Types.ForeignLib import Distribution.Types.Library diff --git a/Cabal-syntax/src/Distribution/Types/Imports.hs b/Cabal-syntax/src/Distribution/Types/Imports.hs index 174daa243fa..4899b3e4c11 100644 --- a/Cabal-syntax/src/Distribution/Types/Imports.hs +++ b/Cabal-syntax/src/Distribution/Types/Imports.hs @@ -1,22 +1,13 @@ {-# LANGUAGE TupleSections #-} +{-# LANGUAGE DeriveFunctor #-} module Distribution.Types.Imports where -import qualified Data.Bifunctor as Bi +data WithImports a = WithImports + { getImportNames :: ![String] + , unImportNames :: !a + } + deriving (Functor) -type WithImportNames a = ([String], a) - -unImportNames :: WithImportNames a -> a -unImportNames = snd - -importNames :: WithImportNames a -> [String] -importNames = fst - -mapData :: (a -> b) -> WithImportNames a -> WithImportNames b -mapData = Bi.second - -withImportNames :: [String] -> a -> WithImportNames a -withImportNames = (,) - -withNoImports :: a -> WithImportNames a -withNoImports = ([],) +noImports :: a -> WithImports a +noImports = WithImports mempty diff --git a/Cabal-syntax/src/Distribution/Types/Library.hs b/Cabal-syntax/src/Distribution/Types/Library.hs index 1daf1bffbd1..96562b3d599 100644 --- a/Cabal-syntax/src/Distribution/Types/Library.hs +++ b/Cabal-syntax/src/Distribution/Types/Library.hs @@ -40,15 +40,12 @@ data Library = Library deriving (Generic, Show, Eq, Ord, Read, Data) insertLibImports - :: CondTree ConfVar [Dependency] (WithImportNames Library) + :: CondTree ConfVar [Dependency] (WithImports Library) -> CondTree ConfVar [Dependency] Library insertLibImports = mapCondTree f id id where - f :: WithImportNames Library -> Library - f a = - let imports = importNames a - lib = unImportNames a - in lib{libImports=imports} + f :: WithImports Library -> Library + f (WithImports importNames lib) = lib{libImports=importNames} instance L.HasBuildInfo Library where buildInfo f l = (\x -> l{libBuildInfo = x}) <$> f (libBuildInfo l) From 2c9de4df57b95b22a582e6111e24ded59bf68e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Tue, 4 Nov 2025 19:12:57 +0800 Subject: [PATCH 08/60] change import data type; fix issues with import propagation & decoration --- .../Distribution/PackageDescription/Parsec.hs | 61 +++++++++++++------ .../src/Distribution/Types/Imports.hs | 7 ++- 2 files changed, 47 insertions(+), 21 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index 221473ec87b..ed2f2805af9 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -496,15 +496,15 @@ parseCondTree v hasElif grammar commonStanzas fromBuildInfo cond = go where go :: [Field Position] -> ParseResult src (CondTree ConfVar [Dependency] (WithImports a)) go fields0 = do - (fields, endo) <- + (fields, imports, endo) <- if v >= CabalSpecV3_0 then processImports v fromBuildInfo commonStanzas fields0 - else traverse (warnImport v) fields0 >>= \fields1 -> return (catMaybes fields1, id) + else traverse (warnImport v) fields0 >>= \fields1 -> return (catMaybes fields1, mempty, id) let (fs, ss) = partitionFields fields x <- parseFieldGrammar v fs grammar branches <- concat <$> traverse parseIfs ss - return $ endo $ CondNode (noImports x) (cond x) branches + return $ endo $ CondNode (WithImports imports x) (cond x) branches parseIfs :: [Section Position] -> ParseResult src [CondBranch ConfVar [Dependency] (WithImports a)] parseIfs [] = return [] @@ -536,7 +536,6 @@ parseCondTree v hasElif grammar commonStanzas fromBuildInfo cond = go (elseFields, sections') <- parseElseIfs sections -- we parse an empty 'Fields', to get empty value for a node a <- parseFieldGrammar v mempty grammar - -- TODO(leana8959): investigate this return (Just $ CondNode (noImports a) (cond a) [CondBranch test' fields' elseFields], sections') parseElseIfs (MkSection (Name pos name) _ _ : sections) | name == "elif" = do parseWarning pos PWTInvalidSubsection $ "invalid subsection \"elif\". You should set cabal-version: 2.2 or larger to use elif-conditionals." @@ -649,12 +648,29 @@ parseCondTreeWithCommonStanzas -> [Field Position] -> ParseResult src (CondTree ConfVar [Dependency] (WithImports a)) parseCondTreeWithCommonStanzas v grammar fromBuildInfo commonStanzas fields = do - (fields', endo) <- processImports v fromBuildInfo commonStanzas fields + (fields', imports, endo) <- processImports v fromBuildInfo commonStanzas fields x <- parseCondTree v hasElif grammar commonStanzas fromBuildInfo (view L.targetBuildDepends) fields' - return (endo x) + -- TODO(leana8959): we replace this with the one from parseCondTree, because + -- it is duplicated (if such imports should exist, that is >= cabal 3.0) + -- However I'm so very unsure so let's do a concat and see what happens + return (prependImportsOnRoot imports $ endo x) where hasElif = specHasElif v +-- | only attach import annotation on root +attachImportsOnRoot + :: [ImportName] + -> CondTree v c a + -> CondTree v c (WithImports a) +attachImportsOnRoot imports = mapTreeData' (WithImports imports) noImports + +-- | only prepend import annotation on root +prependImportsOnRoot + :: [ImportName] + -> CondTree v c (WithImports a) + -> CondTree v c (WithImports a) +prependImportsOnRoot imports = mapTreeData' (mapImports (imports <>)) id + processImports :: forall src a . L.HasBuildInfo a @@ -666,6 +682,7 @@ processImports -> [Field Position] -> ParseResult src ( [Field Position] + , [ImportName] , CondTree ConfVar [Dependency] (WithImports a) -> CondTree ConfVar [Dependency] (WithImports a) ) processImports v fromBuildInfo commonStanzas = go [] @@ -675,19 +692,12 @@ processImports v fromBuildInfo commonStanzas = go [] getList' :: List CommaFSep Token String -> [String] getList' = Newtype.unpack - -- | only attach import annotation on root - attachImportsOnRoot - :: forall v c a' - . [String] - -> CondTree v c a' - -> CondTree v c (WithImports a') - attachImportsOnRoot imports = mapTreeData' (WithImports imports) noImports - go - :: [CondTree ConfVar [Dependency] (WithImports BuildInfo)] + :: [(ImportName, CondTree ConfVar [Dependency] (WithImports BuildInfo))] -> [Field Position] -> ParseResult src ( [Field Position] + , [ImportName] , CondTree ConfVar [Dependency] (WithImports a) -> CondTree ConfVar [Dependency] (WithImports a) ) go acc (Field (Name pos name) _ : fields) @@ -698,20 +708,30 @@ processImports v fromBuildInfo commonStanzas = go [] -- supported: go acc (Field (Name pos name) fls : fields) | name == "import" = do names <- getList' <$> runFieldParser pos parsec v fls - trees <- for names $ \commonName -> + namedTrees <- for names $ \commonName -> + -- TODO(leana8959): commonStanzas map has no imports, they are already fused. + -- change this map everywhere case Map.lookup commonName commonStanzas of Nothing -> do parseFailure pos $ "Undefined common stanza imported: " ++ commonName pure Nothing Just commonTree -> - pure (Just (attachImportsOnRoot [commonName] commonTree)) + pure (Just (commonName, mapTreeData noImports commonTree)) - go (acc ++ catMaybes trees) fields + go (acc ++ catMaybes namedTrees) fields -- parse actual CondTree go acc fields = do fields' <- catMaybes <$> traverse (warnImport v) fields - pure $ (fields', \x -> foldr (mergeCommonStanza fromBuildInfo) x acc) + let + importNames :: [ImportName] + importTrees :: [CondTree ConfVar [Dependency] (WithImports BuildInfo)] + (importNames, importTrees) = unzip acc + pure + ( fields' + , importNames + , \x -> foldr (mergeCommonStanza fromBuildInfo) x importTrees + ) -- | Warn on "import" fields, also map to Maybe, so erroneous fields can be filtered warnImport :: CabalSpecVersion -> Field Position -> ParseResult src (Maybe (Field Position)) @@ -736,7 +756,8 @@ mergeCommonStanza fromBuildInfo (CondNode bi _ bis) (CondNode x _ cs) = x' :: WithImports a x' = WithImports - (getImportNames bi <> getImportNames x) + -- TODO(leana8959): investigate why some imports are being dropped + (let is = getImportNames bi <> getImportNames x in trace ("Got imported names " <> show is) is ) (unImportNames x & L.buildInfo %~ (unImportNames bi <>)) -- tree components are appended together. diff --git a/Cabal-syntax/src/Distribution/Types/Imports.hs b/Cabal-syntax/src/Distribution/Types/Imports.hs index 4899b3e4c11..824df5ba9b1 100644 --- a/Cabal-syntax/src/Distribution/Types/Imports.hs +++ b/Cabal-syntax/src/Distribution/Types/Imports.hs @@ -4,10 +4,15 @@ module Distribution.Types.Imports where data WithImports a = WithImports - { getImportNames :: ![String] + { getImportNames :: ![ImportName] , unImportNames :: !a } deriving (Functor) +type ImportName = String + +mapImports :: ([ImportName] -> [ImportName]) -> WithImports a -> WithImports a +mapImports f (WithImports imports x) = WithImports (f imports) x + noImports :: a -> WithImports a noImports = WithImports mempty From 76ae7941f411ec39c06c0383ec1f9004c965f8b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 5 Nov 2025 10:47:02 +0800 Subject: [PATCH 09/60] fix missing import names in testSuite --- .../src/Distribution/PackageDescription/FieldGrammar.hs | 7 ++++--- .../src/Distribution/PackageDescription/Parsec.hs | 9 ++++++--- Cabal-syntax/src/Distribution/Types/Executable.hs | 2 +- Cabal-syntax/src/Distribution/Types/ForeignLib.hs | 2 +- Cabal-syntax/src/Distribution/Types/Imports.hs | 2 +- Cabal-syntax/src/Distribution/Types/Library.hs | 2 +- Cabal-syntax/src/Distribution/Types/TestSuite.hs | 4 ++++ Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs | 4 ++++ .../src/Distribution/PackageDescription/Check/Target.hs | 1 + 9 files changed, 23 insertions(+), 10 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index b0d5ad2ab1a..3ee1221c7b4 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -300,7 +300,7 @@ executableFieldGrammar n = -- | An intermediate type just used for parsing the test-suite stanza. -- After validation it is converted into the proper 'TestSuite' type. data TestSuiteStanza = TestSuiteStanza - { _testStanzaImports :: [String] + { _testStanzaImports :: [ImportName] , _testStanzaTestType :: Maybe TestType -- ^ Retained imports for exact printing , _testStanzaMainIs :: Maybe (RelativePath Source File) @@ -308,6 +308,7 @@ data TestSuiteStanza = TestSuiteStanza , _testStanzaBuildInfo :: BuildInfo , _testStanzaCodeGenerators :: [String] } + deriving (Show) insertTestSuiteStanzaImports :: CondTree ConfVar [Dependency] (WithImports TestSuiteStanza) @@ -375,7 +376,7 @@ testSuiteFieldGrammar = ^^^ availableSince CabalSpecV3_8 [] validateTestSuite :: CabalSpecVersion -> Position -> TestSuiteStanza -> ParseResult src TestSuite -validateTestSuite cabalSpecVersion pos stanza = case testSuiteType of +validateTestSuite cabalSpecVersion pos stanza = fmap (L.testSuiteImports .~ (_testStanzaImports stanza)) $ case testSuiteType of Nothing -> pure basicTestSuite Just tt@(TestTypeUnknown _ _) -> pure @@ -461,7 +462,7 @@ unvalidateTestSuite t = -- | An intermediate type just used for parsing the benchmark stanza. -- After validation it is converted into the proper 'Benchmark' type. data BenchmarkStanza = BenchmarkStanza - { _benchmarkStanzaImports :: [String] + { _benchmarkStanzaImports :: [ImportName] -- ^ retained imports , _benchmarkStanzaBenchmarkType :: Maybe BenchmarkType , _benchmarkStanzaMainIs :: Maybe (RelativePath Source File) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index ed2f2805af9..61b381555fe 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -1,4 +1,5 @@ {-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE BangPatterns #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Rank2Types #-} @@ -344,7 +345,10 @@ goSections specVer = traverse_ process name' <- parseUnqualComponentName pos args testStanza <- lift $ parseCondTree' testSuiteFieldGrammar (fromBuildInfo' name') commonStanzas fields let testStanza' = insertTestSuiteStanzaImports testStanza + let !_ = trace ("TestStanza " <> show testStanza <> "\n\n\n") () + let !_ = trace ("TestStanza' " <> show testStanza' <> "\n\n\n") () testSuite <- lift $ traverse (validateTestSuite specVer pos) testStanza' + let !_ = trace ("TestStanza' " <> show testSuite <> "\n\n\n") () let hasType ts = testInterface ts /= testInterface mempty unless (onAllBranches hasType testSuite) $ @@ -709,7 +713,7 @@ processImports v fromBuildInfo commonStanzas = go [] go acc (Field (Name pos name) fls : fields) | name == "import" = do names <- getList' <$> runFieldParser pos parsec v fls namedTrees <- for names $ \commonName -> - -- TODO(leana8959): commonStanzas map has no imports, they are already fused. + -- TODO(leana8959): commonStanzas map has no imports names, they are already fused. -- change this map everywhere case Map.lookup commonName commonStanzas of Nothing -> do @@ -756,8 +760,7 @@ mergeCommonStanza fromBuildInfo (CondNode bi _ bis) (CondNode x _ cs) = x' :: WithImports a x' = WithImports - -- TODO(leana8959): investigate why some imports are being dropped - (let is = getImportNames bi <> getImportNames x in trace ("Got imported names " <> show is) is ) + (getImportNames bi <> getImportNames x) (unImportNames x & L.buildInfo %~ (unImportNames bi <>)) -- tree components are appended together. diff --git a/Cabal-syntax/src/Distribution/Types/Executable.hs b/Cabal-syntax/src/Distribution/Types/Executable.hs index ac584abec70..6d0d2d21ba1 100644 --- a/Cabal-syntax/src/Distribution/Types/Executable.hs +++ b/Cabal-syntax/src/Distribution/Types/Executable.hs @@ -27,7 +27,7 @@ import qualified Distribution.Types.BuildInfo.Lens as L data Executable = Executable { exeName :: UnqualComponentName - , exeImports :: [String] + , exeImports :: [ImportName] -- ^ Retained for exact print , modulePath :: RelativePath Source File , exeScope :: ExecutableScope diff --git a/Cabal-syntax/src/Distribution/Types/ForeignLib.hs b/Cabal-syntax/src/Distribution/Types/ForeignLib.hs index 153a4ece569..e495d996dc0 100644 --- a/Cabal-syntax/src/Distribution/Types/ForeignLib.hs +++ b/Cabal-syntax/src/Distribution/Types/ForeignLib.hs @@ -47,7 +47,7 @@ import qualified Distribution.Types.BuildInfo.Lens as L data ForeignLib = ForeignLib { foreignLibName :: UnqualComponentName -- ^ Name of the foreign library - , foreignLibImports :: [String] + , foreignLibImports :: [ImportName] -- ^ Retained imports for exact printing , foreignLibType :: ForeignLibType -- ^ What kind of foreign library is this (static or dynamic). diff --git a/Cabal-syntax/src/Distribution/Types/Imports.hs b/Cabal-syntax/src/Distribution/Types/Imports.hs index 824df5ba9b1..689b640b9fb 100644 --- a/Cabal-syntax/src/Distribution/Types/Imports.hs +++ b/Cabal-syntax/src/Distribution/Types/Imports.hs @@ -7,7 +7,7 @@ data WithImports a = WithImports { getImportNames :: ![ImportName] , unImportNames :: !a } - deriving (Functor) + deriving (Show, Functor) type ImportName = String diff --git a/Cabal-syntax/src/Distribution/Types/Library.hs b/Cabal-syntax/src/Distribution/Types/Library.hs index 96562b3d599..ceda767963d 100644 --- a/Cabal-syntax/src/Distribution/Types/Library.hs +++ b/Cabal-syntax/src/Distribution/Types/Library.hs @@ -26,7 +26,7 @@ import qualified Distribution.Types.BuildInfo.Lens as L data Library = Library { libName :: LibraryName - , libImports :: [String] + , libImports :: [ImportName] , exposedModules :: [ModuleName] , reexportedModules :: [ModuleReexport] , signatures :: [ModuleName] diff --git a/Cabal-syntax/src/Distribution/Types/TestSuite.hs b/Cabal-syntax/src/Distribution/Types/TestSuite.hs index 129e17dabfb..7a77d41a638 100644 --- a/Cabal-syntax/src/Distribution/Types/TestSuite.hs +++ b/Cabal-syntax/src/Distribution/Types/TestSuite.hs @@ -16,6 +16,7 @@ import Distribution.Types.BuildInfo import Distribution.Types.TestSuiteInterface import Distribution.Types.TestType import Distribution.Types.UnqualComponentName +import Distribution.Types.Imports import Distribution.ModuleName @@ -24,6 +25,7 @@ import qualified Distribution.Types.BuildInfo.Lens as L -- | A \"test-suite\" stanza in a cabal file. data TestSuite = TestSuite { testName :: UnqualComponentName + , testSuiteImports :: [ImportName] , testInterface :: TestSuiteInterface , testBuildInfo :: BuildInfo , testCodeGenerators :: [String] @@ -42,6 +44,7 @@ instance Monoid TestSuite where mempty = TestSuite { testName = mempty + , testSuiteImports = mempty , testInterface = mempty , testBuildInfo = mempty , testCodeGenerators = mempty @@ -52,6 +55,7 @@ instance Semigroup TestSuite where a <> b = TestSuite { testName = combineNames a b testName "test" + , testSuiteImports = combine testSuiteImports , testInterface = combine testInterface , testBuildInfo = combine testBuildInfo , testCodeGenerators = combine testCodeGenerators diff --git a/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs b/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs index d44862eed48..a00e2f1dac0 100644 --- a/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs @@ -7,6 +7,7 @@ import Distribution.Compat.Lens import Distribution.Compat.Prelude import Prelude () +import Distribution.Types.Imports (ImportName) import Distribution.Types.BuildInfo (BuildInfo) import Distribution.Types.TestSuite (TestSuite) import Distribution.Types.TestSuiteInterface (TestSuiteInterface) @@ -14,6 +15,9 @@ import Distribution.Types.UnqualComponentName (UnqualComponentName) import qualified Distribution.Types.TestSuite as T +testSuiteImports :: Lens' TestSuite [ImportName] +testSuiteImports f s = fmap (\x -> s{T.testSuiteImports = x}) (f (T.testSuiteImports s)) + testName :: Lens' TestSuite UnqualComponentName testName f s = fmap (\x -> s{T.testName = x}) (f (T.testName s)) {-# INLINE testName #-} diff --git a/Cabal/src/Distribution/PackageDescription/Check/Target.hs b/Cabal/src/Distribution/PackageDescription/Check/Target.hs index 26a66e88531..a9812ebedb2 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Target.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Target.hs @@ -197,6 +197,7 @@ checkTestSuite ads ts@( TestSuite testName_ + _testImports_ testInterface_ testBuildInfo_ _testCodeGenerators_ From 41a4eebcbb2001f17934c7b4ce25b9bff942b5f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 5 Nov 2025 10:56:04 +0800 Subject: [PATCH 10/60] fix missing import names in benchmark --- .../src/Distribution/PackageDescription/FieldGrammar.hs | 6 +++--- Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs | 3 --- Cabal-syntax/src/Distribution/Types/Benchmark.hs | 6 +++++- Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs | 5 +++++ Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs | 1 + Cabal/src/Distribution/PackageDescription/Check/Target.hs | 1 + 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index 3ee1221c7b4..428a456fc4f 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -442,7 +442,7 @@ validateTestSuite cabalSpecVersion pos stanza = fmap (L.testSuiteImports .~ (_te unvalidateTestSuite :: TestSuite -> TestSuiteStanza unvalidateTestSuite t = TestSuiteStanza - { _testStanzaImports = mempty + { _testStanzaImports = testSuiteImports t , _testStanzaTestType = ty , _testStanzaMainIs = ma , _testStanzaTestModule = mo @@ -529,7 +529,7 @@ benchmarkFieldGrammar = <*> blurFieldGrammar benchmarkStanzaBuildInfo buildInfoFieldGrammar validateBenchmark :: CabalSpecVersion -> Position -> BenchmarkStanza -> ParseResult src Benchmark -validateBenchmark cabalSpecVersion pos stanza = case benchmarkStanzaType of +validateBenchmark cabalSpecVersion pos stanza = fmap (L.benchmarkImports .~ (_benchmarkStanzaImports stanza)) $ case benchmarkStanzaType of Nothing -> pure emptyBenchmark @@ -584,7 +584,7 @@ validateBenchmark cabalSpecVersion pos stanza = case benchmarkStanzaType of unvalidateBenchmark :: Benchmark -> BenchmarkStanza unvalidateBenchmark b = BenchmarkStanza - { _benchmarkStanzaImports = mempty + { _benchmarkStanzaImports = benchmarkImports b , _benchmarkStanzaBenchmarkType = ty , _benchmarkStanzaMainIs = ma , _benchmarkStanzaBenchmarkModule = mo diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index 61b381555fe..fa902b54429 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -345,10 +345,7 @@ goSections specVer = traverse_ process name' <- parseUnqualComponentName pos args testStanza <- lift $ parseCondTree' testSuiteFieldGrammar (fromBuildInfo' name') commonStanzas fields let testStanza' = insertTestSuiteStanzaImports testStanza - let !_ = trace ("TestStanza " <> show testStanza <> "\n\n\n") () - let !_ = trace ("TestStanza' " <> show testStanza' <> "\n\n\n") () testSuite <- lift $ traverse (validateTestSuite specVer pos) testStanza' - let !_ = trace ("TestStanza' " <> show testSuite <> "\n\n\n") () let hasType ts = testInterface ts /= testInterface mempty unless (onAllBranches hasType testSuite) $ diff --git a/Cabal-syntax/src/Distribution/Types/Benchmark.hs b/Cabal-syntax/src/Distribution/Types/Benchmark.hs index 6da7ef9dcae..4ff46c61cf5 100644 --- a/Cabal-syntax/src/Distribution/Types/Benchmark.hs +++ b/Cabal-syntax/src/Distribution/Types/Benchmark.hs @@ -12,6 +12,7 @@ module Distribution.Types.Benchmark import Distribution.Compat.Prelude import Prelude () +import Distribution.Types.Imports import Distribution.Types.BenchmarkInterface import Distribution.Types.BenchmarkType import Distribution.Types.BuildInfo @@ -24,6 +25,7 @@ import qualified Distribution.Types.BuildInfo.Lens as L -- | A \"benchmark\" stanza in a cabal file. data Benchmark = Benchmark { benchmarkName :: UnqualComponentName + , benchmarkImports :: [ImportName] , benchmarkInterface :: BenchmarkInterface , benchmarkBuildInfo :: BuildInfo } @@ -34,12 +36,13 @@ instance Structured Benchmark instance NFData Benchmark where rnf = genericRnf instance L.HasBuildInfo Benchmark where - buildInfo f (Benchmark x1 x2 x3) = fmap (\y1 -> Benchmark x1 x2 y1) (f x3) + buildInfo f (Benchmark x1 x2 x3 x4) = fmap (\y1 -> Benchmark x1 x2 x3 y1) (f x4) instance Monoid Benchmark where mempty = Benchmark { benchmarkName = mempty + , benchmarkImports = mempty , benchmarkInterface = mempty , benchmarkBuildInfo = mempty } @@ -49,6 +52,7 @@ instance Semigroup Benchmark where a <> b = Benchmark { benchmarkName = combineNames a b benchmarkName "benchmark" + , benchmarkImports = combine benchmarkImports , benchmarkInterface = combine benchmarkInterface , benchmarkBuildInfo = combine benchmarkBuildInfo } diff --git a/Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs b/Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs index 40b17330fec..1b1a22e1209 100644 --- a/Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs @@ -7,6 +7,7 @@ import Distribution.Compat.Lens import Distribution.Compat.Prelude import Prelude () +import Distribution.Types.Imports (ImportName) import Distribution.Types.Benchmark (Benchmark) import Distribution.Types.BenchmarkInterface (BenchmarkInterface) import Distribution.Types.BuildInfo (BuildInfo) @@ -14,6 +15,10 @@ import Distribution.Types.UnqualComponentName (UnqualComponentName) import qualified Distribution.Types.Benchmark as T +benchmarkImports :: Lens' Benchmark [ImportName] +benchmarkImports f s = fmap (\x -> s{T.benchmarkImports = x}) (f (T.benchmarkImports s)) +{-# INLINE benchmarkImports #-} + benchmarkName :: Lens' Benchmark UnqualComponentName benchmarkName f s = fmap (\x -> s{T.benchmarkName = x}) (f (T.benchmarkName s)) {-# INLINE benchmarkName #-} diff --git a/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs b/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs index a00e2f1dac0..d0961ec99ae 100644 --- a/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs @@ -17,6 +17,7 @@ import qualified Distribution.Types.TestSuite as T testSuiteImports :: Lens' TestSuite [ImportName] testSuiteImports f s = fmap (\x -> s{T.testSuiteImports = x}) (f (T.testSuiteImports s)) +{-# INLINE testSuiteImports #-} testName :: Lens' TestSuite UnqualComponentName testName f s = fmap (\x -> s{T.testName = x}) (f (T.testName s)) diff --git a/Cabal/src/Distribution/PackageDescription/Check/Target.hs b/Cabal/src/Distribution/PackageDescription/Check/Target.hs index a9812ebedb2..267891f8a43 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Target.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Target.hs @@ -262,6 +262,7 @@ checkBenchmark ads bm@( Benchmark benchmarkName_ + _benchmarkImports_ benchmarkInterface_ benchmarkBuildInfo_ ) = do From f82caf272f551d6c53699939e218aee6769f2bf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 5 Nov 2025 10:57:37 +0800 Subject: [PATCH 11/60] run fourmolu --- .../Distribution/PackageDescription/FieldGrammar.hs | 8 ++++---- .../src/Distribution/PackageDescription/Parsec.hs | 12 +++++++----- Cabal-syntax/src/Distribution/Types/Benchmark.hs | 4 ++-- .../src/Distribution/Types/Benchmark/Lens.hs | 2 +- Cabal-syntax/src/Distribution/Types/BuildInfo.hs | 8 ++++---- Cabal-syntax/src/Distribution/Types/Executable.hs | 6 +++--- Cabal-syntax/src/Distribution/Types/ForeignLib.hs | 8 ++++---- .../Distribution/Types/GenericPackageDescription.hs | 2 +- Cabal-syntax/src/Distribution/Types/Imports.hs | 2 +- Cabal-syntax/src/Distribution/Types/Library.hs | 10 +++++----- Cabal-syntax/src/Distribution/Types/TestSuite.hs | 2 +- .../src/Distribution/Types/TestSuite/Lens.hs | 2 +- 12 files changed, 34 insertions(+), 32 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index 428a456fc4f..ee93894947e 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -84,9 +84,9 @@ import Distribution.Package import Distribution.PackageDescription import Distribution.Parsec import Distribution.Pretty (Pretty (..), prettyShow, showToken) +import Distribution.Types.Imports import Distribution.Utils.Path import Distribution.Version (Version, VersionRange) -import Distribution.Types.Imports import qualified Data.ByteString.Char8 as BS8 import qualified Distribution.Compat.CharParsing as P @@ -316,7 +316,7 @@ insertTestSuiteStanzaImports insertTestSuiteStanzaImports = mapCondTree f id id where f :: WithImports TestSuiteStanza -> TestSuiteStanza - f (WithImports importNames ts) = ts{_testStanzaImports=importNames} + f (WithImports importNames ts) = ts{_testStanzaImports = importNames} instance L.HasBuildInfo TestSuiteStanza where buildInfo = testStanzaBuildInfo @@ -463,7 +463,7 @@ unvalidateTestSuite t = -- After validation it is converted into the proper 'Benchmark' type. data BenchmarkStanza = BenchmarkStanza { _benchmarkStanzaImports :: [ImportName] - -- ^ retained imports + -- ^ retained imports , _benchmarkStanzaBenchmarkType :: Maybe BenchmarkType , _benchmarkStanzaMainIs :: Maybe (RelativePath Source File) , _benchmarkStanzaBenchmarkModule :: Maybe ModuleName @@ -476,7 +476,7 @@ insertBenchmarkStanzaImports insertBenchmarkStanzaImports = mapCondTree f id id where f :: WithImports BenchmarkStanza -> BenchmarkStanza - f (WithImports importNames bs) = bs{_benchmarkStanzaImports=importNames} + f (WithImports importNames bs) = bs{_benchmarkStanzaImports = importNames} instance L.HasBuildInfo BenchmarkStanza where buildInfo = benchmarkStanzaBuildInfo diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index fa902b54429..c3a84d8b485 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -1,9 +1,9 @@ -{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE BangPatterns #-} -{-# LANGUAGE TupleSections #-} +{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TupleSections #-} -- | -- Module : Distribution.PackageDescription.Parsec @@ -62,13 +62,13 @@ import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as BS8 import qualified Data.Map.Strict as Map import qualified Data.Set as Set -import Distribution.Types.Imports import qualified Distribution.Compat.Newtype as Newtype import qualified Distribution.Compat.NonEmptySet as NES import qualified Distribution.Types.BuildInfo.Lens as L import qualified Distribution.Types.Executable.Lens as L import qualified Distribution.Types.ForeignLib.Lens as L import qualified Distribution.Types.GenericPackageDescription.Lens as L +import Distribution.Types.Imports import qualified Distribution.Types.PackageDescription.Lens as L import qualified Distribution.Types.SetupBuildInfo.Lens as L import qualified Text.Parsec as P @@ -681,7 +681,8 @@ processImports -> Map String CondTreeBuildInfo -- ^ common stanzas -> [Field Position] - -> ParseResult src + -> ParseResult + src ( [Field Position] , [ImportName] , CondTree ConfVar [Dependency] (WithImports a) -> CondTree ConfVar [Dependency] (WithImports a) @@ -696,7 +697,8 @@ processImports v fromBuildInfo commonStanzas = go [] go :: [(ImportName, CondTree ConfVar [Dependency] (WithImports BuildInfo))] -> [Field Position] - -> ParseResult src + -> ParseResult + src ( [Field Position] , [ImportName] , CondTree ConfVar [Dependency] (WithImports a) -> CondTree ConfVar [Dependency] (WithImports a) diff --git a/Cabal-syntax/src/Distribution/Types/Benchmark.hs b/Cabal-syntax/src/Distribution/Types/Benchmark.hs index 4ff46c61cf5..f22f52f94eb 100644 --- a/Cabal-syntax/src/Distribution/Types/Benchmark.hs +++ b/Cabal-syntax/src/Distribution/Types/Benchmark.hs @@ -12,10 +12,10 @@ module Distribution.Types.Benchmark import Distribution.Compat.Prelude import Prelude () -import Distribution.Types.Imports import Distribution.Types.BenchmarkInterface import Distribution.Types.BenchmarkType import Distribution.Types.BuildInfo +import Distribution.Types.Imports import Distribution.Types.UnqualComponentName import Distribution.ModuleName @@ -25,7 +25,7 @@ import qualified Distribution.Types.BuildInfo.Lens as L -- | A \"benchmark\" stanza in a cabal file. data Benchmark = Benchmark { benchmarkName :: UnqualComponentName - , benchmarkImports :: [ImportName] + , benchmarkImports :: [ImportName] , benchmarkInterface :: BenchmarkInterface , benchmarkBuildInfo :: BuildInfo } diff --git a/Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs b/Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs index 1b1a22e1209..b3bb7e99f36 100644 --- a/Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs @@ -7,10 +7,10 @@ import Distribution.Compat.Lens import Distribution.Compat.Prelude import Prelude () -import Distribution.Types.Imports (ImportName) import Distribution.Types.Benchmark (Benchmark) import Distribution.Types.BenchmarkInterface (BenchmarkInterface) import Distribution.Types.BuildInfo (BuildInfo) +import Distribution.Types.Imports (ImportName) import Distribution.Types.UnqualComponentName (UnqualComponentName) import qualified Distribution.Types.Benchmark as T diff --git a/Cabal-syntax/src/Distribution/Types/BuildInfo.hs b/Cabal-syntax/src/Distribution/Types/BuildInfo.hs index 7738ec3471b..1de0f720c40 100644 --- a/Cabal-syntax/src/Distribution/Types/BuildInfo.hs +++ b/Cabal-syntax/src/Distribution/Types/BuildInfo.hs @@ -20,13 +20,13 @@ module Distribution.Types.BuildInfo import Distribution.Compat.Prelude import Prelude () +import Distribution.Types.CondTree +import Distribution.Types.ConfVar import Distribution.Types.Dependency import Distribution.Types.ExeDependency +import Distribution.Types.Imports import Distribution.Types.LegacyExeDependency import Distribution.Types.Mixin -import Distribution.Types.Imports -import Distribution.Types.CondTree -import Distribution.Types.ConfVar import Distribution.Types.PkgconfigDependency import Distribution.Utils.Path @@ -163,7 +163,7 @@ insertBuildInfoImports insertBuildInfoImports = mapCondTree f id id where f :: WithImports BuildInfo -> BuildInfo - f (WithImports importNames bi) = bi{buildInfoImports=importNames} + f (WithImports importNames bi) = bi{buildInfoImports = importNames} instance Monoid BuildInfo where mempty = diff --git a/Cabal-syntax/src/Distribution/Types/Executable.hs b/Cabal-syntax/src/Distribution/Types/Executable.hs index 6d0d2d21ba1..8b140bf7f0b 100644 --- a/Cabal-syntax/src/Distribution/Types/Executable.hs +++ b/Cabal-syntax/src/Distribution/Types/Executable.hs @@ -15,11 +15,11 @@ import Prelude () import Distribution.ModuleName import Distribution.Types.BuildInfo -import Distribution.Types.Imports import Distribution.Types.CondTree import Distribution.Types.ConfVar import Distribution.Types.Dependency import Distribution.Types.ExecutableScope +import Distribution.Types.Imports import Distribution.Types.UnqualComponentName import Distribution.Utils.Path @@ -28,7 +28,7 @@ import qualified Distribution.Types.BuildInfo.Lens as L data Executable = Executable { exeName :: UnqualComponentName , exeImports :: [ImportName] - -- ^ Retained for exact print + -- ^ Retained for exact print , modulePath :: RelativePath Source File , exeScope :: ExecutableScope , buildInfo :: BuildInfo @@ -41,7 +41,7 @@ insertExeImports insertExeImports = mapCondTree f id id where f :: WithImports Executable -> Executable - f (WithImports importNames exe) = exe{exeImports=importNames} + f (WithImports importNames exe) = exe{exeImports = importNames} instance L.HasBuildInfo Executable where buildInfo f l = (\x -> l{buildInfo = x}) <$> f (buildInfo l) diff --git a/Cabal-syntax/src/Distribution/Types/ForeignLib.hs b/Cabal-syntax/src/Distribution/Types/ForeignLib.hs index e495d996dc0..5b48348fd2d 100644 --- a/Cabal-syntax/src/Distribution/Types/ForeignLib.hs +++ b/Cabal-syntax/src/Distribution/Types/ForeignLib.hs @@ -25,12 +25,12 @@ import Distribution.Parsec import Distribution.Pretty import Distribution.System import Distribution.Types.BuildInfo -import Distribution.Types.ForeignLibOption -import Distribution.Types.Imports -import Distribution.Types.Dependency import Distribution.Types.CondTree import Distribution.Types.ConfVar +import Distribution.Types.Dependency +import Distribution.Types.ForeignLibOption import Distribution.Types.ForeignLibType +import Distribution.Types.Imports import Distribution.Types.UnqualComponentName import Distribution.Utils.Path import Distribution.Version @@ -78,7 +78,7 @@ insertForeignLibImports insertForeignLibImports = mapCondTree f id id where f :: WithImports ForeignLib -> ForeignLib - f (WithImports importNames flib) = flib{foreignLibImports=importNames} + f (WithImports importNames flib) = flib{foreignLibImports = importNames} instance Ord LibVersionInfo where LibVersionInfo c r _ `compare` LibVersionInfo c' r' _ = diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index 4a96ffc0740..a6b94d2855f 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -1,8 +1,8 @@ {-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE TupleSections #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TupleSections #-} module Distribution.Types.GenericPackageDescription ( GenericPackageDescription (..) diff --git a/Cabal-syntax/src/Distribution/Types/Imports.hs b/Cabal-syntax/src/Distribution/Types/Imports.hs index 689b640b9fb..7cb63f702eb 100644 --- a/Cabal-syntax/src/Distribution/Types/Imports.hs +++ b/Cabal-syntax/src/Distribution/Types/Imports.hs @@ -1,5 +1,5 @@ -{-# LANGUAGE TupleSections #-} {-# LANGUAGE DeriveFunctor #-} +{-# LANGUAGE TupleSections #-} module Distribution.Types.Imports where diff --git a/Cabal-syntax/src/Distribution/Types/Library.hs b/Cabal-syntax/src/Distribution/Types/Library.hs index ceda767963d..83d1f69afe7 100644 --- a/Cabal-syntax/src/Distribution/Types/Library.hs +++ b/Cabal-syntax/src/Distribution/Types/Library.hs @@ -14,13 +14,13 @@ import Prelude () import Distribution.ModuleName import Distribution.Types.BuildInfo -import Distribution.Types.LibraryName -import Distribution.Types.LibraryVisibility -import Distribution.Types.ModuleReexport -import Distribution.Types.Imports import Distribution.Types.CondTree import Distribution.Types.ConfVar import Distribution.Types.Dependency +import Distribution.Types.Imports +import Distribution.Types.LibraryName +import Distribution.Types.LibraryVisibility +import Distribution.Types.ModuleReexport import qualified Distribution.Types.BuildInfo.Lens as L @@ -45,7 +45,7 @@ insertLibImports insertLibImports = mapCondTree f id id where f :: WithImports Library -> Library - f (WithImports importNames lib) = lib{libImports=importNames} + f (WithImports importNames lib) = lib{libImports = importNames} instance L.HasBuildInfo Library where buildInfo f l = (\x -> l{libBuildInfo = x}) <$> f (libBuildInfo l) diff --git a/Cabal-syntax/src/Distribution/Types/TestSuite.hs b/Cabal-syntax/src/Distribution/Types/TestSuite.hs index 7a77d41a638..3aae8bca5aa 100644 --- a/Cabal-syntax/src/Distribution/Types/TestSuite.hs +++ b/Cabal-syntax/src/Distribution/Types/TestSuite.hs @@ -13,10 +13,10 @@ import Distribution.Compat.Prelude import Prelude () import Distribution.Types.BuildInfo +import Distribution.Types.Imports import Distribution.Types.TestSuiteInterface import Distribution.Types.TestType import Distribution.Types.UnqualComponentName -import Distribution.Types.Imports import Distribution.ModuleName diff --git a/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs b/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs index d0961ec99ae..47c51aab110 100644 --- a/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs @@ -7,8 +7,8 @@ import Distribution.Compat.Lens import Distribution.Compat.Prelude import Prelude () -import Distribution.Types.Imports (ImportName) import Distribution.Types.BuildInfo (BuildInfo) +import Distribution.Types.Imports (ImportName) import Distribution.Types.TestSuite (TestSuite) import Distribution.Types.TestSuiteInterface (TestSuiteInterface) import Distribution.Types.UnqualComponentName (UnqualComponentName) From e2532250638a6f6e0ba4a07a6cddf48271792ff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 5 Nov 2025 11:00:20 +0800 Subject: [PATCH 12/60] run hlint --- Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs | 2 -- .../src/Distribution/Types/GenericPackageDescription.hs | 1 - Cabal-syntax/src/Distribution/Types/Imports.hs | 1 - 3 files changed, 4 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index c3a84d8b485..7d7869dce36 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -1,9 +1,7 @@ -{-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TupleSections #-} -- | -- Module : Distribution.PackageDescription.Parsec diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index a6b94d2855f..97f4ed8cccb 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -2,7 +2,6 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TupleSections #-} module Distribution.Types.GenericPackageDescription ( GenericPackageDescription (..) diff --git a/Cabal-syntax/src/Distribution/Types/Imports.hs b/Cabal-syntax/src/Distribution/Types/Imports.hs index 7cb63f702eb..a63020f02f8 100644 --- a/Cabal-syntax/src/Distribution/Types/Imports.hs +++ b/Cabal-syntax/src/Distribution/Types/Imports.hs @@ -1,5 +1,4 @@ {-# LANGUAGE DeriveFunctor #-} -{-# LANGUAGE TupleSections #-} module Distribution.Types.Imports where From 21636db8b0acfc1cf87119d6900552994b243013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 5 Nov 2025 12:03:37 +0800 Subject: [PATCH 13/60] defer merging prototype Currently we have achieve the following: - Stop merging, the merging function "endo" is id - CondTree are completly retained in bigger types such as libarry and executable We will need to do the following: - Allow merging in the accessor We broke: - A bunch of Read and Ord instances --- Cabal-syntax/Cabal-syntax.cabal | 1 - .../PackageDescription/FieldGrammar.hs | 5 +- .../Distribution/PackageDescription/Parsec.hs | 74 ++++++++++--------- .../src/Distribution/Types/Benchmark.hs | 10 ++- .../src/Distribution/Types/Benchmark/Lens.hs | 8 +- .../src/Distribution/Types/BuildInfo.hs | 31 +++++++- .../src/Distribution/Types/Component.hs | 2 +- .../src/Distribution/Types/Executable.hs | 9 ++- .../src/Distribution/Types/ForeignLib.hs | 9 +-- .../src/Distribution/Types/Imports.hs | 17 ----- .../src/Distribution/Types/Library.hs | 9 ++- .../Distribution/Types/PackageDescription.hs | 2 +- .../src/Distribution/Types/TestSuite.hs | 9 ++- .../src/Distribution/Types/TestSuite/Lens.hs | 8 +- .../Distribution/Types/LocalBuildConfig.hs | 6 +- .../src/Distribution/Types/LocalBuildInfo.hs | 2 +- 16 files changed, 112 insertions(+), 90 deletions(-) delete mode 100644 Cabal-syntax/src/Distribution/Types/Imports.hs diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal index de3d2adcde0..85137dc147c 100644 --- a/Cabal-syntax/Cabal-syntax.cabal +++ b/Cabal-syntax/Cabal-syntax.cabal @@ -160,7 +160,6 @@ library Distribution.Types.Library.Lens Distribution.Types.LibraryName Distribution.Types.LibraryVisibility - Distribution.Types.Imports Distribution.Types.MissingDependency Distribution.Types.MissingDependencyReason Distribution.Types.Mixin diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index ee93894947e..42382cb03d7 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -84,7 +84,6 @@ import Distribution.Package import Distribution.PackageDescription import Distribution.Parsec import Distribution.Pretty (Pretty (..), prettyShow, showToken) -import Distribution.Types.Imports import Distribution.Utils.Path import Distribution.Version (Version, VersionRange) @@ -300,7 +299,7 @@ executableFieldGrammar n = -- | An intermediate type just used for parsing the test-suite stanza. -- After validation it is converted into the proper 'TestSuite' type. data TestSuiteStanza = TestSuiteStanza - { _testStanzaImports :: [ImportName] + { _testStanzaImports :: [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] , _testStanzaTestType :: Maybe TestType -- ^ Retained imports for exact printing , _testStanzaMainIs :: Maybe (RelativePath Source File) @@ -462,7 +461,7 @@ unvalidateTestSuite t = -- | An intermediate type just used for parsing the benchmark stanza. -- After validation it is converted into the proper 'Benchmark' type. data BenchmarkStanza = BenchmarkStanza - { _benchmarkStanzaImports :: [ImportName] + { _benchmarkStanzaImports :: [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] -- ^ retained imports , _benchmarkStanzaBenchmarkType :: Maybe BenchmarkType , _benchmarkStanzaMainIs :: Maybe (RelativePath Source File) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index 7d7869dce36..5698187df8f 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -2,6 +2,7 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE ViewPatterns #-} -- | -- Module : Distribution.PackageDescription.Parsec @@ -66,7 +67,6 @@ import qualified Distribution.Types.BuildInfo.Lens as L import qualified Distribution.Types.Executable.Lens as L import qualified Distribution.Types.ForeignLib.Lens as L import qualified Distribution.Types.GenericPackageDescription.Lens as L -import Distribution.Types.Imports import qualified Distribution.Types.PackageDescription.Lens as L import qualified Distribution.Types.SetupBuildInfo.Lens as L import qualified Text.Parsec as P @@ -656,16 +656,16 @@ parseCondTreeWithCommonStanzas v grammar fromBuildInfo commonStanzas fields = do where hasElif = specHasElif v --- | only attach import annotation on root -attachImportsOnRoot - :: [ImportName] - -> CondTree v c a - -> CondTree v c (WithImports a) -attachImportsOnRoot imports = mapTreeData' (WithImports imports) noImports +-- -- | only attach import annotation on root +-- attachImportsOnRoot +-- :: [ImportName] +-- -> CondTree v c a +-- -> CondTree v c (WithImports a) +-- attachImportsOnRoot imports = mapTreeData' (WithImports imports) noImports -- | only prepend import annotation on root prependImportsOnRoot - :: [ImportName] + :: [(ImportName, CondTreeBuildInfo)] -> CondTree v c (WithImports a) -> CondTree v c (WithImports a) prependImportsOnRoot imports = mapTreeData' (mapImports (imports <>)) id @@ -682,8 +682,9 @@ processImports -> ParseResult src ( [Field Position] - , [ImportName] - , CondTree ConfVar [Dependency] (WithImports a) -> CondTree ConfVar [Dependency] (WithImports a) + , [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] + , -- NOTE(leana8959): as we know it's a build info we can insert in this function! + CondTree ConfVar [Dependency] (WithImports a) -> CondTree ConfVar [Dependency] (WithImports a) ) processImports v fromBuildInfo commonStanzas = go [] where @@ -693,12 +694,12 @@ processImports v fromBuildInfo commonStanzas = go [] getList' = Newtype.unpack go - :: [(ImportName, CondTree ConfVar [Dependency] (WithImports BuildInfo))] + :: [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] -> [Field Position] -> ParseResult src ( [Field Position] - , [ImportName] + , [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] , CondTree ConfVar [Dependency] (WithImports a) -> CondTree ConfVar [Dependency] (WithImports a) ) go acc (Field (Name pos name) _ : fields) @@ -717,7 +718,7 @@ processImports v fromBuildInfo commonStanzas = go [] parseFailure pos $ "Undefined common stanza imported: " ++ commonName pure Nothing Just commonTree -> - pure (Just (commonName, mapTreeData noImports commonTree)) + pure (Just (commonName, commonTree)) go (acc ++ catMaybes namedTrees) fields @@ -726,12 +727,12 @@ processImports v fromBuildInfo commonStanzas = go [] fields' <- catMaybes <$> traverse (warnImport v) fields let importNames :: [ImportName] - importTrees :: [CondTree ConfVar [Dependency] (WithImports BuildInfo)] + importTrees :: [CondTree ConfVar [Dependency] BuildInfo] (importNames, importTrees) = unzip acc pure ( fields' - , importNames - , \x -> foldr (mergeCommonStanza fromBuildInfo) x importTrees + , acc + , id -- TODO(leana8959): defer merging ) -- | Warn on "import" fields, also map to Maybe, so erroneous fields can be filtered @@ -743,26 +744,27 @@ warnImport v (Field (Name pos name) _) | name == "import" = do return Nothing warnImport _ f = pure (Just f) -mergeCommonStanza - :: forall a - . L.HasBuildInfo a - => (BuildInfo -> a) - -> CondTree ConfVar [Dependency] (WithImports BuildInfo) - -> CondTree ConfVar [Dependency] (WithImports a) - -> CondTree ConfVar [Dependency] (WithImports a) -mergeCommonStanza fromBuildInfo (CondNode bi _ bis) (CondNode x _ cs) = - CondNode x' (unImportNames x' ^. L.targetBuildDepends) cs' - where - -- new value is old value with buildInfo field _prepended_. - x' :: WithImports a - x' = - WithImports - (getImportNames bi <> getImportNames x) - (unImportNames x & L.buildInfo %~ (unImportNames bi <>)) - - -- tree components are appended together. - cs' :: [CondBranch ConfVar [Dependency] (WithImports a)] - cs' = map (fmap fromBuildInfo <$>) bis ++ cs +-- -- TODO(leana8959): we defer merging +-- mergeCommonStanza +-- :: forall a +-- . L.HasBuildInfo a +-- => (BuildInfo -> a) +-- -> CondTree ConfVar [Dependency] (WithImports BuildInfo) +-- -> CondTree ConfVar [Dependency] (WithImports a) +-- -> CondTree ConfVar [Dependency] (WithImports a) +-- mergeCommonStanza fromBuildInfo (CondNode bi _ bis) (CondNode x _ cs) = +-- CondNode x' (unImportNames x' ^. L.targetBuildDepends) cs' +-- where +-- -- new value is old value with buildInfo field _prepended_. +-- x' :: WithImports a +-- x' = +-- WithImports +-- (getImportNames bi <> getImportNames x) +-- (unImportNames x & L.buildInfo %~ (unImportNames bi <>)) +-- +-- -- tree components are appended together. +-- cs' :: [CondBranch ConfVar [Dependency] (WithImports a)] +-- cs' = map (fmap fromBuildInfo <$>) bis ++ cs ------------------------------------------------------------------------------- -- Branches diff --git a/Cabal-syntax/src/Distribution/Types/Benchmark.hs b/Cabal-syntax/src/Distribution/Types/Benchmark.hs index f22f52f94eb..83a968c6eda 100644 --- a/Cabal-syntax/src/Distribution/Types/Benchmark.hs +++ b/Cabal-syntax/src/Distribution/Types/Benchmark.hs @@ -15,7 +15,9 @@ import Prelude () import Distribution.Types.BenchmarkInterface import Distribution.Types.BenchmarkType import Distribution.Types.BuildInfo -import Distribution.Types.Imports +import Distribution.Types.CondTree +import Distribution.Types.ConfVar +import Distribution.Types.Dependency import Distribution.Types.UnqualComponentName import Distribution.ModuleName @@ -25,11 +27,13 @@ import qualified Distribution.Types.BuildInfo.Lens as L -- | A \"benchmark\" stanza in a cabal file. data Benchmark = Benchmark { benchmarkName :: UnqualComponentName - , benchmarkImports :: [ImportName] + , benchmarkImports :: [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] + -- ^ Retained condTree imports, not merged , benchmarkInterface :: BenchmarkInterface , benchmarkBuildInfo :: BuildInfo + -- ^ the BuildInfo defined locally, unmerged with imports } - deriving (Generic, Show, Read, Eq, Ord, Data) + deriving (Generic, Show {- Read, -}, Eq {- Ord, -}, Data) instance Binary Benchmark instance Structured Benchmark diff --git a/Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs b/Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs index b3bb7e99f36..95fa59404c7 100644 --- a/Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs @@ -9,13 +9,15 @@ import Prelude () import Distribution.Types.Benchmark (Benchmark) import Distribution.Types.BenchmarkInterface (BenchmarkInterface) -import Distribution.Types.BuildInfo (BuildInfo) -import Distribution.Types.Imports (ImportName) +import Distribution.Types.BuildInfo (BuildInfo, ImportName) +import Distribution.Types.CondTree +import Distribution.Types.ConfVar +import Distribution.Types.Dependency import Distribution.Types.UnqualComponentName (UnqualComponentName) import qualified Distribution.Types.Benchmark as T -benchmarkImports :: Lens' Benchmark [ImportName] +benchmarkImports :: Lens' Benchmark [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] benchmarkImports f s = fmap (\x -> s{T.benchmarkImports = x}) (f (T.benchmarkImports s)) {-# INLINE benchmarkImports #-} diff --git a/Cabal-syntax/src/Distribution/Types/BuildInfo.hs b/Cabal-syntax/src/Distribution/Types/BuildInfo.hs index 1de0f720c40..83019edbe64 100644 --- a/Cabal-syntax/src/Distribution/Types/BuildInfo.hs +++ b/Cabal-syntax/src/Distribution/Types/BuildInfo.hs @@ -1,5 +1,6 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} module Distribution.Types.BuildInfo @@ -15,6 +16,12 @@ module Distribution.Types.BuildInfo , hcProfSharedOptions , hcStaticOptions , insertBuildInfoImports + + -- * Imports + , WithImports (..) + , ImportName + , noImports + , mapImports ) where import Distribution.Compat.Prelude @@ -24,7 +31,8 @@ import Distribution.Types.CondTree import Distribution.Types.ConfVar import Distribution.Types.Dependency import Distribution.Types.ExeDependency -import Distribution.Types.Imports + +-- import Distribution.Types.Imports import Distribution.Types.LegacyExeDependency import Distribution.Types.Mixin import Distribution.Types.PkgconfigDependency @@ -36,7 +44,7 @@ import Language.Haskell.Extension -- Consider refactoring into executable and library versions. data BuildInfo = BuildInfo - { buildInfoImports :: [String] + { buildInfoImports :: ![(ImportName, CondTreeBuildInfo)] , buildable :: Bool -- ^ component is buildable here , buildTools :: [LegacyExeDependency] @@ -151,7 +159,8 @@ data BuildInfo = BuildInfo -- ^ Dependencies specific to a library or executable target , mixins :: [Mixin] } - deriving (Generic, Show, Read, Eq, Ord, Data) + -- TODO(leana8959): instances + deriving (Generic, Show {- Read, -}, Eq {- Ord, -}, Data) instance Binary BuildInfo instance Structured BuildInfo @@ -334,3 +343,19 @@ lookupHcOptions f hc bi = case f bi of | hc == GHC -> ghc | hc == GHCJS -> ghcjs | otherwise -> mempty + +-- TODO(leana8959): where do we put this to avoid cyclical import +type ImportName = String +type CondTreeBuildInfo = CondTree ConfVar [Dependency] BuildInfo + +data WithImports a = WithImports + { getImportNames :: ![(ImportName, CondTreeBuildInfo)] + , unImportNames :: !a + } + deriving (Show, Functor) + +mapImports :: ([(ImportName, CondTreeBuildInfo)] -> [(ImportName, CondTreeBuildInfo)]) -> WithImports a -> WithImports a +mapImports f (WithImports imports x) = WithImports (f imports) x + +noImports :: a -> WithImports a +noImports = WithImports mempty diff --git a/Cabal-syntax/src/Distribution/Types/Component.hs b/Cabal-syntax/src/Distribution/Types/Component.hs index fee1201fba9..e99814eac8d 100644 --- a/Cabal-syntax/src/Distribution/Types/Component.hs +++ b/Cabal-syntax/src/Distribution/Types/Component.hs @@ -29,7 +29,7 @@ data Component | CExe Executable | CTest TestSuite | CBench Benchmark - deriving (Generic, Show, Eq, Read) + deriving (Generic, Show, Eq {- , Read -}) instance Binary Component instance Structured Component diff --git a/Cabal-syntax/src/Distribution/Types/Executable.hs b/Cabal-syntax/src/Distribution/Types/Executable.hs index 8b140bf7f0b..e3a1663efa6 100644 --- a/Cabal-syntax/src/Distribution/Types/Executable.hs +++ b/Cabal-syntax/src/Distribution/Types/Executable.hs @@ -19,7 +19,6 @@ import Distribution.Types.CondTree import Distribution.Types.ConfVar import Distribution.Types.Dependency import Distribution.Types.ExecutableScope -import Distribution.Types.Imports import Distribution.Types.UnqualComponentName import Distribution.Utils.Path @@ -27,13 +26,15 @@ import qualified Distribution.Types.BuildInfo.Lens as L data Executable = Executable { exeName :: UnqualComponentName - , exeImports :: [ImportName] - -- ^ Retained for exact print + , exeImports :: [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] + -- ^ Retained condTree imports, not merged , modulePath :: RelativePath Source File , exeScope :: ExecutableScope , buildInfo :: BuildInfo + -- ^ the BuildInfo defined locally, unmerged with imports } - deriving (Generic, Show, Read, Eq, Ord, Data) + -- TODO(leana8959): instances + deriving (Generic, Show {- Read, -}, Eq {- Ord, -}, Data) insertExeImports :: CondTree ConfVar [Dependency] (WithImports Executable) diff --git a/Cabal-syntax/src/Distribution/Types/ForeignLib.hs b/Cabal-syntax/src/Distribution/Types/ForeignLib.hs index 5b48348fd2d..dee4f614f41 100644 --- a/Cabal-syntax/src/Distribution/Types/ForeignLib.hs +++ b/Cabal-syntax/src/Distribution/Types/ForeignLib.hs @@ -30,7 +30,6 @@ import Distribution.Types.ConfVar import Distribution.Types.Dependency import Distribution.Types.ForeignLibOption import Distribution.Types.ForeignLibType -import Distribution.Types.Imports import Distribution.Types.UnqualComponentName import Distribution.Utils.Path import Distribution.Version @@ -47,15 +46,15 @@ import qualified Distribution.Types.BuildInfo.Lens as L data ForeignLib = ForeignLib { foreignLibName :: UnqualComponentName -- ^ Name of the foreign library - , foreignLibImports :: [ImportName] - -- ^ Retained imports for exact printing + , foreignLibImports :: [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] + -- ^ Retained condTree imports, not merged , foreignLibType :: ForeignLibType -- ^ What kind of foreign library is this (static or dynamic). , foreignLibOptions :: [ForeignLibOption] -- ^ What options apply to this foreign library (e.g., are we -- merging in all foreign dependencies.) , foreignLibBuildInfo :: BuildInfo - -- ^ Build information for this foreign library. + -- ^ the BuildInfo for this foreign library. Defined locally, unmerged with imports , foreignLibVersionInfo :: Maybe LibVersionInfo -- ^ Libtool-style version-info data to compute library version. -- Refer to the libtool documentation on the @@ -68,7 +67,7 @@ data ForeignLib = ForeignLib -- This is a list rather than a maybe field so that we can flatten -- the condition trees (for instance, when creating an sdist) } - deriving (Generic, Show, Read, Eq, Ord, Data) + deriving (Generic, Show {- Read, -}, Eq {- Ord, -}, Data) data LibVersionInfo = LibVersionInfo Int Int Int deriving (Data, Eq, Generic) diff --git a/Cabal-syntax/src/Distribution/Types/Imports.hs b/Cabal-syntax/src/Distribution/Types/Imports.hs deleted file mode 100644 index a63020f02f8..00000000000 --- a/Cabal-syntax/src/Distribution/Types/Imports.hs +++ /dev/null @@ -1,17 +0,0 @@ -{-# LANGUAGE DeriveFunctor #-} - -module Distribution.Types.Imports where - -data WithImports a = WithImports - { getImportNames :: ![ImportName] - , unImportNames :: !a - } - deriving (Show, Functor) - -type ImportName = String - -mapImports :: ([ImportName] -> [ImportName]) -> WithImports a -> WithImports a -mapImports f (WithImports imports x) = WithImports (f imports) x - -noImports :: a -> WithImports a -noImports = WithImports mempty diff --git a/Cabal-syntax/src/Distribution/Types/Library.hs b/Cabal-syntax/src/Distribution/Types/Library.hs index 83d1f69afe7..5ecd60ca718 100644 --- a/Cabal-syntax/src/Distribution/Types/Library.hs +++ b/Cabal-syntax/src/Distribution/Types/Library.hs @@ -17,7 +17,6 @@ import Distribution.Types.BuildInfo import Distribution.Types.CondTree import Distribution.Types.ConfVar import Distribution.Types.Dependency -import Distribution.Types.Imports import Distribution.Types.LibraryName import Distribution.Types.LibraryVisibility import Distribution.Types.ModuleReexport @@ -26,7 +25,8 @@ import qualified Distribution.Types.BuildInfo.Lens as L data Library = Library { libName :: LibraryName - , libImports :: [ImportName] + , libImports :: [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] + -- ^ Retained condTree imports, not merged , exposedModules :: [ModuleName] , reexportedModules :: [ModuleReexport] , signatures :: [ModuleName] @@ -36,8 +36,11 @@ data Library = Library , libVisibility :: LibraryVisibility -- ^ Whether this multilib can be used as a dependency for other packages. , libBuildInfo :: BuildInfo + -- ^ the BuildInfo defined locally, unmerged with imports } - deriving (Generic, Show, Eq, Ord, Read, Data) + -- TODO(leana8959): fix these instances, condtree doesn't support them + -- best case we just ignore that field + deriving (Generic, Show, Eq {- Ord, Read, -}, Data) insertLibImports :: CondTree ConfVar [Dependency] (WithImports Library) diff --git a/Cabal-syntax/src/Distribution/Types/PackageDescription.hs b/Cabal-syntax/src/Distribution/Types/PackageDescription.hs index 4b00a8ef526..5ffd93e7d13 100644 --- a/Cabal-syntax/src/Distribution/Types/PackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/PackageDescription.hs @@ -151,7 +151,7 @@ data PackageDescription = PackageDescription , extraDocFiles :: [RelativePath Pkg File] , extraFiles :: [RelativePath Pkg File] } - deriving (Generic, Show, Read, Eq, Ord, Data) + deriving (Generic, Show {- Read, -}, Eq {- Ord, -}, Data) instance Binary PackageDescription instance Structured PackageDescription diff --git a/Cabal-syntax/src/Distribution/Types/TestSuite.hs b/Cabal-syntax/src/Distribution/Types/TestSuite.hs index 3aae8bca5aa..4f2ad19126e 100644 --- a/Cabal-syntax/src/Distribution/Types/TestSuite.hs +++ b/Cabal-syntax/src/Distribution/Types/TestSuite.hs @@ -13,7 +13,9 @@ import Distribution.Compat.Prelude import Prelude () import Distribution.Types.BuildInfo -import Distribution.Types.Imports +import Distribution.Types.CondTree +import Distribution.Types.ConfVar +import Distribution.Types.Dependency import Distribution.Types.TestSuiteInterface import Distribution.Types.TestType import Distribution.Types.UnqualComponentName @@ -25,12 +27,13 @@ import qualified Distribution.Types.BuildInfo.Lens as L -- | A \"test-suite\" stanza in a cabal file. data TestSuite = TestSuite { testName :: UnqualComponentName - , testSuiteImports :: [ImportName] + , testSuiteImports :: [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] , testInterface :: TestSuiteInterface , testBuildInfo :: BuildInfo , testCodeGenerators :: [String] } - deriving (Generic, Show, Read, Eq, Ord, Data) + -- TODO(leana8959): instances + deriving (Generic, Show {- Read, -}, Eq {- Ord, -}, Data) instance L.HasBuildInfo TestSuite where buildInfo f l = (\x -> l{testBuildInfo = x}) <$> f (testBuildInfo l) diff --git a/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs b/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs index 47c51aab110..5c16fc3d7bb 100644 --- a/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs @@ -7,15 +7,17 @@ import Distribution.Compat.Lens import Distribution.Compat.Prelude import Prelude () -import Distribution.Types.BuildInfo (BuildInfo) -import Distribution.Types.Imports (ImportName) +import Distribution.Types.BuildInfo (BuildInfo, ImportName) +import Distribution.Types.CondTree +import Distribution.Types.ConfVar +import Distribution.Types.Dependency import Distribution.Types.TestSuite (TestSuite) import Distribution.Types.TestSuiteInterface (TestSuiteInterface) import Distribution.Types.UnqualComponentName (UnqualComponentName) import qualified Distribution.Types.TestSuite as T -testSuiteImports :: Lens' TestSuite [ImportName] +testSuiteImports :: Lens' TestSuite [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] testSuiteImports f s = fmap (\x -> s{T.testSuiteImports = x}) (f (T.testSuiteImports s)) {-# INLINE testSuiteImports #-} diff --git a/Cabal/src/Distribution/Types/LocalBuildConfig.hs b/Cabal/src/Distribution/Types/LocalBuildConfig.hs index 12648a8357b..8af12d8f7d9 100644 --- a/Cabal/src/Distribution/Types/LocalBuildConfig.hs +++ b/Cabal/src/Distribution/Types/LocalBuildConfig.hs @@ -84,7 +84,7 @@ data PackageBuildDescr = PackageBuildDescr -- Notably, this list must exclude indefinite libraries and instantiations -- because HPC does not support backpack (Nov. 2023). } - deriving (Generic, Read, Show) + deriving (Generic {- Read, -}, Show) -- | Information about individual components in a package, -- determined after the configure step. @@ -127,7 +127,7 @@ data LocalBuildDescr = LocalBuildDescr -- ^ Information about individual components in the package -- determined after the configure step. } - deriving (Generic, Read, Show) + deriving (Generic {- Read, -}, Show) -- | 'LocalBuildConfig' contains options that can be controlled -- by the user and serve as inputs to the configuration of a package. @@ -141,7 +141,7 @@ data LocalBuildConfig = LocalBuildConfig -- ^ Options to control the build, e.g. whether to -- enable profiling or to enable program coverage. } - deriving (Generic, Read, Show) + deriving (Generic {- Read, -}, Show) -- | 'BuildOptions' contains configuration options that can be controlled -- by the user. diff --git a/Cabal/src/Distribution/Types/LocalBuildInfo.hs b/Cabal/src/Distribution/Types/LocalBuildInfo.hs index 854f454dc87..437030b1620 100644 --- a/Cabal/src/Distribution/Types/LocalBuildInfo.hs +++ b/Cabal/src/Distribution/Types/LocalBuildInfo.hs @@ -143,7 +143,7 @@ data LocalBuildInfo = NewLocalBuildInfo -- ^ Information about a package configuration -- that can be modified by the user at configuration time. } - deriving (Generic, Read, Show) + deriving (Generic {- Read, -}, Show) {-# COMPLETE LocalBuildInfo #-} From 4985b0b9bede360673b8f655fe593db5b1c2454a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 5 Nov 2025 15:16:48 +0800 Subject: [PATCH 14/60] Revert "defer merging prototype" This reverts commit 21636db8b0acfc1cf87119d6900552994b243013. --- Cabal-syntax/Cabal-syntax.cabal | 1 + .../PackageDescription/FieldGrammar.hs | 5 +- .../Distribution/PackageDescription/Parsec.hs | 74 +++++++++---------- .../src/Distribution/Types/Benchmark.hs | 10 +-- .../src/Distribution/Types/Benchmark/Lens.hs | 8 +- .../src/Distribution/Types/BuildInfo.hs | 31 +------- .../src/Distribution/Types/Component.hs | 2 +- .../src/Distribution/Types/Executable.hs | 9 +-- .../src/Distribution/Types/ForeignLib.hs | 9 ++- .../src/Distribution/Types/Imports.hs | 17 +++++ .../src/Distribution/Types/Library.hs | 9 +-- .../Distribution/Types/PackageDescription.hs | 2 +- .../src/Distribution/Types/TestSuite.hs | 9 +-- .../src/Distribution/Types/TestSuite/Lens.hs | 8 +- .../Distribution/Types/LocalBuildConfig.hs | 6 +- .../src/Distribution/Types/LocalBuildInfo.hs | 2 +- 16 files changed, 90 insertions(+), 112 deletions(-) create mode 100644 Cabal-syntax/src/Distribution/Types/Imports.hs diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal index 85137dc147c..de3d2adcde0 100644 --- a/Cabal-syntax/Cabal-syntax.cabal +++ b/Cabal-syntax/Cabal-syntax.cabal @@ -160,6 +160,7 @@ library Distribution.Types.Library.Lens Distribution.Types.LibraryName Distribution.Types.LibraryVisibility + Distribution.Types.Imports Distribution.Types.MissingDependency Distribution.Types.MissingDependencyReason Distribution.Types.Mixin diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index 42382cb03d7..ee93894947e 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -84,6 +84,7 @@ import Distribution.Package import Distribution.PackageDescription import Distribution.Parsec import Distribution.Pretty (Pretty (..), prettyShow, showToken) +import Distribution.Types.Imports import Distribution.Utils.Path import Distribution.Version (Version, VersionRange) @@ -299,7 +300,7 @@ executableFieldGrammar n = -- | An intermediate type just used for parsing the test-suite stanza. -- After validation it is converted into the proper 'TestSuite' type. data TestSuiteStanza = TestSuiteStanza - { _testStanzaImports :: [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] + { _testStanzaImports :: [ImportName] , _testStanzaTestType :: Maybe TestType -- ^ Retained imports for exact printing , _testStanzaMainIs :: Maybe (RelativePath Source File) @@ -461,7 +462,7 @@ unvalidateTestSuite t = -- | An intermediate type just used for parsing the benchmark stanza. -- After validation it is converted into the proper 'Benchmark' type. data BenchmarkStanza = BenchmarkStanza - { _benchmarkStanzaImports :: [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] + { _benchmarkStanzaImports :: [ImportName] -- ^ retained imports , _benchmarkStanzaBenchmarkType :: Maybe BenchmarkType , _benchmarkStanzaMainIs :: Maybe (RelativePath Source File) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index 5698187df8f..7d7869dce36 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -2,7 +2,6 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE ViewPatterns #-} -- | -- Module : Distribution.PackageDescription.Parsec @@ -67,6 +66,7 @@ import qualified Distribution.Types.BuildInfo.Lens as L import qualified Distribution.Types.Executable.Lens as L import qualified Distribution.Types.ForeignLib.Lens as L import qualified Distribution.Types.GenericPackageDescription.Lens as L +import Distribution.Types.Imports import qualified Distribution.Types.PackageDescription.Lens as L import qualified Distribution.Types.SetupBuildInfo.Lens as L import qualified Text.Parsec as P @@ -656,16 +656,16 @@ parseCondTreeWithCommonStanzas v grammar fromBuildInfo commonStanzas fields = do where hasElif = specHasElif v --- -- | only attach import annotation on root --- attachImportsOnRoot --- :: [ImportName] --- -> CondTree v c a --- -> CondTree v c (WithImports a) --- attachImportsOnRoot imports = mapTreeData' (WithImports imports) noImports +-- | only attach import annotation on root +attachImportsOnRoot + :: [ImportName] + -> CondTree v c a + -> CondTree v c (WithImports a) +attachImportsOnRoot imports = mapTreeData' (WithImports imports) noImports -- | only prepend import annotation on root prependImportsOnRoot - :: [(ImportName, CondTreeBuildInfo)] + :: [ImportName] -> CondTree v c (WithImports a) -> CondTree v c (WithImports a) prependImportsOnRoot imports = mapTreeData' (mapImports (imports <>)) id @@ -682,9 +682,8 @@ processImports -> ParseResult src ( [Field Position] - , [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] - , -- NOTE(leana8959): as we know it's a build info we can insert in this function! - CondTree ConfVar [Dependency] (WithImports a) -> CondTree ConfVar [Dependency] (WithImports a) + , [ImportName] + , CondTree ConfVar [Dependency] (WithImports a) -> CondTree ConfVar [Dependency] (WithImports a) ) processImports v fromBuildInfo commonStanzas = go [] where @@ -694,12 +693,12 @@ processImports v fromBuildInfo commonStanzas = go [] getList' = Newtype.unpack go - :: [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] + :: [(ImportName, CondTree ConfVar [Dependency] (WithImports BuildInfo))] -> [Field Position] -> ParseResult src ( [Field Position] - , [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] + , [ImportName] , CondTree ConfVar [Dependency] (WithImports a) -> CondTree ConfVar [Dependency] (WithImports a) ) go acc (Field (Name pos name) _ : fields) @@ -718,7 +717,7 @@ processImports v fromBuildInfo commonStanzas = go [] parseFailure pos $ "Undefined common stanza imported: " ++ commonName pure Nothing Just commonTree -> - pure (Just (commonName, commonTree)) + pure (Just (commonName, mapTreeData noImports commonTree)) go (acc ++ catMaybes namedTrees) fields @@ -727,12 +726,12 @@ processImports v fromBuildInfo commonStanzas = go [] fields' <- catMaybes <$> traverse (warnImport v) fields let importNames :: [ImportName] - importTrees :: [CondTree ConfVar [Dependency] BuildInfo] + importTrees :: [CondTree ConfVar [Dependency] (WithImports BuildInfo)] (importNames, importTrees) = unzip acc pure ( fields' - , acc - , id -- TODO(leana8959): defer merging + , importNames + , \x -> foldr (mergeCommonStanza fromBuildInfo) x importTrees ) -- | Warn on "import" fields, also map to Maybe, so erroneous fields can be filtered @@ -744,27 +743,26 @@ warnImport v (Field (Name pos name) _) | name == "import" = do return Nothing warnImport _ f = pure (Just f) --- -- TODO(leana8959): we defer merging --- mergeCommonStanza --- :: forall a --- . L.HasBuildInfo a --- => (BuildInfo -> a) --- -> CondTree ConfVar [Dependency] (WithImports BuildInfo) --- -> CondTree ConfVar [Dependency] (WithImports a) --- -> CondTree ConfVar [Dependency] (WithImports a) --- mergeCommonStanza fromBuildInfo (CondNode bi _ bis) (CondNode x _ cs) = --- CondNode x' (unImportNames x' ^. L.targetBuildDepends) cs' --- where --- -- new value is old value with buildInfo field _prepended_. --- x' :: WithImports a --- x' = --- WithImports --- (getImportNames bi <> getImportNames x) --- (unImportNames x & L.buildInfo %~ (unImportNames bi <>)) --- --- -- tree components are appended together. --- cs' :: [CondBranch ConfVar [Dependency] (WithImports a)] --- cs' = map (fmap fromBuildInfo <$>) bis ++ cs +mergeCommonStanza + :: forall a + . L.HasBuildInfo a + => (BuildInfo -> a) + -> CondTree ConfVar [Dependency] (WithImports BuildInfo) + -> CondTree ConfVar [Dependency] (WithImports a) + -> CondTree ConfVar [Dependency] (WithImports a) +mergeCommonStanza fromBuildInfo (CondNode bi _ bis) (CondNode x _ cs) = + CondNode x' (unImportNames x' ^. L.targetBuildDepends) cs' + where + -- new value is old value with buildInfo field _prepended_. + x' :: WithImports a + x' = + WithImports + (getImportNames bi <> getImportNames x) + (unImportNames x & L.buildInfo %~ (unImportNames bi <>)) + + -- tree components are appended together. + cs' :: [CondBranch ConfVar [Dependency] (WithImports a)] + cs' = map (fmap fromBuildInfo <$>) bis ++ cs ------------------------------------------------------------------------------- -- Branches diff --git a/Cabal-syntax/src/Distribution/Types/Benchmark.hs b/Cabal-syntax/src/Distribution/Types/Benchmark.hs index 83a968c6eda..f22f52f94eb 100644 --- a/Cabal-syntax/src/Distribution/Types/Benchmark.hs +++ b/Cabal-syntax/src/Distribution/Types/Benchmark.hs @@ -15,9 +15,7 @@ import Prelude () import Distribution.Types.BenchmarkInterface import Distribution.Types.BenchmarkType import Distribution.Types.BuildInfo -import Distribution.Types.CondTree -import Distribution.Types.ConfVar -import Distribution.Types.Dependency +import Distribution.Types.Imports import Distribution.Types.UnqualComponentName import Distribution.ModuleName @@ -27,13 +25,11 @@ import qualified Distribution.Types.BuildInfo.Lens as L -- | A \"benchmark\" stanza in a cabal file. data Benchmark = Benchmark { benchmarkName :: UnqualComponentName - , benchmarkImports :: [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] - -- ^ Retained condTree imports, not merged + , benchmarkImports :: [ImportName] , benchmarkInterface :: BenchmarkInterface , benchmarkBuildInfo :: BuildInfo - -- ^ the BuildInfo defined locally, unmerged with imports } - deriving (Generic, Show {- Read, -}, Eq {- Ord, -}, Data) + deriving (Generic, Show, Read, Eq, Ord, Data) instance Binary Benchmark instance Structured Benchmark diff --git a/Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs b/Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs index 95fa59404c7..b3bb7e99f36 100644 --- a/Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs @@ -9,15 +9,13 @@ import Prelude () import Distribution.Types.Benchmark (Benchmark) import Distribution.Types.BenchmarkInterface (BenchmarkInterface) -import Distribution.Types.BuildInfo (BuildInfo, ImportName) -import Distribution.Types.CondTree -import Distribution.Types.ConfVar -import Distribution.Types.Dependency +import Distribution.Types.BuildInfo (BuildInfo) +import Distribution.Types.Imports (ImportName) import Distribution.Types.UnqualComponentName (UnqualComponentName) import qualified Distribution.Types.Benchmark as T -benchmarkImports :: Lens' Benchmark [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] +benchmarkImports :: Lens' Benchmark [ImportName] benchmarkImports f s = fmap (\x -> s{T.benchmarkImports = x}) (f (T.benchmarkImports s)) {-# INLINE benchmarkImports #-} diff --git a/Cabal-syntax/src/Distribution/Types/BuildInfo.hs b/Cabal-syntax/src/Distribution/Types/BuildInfo.hs index 83019edbe64..1de0f720c40 100644 --- a/Cabal-syntax/src/Distribution/Types/BuildInfo.hs +++ b/Cabal-syntax/src/Distribution/Types/BuildInfo.hs @@ -1,6 +1,5 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} module Distribution.Types.BuildInfo @@ -16,12 +15,6 @@ module Distribution.Types.BuildInfo , hcProfSharedOptions , hcStaticOptions , insertBuildInfoImports - - -- * Imports - , WithImports (..) - , ImportName - , noImports - , mapImports ) where import Distribution.Compat.Prelude @@ -31,8 +24,7 @@ import Distribution.Types.CondTree import Distribution.Types.ConfVar import Distribution.Types.Dependency import Distribution.Types.ExeDependency - --- import Distribution.Types.Imports +import Distribution.Types.Imports import Distribution.Types.LegacyExeDependency import Distribution.Types.Mixin import Distribution.Types.PkgconfigDependency @@ -44,7 +36,7 @@ import Language.Haskell.Extension -- Consider refactoring into executable and library versions. data BuildInfo = BuildInfo - { buildInfoImports :: ![(ImportName, CondTreeBuildInfo)] + { buildInfoImports :: [String] , buildable :: Bool -- ^ component is buildable here , buildTools :: [LegacyExeDependency] @@ -159,8 +151,7 @@ data BuildInfo = BuildInfo -- ^ Dependencies specific to a library or executable target , mixins :: [Mixin] } - -- TODO(leana8959): instances - deriving (Generic, Show {- Read, -}, Eq {- Ord, -}, Data) + deriving (Generic, Show, Read, Eq, Ord, Data) instance Binary BuildInfo instance Structured BuildInfo @@ -343,19 +334,3 @@ lookupHcOptions f hc bi = case f bi of | hc == GHC -> ghc | hc == GHCJS -> ghcjs | otherwise -> mempty - --- TODO(leana8959): where do we put this to avoid cyclical import -type ImportName = String -type CondTreeBuildInfo = CondTree ConfVar [Dependency] BuildInfo - -data WithImports a = WithImports - { getImportNames :: ![(ImportName, CondTreeBuildInfo)] - , unImportNames :: !a - } - deriving (Show, Functor) - -mapImports :: ([(ImportName, CondTreeBuildInfo)] -> [(ImportName, CondTreeBuildInfo)]) -> WithImports a -> WithImports a -mapImports f (WithImports imports x) = WithImports (f imports) x - -noImports :: a -> WithImports a -noImports = WithImports mempty diff --git a/Cabal-syntax/src/Distribution/Types/Component.hs b/Cabal-syntax/src/Distribution/Types/Component.hs index e99814eac8d..fee1201fba9 100644 --- a/Cabal-syntax/src/Distribution/Types/Component.hs +++ b/Cabal-syntax/src/Distribution/Types/Component.hs @@ -29,7 +29,7 @@ data Component | CExe Executable | CTest TestSuite | CBench Benchmark - deriving (Generic, Show, Eq {- , Read -}) + deriving (Generic, Show, Eq, Read) instance Binary Component instance Structured Component diff --git a/Cabal-syntax/src/Distribution/Types/Executable.hs b/Cabal-syntax/src/Distribution/Types/Executable.hs index e3a1663efa6..8b140bf7f0b 100644 --- a/Cabal-syntax/src/Distribution/Types/Executable.hs +++ b/Cabal-syntax/src/Distribution/Types/Executable.hs @@ -19,6 +19,7 @@ import Distribution.Types.CondTree import Distribution.Types.ConfVar import Distribution.Types.Dependency import Distribution.Types.ExecutableScope +import Distribution.Types.Imports import Distribution.Types.UnqualComponentName import Distribution.Utils.Path @@ -26,15 +27,13 @@ import qualified Distribution.Types.BuildInfo.Lens as L data Executable = Executable { exeName :: UnqualComponentName - , exeImports :: [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] - -- ^ Retained condTree imports, not merged + , exeImports :: [ImportName] + -- ^ Retained for exact print , modulePath :: RelativePath Source File , exeScope :: ExecutableScope , buildInfo :: BuildInfo - -- ^ the BuildInfo defined locally, unmerged with imports } - -- TODO(leana8959): instances - deriving (Generic, Show {- Read, -}, Eq {- Ord, -}, Data) + deriving (Generic, Show, Read, Eq, Ord, Data) insertExeImports :: CondTree ConfVar [Dependency] (WithImports Executable) diff --git a/Cabal-syntax/src/Distribution/Types/ForeignLib.hs b/Cabal-syntax/src/Distribution/Types/ForeignLib.hs index dee4f614f41..5b48348fd2d 100644 --- a/Cabal-syntax/src/Distribution/Types/ForeignLib.hs +++ b/Cabal-syntax/src/Distribution/Types/ForeignLib.hs @@ -30,6 +30,7 @@ import Distribution.Types.ConfVar import Distribution.Types.Dependency import Distribution.Types.ForeignLibOption import Distribution.Types.ForeignLibType +import Distribution.Types.Imports import Distribution.Types.UnqualComponentName import Distribution.Utils.Path import Distribution.Version @@ -46,15 +47,15 @@ import qualified Distribution.Types.BuildInfo.Lens as L data ForeignLib = ForeignLib { foreignLibName :: UnqualComponentName -- ^ Name of the foreign library - , foreignLibImports :: [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] - -- ^ Retained condTree imports, not merged + , foreignLibImports :: [ImportName] + -- ^ Retained imports for exact printing , foreignLibType :: ForeignLibType -- ^ What kind of foreign library is this (static or dynamic). , foreignLibOptions :: [ForeignLibOption] -- ^ What options apply to this foreign library (e.g., are we -- merging in all foreign dependencies.) , foreignLibBuildInfo :: BuildInfo - -- ^ the BuildInfo for this foreign library. Defined locally, unmerged with imports + -- ^ Build information for this foreign library. , foreignLibVersionInfo :: Maybe LibVersionInfo -- ^ Libtool-style version-info data to compute library version. -- Refer to the libtool documentation on the @@ -67,7 +68,7 @@ data ForeignLib = ForeignLib -- This is a list rather than a maybe field so that we can flatten -- the condition trees (for instance, when creating an sdist) } - deriving (Generic, Show {- Read, -}, Eq {- Ord, -}, Data) + deriving (Generic, Show, Read, Eq, Ord, Data) data LibVersionInfo = LibVersionInfo Int Int Int deriving (Data, Eq, Generic) diff --git a/Cabal-syntax/src/Distribution/Types/Imports.hs b/Cabal-syntax/src/Distribution/Types/Imports.hs new file mode 100644 index 00000000000..a63020f02f8 --- /dev/null +++ b/Cabal-syntax/src/Distribution/Types/Imports.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE DeriveFunctor #-} + +module Distribution.Types.Imports where + +data WithImports a = WithImports + { getImportNames :: ![ImportName] + , unImportNames :: !a + } + deriving (Show, Functor) + +type ImportName = String + +mapImports :: ([ImportName] -> [ImportName]) -> WithImports a -> WithImports a +mapImports f (WithImports imports x) = WithImports (f imports) x + +noImports :: a -> WithImports a +noImports = WithImports mempty diff --git a/Cabal-syntax/src/Distribution/Types/Library.hs b/Cabal-syntax/src/Distribution/Types/Library.hs index 5ecd60ca718..83d1f69afe7 100644 --- a/Cabal-syntax/src/Distribution/Types/Library.hs +++ b/Cabal-syntax/src/Distribution/Types/Library.hs @@ -17,6 +17,7 @@ import Distribution.Types.BuildInfo import Distribution.Types.CondTree import Distribution.Types.ConfVar import Distribution.Types.Dependency +import Distribution.Types.Imports import Distribution.Types.LibraryName import Distribution.Types.LibraryVisibility import Distribution.Types.ModuleReexport @@ -25,8 +26,7 @@ import qualified Distribution.Types.BuildInfo.Lens as L data Library = Library { libName :: LibraryName - , libImports :: [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] - -- ^ Retained condTree imports, not merged + , libImports :: [ImportName] , exposedModules :: [ModuleName] , reexportedModules :: [ModuleReexport] , signatures :: [ModuleName] @@ -36,11 +36,8 @@ data Library = Library , libVisibility :: LibraryVisibility -- ^ Whether this multilib can be used as a dependency for other packages. , libBuildInfo :: BuildInfo - -- ^ the BuildInfo defined locally, unmerged with imports } - -- TODO(leana8959): fix these instances, condtree doesn't support them - -- best case we just ignore that field - deriving (Generic, Show, Eq {- Ord, Read, -}, Data) + deriving (Generic, Show, Eq, Ord, Read, Data) insertLibImports :: CondTree ConfVar [Dependency] (WithImports Library) diff --git a/Cabal-syntax/src/Distribution/Types/PackageDescription.hs b/Cabal-syntax/src/Distribution/Types/PackageDescription.hs index 5ffd93e7d13..4b00a8ef526 100644 --- a/Cabal-syntax/src/Distribution/Types/PackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/PackageDescription.hs @@ -151,7 +151,7 @@ data PackageDescription = PackageDescription , extraDocFiles :: [RelativePath Pkg File] , extraFiles :: [RelativePath Pkg File] } - deriving (Generic, Show {- Read, -}, Eq {- Ord, -}, Data) + deriving (Generic, Show, Read, Eq, Ord, Data) instance Binary PackageDescription instance Structured PackageDescription diff --git a/Cabal-syntax/src/Distribution/Types/TestSuite.hs b/Cabal-syntax/src/Distribution/Types/TestSuite.hs index 4f2ad19126e..3aae8bca5aa 100644 --- a/Cabal-syntax/src/Distribution/Types/TestSuite.hs +++ b/Cabal-syntax/src/Distribution/Types/TestSuite.hs @@ -13,9 +13,7 @@ import Distribution.Compat.Prelude import Prelude () import Distribution.Types.BuildInfo -import Distribution.Types.CondTree -import Distribution.Types.ConfVar -import Distribution.Types.Dependency +import Distribution.Types.Imports import Distribution.Types.TestSuiteInterface import Distribution.Types.TestType import Distribution.Types.UnqualComponentName @@ -27,13 +25,12 @@ import qualified Distribution.Types.BuildInfo.Lens as L -- | A \"test-suite\" stanza in a cabal file. data TestSuite = TestSuite { testName :: UnqualComponentName - , testSuiteImports :: [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] + , testSuiteImports :: [ImportName] , testInterface :: TestSuiteInterface , testBuildInfo :: BuildInfo , testCodeGenerators :: [String] } - -- TODO(leana8959): instances - deriving (Generic, Show {- Read, -}, Eq {- Ord, -}, Data) + deriving (Generic, Show, Read, Eq, Ord, Data) instance L.HasBuildInfo TestSuite where buildInfo f l = (\x -> l{testBuildInfo = x}) <$> f (testBuildInfo l) diff --git a/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs b/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs index 5c16fc3d7bb..47c51aab110 100644 --- a/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs @@ -7,17 +7,15 @@ import Distribution.Compat.Lens import Distribution.Compat.Prelude import Prelude () -import Distribution.Types.BuildInfo (BuildInfo, ImportName) -import Distribution.Types.CondTree -import Distribution.Types.ConfVar -import Distribution.Types.Dependency +import Distribution.Types.BuildInfo (BuildInfo) +import Distribution.Types.Imports (ImportName) import Distribution.Types.TestSuite (TestSuite) import Distribution.Types.TestSuiteInterface (TestSuiteInterface) import Distribution.Types.UnqualComponentName (UnqualComponentName) import qualified Distribution.Types.TestSuite as T -testSuiteImports :: Lens' TestSuite [(ImportName, CondTree ConfVar [Dependency] BuildInfo)] +testSuiteImports :: Lens' TestSuite [ImportName] testSuiteImports f s = fmap (\x -> s{T.testSuiteImports = x}) (f (T.testSuiteImports s)) {-# INLINE testSuiteImports #-} diff --git a/Cabal/src/Distribution/Types/LocalBuildConfig.hs b/Cabal/src/Distribution/Types/LocalBuildConfig.hs index 8af12d8f7d9..12648a8357b 100644 --- a/Cabal/src/Distribution/Types/LocalBuildConfig.hs +++ b/Cabal/src/Distribution/Types/LocalBuildConfig.hs @@ -84,7 +84,7 @@ data PackageBuildDescr = PackageBuildDescr -- Notably, this list must exclude indefinite libraries and instantiations -- because HPC does not support backpack (Nov. 2023). } - deriving (Generic {- Read, -}, Show) + deriving (Generic, Read, Show) -- | Information about individual components in a package, -- determined after the configure step. @@ -127,7 +127,7 @@ data LocalBuildDescr = LocalBuildDescr -- ^ Information about individual components in the package -- determined after the configure step. } - deriving (Generic {- Read, -}, Show) + deriving (Generic, Read, Show) -- | 'LocalBuildConfig' contains options that can be controlled -- by the user and serve as inputs to the configuration of a package. @@ -141,7 +141,7 @@ data LocalBuildConfig = LocalBuildConfig -- ^ Options to control the build, e.g. whether to -- enable profiling or to enable program coverage. } - deriving (Generic {- Read, -}, Show) + deriving (Generic, Read, Show) -- | 'BuildOptions' contains configuration options that can be controlled -- by the user. diff --git a/Cabal/src/Distribution/Types/LocalBuildInfo.hs b/Cabal/src/Distribution/Types/LocalBuildInfo.hs index 437030b1620..854f454dc87 100644 --- a/Cabal/src/Distribution/Types/LocalBuildInfo.hs +++ b/Cabal/src/Distribution/Types/LocalBuildInfo.hs @@ -143,7 +143,7 @@ data LocalBuildInfo = NewLocalBuildInfo -- ^ Information about a package configuration -- that can be modified by the user at configuration time. } - deriving (Generic {- Read, -}, Show) + deriving (Generic, Read, Show) {-# COMPLETE LocalBuildInfo #-} From a67fa767dccf40dce71b9573c458146a35f5cdab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 5 Nov 2025 15:24:52 +0800 Subject: [PATCH 15/60] stop merging --- .../Distribution/PackageDescription/Parsec.hs | 52 ++++++------------- 1 file changed, 16 insertions(+), 36 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index 7d7869dce36..28fe3bce4eb 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -495,15 +495,15 @@ parseCondTree v hasElif grammar commonStanzas fromBuildInfo cond = go where go :: [Field Position] -> ParseResult src (CondTree ConfVar [Dependency] (WithImports a)) go fields0 = do - (fields, imports, endo) <- + (fields, imports) <- if v >= CabalSpecV3_0 then processImports v fromBuildInfo commonStanzas fields0 - else traverse (warnImport v) fields0 >>= \fields1 -> return (catMaybes fields1, mempty, id) + else traverse (warnImport v) fields0 >>= \fields1 -> return (catMaybes fields1, mempty) let (fs, ss) = partitionFields fields x <- parseFieldGrammar v fs grammar branches <- concat <$> traverse parseIfs ss - return $ endo $ CondNode (WithImports imports x) (cond x) branches + return $ CondNode (WithImports imports x) (cond x) branches parseIfs :: [Section Position] -> ParseResult src [CondBranch ConfVar [Dependency] (WithImports a)] parseIfs [] = return [] @@ -647,12 +647,12 @@ parseCondTreeWithCommonStanzas -> [Field Position] -> ParseResult src (CondTree ConfVar [Dependency] (WithImports a)) parseCondTreeWithCommonStanzas v grammar fromBuildInfo commonStanzas fields = do - (fields', imports, endo) <- processImports v fromBuildInfo commonStanzas fields + (fields', imports) <- processImports v fromBuildInfo commonStanzas fields x <- parseCondTree v hasElif grammar commonStanzas fromBuildInfo (view L.targetBuildDepends) fields' -- TODO(leana8959): we replace this with the one from parseCondTree, because -- it is duplicated (if such imports should exist, that is >= cabal 3.0) -- However I'm so very unsure so let's do a concat and see what happens - return (prependImportsOnRoot imports $ endo x) + return (prependImportsOnRoot imports $ x) where hasElif = specHasElif v @@ -679,12 +679,7 @@ processImports -> Map String CondTreeBuildInfo -- ^ common stanzas -> [Field Position] - -> ParseResult - src - ( [Field Position] - , [ImportName] - , CondTree ConfVar [Dependency] (WithImports a) -> CondTree ConfVar [Dependency] (WithImports a) - ) + -> ParseResult src ([Field Position], [ImportName]) processImports v fromBuildInfo commonStanzas = go [] where hasCommonStanzas = specHasCommonStanzas v @@ -693,14 +688,9 @@ processImports v fromBuildInfo commonStanzas = go [] getList' = Newtype.unpack go - :: [(ImportName, CondTree ConfVar [Dependency] (WithImports BuildInfo))] + :: [ImportName] -> [Field Position] - -> ParseResult - src - ( [Field Position] - , [ImportName] - , CondTree ConfVar [Dependency] (WithImports a) -> CondTree ConfVar [Dependency] (WithImports a) - ) + -> ParseResult src ([Field Position], [ImportName]) go acc (Field (Name pos name) _ : fields) | name == "import" , hasCommonStanzas == NoCommonStanzas = do @@ -709,30 +699,20 @@ processImports v fromBuildInfo commonStanzas = go [] -- supported: go acc (Field (Name pos name) fls : fields) | name == "import" = do names <- getList' <$> runFieldParser pos parsec v fls - namedTrees <- for names $ \commonName -> - -- TODO(leana8959): commonStanzas map has no imports names, they are already fused. - -- change this map everywhere - case Map.lookup commonName commonStanzas of - Nothing -> do + validNames <- for names $ \commonName -> + -- Common Stanza sections are already parsed as 'BuildInfo's with import names inserted + if Map.member commonName commonStanzas + then pure (Just commonName) + else do parseFailure pos $ "Undefined common stanza imported: " ++ commonName pure Nothing - Just commonTree -> - pure (Just (commonName, mapTreeData noImports commonTree)) - go (acc ++ catMaybes namedTrees) fields + go (acc ++ catMaybes validNames) fields -- parse actual CondTree - go acc fields = do + go names fields = do fields' <- catMaybes <$> traverse (warnImport v) fields - let - importNames :: [ImportName] - importTrees :: [CondTree ConfVar [Dependency] (WithImports BuildInfo)] - (importNames, importTrees) = unzip acc - pure - ( fields' - , importNames - , \x -> foldr (mergeCommonStanza fromBuildInfo) x importTrees - ) + pure (fields', reverse names) -- | Warn on "import" fields, also map to Maybe, so erroneous fields can be filtered warnImport :: CabalSpecVersion -> Field Position -> ParseResult src (Maybe (Field Position)) From 89c1b324d58d43578e3e66cfe2ad2757162f18a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 5 Nov 2025 20:13:49 +0800 Subject: [PATCH 16/60] retain common stanza in GenericPackageDescription --- .../PackageDescription/Configuration.hs | 5 +- .../Distribution/PackageDescription/Parsec.hs | 33 ++----- .../PackageDescription/PrettyPrint.hs | 5 +- .../Types/GenericPackageDescription.hs | 90 ++++++++++++++++++- .../Types/GenericPackageDescription/Lens.hs | 12 ++- .../Distribution/PackageDescription/Check.hs | 4 +- 6 files changed, 115 insertions(+), 34 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs index d23ac5cbf51..63635538caa 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs @@ -458,7 +458,8 @@ finalizePD (Platform arch os) impl constraints - (GenericPackageDescription pkg _ver flags mb_lib0 sub_libs0 flibs0 exes0 tests0 bms0) = do + -- TODO(leana8959): we maybe want to resolve the imports here ? + (GenericPackageDescription pkg _ver flags _commonStanzas mb_lib0 sub_libs0 flibs0 exes0 tests0 bms0) = do (targetSet, flagVals) <- resolveWithFlags flagChoices enabled os arch impl constraints condTrees check let @@ -542,7 +543,7 @@ resolveWithFlags [] Distribution.System.Linux Distribution.System.I386 (Distribu -- function. flattenPackageDescription :: GenericPackageDescription -> PackageDescription flattenPackageDescription - (GenericPackageDescription pkg _ _ mlib0 sub_libs0 flibs0 exes0 tests0 bms0) = + (GenericPackageDescription pkg _ _ _commonStanzas mlib0 sub_libs0 flibs0 exes0 tests0 bms0) = pkg { library = mlib , subLibraries = reverse sub_libs diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index 28fe3bce4eb..858920ccbf2 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -33,7 +33,7 @@ module Distribution.PackageDescription.Parsec import Distribution.Compat.Prelude import Prelude () -import Control.Monad.State.Strict (StateT, execStateT) +import Control.Monad.State.Strict (StateT, execStateT, modify) import Control.Monad.Trans.Class (lift) import Distribution.CabalSpecVersion import Distribution.Compat.Lens @@ -241,9 +241,15 @@ parseGenericPackageDescription' scannedVer lexWarnings utf8WarnPos fs = do cabalFormatVersionsDesc :: String cabalFormatVersionsDesc = "Current cabal-version values are listed at https://cabal.readthedocs.io/en/stable/file-format-changelog.html." -goSections :: CabalSpecVersion -> [Field Position] -> SectionParser src () -goSections specVer = traverse_ process +goSections :: forall src. CabalSpecVersion -> [Field Position] -> SectionParser src () +goSections specVer fields = do + traverse_ process fields + + -- Retain commen stanzas after parsing sections + commonStanzas <- use stateCommonStanzas + (stateGpd . L.gpdCommonStanzas) .= commonStanzas where + process :: Field Position -> SectionParser src () process (Field (Name pos name) _) = lift $ parseWarning pos PWTTrailingFields $ @@ -723,27 +729,6 @@ warnImport v (Field (Name pos name) _) | name == "import" = do return Nothing warnImport _ f = pure (Just f) -mergeCommonStanza - :: forall a - . L.HasBuildInfo a - => (BuildInfo -> a) - -> CondTree ConfVar [Dependency] (WithImports BuildInfo) - -> CondTree ConfVar [Dependency] (WithImports a) - -> CondTree ConfVar [Dependency] (WithImports a) -mergeCommonStanza fromBuildInfo (CondNode bi _ bis) (CondNode x _ cs) = - CondNode x' (unImportNames x' ^. L.targetBuildDepends) cs' - where - -- new value is old value with buildInfo field _prepended_. - x' :: WithImports a - x' = - WithImports - (getImportNames bi <> getImportNames x) - (unImportNames x & L.buildInfo %~ (unImportNames bi <>)) - - -- tree components are appended together. - cs' :: [CondBranch ConfVar [Dependency] (WithImports a)] - cs' = map (fmap fromBuildInfo <$>) bis ++ cs - ------------------------------------------------------------------------------- -- Branches ------------------------------------------------------------------------------- diff --git a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs index 9d3072719f4..27afe3f82a0 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs @@ -227,11 +227,12 @@ showPackageDescription = showGenericPackageDescription . pdToGpd pdToGpd :: PackageDescription -> GenericPackageDescription pdToGpd pd = - GenericPackageDescription + emptyGenericPackageDescription { packageDescription = pd , gpdScannedVersion = Nothing , genPackageFlags = [] - , condLibrary = mkCondTree <$> library pd + -- TODO(leana8959): what to do here + , _condLibrary = mkCondTree <$> library pd , condSubLibraries = mkCondTreeL <$> subLibraries pd , condForeignLibs = mkCondTree' foreignLibName <$> foreignLibs pd , condExecutables = mkCondTree' exeName <$> executables pd diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index 97f4ed8cccb..1d167e35cc0 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -6,6 +6,8 @@ module Distribution.Types.GenericPackageDescription ( GenericPackageDescription (..) , emptyGenericPackageDescription + + , condLibrary ) where import Distribution.Compat.Prelude @@ -18,6 +20,11 @@ import qualified Distribution.Types.BuildInfo.Lens as L import Distribution.Types.PackageDescription import Distribution.Package +import Distribution.Types.Imports +import Distribution.Types.Library +import Distribution.Types.LibraryName +import Distribution.Types.LibraryVisibility +import Distribution.Types.BuildInfo import Distribution.Types.Benchmark import Distribution.Types.CondTree import Distribution.Types.ConfVar @@ -29,6 +36,8 @@ import Distribution.Types.TestSuite import Distribution.Types.UnqualComponentName import Distribution.Version +import qualified Data.Map as Map + -- --------------------------------------------------------------------------- -- The 'GenericPackageDescription' type @@ -44,7 +53,9 @@ data GenericPackageDescription = GenericPackageDescription -- Perfectly, PackageIndex should have sum type, so we don't need to -- have dummy GPDs. , genPackageFlags :: [PackageFlag] - , condLibrary :: Maybe (CondTree ConfVar [Dependency] Library) + , gpdCommonStanzas :: Map ImportName (CondTree ConfVar [Dependency] BuildInfo) + , -- The following fields only contains defined in place configuration, the imports merging is deferred + _condLibrary :: Maybe (CondTree ConfVar [Dependency] Library) , condSubLibraries :: [ ( UnqualComponentName , CondTree ConfVar [Dependency] Library @@ -73,6 +84,66 @@ data GenericPackageDescription = GenericPackageDescription } deriving (Show, Eq, Data, Generic) +mergeCommonStanza + :: forall a + . L.HasBuildInfo a + => (BuildInfo -> a) + -> CondTree ConfVar [Dependency] BuildInfo + -> CondTree ConfVar [Dependency] a + -> CondTree ConfVar [Dependency] a +mergeCommonStanza fromBuildInfo (CondNode bi _ bis) (CondNode x _ cs) = + CondNode x' (x' ^. L.targetBuildDepends) cs' + where + -- new value is old value with buildInfo field _prepended_. + x' :: a + x' = x & L.buildInfo %~ (bi <>) + + -- tree components are appended together. + cs' :: [CondBranch ConfVar [Dependency] a] + cs' = map (fromBuildInfo <$>) bis ++ cs + +libraryFromBuildInfo :: LibraryName -> BuildInfo -> Library +libraryFromBuildInfo n bi = + emptyLibrary + { libName = n + , libVisibility = case n of + LMainLibName -> LibraryVisibilityPublic + LSubLibName _ -> LibraryVisibilityPrivate + , libBuildInfo = bi + } + +condLibrary :: GenericPackageDescription -> Maybe (CondTree ConfVar [Dependency] Library) +condLibrary gpd = fmap go $ _condLibrary gpd + where + go :: CondTree ConfVar [Dependency] Library -> CondTree ConfVar [Dependency] Library + go libTree = + let rootLib :: Library + rootLib = condTreeData libTree + + commonTrees :: [CondTree ConfVar [Dependency] BuildInfo] + commonTrees = + map + (fromMaybe (error "failed to merge imports, did you mess with GenericPackageDescription?") + . flip Map.lookup (gpdCommonStanzas gpd)) + (libImports rootLib) + + fromBuildInfo :: BuildInfo -> Library + fromBuildInfo = libraryFromBuildInfo (libName rootLib) + + -- TODO(leana8959): figure out merge direction + in foldr (mergeCommonStanza fromBuildInfo) libTree commonTrees + +-- condSubLibraries :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)] +-- condSubLibraries = () +-- condForeignLibs :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)] +-- condForeignLibs = () +-- condExecutables :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] Executable)] +-- condExecutables = () +-- condTestSuites :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)] +-- condTestSuites = () +-- condBenchmarks :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)] +-- condBenchmarks = () + instance Package GenericPackageDescription where packageId = packageId . packageDescription @@ -81,17 +152,30 @@ instance Structured GenericPackageDescription instance NFData GenericPackageDescription where rnf = genericRnf emptyGenericPackageDescription :: GenericPackageDescription -emptyGenericPackageDescription = GenericPackageDescription emptyPackageDescription Nothing [] Nothing [] [] [] [] [] +emptyGenericPackageDescription = + GenericPackageDescription + { packageDescription = emptyPackageDescription + , gpdScannedVersion = Nothing + , genPackageFlags = [] + , gpdCommonStanzas = mempty + , _condLibrary = Nothing + , condSubLibraries = [] + , condForeignLibs = [] + , condExecutables = [] + , condTestSuites = [] + , condBenchmarks = [] + } -- ----------------------------------------------------------------------------- -- Traversal Instances instance L.HasBuildInfos GenericPackageDescription where - traverseBuildInfos f (GenericPackageDescription p v a1 x1 x2 x3 x4 x5 x6) = + traverseBuildInfos f (GenericPackageDescription p v a1 commonStanzas x1 x2 x3 x4 x5 x6) = GenericPackageDescription <$> L.traverseBuildInfos f p <*> pure v <*> pure a1 + <*> (traverse . traverseCondTreeBuildInfo) f commonStanzas <*> (traverse . traverseCondTreeBuildInfo) f x1 <*> (traverse . L._2 . traverseCondTreeBuildInfo) f x2 <*> (traverse . L._2 . traverseCondTreeBuildInfo) f x3 diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs index 213c97128f9..493a0a96700 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs @@ -19,7 +19,9 @@ import qualified Distribution.Types.GenericPackageDescription as T import Distribution.Compiler (CompilerFlavor) import Distribution.System (Arch, OS) +import Distribution.Types.Imports (ImportName) import Distribution.Types.Benchmark (Benchmark) +import Distribution.Types.BuildInfo (BuildInfo) import Distribution.Types.CondTree (CondTree) import Distribution.Types.ConfVar (ConfVar (..)) import Distribution.Types.Dependency (Dependency) @@ -49,8 +51,13 @@ genPackageFlags :: Lens' GenericPackageDescription [PackageFlag] genPackageFlags f s = fmap (\x -> s{T.genPackageFlags = x}) (f (T.genPackageFlags s)) {-# INLINE genPackageFlags #-} +gpdCommonStanzas :: Lens' GenericPackageDescription (Map ImportName (CondTree ConfVar [Dependency] BuildInfo)) +gpdCommonStanzas f s = fmap (\x -> s{T.gpdCommonStanzas = x}) (f (T.gpdCommonStanzas s)) +{-# INLINE gpdCommonStanzas #-} + +-- TODO(leana8959): how to deal with this condLibrary :: Lens' GenericPackageDescription (Maybe (CondTree ConfVar [Dependency] Library)) -condLibrary f s = fmap (\x -> s{T.condLibrary = x}) (f (T.condLibrary s)) +condLibrary f s = fmap (\x -> s{T._condLibrary = x}) (f (T._condLibrary s)) {-# INLINE condLibrary #-} condSubLibraries :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] Library))] @@ -81,11 +88,12 @@ allCondTrees ) -> GenericPackageDescription -> f GenericPackageDescription -allCondTrees f (GenericPackageDescription p v a1 x1 x2 x3 x4 x5 x6) = +allCondTrees f (GenericPackageDescription p v a1 commonStanzas x1 x2 x3 x4 x5 x6) = GenericPackageDescription <$> pure p <*> pure v <*> pure a1 + <*> traverse f commonStanzas <*> traverse f x1 <*> (traverse . _2) f x2 <*> (traverse . _2) f x3 diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs index 0593ce8d905..952f28a2584 100644 --- a/Cabal/src/Distribution/PackageDescription/Check.hs +++ b/Cabal/src/Distribution/PackageDescription/Check.hs @@ -226,6 +226,7 @@ checkGenericPackageDescription packageDescription_ _gpdScannedVersion_ genPackageFlags_ + _gpdCommonStanzas condLibrary_ condSubLibraries_ condForeignLibs_ @@ -958,7 +959,8 @@ pd2gpd pd = gpd gpd = emptyGenericPackageDescription { packageDescription = pd - , condLibrary = fmap t2c (library pd) + -- TODO(leana8959): think about reverse conversion + , _condLibrary = fmap t2c (library pd) , condSubLibraries = map (t2cName ln id) (subLibraries pd) , condForeignLibs = map From 0b61013d21eeb2341100c7e369ad2513f2bcb9e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 6 Nov 2025 10:58:30 +0800 Subject: [PATCH 17/60] experiment: use WithImport in gpd --- Cabal-syntax/Cabal-syntax.cabal | 1 + .../PackageDescription/Configuration.hs | 10 +- .../PackageDescription/FieldGrammar.hs | 2 +- .../Distribution/PackageDescription/Parsec.hs | 5 +- .../PackageDescription/PrettyPrint.hs | 5 +- .../Types/GenericPackageDescription.hs | 102 +++++++++--------- .../Types/GenericPackageDescription/Lens.hs | 5 +- .../src/Distribution/Types/Imports.hs | 11 +- .../src/Distribution/Types/Imports/Lens.hs | 25 +++++ .../src/Distribution/Types/Library.hs | 16 --- .../src/Data/TreeDiff/Instances/Cabal.hs | 2 + .../Distribution/PackageDescription/Check.hs | 11 +- .../PackageDescription/Check/Conditional.hs | 4 +- .../PackageDescription/Check/Target.hs | 1 - Cabal/src/Distribution/Simple/Build.hs | 1 - 15 files changed, 115 insertions(+), 86 deletions(-) create mode 100644 Cabal-syntax/src/Distribution/Types/Imports/Lens.hs diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal index de3d2adcde0..1095fadedba 100644 --- a/Cabal-syntax/Cabal-syntax.cabal +++ b/Cabal-syntax/Cabal-syntax.cabal @@ -161,6 +161,7 @@ library Distribution.Types.LibraryName Distribution.Types.LibraryVisibility Distribution.Types.Imports + Distribution.Types.Imports.Lens Distribution.Types.MissingDependency Distribution.Types.MissingDependencyReason Distribution.Types.Mixin diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs index 63635538caa..ccf4b68befc 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs @@ -54,6 +54,7 @@ import Distribution.Parsec import Distribution.Pretty import Distribution.System import Distribution.Types.Component +import Distribution.Types.Imports import Distribution.Types.ComponentRequestedSpec import Distribution.Types.DependencyMap import Distribution.Types.DependencySatisfaction (DependencySatisfaction (..)) @@ -319,7 +320,8 @@ extractConditions -> [Condition ConfVar] extractConditions f gpkg = concat - [ extractCondition (f . libBuildInfo) <$> maybeToList (condLibrary gpkg) + -- TODO(leana8959): merge this and not just drop the imports + [ extractCondition (f . libBuildInfo) <$> maybeToList (mapTreeData unImportNames <$> condLibrary gpkg) , extractCondition (f . libBuildInfo) . snd <$> condSubLibraries gpkg , extractCondition (f . buildInfo) . snd <$> condExecutables gpkg , extractCondition (f . testBuildInfo) . snd <$> condTestSuites gpkg @@ -494,7 +496,8 @@ finalizePD where -- Combine lib, exes, and tests into one list of @CondTree@s with tagged data condTrees = - maybeToList (fmap (mapTreeData Lib) mb_lib0) + -- TODO(leana8959): handle imports + maybeToList (fmap (mapTreeData $ Lib . unImportNames) mb_lib0) ++ map (\(name, tree) -> mapTreeData (SubComp name . CLib) tree) sub_libs0 ++ map (\(name, tree) -> mapTreeData (SubComp name . CFLib) tree) flibs0 ++ map (\(name, tree) -> mapTreeData (SubComp name . CExe) tree) exes0 @@ -553,7 +556,8 @@ flattenPackageDescription , benchmarks = reverse bms } where - mlib = f <$> mlib0 + -- TODO(leana8959): handle imports + mlib = f . mapTreeData unImportNames <$> mlib0 where f lib = (libFillInDefaults . fst . ignoreConditions $ lib){libName = LMainLibName} sub_libs = flattenLib <$> sub_libs0 diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index ee93894947e..34a555a1129 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -192,7 +192,7 @@ libraryFieldGrammar => LibraryName -> g Library Library libraryFieldGrammar n = - Library n [] {- imports are later filled in -} + Library n <$> monoidalFieldAla "exposed-modules" formatExposedModules L.exposedModules <*> monoidalFieldAla "reexported-modules" (alaList CommaVCat) L.reexportedModules <*> monoidalFieldAla "signatures" (alaList' VCat MQuoted) L.signatures diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index 858920ccbf2..0dc828cb39b 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -300,10 +300,9 @@ goSections specVer fields = do commonStanzas <- use stateCommonStanzas let name' = LMainLibName lib <- lift $ parseCondTree' (libraryFieldGrammar name') (libraryFromBuildInfo name') commonStanzas fields - let lib' = insertLibImports lib -- -- TODO check that not set - stateGpd . L.condLibrary ?= lib' + stateGpd . L.condLibrary ?= lib -- Sublibraries -- TODO: check cabal-version @@ -312,7 +311,7 @@ goSections specVer fields = do name' <- parseUnqualComponentName pos args let name'' = LSubLibName name' lib <- lift $ parseCondTree' (libraryFieldGrammar name'') (libraryFromBuildInfo name'') commonStanzas fields - let lib' = insertLibImports lib + let lib' = mapTreeData unImportNames lib -- TODO check duplicate name here? stateGpd . L.condSubLibraries %= snoc (name', lib') diff --git a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs index 27afe3f82a0..16fbfce41e9 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs @@ -54,6 +54,7 @@ import Distribution.Pretty import Distribution.Utils.Generic (writeFileAtomic, writeUTF8File) import qualified Distribution.PackageDescription.FieldGrammar as FG +import Distribution.Types.Imports import qualified Distribution.Types.BuildInfo.Lens as L import qualified Distribution.Types.SetupBuildInfo.Lens as L @@ -79,7 +80,7 @@ ppGenericPackageDescription v gpd0 = [ ppPackageDescription v (packageDescription gpd) , ppSetupBInfo v (setupBuildInfo (packageDescription gpd)) , ppGenPackageFlags v (genPackageFlags gpd) - , ppCondLibrary v (condLibrary gpd) + , ppCondLibrary v (mapTreeData unImportNames <$> condLibrary gpd) , ppCondSubLibraries v (condSubLibraries gpd) , ppCondForeignLibs v (condForeignLibs gpd) , ppCondExecutables v (condExecutables gpd) @@ -232,7 +233,7 @@ pdToGpd pd = , gpdScannedVersion = Nothing , genPackageFlags = [] -- TODO(leana8959): what to do here - , _condLibrary = mkCondTree <$> library pd + , condLibrary = mapTreeData noImports . mkCondTree <$> library pd , condSubLibraries = mkCondTreeL <$> subLibraries pd , condForeignLibs = mkCondTree' foreignLibName <$> foreignLibs pd , condExecutables = mkCondTree' exeName <$> executables pd diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index 1d167e35cc0..e6b5580050a 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -16,6 +16,7 @@ import Prelude () -- lens import Distribution.Compat.Lens as L import qualified Distribution.Types.BuildInfo.Lens as L +import qualified Distribution.Types.Imports.Lens as L import Distribution.Types.PackageDescription @@ -54,8 +55,7 @@ data GenericPackageDescription = GenericPackageDescription -- have dummy GPDs. , genPackageFlags :: [PackageFlag] , gpdCommonStanzas :: Map ImportName (CondTree ConfVar [Dependency] BuildInfo) - , -- The following fields only contains defined in place configuration, the imports merging is deferred - _condLibrary :: Maybe (CondTree ConfVar [Dependency] Library) + , condLibrary :: Maybe (CondTree ConfVar [Dependency] (WithImports Library)) , condSubLibraries :: [ ( UnqualComponentName , CondTree ConfVar [Dependency] Library @@ -84,54 +84,54 @@ data GenericPackageDescription = GenericPackageDescription } deriving (Show, Eq, Data, Generic) -mergeCommonStanza - :: forall a - . L.HasBuildInfo a - => (BuildInfo -> a) - -> CondTree ConfVar [Dependency] BuildInfo - -> CondTree ConfVar [Dependency] a - -> CondTree ConfVar [Dependency] a -mergeCommonStanza fromBuildInfo (CondNode bi _ bis) (CondNode x _ cs) = - CondNode x' (x' ^. L.targetBuildDepends) cs' - where - -- new value is old value with buildInfo field _prepended_. - x' :: a - x' = x & L.buildInfo %~ (bi <>) - - -- tree components are appended together. - cs' :: [CondBranch ConfVar [Dependency] a] - cs' = map (fromBuildInfo <$>) bis ++ cs - -libraryFromBuildInfo :: LibraryName -> BuildInfo -> Library -libraryFromBuildInfo n bi = - emptyLibrary - { libName = n - , libVisibility = case n of - LMainLibName -> LibraryVisibilityPublic - LSubLibName _ -> LibraryVisibilityPrivate - , libBuildInfo = bi - } - -condLibrary :: GenericPackageDescription -> Maybe (CondTree ConfVar [Dependency] Library) -condLibrary gpd = fmap go $ _condLibrary gpd - where - go :: CondTree ConfVar [Dependency] Library -> CondTree ConfVar [Dependency] Library - go libTree = - let rootLib :: Library - rootLib = condTreeData libTree - - commonTrees :: [CondTree ConfVar [Dependency] BuildInfo] - commonTrees = - map - (fromMaybe (error "failed to merge imports, did you mess with GenericPackageDescription?") - . flip Map.lookup (gpdCommonStanzas gpd)) - (libImports rootLib) - - fromBuildInfo :: BuildInfo -> Library - fromBuildInfo = libraryFromBuildInfo (libName rootLib) - - -- TODO(leana8959): figure out merge direction - in foldr (mergeCommonStanza fromBuildInfo) libTree commonTrees +-- mergeCommonStanza +-- :: forall a +-- . L.HasBuildInfo a +-- => (BuildInfo -> a) +-- -> CondTree ConfVar [Dependency] BuildInfo +-- -> CondTree ConfVar [Dependency] a +-- -> CondTree ConfVar [Dependency] a +-- mergeCommonStanza fromBuildInfo (CondNode bi _ bis) (CondNode x _ cs) = +-- CondNode x' (x' ^. L.targetBuildDepends) cs' +-- where +-- -- new value is old value with buildInfo field _prepended_. +-- x' :: a +-- x' = x & L.buildInfo %~ (bi <>) +-- +-- -- tree components are appended together. +-- cs' :: [CondBranch ConfVar [Dependency] a] +-- cs' = map (fromBuildInfo <$>) bis ++ cs +-- +-- libraryFromBuildInfo :: LibraryName -> BuildInfo -> Library +-- libraryFromBuildInfo n bi = +-- emptyLibrary +-- { libName = n +-- , libVisibility = case n of +-- LMainLibName -> LibraryVisibilityPublic +-- LSubLibName _ -> LibraryVisibilityPrivate +-- , libBuildInfo = bi +-- } +-- +-- condLibrary :: GenericPackageDescription -> Maybe (CondTree ConfVar [Dependency] Library) +-- condLibrary gpd = fmap go $ condLibrary gpd +-- where +-- go :: CondTree ConfVar [Dependency] Library -> CondTree ConfVar [Dependency] Library +-- go libTree = +-- let rootLib :: Library +-- rootLib = condTreeData libTree +-- +-- commonTrees :: [CondTree ConfVar [Dependency] BuildInfo] +-- commonTrees = +-- map +-- (fromMaybe (error "failed to merge imports, did you mess with GenericPackageDescription?") +-- . flip Map.lookup (gpdCommonStanzas gpd)) +-- (libImports rootLib) +-- +-- fromBuildInfo :: BuildInfo -> Library +-- fromBuildInfo = libraryFromBuildInfo (libName rootLib) +-- +-- -- TODO(leana8959): figure out merge direction +-- in foldr (mergeCommonStanza fromBuildInfo) libTree commonTrees -- condSubLibraries :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)] -- condSubLibraries = () @@ -158,7 +158,7 @@ emptyGenericPackageDescription = , gpdScannedVersion = Nothing , genPackageFlags = [] , gpdCommonStanzas = mempty - , _condLibrary = Nothing + , condLibrary = Nothing , condSubLibraries = [] , condForeignLibs = [] , condExecutables = [] diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs index 493a0a96700..7f82b51fe7b 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs @@ -13,6 +13,7 @@ import Distribution.Compat.Prelude import Prelude () import qualified Distribution.Types.GenericPackageDescription as T +import qualified Distribution.Types.Imports as T -- We import types from their packages, so we can remove unused imports -- and have wider inter-module dependency graph @@ -56,8 +57,8 @@ gpdCommonStanzas f s = fmap (\x -> s{T.gpdCommonStanzas = x}) (f (T.gpdCommonSta {-# INLINE gpdCommonStanzas #-} -- TODO(leana8959): how to deal with this -condLibrary :: Lens' GenericPackageDescription (Maybe (CondTree ConfVar [Dependency] Library)) -condLibrary f s = fmap (\x -> s{T._condLibrary = x}) (f (T._condLibrary s)) +condLibrary :: Lens' GenericPackageDescription (Maybe (CondTree ConfVar [Dependency] (T.WithImports Library))) +condLibrary f s = fmap (\x -> s{T.condLibrary = x}) (f (T.condLibrary s)) {-# INLINE condLibrary #-} condSubLibraries :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] Library))] diff --git a/Cabal-syntax/src/Distribution/Types/Imports.hs b/Cabal-syntax/src/Distribution/Types/Imports.hs index a63020f02f8..c13705f6496 100644 --- a/Cabal-syntax/src/Distribution/Types/Imports.hs +++ b/Cabal-syntax/src/Distribution/Types/Imports.hs @@ -1,12 +1,21 @@ {-# LANGUAGE DeriveFunctor #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE DeriveDataTypeable #-} module Distribution.Types.Imports where +import Distribution.Compat.Lens +import Distribution.Compat.Prelude + data WithImports a = WithImports { getImportNames :: ![ImportName] , unImportNames :: !a } - deriving (Show, Functor) + deriving (Show, Functor, Eq, Ord, Read, Data, Generic) + +instance Binary a => Binary (WithImports a) +instance Structured a => Structured (WithImports a) +instance NFData a => NFData (WithImports a) where rnf = genericRnf type ImportName = String diff --git a/Cabal-syntax/src/Distribution/Types/Imports/Lens.hs b/Cabal-syntax/src/Distribution/Types/Imports/Lens.hs new file mode 100644 index 00000000000..2d669e059d6 --- /dev/null +++ b/Cabal-syntax/src/Distribution/Types/Imports/Lens.hs @@ -0,0 +1,25 @@ +{-# LANGUAGE DeriveFunctor #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE DeriveDataTypeable #-} + +module Distribution.Types.Imports.Lens where + +import Distribution.Compat.Lens +import Distribution.Compat.Prelude + +import qualified Distribution.Types.Imports as T +import qualified Distribution.Types.BuildInfo as T + +import qualified Distribution.Types.BuildInfo.Lens as L + +getImportNames :: Lens (T.WithImports a) (T.WithImports b) a b +getImportNames f (T.WithImports is x) = fmap (\y -> T.WithImports is y) (f x) +{-# INLINE getImportNames #-} + +unImportNames :: Lens' (T.WithImports a) [T.ImportName] +unImportNames f (T.WithImports is x) = fmap (\is' -> T.WithImports is' x) (f is) +{-# INLINE unImportNames #-} + + +instance L.HasBuildInfo a => L.HasBuildInfo (T.WithImports a) where + buildInfo f (T.WithImports is x) = T.WithImports is <$> L.buildInfo f x diff --git a/Cabal-syntax/src/Distribution/Types/Library.hs b/Cabal-syntax/src/Distribution/Types/Library.hs index 83d1f69afe7..fd4b89b6a6a 100644 --- a/Cabal-syntax/src/Distribution/Types/Library.hs +++ b/Cabal-syntax/src/Distribution/Types/Library.hs @@ -6,7 +6,6 @@ module Distribution.Types.Library , emptyLibrary , explicitLibModules , libModulesAutogen - , insertLibImports ) where import Distribution.Compat.Prelude @@ -14,10 +13,6 @@ import Prelude () import Distribution.ModuleName import Distribution.Types.BuildInfo -import Distribution.Types.CondTree -import Distribution.Types.ConfVar -import Distribution.Types.Dependency -import Distribution.Types.Imports import Distribution.Types.LibraryName import Distribution.Types.LibraryVisibility import Distribution.Types.ModuleReexport @@ -26,7 +21,6 @@ import qualified Distribution.Types.BuildInfo.Lens as L data Library = Library { libName :: LibraryName - , libImports :: [ImportName] , exposedModules :: [ModuleName] , reexportedModules :: [ModuleReexport] , signatures :: [ModuleName] @@ -39,14 +33,6 @@ data Library = Library } deriving (Generic, Show, Eq, Ord, Read, Data) -insertLibImports - :: CondTree ConfVar [Dependency] (WithImports Library) - -> CondTree ConfVar [Dependency] Library -insertLibImports = mapCondTree f id id - where - f :: WithImports Library -> Library - f (WithImports importNames lib) = lib{libImports = importNames} - instance L.HasBuildInfo Library where buildInfo f l = (\x -> l{libBuildInfo = x}) <$> f (libBuildInfo l) @@ -58,7 +44,6 @@ emptyLibrary :: Library emptyLibrary = Library { libName = LMainLibName - , libImports = mempty , exposedModules = mempty , reexportedModules = mempty , signatures = mempty @@ -82,7 +67,6 @@ instance Semigroup Library where a <> b = Library { libName = combineLibraryName (libName a) (libName b) - , libImports = combine libImports , exposedModules = combine exposedModules , reexportedModules = combine reexportedModules , signatures = combine signatures diff --git a/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs b/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs index f7e7ca5b7b6..0bd75b7a3f5 100644 --- a/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs +++ b/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs @@ -26,6 +26,7 @@ import Distribution.Types.ComponentId (ComponentId) import Distribution.Types.DumpBuildInfo (DumpBuildInfo) import Distribution.Types.PackageVersionConstraint import Distribution.Types.UnitId (DefUnitId, UnitId) +import Distribution.Types.Imports import Distribution.Utils.NubList (NubList) import Distribution.Utils.Path (SymbolicPathX) import Distribution.Utils.ShortText (ShortText, fromShortText) @@ -55,6 +56,7 @@ instance ToExpr Dependency where instance ToExpr (SymbolicPathX allowAbs from to) instance ToExpr a => ToExpr (InstallDirs a) +instance ToExpr a => ToExpr (WithImports a) instance ToExpr AbiDependency instance ToExpr AbiHash diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs index 952f28a2584..2fb0443dba9 100644 --- a/Cabal/src/Distribution/PackageDescription/Check.hs +++ b/Cabal/src/Distribution/PackageDescription/Check.hs @@ -86,6 +86,7 @@ import qualified Data.Set as Set import qualified Distribution.Utils.ShortText as ShortText import qualified Distribution.Types.GenericPackageDescription.Lens as L +import Distribution.Types.Imports import Control.Monad @@ -239,7 +240,8 @@ checkGenericPackageDescription checkPackageDescription packageDescription_ -- Targets should be present... let condAllLibraries = - maybeToList condLibrary_ + -- TODO(leana8959): + maybeToList (mapTreeData unImportNames <$> condLibrary_) ++ (map snd condSubLibraries_) checkP ( and @@ -294,7 +296,8 @@ checkGenericPackageDescription . ccNames ) let ads = - maybe [] ((: []) . extractAssocDeps pName) condLibrary_ + -- TODO(leana8959): + maybe [] ((: []) . extractAssocDeps pName . mapTreeData unImportNames) condLibrary_ ++ map (uncurry extractAssocDeps) condSubLibraries_ case condLibrary_ of @@ -303,7 +306,7 @@ checkGenericPackageDescription genPackageFlags_ (checkLibrary False ads) (const id) - (mempty, cl) + (mempty, mapTreeData unImportNames cl) Nothing -> return () mapM_ ( checkCondTarget @@ -960,7 +963,7 @@ pd2gpd pd = gpd emptyGenericPackageDescription { packageDescription = pd -- TODO(leana8959): think about reverse conversion - , _condLibrary = fmap t2c (library pd) + , condLibrary = t2c . noImports <$> (library pd) , condSubLibraries = map (t2cName ln id) (subLibraries pd) , condForeignLibs = map diff --git a/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs b/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs index 44964272065..040f529fb54 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs @@ -26,6 +26,7 @@ import Distribution.Package import Distribution.PackageDescription import Distribution.PackageDescription.Check.Monad import Distribution.System +import Distribution.Types.Imports import qualified Data.Map as Map @@ -228,7 +229,8 @@ checkCondVars cond = -- this particular check. checkDuplicateModules :: GenericPackageDescription -> [PackageCheck] checkDuplicateModules pkg = - concatMap checkLib (maybe id (:) (condLibrary pkg) . map snd $ condSubLibraries pkg) + -- TODO(leana8959): + concatMap checkLib (maybe id (:) (mapTreeData unImportNames <$> condLibrary pkg) . map snd $ condSubLibraries pkg) ++ concatMap checkExe (map snd $ condExecutables pkg) ++ concatMap checkTest (map snd $ condTestSuites pkg) ++ concatMap checkBench (map snd $ condBenchmarks pkg) diff --git a/Cabal/src/Distribution/PackageDescription/Check/Target.hs b/Cabal/src/Distribution/PackageDescription/Check/Target.hs index 267891f8a43..c445beaa478 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Target.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Target.hs @@ -54,7 +54,6 @@ checkLibrary ads lib@( Library libName_ - _libImports_ _exposedModules_ reexportedModules_ signatures_ diff --git a/Cabal/src/Distribution/Simple/Build.hs b/Cabal/src/Distribution/Simple/Build.hs index bb5e52cbc10..95592f6bc26 100644 --- a/Cabal/src/Distribution/Simple/Build.hs +++ b/Cabal/src/Distribution/Simple/Build.hs @@ -816,7 +816,6 @@ testSuiteLibV09AsLibAndExe lib = Library { libName = LMainLibName - , libImports = [] , exposedModules = [m] , reexportedModules = [] , signatures = [] From 0274650d4aa079454a14e77d6e95153c7d748e1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 6 Nov 2025 12:00:08 +0800 Subject: [PATCH 18/60] add function to merge imports --- .../Types/GenericPackageDescription.hs | 75 ++++++++++++++----- 1 file changed, 57 insertions(+), 18 deletions(-) diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index e6b5580050a..ea5100837b2 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -84,24 +84,6 @@ data GenericPackageDescription = GenericPackageDescription } deriving (Show, Eq, Data, Generic) --- mergeCommonStanza --- :: forall a --- . L.HasBuildInfo a --- => (BuildInfo -> a) --- -> CondTree ConfVar [Dependency] BuildInfo --- -> CondTree ConfVar [Dependency] a --- -> CondTree ConfVar [Dependency] a --- mergeCommonStanza fromBuildInfo (CondNode bi _ bis) (CondNode x _ cs) = --- CondNode x' (x' ^. L.targetBuildDepends) cs' --- where --- -- new value is old value with buildInfo field _prepended_. --- x' :: a --- x' = x & L.buildInfo %~ (bi <>) --- --- -- tree components are appended together. --- cs' :: [CondBranch ConfVar [Dependency] a] --- cs' = map (fromBuildInfo <$>) bis ++ cs --- -- libraryFromBuildInfo :: LibraryName -> BuildInfo -> Library -- libraryFromBuildInfo n bi = -- emptyLibrary @@ -133,6 +115,63 @@ data GenericPackageDescription = GenericPackageDescription -- -- TODO(leana8959): figure out merge direction -- in foldr (mergeCommonStanza fromBuildInfo) libTree commonTrees +mergeImports + :: forall a + . L.HasBuildInfo a + => Map ImportName (CondTree ConfVar [Dependency] BuildInfo) + -> (BuildInfo -> a) + -- ^ fromBuildInfo + -> CondTree ConfVar [Dependency] (WithImports a) + -> CondTree ConfVar [Dependency] a +mergeImports commonStanzas fromBuildInfo (CondNode root c zs) = + let endo :: CondTree ConfVar [Dependency] a -> CondTree ConfVar [Dependency] a + endo = resolveImports (getImportNames root) + + tree :: CondTree ConfVar [Dependency] a + tree = CondNode (unImportNames root) c (map goBranch zs) + + in endo tree + + where + goNode = mergeImports commonStanzas fromBuildInfo + + goBranch + :: L.HasBuildInfo a + => CondBranch ConfVar [Dependency] (WithImports a) + -> CondBranch ConfVar [Dependency] a + goBranch (CondBranch cond ifTrue ifFalse) = CondBranch cond (goNode ifTrue) (goNode <$> ifFalse) + + -- TODO(leana8959): (at some point it'll become (WithImports BuildInfo) and it'll force us to handle its imports too) + resolveImports + :: L.HasBuildInfo a + => [ImportName] + -> (CondTree ConfVar [Dependency] a -> CondTree ConfVar [Dependency] a) + resolveImports importNames = + let commonTrees :: [CondTree ConfVar [Dependency] BuildInfo] + commonTrees = + map + ( fromMaybe (error "failed to merge imports, did you mess with GenericPackageDescription?") + . flip Map.lookup commonStanzas + ) + importNames + in \x -> foldr mergeCondTree x commonTrees + + mergeCondTree + :: L.HasBuildInfo a + => CondTree ConfVar [Dependency] BuildInfo + -> CondTree ConfVar [Dependency] a + -> CondTree ConfVar [Dependency] a + mergeCondTree (CondNode bi _ bis) (CondNode x _ cs) = CondNode x' (x' ^. L.targetBuildDepends) cs' + where + -- new value is old value with buildInfo field _prepended_. + x' :: a + x' = x & L.buildInfo %~ (bi <>) + + -- tree components are appended together. + cs' :: [CondBranch ConfVar [Dependency] a] + cs' = map (fromBuildInfo <$>) bis ++ cs + + -- condSubLibraries :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)] -- condSubLibraries = () -- condForeignLibs :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)] From 0d506fbbe0f67dd1a4d0bf27bcf261a5fd270945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 6 Nov 2025 12:11:53 +0800 Subject: [PATCH 19/60] mergeLibrary --- .../Types/GenericPackageDescription.hs | 57 ++++++++----------- 1 file changed, 24 insertions(+), 33 deletions(-) diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index ea5100837b2..1a03e746715 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -84,43 +84,31 @@ data GenericPackageDescription = GenericPackageDescription } deriving (Show, Eq, Data, Generic) --- libraryFromBuildInfo :: LibraryName -> BuildInfo -> Library --- libraryFromBuildInfo n bi = --- emptyLibrary --- { libName = n --- , libVisibility = case n of --- LMainLibName -> LibraryVisibilityPublic --- LSubLibName _ -> LibraryVisibilityPrivate --- , libBuildInfo = bi --- } --- --- condLibrary :: GenericPackageDescription -> Maybe (CondTree ConfVar [Dependency] Library) --- condLibrary gpd = fmap go $ condLibrary gpd --- where --- go :: CondTree ConfVar [Dependency] Library -> CondTree ConfVar [Dependency] Library --- go libTree = --- let rootLib :: Library --- rootLib = condTreeData libTree --- --- commonTrees :: [CondTree ConfVar [Dependency] BuildInfo] --- commonTrees = --- map --- (fromMaybe (error "failed to merge imports, did you mess with GenericPackageDescription?") --- . flip Map.lookup (gpdCommonStanzas gpd)) --- (libImports rootLib) --- --- fromBuildInfo :: BuildInfo -> Library --- fromBuildInfo = libraryFromBuildInfo (libName rootLib) --- --- -- TODO(leana8959): figure out merge direction --- in foldr (mergeCommonStanza fromBuildInfo) libTree commonTrees +libraryFromBuildInfo :: LibraryName -> BuildInfo -> Library +libraryFromBuildInfo n bi = + emptyLibrary + { libName = n + , libVisibility = case n of + LMainLibName -> LibraryVisibilityPublic + LSubLibName _ -> LibraryVisibilityPrivate + , libBuildInfo = bi + } + +_condLibrary :: GenericPackageDescription -> Maybe (CondTree ConfVar [Dependency] Library) +_condLibrary gpd = + let commonStanzas = gpdCommonStanzas gpd + + fromBuildInfo :: Library -> (BuildInfo -> Library) + fromBuildInfo = libraryFromBuildInfo . libName + + in mergeImports commonStanzas fromBuildInfo <$> (condLibrary gpd) mergeImports :: forall a . L.HasBuildInfo a => Map ImportName (CondTree ConfVar [Dependency] BuildInfo) - -> (BuildInfo -> a) - -- ^ fromBuildInfo + -> (a -> (BuildInfo -> a)) + -- ^ We need the information regarding the root node to be able to build such a constructor function -> CondTree ConfVar [Dependency] (WithImports a) -> CondTree ConfVar [Dependency] a mergeImports commonStanzas fromBuildInfo (CondNode root c zs) = @@ -163,13 +151,16 @@ mergeImports commonStanzas fromBuildInfo (CondNode root c zs) = -> CondTree ConfVar [Dependency] a mergeCondTree (CondNode bi _ bis) (CondNode x _ cs) = CondNode x' (x' ^. L.targetBuildDepends) cs' where + fromBuildInfo' :: (BuildInfo -> a) + fromBuildInfo' = fromBuildInfo (unImportNames root) + -- new value is old value with buildInfo field _prepended_. x' :: a x' = x & L.buildInfo %~ (bi <>) -- tree components are appended together. cs' :: [CondBranch ConfVar [Dependency] a] - cs' = map (fromBuildInfo <$>) bis ++ cs + cs' = map (fromBuildInfo' <$>) bis ++ cs -- condSubLibraries :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)] From 3de619f63d70750bcb12d975e40bd6357855aa15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 6 Nov 2025 12:42:21 +0800 Subject: [PATCH 20/60] test merging ability --- .../Types/GenericPackageDescription.hs | 2 +- Cabal-tests/tests/ParserTests.hs | 37 ++++ .../accessors/library-merging.cabal | 30 +++ .../accessors/library-merging.expr | 175 ++++++++++++++++++ 4 files changed, 243 insertions(+), 1 deletion(-) create mode 100644 Cabal-tests/tests/ParserTests/accessors/library-merging.cabal create mode 100644 Cabal-tests/tests/ParserTests/accessors/library-merging.expr diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index 1a03e746715..15da8d36218 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -7,7 +7,7 @@ module Distribution.Types.GenericPackageDescription ( GenericPackageDescription (..) , emptyGenericPackageDescription - , condLibrary + , _condLibrary ) where import Distribution.Compat.Prelude diff --git a/Cabal-tests/tests/ParserTests.hs b/Cabal-tests/tests/ParserTests.hs index 8368ed19451..c913139d4aa 100644 --- a/Cabal-tests/tests/ParserTests.hs +++ b/Cabal-tests/tests/ParserTests.hs @@ -15,6 +15,7 @@ import Data.Algorithm.Diff (PolyDiff (..), getGroupedDif import Data.Maybe (isNothing) import Distribution.Fields (pwarning) import Distribution.PackageDescription (GenericPackageDescription) +import Distribution.Types.GenericPackageDescription(_condLibrary) import Distribution.PackageDescription.Parsec (parseGenericPackageDescription) import Distribution.PackageDescription.PrettyPrint (showGenericPackageDescription) import Distribution.Parsec (PWarnType (..), PWarning (..), showPErrorWithSource, showPWarningWithSource) @@ -34,6 +35,7 @@ import qualified Distribution.InstalledPackageInfo as IPI #ifdef MIN_VERSION_tree_diff import Data.TreeDiff (ansiWlEditExpr, ediff, toExpr) +import Data.TreeDiff.Class (ToExpr) import Data.TreeDiff.Golden (ediffGolden) import Data.TreeDiff.Instances.Cabal () #endif @@ -41,6 +43,7 @@ import Data.TreeDiff.Instances.Cabal () tests :: TestTree tests = testGroup "parsec tests" [ regressionTests + , accessorsTests , warningTests , errorTests , ipiTests @@ -150,6 +153,40 @@ errorTest fp = cabalGoldenTest fp correct $ do input = "tests" "ParserTests" "errors" fp correct = replaceExtension input "errors" +------------------------------------------------------------------------------- +-- Merging accessors tests +------------------------------------------------------------------------------- + +accessorsTests :: TestTree +accessorsTests = testGroup "accessors" + [ +#ifdef MIN_VERSION_tree_diff + accessorsGoldenTestCondLibrary + [ "library-merging.cabal" + ] +#endif + ] + +#ifdef MIN_VERSION_tree_diff +accessorsGoldenTestCondLibrary :: [FilePath] -> TestTree +accessorsGoldenTestCondLibrary = testGroup "condLibrary" . map (accessorsGoldenTest _condLibrary) + +accessorsGoldenTest + :: ToExpr a + => (GenericPackageDescription -> a) + -> FilePath -> TestTree +accessorsGoldenTest f fp = ediffGolden goldenTest fp exprFile $ do + contents <- BS.readFile input + let res = withSource (PCabalFile (fp, contents)) $ parseGenericPackageDescription contents + let (_, x) = runParseResult res + case x of + Right gpd -> pure . toExpr $ f gpd + Left (_, errs) -> fail $ unlines $ "ERROR" : map (showPErrorWithSource . fmap renderCabalFileSource) (NE.toList errs) + where + input = "tests" "ParserTests" "accessors" fp + exprFile = replaceExtension input "expr" +#endif + ------------------------------------------------------------------------------- -- Regressions ------------------------------------------------------------------------------- diff --git a/Cabal-tests/tests/ParserTests/accessors/library-merging.cabal b/Cabal-tests/tests/ParserTests/accessors/library-merging.cabal new file mode 100644 index 00000000000..6f8ed6ad6c0 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/accessors/library-merging.cabal @@ -0,0 +1,30 @@ +cabal-version: 3.0 +name: Library-merging +version: 0 +synopsis: Tests the correctness of deferred merging in imports +build-type: Simple + +flag foo + manual: True + default: True + +common windows + if os(windows) + build-depends: Win32 + +common deps + import: windows + buildable: True + build-depends: + base >=4.10 && <4.11, + containers + +library + if flag(foo) + import: deps + + default-language: Haskell2010 + exposed-modules: ElseIf + + build-depends: + ghc-prim diff --git a/Cabal-tests/tests/ParserTests/accessors/library-merging.expr b/Cabal-tests/tests/ParserTests/accessors/library-merging.expr new file mode 100644 index 00000000000..d8acb7080bb --- /dev/null +++ b/Cabal-tests/tests/ParserTests/accessors/library-merging.expr @@ -0,0 +1,175 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "ElseIf"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildInfoImports = [], + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "foo"))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildInfoImports = ["windows"], + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]} From 3022efe3f84bb32230929c23a181830a46283369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 6 Nov 2025 13:00:17 +0800 Subject: [PATCH 21/60] fix transitive imports retaintion and merging --- .../PackageDescription/FieldGrammar.hs | 2 +- .../Distribution/PackageDescription/Parsec.hs | 19 ++--- .../src/Distribution/Types/BuildInfo.hs | 21 +---- .../Types/GenericPackageDescription.hs | 21 +++-- .../Types/GenericPackageDescription/Lens.hs | 2 +- .../src/Distribution/Types/Imports/Lens.hs | 3 - .../accessors/library-merging.expr | 83 ++++++++++++++++++- 7 files changed, 107 insertions(+), 44 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index 34a555a1129..9fe5daff070 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -624,7 +624,7 @@ buildInfoFieldGrammar ) => g BuildInfo BuildInfo buildInfoFieldGrammar = - BuildInfo [] + BuildInfo <$> booleanFieldDef "buildable" L.buildable True <*> monoidalFieldAla "build-tools" (alaList CommaFSep) L.buildTools ^^^ deprecatedSince diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index 0dc828cb39b..408db75254e 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -33,7 +33,7 @@ module Distribution.PackageDescription.Parsec import Distribution.Compat.Prelude import Prelude () -import Control.Monad.State.Strict (StateT, execStateT, modify) +import Control.Monad.State.Strict (StateT, execStateT) import Control.Monad.Trans.Class (lift) import Distribution.CabalSpecVersion import Distribution.Compat.Lens @@ -130,14 +130,14 @@ type SectionParser src = StateT SectionS (ParseResult src) -- | State of section parser data SectionS = SectionS { _stateGpd :: !GenericPackageDescription - , _stateCommonStanzas :: !(Map String CondTreeBuildInfo) + , _stateCommonStanzas :: !(Map String CondTreeBuildInfoWithImports) } stateGpd :: Lens' SectionS GenericPackageDescription stateGpd f (SectionS gpd cs) = (\x -> SectionS x cs) <$> f gpd {-# INLINE stateGpd #-} -stateCommonStanzas :: Lens' SectionS (Map String CondTreeBuildInfo) +stateCommonStanzas :: Lens' SectionS (Map String CondTreeBuildInfoWithImports) stateCommonStanzas f (SectionS gpd cs) = SectionS gpd <$> f cs {-# INLINE stateCommonStanzas #-} @@ -267,7 +267,7 @@ goSections specVer fields = do => ParsecFieldGrammar' a -- \^ grammar -> (BuildInfo -> a) - -> Map String CondTreeBuildInfo + -> Map String CondTreeBuildInfoWithImports -- \^ common stanzas -> [Field Position] -> ParseResult src (CondTree ConfVar [Dependency] (WithImports a)) @@ -282,10 +282,8 @@ goSections specVer fields = do commonStanzas <- use stateCommonStanzas name' <- lift $ parseCommonName pos args biTree <- lift $ parseCondTree' buildInfoFieldGrammar id commonStanzas fields - let biTree' = insertBuildInfoImports biTree - case Map.lookup name' commonStanzas of - Nothing -> stateCommonStanzas .= Map.insert name' biTree' commonStanzas + Nothing -> stateCommonStanzas .= Map.insert name' biTree commonStanzas Just _ -> lift $ parseFailure pos $ @@ -488,7 +486,7 @@ parseCondTree -- ^ accept @elif@ -> ParsecFieldGrammar' a -- ^ grammar - -> Map String CondTreeBuildInfo + -> Map String CondTreeBuildInfoWithImports -- ^ common stanzas -> (BuildInfo -> a) -- ^ constructor from buildInfo @@ -609,6 +607,7 @@ with new AST, this all need to be rewritten. -- -- * Common stanzas are parsed exactly once, even if not-used. Thus we report errors in them. type CondTreeBuildInfo = CondTree ConfVar [Dependency] BuildInfo +type CondTreeBuildInfoWithImports = CondTree ConfVar [Dependency] (WithImports BuildInfo) -- | Create @a@ from 'BuildInfo'. -- This class is used to implement common stanza parsing. @@ -647,7 +646,7 @@ parseCondTreeWithCommonStanzas -- ^ grammar -> (BuildInfo -> a) -- ^ construct fromBuildInfo - -> Map String CondTreeBuildInfo + -> Map String CondTreeBuildInfoWithImports -- ^ common stanzas -> [Field Position] -> ParseResult src (CondTree ConfVar [Dependency] (WithImports a)) @@ -681,7 +680,7 @@ processImports => CabalSpecVersion -> (BuildInfo -> a) -- ^ construct fromBuildInfo - -> Map String CondTreeBuildInfo + -> Map String CondTreeBuildInfoWithImports -- ^ common stanzas -> [Field Position] -> ParseResult src ([Field Position], [ImportName]) diff --git a/Cabal-syntax/src/Distribution/Types/BuildInfo.hs b/Cabal-syntax/src/Distribution/Types/BuildInfo.hs index 1de0f720c40..e68fcbc5c22 100644 --- a/Cabal-syntax/src/Distribution/Types/BuildInfo.hs +++ b/Cabal-syntax/src/Distribution/Types/BuildInfo.hs @@ -14,17 +14,13 @@ module Distribution.Types.BuildInfo , hcSharedOptions , hcProfSharedOptions , hcStaticOptions - , insertBuildInfoImports ) where import Distribution.Compat.Prelude import Prelude () -import Distribution.Types.CondTree -import Distribution.Types.ConfVar import Distribution.Types.Dependency import Distribution.Types.ExeDependency -import Distribution.Types.Imports import Distribution.Types.LegacyExeDependency import Distribution.Types.Mixin import Distribution.Types.PkgconfigDependency @@ -36,8 +32,7 @@ import Language.Haskell.Extension -- Consider refactoring into executable and library versions. data BuildInfo = BuildInfo - { buildInfoImports :: [String] - , buildable :: Bool + { buildable :: Bool -- ^ component is buildable here , buildTools :: [LegacyExeDependency] -- ^ Tools needed to build this bit. @@ -157,19 +152,10 @@ instance Binary BuildInfo instance Structured BuildInfo instance NFData BuildInfo where rnf = genericRnf -insertBuildInfoImports - :: CondTree ConfVar [Dependency] (WithImports BuildInfo) - -> CondTree ConfVar [Dependency] BuildInfo -insertBuildInfoImports = mapCondTree f id id - where - f :: WithImports BuildInfo -> BuildInfo - f (WithImports importNames bi) = bi{buildInfoImports = importNames} - instance Monoid BuildInfo where mempty = BuildInfo - { buildInfoImports = [] - , buildable = True + { buildable = True , buildTools = [] , buildToolDepends = [] , cppOptions = [] @@ -223,8 +209,7 @@ instance Monoid BuildInfo where instance Semigroup BuildInfo where a <> b = BuildInfo - { buildInfoImports = combine buildInfoImports - , buildable = buildable a && buildable b + { buildable = buildable a && buildable b , buildTools = combine buildTools , buildToolDepends = combine buildToolDepends , cppOptions = combine cppOptions diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index 15da8d36218..d3054facfb7 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -16,7 +16,8 @@ import Prelude () -- lens import Distribution.Compat.Lens as L import qualified Distribution.Types.BuildInfo.Lens as L -import qualified Distribution.Types.Imports.Lens as L +-- TODO(leana8959): fix it this orphan +import qualified Distribution.Types.Imports.Lens as L () import Distribution.Types.PackageDescription @@ -32,7 +33,6 @@ import Distribution.Types.ConfVar import Distribution.Types.Executable import Distribution.Types.Flag import Distribution.Types.ForeignLib -import Distribution.Types.Library import Distribution.Types.TestSuite import Distribution.Types.UnqualComponentName import Distribution.Version @@ -54,7 +54,7 @@ data GenericPackageDescription = GenericPackageDescription -- Perfectly, PackageIndex should have sum type, so we don't need to -- have dummy GPDs. , genPackageFlags :: [PackageFlag] - , gpdCommonStanzas :: Map ImportName (CondTree ConfVar [Dependency] BuildInfo) + , gpdCommonStanzas :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) , condLibrary :: Maybe (CondTree ConfVar [Dependency] (WithImports Library)) , condSubLibraries :: [ ( UnqualComponentName @@ -106,7 +106,7 @@ _condLibrary gpd = mergeImports :: forall a . L.HasBuildInfo a - => Map ImportName (CondTree ConfVar [Dependency] BuildInfo) + => Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) -> (a -> (BuildInfo -> a)) -- ^ We need the information regarding the root node to be able to build such a constructor function -> CondTree ConfVar [Dependency] (WithImports a) @@ -121,13 +121,13 @@ mergeImports commonStanzas fromBuildInfo (CondNode root c zs) = in endo tree where - goNode = mergeImports commonStanzas fromBuildInfo - goBranch :: L.HasBuildInfo a => CondBranch ConfVar [Dependency] (WithImports a) -> CondBranch ConfVar [Dependency] a goBranch (CondBranch cond ifTrue ifFalse) = CondBranch cond (goNode ifTrue) (goNode <$> ifFalse) + where + goNode = mergeImports commonStanzas fromBuildInfo -- TODO(leana8959): (at some point it'll become (WithImports BuildInfo) and it'll force us to handle its imports too) resolveImports @@ -135,14 +135,19 @@ mergeImports commonStanzas fromBuildInfo (CondNode root c zs) = => [ImportName] -> (CondTree ConfVar [Dependency] a -> CondTree ConfVar [Dependency] a) resolveImports importNames = - let commonTrees :: [CondTree ConfVar [Dependency] BuildInfo] + let commonTrees :: [CondTree ConfVar [Dependency] (WithImports BuildInfo)] commonTrees = map ( fromMaybe (error "failed to merge imports, did you mess with GenericPackageDescription?") . flip Map.lookup commonStanzas ) importNames - in \x -> foldr mergeCondTree x commonTrees + + commonTrees' :: [CondTree ConfVar [Dependency] BuildInfo] + commonTrees' = map goNode commonTrees + in \x -> foldr mergeCondTree x commonTrees' + where + goNode = mergeImports commonStanzas (const id) mergeCondTree :: L.HasBuildInfo a diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs index 7f82b51fe7b..ba265b46469 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs @@ -52,7 +52,7 @@ genPackageFlags :: Lens' GenericPackageDescription [PackageFlag] genPackageFlags f s = fmap (\x -> s{T.genPackageFlags = x}) (f (T.genPackageFlags s)) {-# INLINE genPackageFlags #-} -gpdCommonStanzas :: Lens' GenericPackageDescription (Map ImportName (CondTree ConfVar [Dependency] BuildInfo)) +gpdCommonStanzas :: Lens' GenericPackageDescription (Map ImportName (CondTree ConfVar [Dependency] (T.WithImports BuildInfo))) gpdCommonStanzas f s = fmap (\x -> s{T.gpdCommonStanzas = x}) (f (T.gpdCommonStanzas s)) {-# INLINE gpdCommonStanzas #-} diff --git a/Cabal-syntax/src/Distribution/Types/Imports/Lens.hs b/Cabal-syntax/src/Distribution/Types/Imports/Lens.hs index 2d669e059d6..bae21ef0278 100644 --- a/Cabal-syntax/src/Distribution/Types/Imports/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/Imports/Lens.hs @@ -5,11 +5,8 @@ module Distribution.Types.Imports.Lens where import Distribution.Compat.Lens -import Distribution.Compat.Prelude import qualified Distribution.Types.Imports as T -import qualified Distribution.Types.BuildInfo as T - import qualified Distribution.Types.BuildInfo.Lens as L getImportNames :: Lens (T.WithImports a) (T.WithImports b) a b diff --git a/Cabal-tests/tests/ParserTests/accessors/library-merging.expr b/Cabal-tests/tests/ParserTests/accessors/library-merging.expr index d8acb7080bb..0e3d49ae740 100644 --- a/Cabal-tests/tests/ParserTests/accessors/library-merging.expr +++ b/Cabal-tests/tests/ParserTests/accessors/library-merging.expr @@ -10,7 +10,6 @@ Just libVisibility = LibraryVisibilityPublic, libBuildInfo = BuildInfo { - buildInfoImports = [], buildable = True, buildTools = [], buildToolDepends = [], @@ -90,7 +89,6 @@ Just libVisibility = LibraryVisibilityPublic, libBuildInfo = BuildInfo { - buildInfoImports = ["windows"], buildable = True, buildTools = [], buildToolDepends = [], @@ -171,5 +169,84 @@ Just (PackageName "containers") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}, + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}, condBranchIfFalse = Nothing}]} From 8d8642db232ad15a8c41112a5d96b15bd19071f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 6 Nov 2025 13:01:15 +0800 Subject: [PATCH 22/60] run fourmolu --- .../PackageDescription/Configuration.hs | 6 +- .../PackageDescription/PrettyPrint.hs | 6 +- .../Types/GenericPackageDescription.hs | 112 +++++++++--------- .../Types/GenericPackageDescription/Lens.hs | 2 +- .../src/Distribution/Types/Imports.hs | 2 +- .../src/Distribution/Types/Imports/Lens.hs | 5 +- .../Distribution/PackageDescription/Check.hs | 8 +- 7 files changed, 68 insertions(+), 73 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs index ccf4b68befc..be46de09cc4 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs @@ -54,10 +54,10 @@ import Distribution.Parsec import Distribution.Pretty import Distribution.System import Distribution.Types.Component -import Distribution.Types.Imports import Distribution.Types.ComponentRequestedSpec import Distribution.Types.DependencyMap import Distribution.Types.DependencySatisfaction (DependencySatisfaction (..)) +import Distribution.Types.Imports import Distribution.Types.MissingDependency (MissingDependency (..)) import Distribution.Types.PackageVersionConstraint import Distribution.Utils.Generic @@ -320,7 +320,7 @@ extractConditions -> [Condition ConfVar] extractConditions f gpkg = concat - -- TODO(leana8959): merge this and not just drop the imports + -- TODO(leana8959): merge this and not just drop the imports [ extractCondition (f . libBuildInfo) <$> maybeToList (mapTreeData unImportNames <$> condLibrary gpkg) , extractCondition (f . libBuildInfo) . snd <$> condSubLibraries gpkg , extractCondition (f . buildInfo) . snd <$> condExecutables gpkg @@ -496,7 +496,7 @@ finalizePD where -- Combine lib, exes, and tests into one list of @CondTree@s with tagged data condTrees = - -- TODO(leana8959): handle imports + -- TODO(leana8959): handle imports maybeToList (fmap (mapTreeData $ Lib . unImportNames) mb_lib0) ++ map (\(name, tree) -> mapTreeData (SubComp name . CLib) tree) sub_libs0 ++ map (\(name, tree) -> mapTreeData (SubComp name . CFLib) tree) flibs0 diff --git a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs index 16fbfce41e9..b452fe95dd9 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs @@ -54,8 +54,8 @@ import Distribution.Pretty import Distribution.Utils.Generic (writeFileAtomic, writeUTF8File) import qualified Distribution.PackageDescription.FieldGrammar as FG -import Distribution.Types.Imports import qualified Distribution.Types.BuildInfo.Lens as L +import Distribution.Types.Imports import qualified Distribution.Types.SetupBuildInfo.Lens as L import Text.PrettyPrint (Doc, char, hsep, parens, text) @@ -232,8 +232,8 @@ pdToGpd pd = { packageDescription = pd , gpdScannedVersion = Nothing , genPackageFlags = [] - -- TODO(leana8959): what to do here - , condLibrary = mapTreeData noImports . mkCondTree <$> library pd + , -- TODO(leana8959): what to do here + condLibrary = mapTreeData noImports . mkCondTree <$> library pd , condSubLibraries = mkCondTreeL <$> subLibraries pd , condForeignLibs = mkCondTree' foreignLibName <$> foreignLibs pd , condExecutables = mkCondTree' exeName <$> executables pd diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index d3054facfb7..ce614f40eee 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -6,7 +6,6 @@ module Distribution.Types.GenericPackageDescription ( GenericPackageDescription (..) , emptyGenericPackageDescription - , _condLibrary ) where @@ -16,23 +15,24 @@ import Prelude () -- lens import Distribution.Compat.Lens as L import qualified Distribution.Types.BuildInfo.Lens as L + -- TODO(leana8959): fix it this orphan import qualified Distribution.Types.Imports.Lens as L () import Distribution.Types.PackageDescription import Distribution.Package -import Distribution.Types.Imports -import Distribution.Types.Library -import Distribution.Types.LibraryName -import Distribution.Types.LibraryVisibility -import Distribution.Types.BuildInfo import Distribution.Types.Benchmark +import Distribution.Types.BuildInfo import Distribution.Types.CondTree import Distribution.Types.ConfVar import Distribution.Types.Executable import Distribution.Types.Flag import Distribution.Types.ForeignLib +import Distribution.Types.Imports +import Distribution.Types.Library +import Distribution.Types.LibraryName +import Distribution.Types.LibraryVisibility import Distribution.Types.TestSuite import Distribution.Types.UnqualComponentName import Distribution.Version @@ -100,8 +100,7 @@ _condLibrary gpd = fromBuildInfo :: Library -> (BuildInfo -> Library) fromBuildInfo = libraryFromBuildInfo . libName - - in mergeImports commonStanzas fromBuildInfo <$> (condLibrary gpd) + in mergeImports commonStanzas fromBuildInfo <$> (condLibrary gpd) mergeImports :: forall a @@ -117,56 +116,53 @@ mergeImports commonStanzas fromBuildInfo (CondNode root c zs) = tree :: CondTree ConfVar [Dependency] a tree = CondNode (unImportNames root) c (map goBranch zs) - - in endo tree - - where - goBranch - :: L.HasBuildInfo a - => CondBranch ConfVar [Dependency] (WithImports a) - -> CondBranch ConfVar [Dependency] a - goBranch (CondBranch cond ifTrue ifFalse) = CondBranch cond (goNode ifTrue) (goNode <$> ifFalse) - where - goNode = mergeImports commonStanzas fromBuildInfo - - -- TODO(leana8959): (at some point it'll become (WithImports BuildInfo) and it'll force us to handle its imports too) - resolveImports - :: L.HasBuildInfo a - => [ImportName] - -> (CondTree ConfVar [Dependency] a -> CondTree ConfVar [Dependency] a) - resolveImports importNames = - let commonTrees :: [CondTree ConfVar [Dependency] (WithImports BuildInfo)] - commonTrees = - map - ( fromMaybe (error "failed to merge imports, did you mess with GenericPackageDescription?") + in endo tree + where + goBranch + :: L.HasBuildInfo a + => CondBranch ConfVar [Dependency] (WithImports a) + -> CondBranch ConfVar [Dependency] a + goBranch (CondBranch cond ifTrue ifFalse) = CondBranch cond (goNode ifTrue) (goNode <$> ifFalse) + where + goNode = mergeImports commonStanzas fromBuildInfo + + -- TODO(leana8959): (at some point it'll become (WithImports BuildInfo) and it'll force us to handle its imports too) + resolveImports + :: L.HasBuildInfo a + => [ImportName] + -> (CondTree ConfVar [Dependency] a -> CondTree ConfVar [Dependency] a) + resolveImports importNames = + let commonTrees :: [CondTree ConfVar [Dependency] (WithImports BuildInfo)] + commonTrees = + map + ( fromMaybe (error "failed to merge imports, did you mess with GenericPackageDescription?") . flip Map.lookup commonStanzas - ) - importNames - - commonTrees' :: [CondTree ConfVar [Dependency] BuildInfo] - commonTrees' = map goNode commonTrees - in \x -> foldr mergeCondTree x commonTrees' - where - goNode = mergeImports commonStanzas (const id) - - mergeCondTree - :: L.HasBuildInfo a - => CondTree ConfVar [Dependency] BuildInfo - -> CondTree ConfVar [Dependency] a - -> CondTree ConfVar [Dependency] a - mergeCondTree (CondNode bi _ bis) (CondNode x _ cs) = CondNode x' (x' ^. L.targetBuildDepends) cs' - where - fromBuildInfo' :: (BuildInfo -> a) - fromBuildInfo' = fromBuildInfo (unImportNames root) - - -- new value is old value with buildInfo field _prepended_. - x' :: a - x' = x & L.buildInfo %~ (bi <>) - - -- tree components are appended together. - cs' :: [CondBranch ConfVar [Dependency] a] - cs' = map (fromBuildInfo' <$>) bis ++ cs - + ) + importNames + + commonTrees' :: [CondTree ConfVar [Dependency] BuildInfo] + commonTrees' = map goNode commonTrees + in \x -> foldr mergeCondTree x commonTrees' + where + goNode = mergeImports commonStanzas (const id) + + mergeCondTree + :: L.HasBuildInfo a + => CondTree ConfVar [Dependency] BuildInfo + -> CondTree ConfVar [Dependency] a + -> CondTree ConfVar [Dependency] a + mergeCondTree (CondNode bi _ bis) (CondNode x _ cs) = CondNode x' (x' ^. L.targetBuildDepends) cs' + where + fromBuildInfo' :: (BuildInfo -> a) + fromBuildInfo' = fromBuildInfo (unImportNames root) + + -- new value is old value with buildInfo field _prepended_. + x' :: a + x' = x & L.buildInfo %~ (bi <>) + + -- tree components are appended together. + cs' :: [CondBranch ConfVar [Dependency] a] + cs' = map (fromBuildInfo' <$>) bis ++ cs -- condSubLibraries :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)] -- condSubLibraries = () @@ -189,7 +185,7 @@ instance NFData GenericPackageDescription where rnf = genericRnf emptyGenericPackageDescription :: GenericPackageDescription emptyGenericPackageDescription = GenericPackageDescription - { packageDescription = emptyPackageDescription + { packageDescription = emptyPackageDescription , gpdScannedVersion = Nothing , genPackageFlags = [] , gpdCommonStanzas = mempty diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs index ba265b46469..4f15f096855 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs @@ -20,7 +20,6 @@ import qualified Distribution.Types.Imports as T import Distribution.Compiler (CompilerFlavor) import Distribution.System (Arch, OS) -import Distribution.Types.Imports (ImportName) import Distribution.Types.Benchmark (Benchmark) import Distribution.Types.BuildInfo (BuildInfo) import Distribution.Types.CondTree (CondTree) @@ -30,6 +29,7 @@ import Distribution.Types.Executable (Executable) import Distribution.Types.Flag (FlagName, PackageFlag (MkPackageFlag)) import Distribution.Types.ForeignLib (ForeignLib) import Distribution.Types.GenericPackageDescription (GenericPackageDescription (GenericPackageDescription)) +import Distribution.Types.Imports (ImportName) import Distribution.Types.Library (Library) import Distribution.Types.PackageDescription (PackageDescription) import Distribution.Types.TestSuite (TestSuite) diff --git a/Cabal-syntax/src/Distribution/Types/Imports.hs b/Cabal-syntax/src/Distribution/Types/Imports.hs index c13705f6496..e66b84717d0 100644 --- a/Cabal-syntax/src/Distribution/Types/Imports.hs +++ b/Cabal-syntax/src/Distribution/Types/Imports.hs @@ -1,6 +1,6 @@ +{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE DeriveDataTypeable #-} module Distribution.Types.Imports where diff --git a/Cabal-syntax/src/Distribution/Types/Imports/Lens.hs b/Cabal-syntax/src/Distribution/Types/Imports/Lens.hs index bae21ef0278..dbf24263ea2 100644 --- a/Cabal-syntax/src/Distribution/Types/Imports/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/Imports/Lens.hs @@ -1,13 +1,13 @@ +{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE DeriveDataTypeable #-} module Distribution.Types.Imports.Lens where import Distribution.Compat.Lens -import qualified Distribution.Types.Imports as T import qualified Distribution.Types.BuildInfo.Lens as L +import qualified Distribution.Types.Imports as T getImportNames :: Lens (T.WithImports a) (T.WithImports b) a b getImportNames f (T.WithImports is x) = fmap (\y -> T.WithImports is y) (f x) @@ -17,6 +17,5 @@ unImportNames :: Lens' (T.WithImports a) [T.ImportName] unImportNames f (T.WithImports is x) = fmap (\is' -> T.WithImports is' x) (f is) {-# INLINE unImportNames #-} - instance L.HasBuildInfo a => L.HasBuildInfo (T.WithImports a) where buildInfo f (T.WithImports is x) = T.WithImports is <$> L.buildInfo f x diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs index 2fb0443dba9..571fbf991ce 100644 --- a/Cabal/src/Distribution/PackageDescription/Check.hs +++ b/Cabal/src/Distribution/PackageDescription/Check.hs @@ -240,7 +240,7 @@ checkGenericPackageDescription checkPackageDescription packageDescription_ -- Targets should be present... let condAllLibraries = - -- TODO(leana8959): + -- TODO(leana8959): maybeToList (mapTreeData unImportNames <$> condLibrary_) ++ (map snd condSubLibraries_) checkP @@ -296,7 +296,7 @@ checkGenericPackageDescription . ccNames ) let ads = - -- TODO(leana8959): + -- TODO(leana8959): maybe [] ((: []) . extractAssocDeps pName . mapTreeData unImportNames) condLibrary_ ++ map (uncurry extractAssocDeps) condSubLibraries_ @@ -962,8 +962,8 @@ pd2gpd pd = gpd gpd = emptyGenericPackageDescription { packageDescription = pd - -- TODO(leana8959): think about reverse conversion - , condLibrary = t2c . noImports <$> (library pd) + , -- TODO(leana8959): think about reverse conversion + condLibrary = t2c . noImports <$> (library pd) , condSubLibraries = map (t2cName ln id) (subLibraries pd) , condForeignLibs = map From c9ca3eb72b40dc46e35ddf9e051f6605217e4d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 7 Nov 2025 10:38:00 +0800 Subject: [PATCH 23/60] deferred merging for sublibraries --- .../PackageDescription/Configuration.hs | 10 ++++----- .../Distribution/PackageDescription/Parsec.hs | 3 +-- .../PackageDescription/PrettyPrint.hs | 4 ++-- .../Types/GenericPackageDescription.hs | 22 +++++++++++++++++-- .../Types/GenericPackageDescription/Lens.hs | 2 +- .../Distribution/PackageDescription/Check.hs | 21 ++++++++++-------- .../PackageDescription/Check/Conditional.hs | 2 +- 7 files changed, 42 insertions(+), 22 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs index be46de09cc4..8c1ce229f64 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs @@ -322,7 +322,7 @@ extractConditions f gpkg = concat -- TODO(leana8959): merge this and not just drop the imports [ extractCondition (f . libBuildInfo) <$> maybeToList (mapTreeData unImportNames <$> condLibrary gpkg) - , extractCondition (f . libBuildInfo) . snd <$> condSubLibraries gpkg + , extractCondition (f . libBuildInfo) . snd <$> condSubLibraries' gpkg , extractCondition (f . buildInfo) . snd <$> condExecutables gpkg , extractCondition (f . testBuildInfo) . snd <$> condTestSuites gpkg , extractCondition (f . benchmarkBuildInfo) . snd <$> condBenchmarks gpkg @@ -461,7 +461,7 @@ finalizePD impl constraints -- TODO(leana8959): we maybe want to resolve the imports here ? - (GenericPackageDescription pkg _ver flags _commonStanzas mb_lib0 sub_libs0 flibs0 exes0 tests0 bms0) = do + (GenericPackageDescription pkg _ver flags commonStanzas mb_lib0 sub_libs0 flibs0 exes0 tests0 bms0) = do (targetSet, flagVals) <- resolveWithFlags flagChoices enabled os arch impl constraints condTrees check let @@ -498,7 +498,7 @@ finalizePD condTrees = -- TODO(leana8959): handle imports maybeToList (fmap (mapTreeData $ Lib . unImportNames) mb_lib0) - ++ map (\(name, tree) -> mapTreeData (SubComp name . CLib) tree) sub_libs0 + ++ map (\(name, tree) -> mapTreeData (SubComp name . CLib) tree) (mergeCondSubLibraries commonStanzas sub_libs0) ++ map (\(name, tree) -> mapTreeData (SubComp name . CFLib) tree) flibs0 ++ map (\(name, tree) -> mapTreeData (SubComp name . CExe) tree) exes0 ++ map (\(name, tree) -> mapTreeData (SubComp name . CTest) tree) tests0 @@ -546,7 +546,7 @@ resolveWithFlags [] Distribution.System.Linux Distribution.System.I386 (Distribu -- function. flattenPackageDescription :: GenericPackageDescription -> PackageDescription flattenPackageDescription - (GenericPackageDescription pkg _ _ _commonStanzas mlib0 sub_libs0 flibs0 exes0 tests0 bms0) = + (GenericPackageDescription pkg _ _ commonStanzas mlib0 sub_libs0 flibs0 exes0 tests0 bms0) = pkg { library = mlib , subLibraries = reverse sub_libs @@ -560,7 +560,7 @@ flattenPackageDescription mlib = f . mapTreeData unImportNames <$> mlib0 where f lib = (libFillInDefaults . fst . ignoreConditions $ lib){libName = LMainLibName} - sub_libs = flattenLib <$> sub_libs0 + sub_libs = flattenLib <$> (mergeCondSubLibraries commonStanzas sub_libs0) flibs = flattenFLib <$> flibs0 exes = flattenExe <$> exes0 tests = flattenTst <$> tests0 diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index 408db75254e..9cdb77c2678 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -309,9 +309,8 @@ goSections specVer fields = do name' <- parseUnqualComponentName pos args let name'' = LSubLibName name' lib <- lift $ parseCondTree' (libraryFieldGrammar name'') (libraryFromBuildInfo name'') commonStanzas fields - let lib' = mapTreeData unImportNames lib -- TODO check duplicate name here? - stateGpd . L.condSubLibraries %= snoc (name', lib') + stateGpd . L.condSubLibraries %= snoc (name', lib) -- TODO: check cabal-version | name == "foreign-library" = do diff --git a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs index b452fe95dd9..ca91b6075a6 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs @@ -81,7 +81,7 @@ ppGenericPackageDescription v gpd0 = , ppSetupBInfo v (setupBuildInfo (packageDescription gpd)) , ppGenPackageFlags v (genPackageFlags gpd) , ppCondLibrary v (mapTreeData unImportNames <$> condLibrary gpd) - , ppCondSubLibraries v (condSubLibraries gpd) + , ppCondSubLibraries v (condSubLibraries' gpd) , ppCondForeignLibs v (condForeignLibs gpd) , ppCondExecutables v (condExecutables gpd) , ppCondTestSuites v (condTestSuites gpd) @@ -234,7 +234,7 @@ pdToGpd pd = , genPackageFlags = [] , -- TODO(leana8959): what to do here condLibrary = mapTreeData noImports . mkCondTree <$> library pd - , condSubLibraries = mkCondTreeL <$> subLibraries pd + , condSubLibraries = fmap (mapTreeData noImports) . mkCondTreeL <$> subLibraries pd , condForeignLibs = mkCondTree' foreignLibName <$> foreignLibs pd , condExecutables = mkCondTree' exeName <$> executables pd , condTestSuites = mkCondTree' testName <$> testSuites pd diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index ce614f40eee..4e506c1b78b 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -6,7 +6,11 @@ module Distribution.Types.GenericPackageDescription ( GenericPackageDescription (..) , emptyGenericPackageDescription + + -- TODO(leana8959): rename this , _condLibrary + , condSubLibraries' + , mergeCondSubLibraries ) where import Distribution.Compat.Prelude @@ -58,7 +62,7 @@ data GenericPackageDescription = GenericPackageDescription , condLibrary :: Maybe (CondTree ConfVar [Dependency] (WithImports Library)) , condSubLibraries :: [ ( UnqualComponentName - , CondTree ConfVar [Dependency] Library + , CondTree ConfVar [Dependency] (WithImports Library) ) ] , condForeignLibs @@ -97,11 +101,25 @@ libraryFromBuildInfo n bi = _condLibrary :: GenericPackageDescription -> Maybe (CondTree ConfVar [Dependency] Library) _condLibrary gpd = let commonStanzas = gpdCommonStanzas gpd - fromBuildInfo :: Library -> (BuildInfo -> Library) fromBuildInfo = libraryFromBuildInfo . libName in mergeImports commonStanzas fromBuildInfo <$> (condLibrary gpd) +condSubLibraries' :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)] +condSubLibraries' gpd = mergeCondSubLibraries (gpdCommonStanzas gpd) (condSubLibraries gpd) + +mergeCondSubLibraries + :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) + -> [(UnqualComponentName, CondTree ConfVar [Dependency] (WithImports Library))] + -> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)] +mergeCondSubLibraries commonStanzas = map (fmap go) + where + go :: CondTree ConfVar [Dependency] (WithImports Library) -> CondTree ConfVar [Dependency] Library + go lib = + let fromBuildInfo :: Library -> (BuildInfo -> Library) + fromBuildInfo = libraryFromBuildInfo . libName + in mergeImports commonStanzas fromBuildInfo lib + mergeImports :: forall a . L.HasBuildInfo a diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs index 4f15f096855..469254cda91 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs @@ -61,7 +61,7 @@ condLibrary :: Lens' GenericPackageDescription (Maybe (CondTree ConfVar [Depende condLibrary f s = fmap (\x -> s{T.condLibrary = x}) (f (T.condLibrary s)) {-# INLINE condLibrary #-} -condSubLibraries :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] Library))] +condSubLibraries :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] (T.WithImports Library)))] condSubLibraries f s = fmap (\x -> s{T.condSubLibraries = x}) (f (T.condSubLibraries s)) {-# INLINE condSubLibraries #-} diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs index 571fbf991ce..66020a1d54d 100644 --- a/Cabal/src/Distribution/PackageDescription/Check.hs +++ b/Cabal/src/Distribution/PackageDescription/Check.hs @@ -227,7 +227,7 @@ checkGenericPackageDescription packageDescription_ _gpdScannedVersion_ genPackageFlags_ - _gpdCommonStanzas + gpdCommonStanzas_ condLibrary_ condSubLibraries_ condForeignLibs_ @@ -235,6 +235,9 @@ checkGenericPackageDescription condTestSuites_ condBenchmarks_ ) = + let + condSubLibrariesMerged = mergeCondSubLibraries gpdCommonStanzas_ condSubLibraries_ + in do -- § Description and names. checkPackageDescription packageDescription_ @@ -242,7 +245,7 @@ checkGenericPackageDescription let condAllLibraries = -- TODO(leana8959): maybeToList (mapTreeData unImportNames <$> condLibrary_) - ++ (map snd condSubLibraries_) + ++ (map snd condSubLibrariesMerged) checkP ( and [ null condExecutables_ @@ -277,7 +280,7 @@ checkGenericPackageDescription -- § Feature checks. checkSpecVer CabalSpecV2_0 - (not . null $ condSubLibraries_) + (not . null $ condSubLibrariesMerged) (PackageDistInexcusable CVMultiLib) checkSpecVer CabalSpecV1_8 @@ -296,9 +299,9 @@ checkGenericPackageDescription . ccNames ) let ads = - -- TODO(leana8959): + -- TODO(leana8959): maybe [] ((: []) . extractAssocDeps pName . mapTreeData unImportNames) condLibrary_ - ++ map (uncurry extractAssocDeps) condSubLibraries_ + ++ map (uncurry extractAssocDeps) condSubLibrariesMerged case condLibrary_ of Just cl -> @@ -314,7 +317,7 @@ checkGenericPackageDescription (checkLibrary False ads) (\u l -> l{libName = maybeToLibraryName (Just u)}) ) - condSubLibraries_ + condSubLibrariesMerged mapM_ ( checkCondTarget genPackageFlags_ @@ -962,9 +965,9 @@ pd2gpd pd = gpd gpd = emptyGenericPackageDescription { packageDescription = pd - , -- TODO(leana8959): think about reverse conversion - condLibrary = t2c . noImports <$> (library pd) - , condSubLibraries = map (t2cName ln id) (subLibraries pd) + -- TODO(leana8959): think about reverse conversion + , condLibrary = t2c . noImports <$> (library pd) + , condSubLibraries = map (fmap (mapTreeData noImports) . t2cName ln id) (subLibraries pd) , condForeignLibs = map (t2cName foreignLibName id) diff --git a/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs b/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs index 040f529fb54..e21d759c4e5 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs @@ -230,7 +230,7 @@ checkCondVars cond = checkDuplicateModules :: GenericPackageDescription -> [PackageCheck] checkDuplicateModules pkg = -- TODO(leana8959): - concatMap checkLib (maybe id (:) (mapTreeData unImportNames <$> condLibrary pkg) . map snd $ condSubLibraries pkg) + concatMap checkLib (maybe id (:) (mapTreeData unImportNames <$> condLibrary pkg) . map snd $ condSubLibraries' pkg) ++ concatMap checkExe (map snd $ condExecutables pkg) ++ concatMap checkTest (map snd $ condTestSuites pkg) ++ concatMap checkBench (map snd $ condBenchmarks pkg) From 1cd716f21fb761b6719cc20a11a30c50570ee7cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 7 Nov 2025 10:47:13 +0800 Subject: [PATCH 24/60] simplification; remove todos --- .../PackageDescription/Configuration.hs | 19 ++++------ .../PackageDescription/PrettyPrint.hs | 2 +- .../Types/GenericPackageDescription.hs | 36 ++++++++++--------- Cabal-tests/tests/ParserTests.hs | 4 +-- .../Distribution/PackageDescription/Check.hs | 21 +++++------ .../PackageDescription/Check/Conditional.hs | 4 +-- 6 files changed, 38 insertions(+), 48 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs index 8c1ce229f64..c7bbd6bc014 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs @@ -57,7 +57,6 @@ import Distribution.Types.Component import Distribution.Types.ComponentRequestedSpec import Distribution.Types.DependencyMap import Distribution.Types.DependencySatisfaction (DependencySatisfaction (..)) -import Distribution.Types.Imports import Distribution.Types.MissingDependency (MissingDependency (..)) import Distribution.Types.PackageVersionConstraint import Distribution.Utils.Generic @@ -320,8 +319,7 @@ extractConditions -> [Condition ConfVar] extractConditions f gpkg = concat - -- TODO(leana8959): merge this and not just drop the imports - [ extractCondition (f . libBuildInfo) <$> maybeToList (mapTreeData unImportNames <$> condLibrary gpkg) + [ extractCondition (f . libBuildInfo) <$> maybeToList (condLibrary' gpkg) , extractCondition (f . libBuildInfo) . snd <$> condSubLibraries' gpkg , extractCondition (f . buildInfo) . snd <$> condExecutables gpkg , extractCondition (f . testBuildInfo) . snd <$> condTestSuites gpkg @@ -460,8 +458,7 @@ finalizePD (Platform arch os) impl constraints - -- TODO(leana8959): we maybe want to resolve the imports here ? - (GenericPackageDescription pkg _ver flags commonStanzas mb_lib0 sub_libs0 flibs0 exes0 tests0 bms0) = do + gpd@(GenericPackageDescription pkg _ver flags _commonStanzas _mb_lib0 _sub_libs0 flibs0 exes0 tests0 bms0) = do (targetSet, flagVals) <- resolveWithFlags flagChoices enabled os arch impl constraints condTrees check let @@ -496,9 +493,8 @@ finalizePD where -- Combine lib, exes, and tests into one list of @CondTree@s with tagged data condTrees = - -- TODO(leana8959): handle imports - maybeToList (fmap (mapTreeData $ Lib . unImportNames) mb_lib0) - ++ map (\(name, tree) -> mapTreeData (SubComp name . CLib) tree) (mergeCondSubLibraries commonStanzas sub_libs0) + maybeToList (mapTreeData Lib <$> condLibrary' gpd) + ++ map (\(name, tree) -> mapTreeData (SubComp name . CLib) tree) (condSubLibraries' gpd) ++ map (\(name, tree) -> mapTreeData (SubComp name . CFLib) tree) flibs0 ++ map (\(name, tree) -> mapTreeData (SubComp name . CExe) tree) exes0 ++ map (\(name, tree) -> mapTreeData (SubComp name . CTest) tree) tests0 @@ -546,7 +542,7 @@ resolveWithFlags [] Distribution.System.Linux Distribution.System.I386 (Distribu -- function. flattenPackageDescription :: GenericPackageDescription -> PackageDescription flattenPackageDescription - (GenericPackageDescription pkg _ _ commonStanzas mlib0 sub_libs0 flibs0 exes0 tests0 bms0) = + gpd@(GenericPackageDescription pkg _ _ gpdCommonStanzas_ _mlib0 sub_libs0 flibs0 exes0 tests0 bms0) = pkg { library = mlib , subLibraries = reverse sub_libs @@ -556,11 +552,10 @@ flattenPackageDescription , benchmarks = reverse bms } where - -- TODO(leana8959): handle imports - mlib = f . mapTreeData unImportNames <$> mlib0 + mlib = f <$> condLibrary' gpd where f lib = (libFillInDefaults . fst . ignoreConditions $ lib){libName = LMainLibName} - sub_libs = flattenLib <$> (mergeCondSubLibraries commonStanzas sub_libs0) + sub_libs = flattenLib <$> (mergeCondSubLibraries gpdCommonStanzas_ sub_libs0) flibs = flattenFLib <$> flibs0 exes = flattenExe <$> exes0 tests = flattenTst <$> tests0 diff --git a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs index ca91b6075a6..19f7ba828a0 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs @@ -80,7 +80,7 @@ ppGenericPackageDescription v gpd0 = [ ppPackageDescription v (packageDescription gpd) , ppSetupBInfo v (setupBuildInfo (packageDescription gpd)) , ppGenPackageFlags v (genPackageFlags gpd) - , ppCondLibrary v (mapTreeData unImportNames <$> condLibrary gpd) + , ppCondLibrary v (condLibrary' gpd) , ppCondSubLibraries v (condSubLibraries' gpd) , ppCondForeignLibs v (condForeignLibs gpd) , ppCondExecutables v (condExecutables gpd) diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index 4e506c1b78b..43f222bf815 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -7,8 +7,8 @@ module Distribution.Types.GenericPackageDescription ( GenericPackageDescription (..) , emptyGenericPackageDescription - -- TODO(leana8959): rename this - , _condLibrary + , condLibrary' + , mergeCondLibrary , condSubLibraries' , mergeCondSubLibraries ) where @@ -98,27 +98,30 @@ libraryFromBuildInfo n bi = , libBuildInfo = bi } -_condLibrary :: GenericPackageDescription -> Maybe (CondTree ConfVar [Dependency] Library) -_condLibrary gpd = - let commonStanzas = gpdCommonStanzas gpd - fromBuildInfo :: Library -> (BuildInfo -> Library) - fromBuildInfo = libraryFromBuildInfo . libName - in mergeImports commonStanzas fromBuildInfo <$> (condLibrary gpd) +condLibrary' + :: GenericPackageDescription + -> Maybe (CondTree ConfVar [Dependency] Library) +condLibrary' gpd = mergeCondLibrary (gpdCommonStanzas gpd) <$> (condLibrary gpd) -condSubLibraries' :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)] +mergeCondLibrary + :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) + -> CondTree ConfVar [Dependency] (WithImports Library) + -> CondTree ConfVar [Dependency] Library +mergeCondLibrary = flip mergeImports fromBuildInfo + where + fromBuildInfo :: Library -> (BuildInfo -> Library) + fromBuildInfo = libraryFromBuildInfo . libName + +condSubLibraries' + :: GenericPackageDescription + -> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)] condSubLibraries' gpd = mergeCondSubLibraries (gpdCommonStanzas gpd) (condSubLibraries gpd) mergeCondSubLibraries :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) -> [(UnqualComponentName, CondTree ConfVar [Dependency] (WithImports Library))] -> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)] -mergeCondSubLibraries commonStanzas = map (fmap go) - where - go :: CondTree ConfVar [Dependency] (WithImports Library) -> CondTree ConfVar [Dependency] Library - go lib = - let fromBuildInfo :: Library -> (BuildInfo -> Library) - fromBuildInfo = libraryFromBuildInfo . libName - in mergeImports commonStanzas fromBuildInfo lib +mergeCondSubLibraries commonStanzas = map (mergeCondLibrary commonStanzas <$>) mergeImports :: forall a @@ -144,7 +147,6 @@ mergeImports commonStanzas fromBuildInfo (CondNode root c zs) = where goNode = mergeImports commonStanzas fromBuildInfo - -- TODO(leana8959): (at some point it'll become (WithImports BuildInfo) and it'll force us to handle its imports too) resolveImports :: L.HasBuildInfo a => [ImportName] diff --git a/Cabal-tests/tests/ParserTests.hs b/Cabal-tests/tests/ParserTests.hs index c913139d4aa..11fdb14cba4 100644 --- a/Cabal-tests/tests/ParserTests.hs +++ b/Cabal-tests/tests/ParserTests.hs @@ -15,7 +15,7 @@ import Data.Algorithm.Diff (PolyDiff (..), getGroupedDif import Data.Maybe (isNothing) import Distribution.Fields (pwarning) import Distribution.PackageDescription (GenericPackageDescription) -import Distribution.Types.GenericPackageDescription(_condLibrary) +import Distribution.Types.GenericPackageDescription(condLibrary') import Distribution.PackageDescription.Parsec (parseGenericPackageDescription) import Distribution.PackageDescription.PrettyPrint (showGenericPackageDescription) import Distribution.Parsec (PWarnType (..), PWarning (..), showPErrorWithSource, showPWarningWithSource) @@ -169,7 +169,7 @@ accessorsTests = testGroup "accessors" #ifdef MIN_VERSION_tree_diff accessorsGoldenTestCondLibrary :: [FilePath] -> TestTree -accessorsGoldenTestCondLibrary = testGroup "condLibrary" . map (accessorsGoldenTest _condLibrary) +accessorsGoldenTestCondLibrary = testGroup "condLibrary" . map (accessorsGoldenTest condLibrary') accessorsGoldenTest :: ToExpr a diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs index 66020a1d54d..6800309b51f 100644 --- a/Cabal/src/Distribution/PackageDescription/Check.hs +++ b/Cabal/src/Distribution/PackageDescription/Check.hs @@ -229,23 +229,19 @@ checkGenericPackageDescription genPackageFlags_ gpdCommonStanzas_ condLibrary_ - condSubLibraries_ + _condSubLibraries_ -- we use the merged version condForeignLibs_ condExecutables_ condTestSuites_ condBenchmarks_ ) = - let - condSubLibrariesMerged = mergeCondSubLibraries gpdCommonStanzas_ condSubLibraries_ - in do -- § Description and names. checkPackageDescription packageDescription_ -- Targets should be present... let condAllLibraries = - -- TODO(leana8959): - maybeToList (mapTreeData unImportNames <$> condLibrary_) - ++ (map snd condSubLibrariesMerged) + maybeToList (condLibrary' gpd) + ++ (map snd $ condSubLibraries' gpd) checkP ( and [ null condExecutables_ @@ -280,7 +276,7 @@ checkGenericPackageDescription -- § Feature checks. checkSpecVer CabalSpecV2_0 - (not . null $ condSubLibrariesMerged) + (not . null $ condSubLibraries' gpd) (PackageDistInexcusable CVMultiLib) checkSpecVer CabalSpecV1_8 @@ -299,9 +295,8 @@ checkGenericPackageDescription . ccNames ) let ads = - -- TODO(leana8959): - maybe [] ((: []) . extractAssocDeps pName . mapTreeData unImportNames) condLibrary_ - ++ map (uncurry extractAssocDeps) condSubLibrariesMerged + maybe [] ((: []) . extractAssocDeps pName . (mergeCondLibrary gpdCommonStanzas_)) condLibrary_ + ++ map (uncurry extractAssocDeps) (condSubLibraries' gpd) case condLibrary_ of Just cl -> @@ -309,7 +304,7 @@ checkGenericPackageDescription genPackageFlags_ (checkLibrary False ads) (const id) - (mempty, mapTreeData unImportNames cl) + (mempty, mergeCondLibrary gpdCommonStanzas_ cl) Nothing -> return () mapM_ ( checkCondTarget @@ -317,7 +312,7 @@ checkGenericPackageDescription (checkLibrary False ads) (\u l -> l{libName = maybeToLibraryName (Just u)}) ) - condSubLibrariesMerged + (condSubLibraries' gpd) mapM_ ( checkCondTarget genPackageFlags_ diff --git a/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs b/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs index e21d759c4e5..e98bf9910a7 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs @@ -26,7 +26,6 @@ import Distribution.Package import Distribution.PackageDescription import Distribution.PackageDescription.Check.Monad import Distribution.System -import Distribution.Types.Imports import qualified Data.Map as Map @@ -229,8 +228,7 @@ checkCondVars cond = -- this particular check. checkDuplicateModules :: GenericPackageDescription -> [PackageCheck] checkDuplicateModules pkg = - -- TODO(leana8959): - concatMap checkLib (maybe id (:) (mapTreeData unImportNames <$> condLibrary pkg) . map snd $ condSubLibraries' pkg) + concatMap checkLib (maybe id (:) (condLibrary' pkg) . map snd $ condSubLibraries' pkg) ++ concatMap checkExe (map snd $ condExecutables pkg) ++ concatMap checkTest (map snd $ condTestSuites pkg) ++ concatMap checkBench (map snd $ condBenchmarks pkg) From 4a040df043ad8bf80b26f1886f8792db28fa5f0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 7 Nov 2025 12:05:22 +0800 Subject: [PATCH 25/60] retain foreignlib imports --- .../PackageDescription/Configuration.hs | 10 ++++----- .../PackageDescription/FieldGrammar.hs | 2 +- .../Distribution/PackageDescription/Parsec.hs | 5 ++--- .../PackageDescription/PrettyPrint.hs | 4 ++-- .../src/Distribution/Types/ForeignLib.hs | 17 -------------- .../Types/GenericPackageDescription.hs | 22 +++++++++++++++++-- .../Types/GenericPackageDescription/Lens.hs | 2 +- .../Distribution/PackageDescription/Check.hs | 4 ++-- .../PackageDescription/Check/Target.hs | 1 - 9 files changed, 33 insertions(+), 34 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs index c7bbd6bc014..b3436892ca5 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs @@ -458,7 +458,7 @@ finalizePD (Platform arch os) impl constraints - gpd@(GenericPackageDescription pkg _ver flags _commonStanzas _mb_lib0 _sub_libs0 flibs0 exes0 tests0 bms0) = do + gpd@(GenericPackageDescription pkg _ver flags _commonStanzas _mb_lib0 _sub_libs0 _flibs0 exes0 tests0 bms0) = do (targetSet, flagVals) <- resolveWithFlags flagChoices enabled os arch impl constraints condTrees check let @@ -495,7 +495,7 @@ finalizePD condTrees = maybeToList (mapTreeData Lib <$> condLibrary' gpd) ++ map (\(name, tree) -> mapTreeData (SubComp name . CLib) tree) (condSubLibraries' gpd) - ++ map (\(name, tree) -> mapTreeData (SubComp name . CFLib) tree) flibs0 + ++ map (\(name, tree) -> mapTreeData (SubComp name . CFLib) tree) (condForeignLibs' gpd) ++ map (\(name, tree) -> mapTreeData (SubComp name . CExe) tree) exes0 ++ map (\(name, tree) -> mapTreeData (SubComp name . CTest) tree) tests0 ++ map (\(name, tree) -> mapTreeData (SubComp name . CBench) tree) bms0 @@ -542,7 +542,7 @@ resolveWithFlags [] Distribution.System.Linux Distribution.System.I386 (Distribu -- function. flattenPackageDescription :: GenericPackageDescription -> PackageDescription flattenPackageDescription - gpd@(GenericPackageDescription pkg _ _ gpdCommonStanzas_ _mlib0 sub_libs0 flibs0 exes0 tests0 bms0) = + gpd@(GenericPackageDescription pkg _ _ _gpdCommonStanzas_ _mlib0 _sub_libs0 _flibs0 exes0 tests0 bms0) = pkg { library = mlib , subLibraries = reverse sub_libs @@ -555,8 +555,8 @@ flattenPackageDescription mlib = f <$> condLibrary' gpd where f lib = (libFillInDefaults . fst . ignoreConditions $ lib){libName = LMainLibName} - sub_libs = flattenLib <$> (mergeCondSubLibraries gpdCommonStanzas_ sub_libs0) - flibs = flattenFLib <$> flibs0 + sub_libs = flattenLib <$> (condSubLibraries' gpd) + flibs = flattenFLib <$> (condForeignLibs' gpd) exes = flattenExe <$> exes0 tests = flattenTst <$> tests0 bms = flattenBm <$> bms0 diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index 9fe5daff070..ab9f80ee9e2 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -242,7 +242,7 @@ foreignLibFieldGrammar => UnqualComponentName -> g ForeignLib ForeignLib foreignLibFieldGrammar n = - ForeignLib n [] + ForeignLib n <$> optionalFieldDef "type" L.foreignLibType ForeignLibTypeUnknown <*> monoidalFieldAla "options" (alaList FSep) L.foreignLibOptions <*> blurFieldGrammar L.foreignLibBuildInfo buildInfoFieldGrammar diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index 9cdb77c2678..979cb6b769b 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -317,10 +317,9 @@ goSections specVer fields = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args flib <- lift $ parseCondTree' (foreignLibFieldGrammar name') (fromBuildInfo' name') commonStanzas fields - let flib' = insertForeignLibImports flib let hasType ts = foreignLibType ts /= foreignLibType mempty - unless (onAllBranches hasType flib') $ + unless (onAllBranches hasType (mapTreeData unImportNames flib)) $ lift $ parseFailure pos $ concat @@ -332,7 +331,7 @@ goSections specVer fields = do ] -- TODO check duplicate name here? - stateGpd . L.condForeignLibs %= snoc (name', flib') + stateGpd . L.condForeignLibs %= snoc (name', flib) | name == "executable" = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args diff --git a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs index 19f7ba828a0..57e968ea0e0 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs @@ -82,7 +82,7 @@ ppGenericPackageDescription v gpd0 = , ppGenPackageFlags v (genPackageFlags gpd) , ppCondLibrary v (condLibrary' gpd) , ppCondSubLibraries v (condSubLibraries' gpd) - , ppCondForeignLibs v (condForeignLibs gpd) + , ppCondForeignLibs v (condForeignLibs' gpd) , ppCondExecutables v (condExecutables gpd) , ppCondTestSuites v (condTestSuites gpd) , ppCondBenchmarks v (condBenchmarks gpd) @@ -235,7 +235,7 @@ pdToGpd pd = , -- TODO(leana8959): what to do here condLibrary = mapTreeData noImports . mkCondTree <$> library pd , condSubLibraries = fmap (mapTreeData noImports) . mkCondTreeL <$> subLibraries pd - , condForeignLibs = mkCondTree' foreignLibName <$> foreignLibs pd + , condForeignLibs = fmap (mapTreeData noImports) . mkCondTree' foreignLibName <$> foreignLibs pd , condExecutables = mkCondTree' exeName <$> executables pd , condTestSuites = mkCondTree' testName <$> testSuites pd , condBenchmarks = mkCondTree' benchmarkName <$> benchmarks pd diff --git a/Cabal-syntax/src/Distribution/Types/ForeignLib.hs b/Cabal-syntax/src/Distribution/Types/ForeignLib.hs index 5b48348fd2d..c8a1472ca56 100644 --- a/Cabal-syntax/src/Distribution/Types/ForeignLib.hs +++ b/Cabal-syntax/src/Distribution/Types/ForeignLib.hs @@ -14,7 +14,6 @@ module Distribution.Types.ForeignLib , libVersionNumber , libVersionNumberShow , libVersionMajor - , insertForeignLibImports ) where import Distribution.Compat.Prelude @@ -25,12 +24,8 @@ import Distribution.Parsec import Distribution.Pretty import Distribution.System import Distribution.Types.BuildInfo -import Distribution.Types.CondTree -import Distribution.Types.ConfVar -import Distribution.Types.Dependency import Distribution.Types.ForeignLibOption import Distribution.Types.ForeignLibType -import Distribution.Types.Imports import Distribution.Types.UnqualComponentName import Distribution.Utils.Path import Distribution.Version @@ -47,8 +42,6 @@ import qualified Distribution.Types.BuildInfo.Lens as L data ForeignLib = ForeignLib { foreignLibName :: UnqualComponentName -- ^ Name of the foreign library - , foreignLibImports :: [ImportName] - -- ^ Retained imports for exact printing , foreignLibType :: ForeignLibType -- ^ What kind of foreign library is this (static or dynamic). , foreignLibOptions :: [ForeignLibOption] @@ -72,14 +65,6 @@ data ForeignLib = ForeignLib data LibVersionInfo = LibVersionInfo Int Int Int deriving (Data, Eq, Generic) -insertForeignLibImports - :: CondTree ConfVar [Dependency] (WithImports ForeignLib) - -> CondTree ConfVar [Dependency] ForeignLib -insertForeignLibImports = mapCondTree f id id - where - f :: WithImports ForeignLib -> ForeignLib - f (WithImports importNames flib) = flib{foreignLibImports = importNames} - instance Ord LibVersionInfo where LibVersionInfo c r _ `compare` LibVersionInfo c' r' _ = case c `compare` c' of @@ -159,7 +144,6 @@ instance Semigroup ForeignLib where a <> b = ForeignLib { foreignLibName = combineNames a b foreignLibName "foreign library" - , foreignLibImports = combine foreignLibImports , foreignLibType = combine foreignLibType , foreignLibOptions = combine foreignLibOptions , foreignLibBuildInfo = combine foreignLibBuildInfo @@ -176,7 +160,6 @@ instance Monoid ForeignLib where mempty = ForeignLib { foreignLibName = mempty - , foreignLibImports = mempty , foreignLibType = ForeignLibTypeUnknown , foreignLibOptions = [] , foreignLibBuildInfo = mempty diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index 43f222bf815..388b7124d36 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -11,6 +11,8 @@ module Distribution.Types.GenericPackageDescription , mergeCondLibrary , condSubLibraries' , mergeCondSubLibraries + , condForeignLibs' + , mergeCondForeignLibs ) where import Distribution.Compat.Prelude @@ -67,7 +69,7 @@ data GenericPackageDescription = GenericPackageDescription ] , condForeignLibs :: [ ( UnqualComponentName - , CondTree ConfVar [Dependency] ForeignLib + , CondTree ConfVar [Dependency] (WithImports ForeignLib) ) ] , condExecutables @@ -98,6 +100,9 @@ libraryFromBuildInfo n bi = , libBuildInfo = bi } +foreignLibFromBuildInfo :: UnqualComponentName -> BuildInfo -> ForeignLib +foreignLibFromBuildInfo n bi = emptyForeignLib{foreignLibName = n, foreignLibBuildInfo = bi} + condLibrary' :: GenericPackageDescription -> Maybe (CondTree ConfVar [Dependency] Library) @@ -109,7 +114,6 @@ mergeCondLibrary -> CondTree ConfVar [Dependency] Library mergeCondLibrary = flip mergeImports fromBuildInfo where - fromBuildInfo :: Library -> (BuildInfo -> Library) fromBuildInfo = libraryFromBuildInfo . libName condSubLibraries' @@ -123,6 +127,20 @@ mergeCondSubLibraries -> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)] mergeCondSubLibraries commonStanzas = map (mergeCondLibrary commonStanzas <$>) +condForeignLibs' + :: GenericPackageDescription + -> [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)] +condForeignLibs' gpd = mergeCondForeignLibs (gpdCommonStanzas gpd) (condForeignLibs gpd) + +mergeCondForeignLibs + :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) + -> [(UnqualComponentName, CondTree ConfVar [Dependency] (WithImports ForeignLib))] + -> [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)] +mergeCondForeignLibs commonStanzas = map go + where + -- TODO(leana8959): is the name within the foreignlib important, on the name in the tuple? + go (name, tree) = (name, mergeImports commonStanzas (const $ foreignLibFromBuildInfo name) tree) + mergeImports :: forall a . L.HasBuildInfo a diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs index 469254cda91..145b9a7aac7 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs @@ -65,7 +65,7 @@ condSubLibraries :: Lens' GenericPackageDescription [(UnqualComponentName, (Cond condSubLibraries f s = fmap (\x -> s{T.condSubLibraries = x}) (f (T.condSubLibraries s)) {-# INLINE condSubLibraries #-} -condForeignLibs :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] ForeignLib))] +condForeignLibs :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] (T.WithImports ForeignLib)))] condForeignLibs f s = fmap (\x -> s{T.condForeignLibs = x}) (f (T.condForeignLibs s)) {-# INLINE condForeignLibs #-} diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs index 6800309b51f..2d26800a691 100644 --- a/Cabal/src/Distribution/PackageDescription/Check.hs +++ b/Cabal/src/Distribution/PackageDescription/Check.hs @@ -319,7 +319,7 @@ checkGenericPackageDescription checkForeignLib (const id) ) - condForeignLibs_ + (condForeignLibs' gpd) mapM_ ( checkCondTarget genPackageFlags_ @@ -965,7 +965,7 @@ pd2gpd pd = gpd , condSubLibraries = map (fmap (mapTreeData noImports) . t2cName ln id) (subLibraries pd) , condForeignLibs = map - (t2cName foreignLibName id) + (fmap (mapTreeData noImports) . t2cName foreignLibName id) (foreignLibs pd) , condExecutables = map diff --git a/Cabal/src/Distribution/PackageDescription/Check/Target.hs b/Cabal/src/Distribution/PackageDescription/Check/Target.hs index c445beaa478..a58ad749623 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Target.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Target.hs @@ -116,7 +116,6 @@ checkForeignLib :: Monad m => ForeignLib -> CheckM m () checkForeignLib ( ForeignLib foreignLibName_ - _foreignLibImports_ _foreignLibType_ _foreignLibOptions_ foreignLibBuildInfo_ From 2d39129bcb1ae621581d2e712895b34e1e6facea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 7 Nov 2025 14:15:46 +0800 Subject: [PATCH 26/60] retain executable imports --- .../PackageDescription/Configuration.hs | 10 +++---- .../Distribution/PackageDescription/Parsec.hs | 3 +-- .../PackageDescription/PrettyPrint.hs | 4 +-- .../src/Distribution/Types/Executable.hs | 12 --------- .../Types/GenericPackageDescription.hs | 26 +++++++++++++++---- .../Types/GenericPackageDescription/Lens.hs | 2 +- .../Distribution/PackageDescription/Check.hs | 4 +-- .../PackageDescription/Check/Conditional.hs | 2 +- 8 files changed, 33 insertions(+), 30 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs index b3436892ca5..24dc04f29fd 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs @@ -321,7 +321,7 @@ extractConditions f gpkg = concat [ extractCondition (f . libBuildInfo) <$> maybeToList (condLibrary' gpkg) , extractCondition (f . libBuildInfo) . snd <$> condSubLibraries' gpkg - , extractCondition (f . buildInfo) . snd <$> condExecutables gpkg + , extractCondition (f . buildInfo) . snd <$> (condExecutables' gpkg) , extractCondition (f . testBuildInfo) . snd <$> condTestSuites gpkg , extractCondition (f . benchmarkBuildInfo) . snd <$> condBenchmarks gpkg ] @@ -458,7 +458,7 @@ finalizePD (Platform arch os) impl constraints - gpd@(GenericPackageDescription pkg _ver flags _commonStanzas _mb_lib0 _sub_libs0 _flibs0 exes0 tests0 bms0) = do + gpd@(GenericPackageDescription pkg _ver flags _commonStanzas _mb_lib0 _sub_libs0 _flibs0 _exes0 tests0 bms0) = do (targetSet, flagVals) <- resolveWithFlags flagChoices enabled os arch impl constraints condTrees check let @@ -496,7 +496,7 @@ finalizePD maybeToList (mapTreeData Lib <$> condLibrary' gpd) ++ map (\(name, tree) -> mapTreeData (SubComp name . CLib) tree) (condSubLibraries' gpd) ++ map (\(name, tree) -> mapTreeData (SubComp name . CFLib) tree) (condForeignLibs' gpd) - ++ map (\(name, tree) -> mapTreeData (SubComp name . CExe) tree) exes0 + ++ map (\(name, tree) -> mapTreeData (SubComp name . CExe) tree) (condExecutables' gpd) ++ map (\(name, tree) -> mapTreeData (SubComp name . CTest) tree) tests0 ++ map (\(name, tree) -> mapTreeData (SubComp name . CBench) tree) bms0 @@ -542,7 +542,7 @@ resolveWithFlags [] Distribution.System.Linux Distribution.System.I386 (Distribu -- function. flattenPackageDescription :: GenericPackageDescription -> PackageDescription flattenPackageDescription - gpd@(GenericPackageDescription pkg _ _ _gpdCommonStanzas_ _mlib0 _sub_libs0 _flibs0 exes0 tests0 bms0) = + gpd@(GenericPackageDescription pkg _ _ _gpdCommonStanzas_ _mlib0 _sub_libs0 _flibs0 _exes0 tests0 bms0) = pkg { library = mlib , subLibraries = reverse sub_libs @@ -557,7 +557,7 @@ flattenPackageDescription f lib = (libFillInDefaults . fst . ignoreConditions $ lib){libName = LMainLibName} sub_libs = flattenLib <$> (condSubLibraries' gpd) flibs = flattenFLib <$> (condForeignLibs' gpd) - exes = flattenExe <$> exes0 + exes = flattenExe <$> (condExecutables' gpd) tests = flattenTst <$> tests0 bms = flattenBm <$> bms0 flattenLib (n, t) = diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index 979cb6b769b..2999b8b235e 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -336,9 +336,8 @@ goSections specVer fields = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args exe <- lift $ parseCondTree' (executableFieldGrammar name') (fromBuildInfo' name') commonStanzas fields - let exe' = insertExeImports exe -- TODO check duplicate name here? - stateGpd . L.condExecutables %= snoc (name', exe') + stateGpd . L.condExecutables %= snoc (name', exe) | name == "test-suite" = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args diff --git a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs index 57e968ea0e0..19dece7639d 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs @@ -83,7 +83,7 @@ ppGenericPackageDescription v gpd0 = , ppCondLibrary v (condLibrary' gpd) , ppCondSubLibraries v (condSubLibraries' gpd) , ppCondForeignLibs v (condForeignLibs' gpd) - , ppCondExecutables v (condExecutables gpd) + , ppCondExecutables v (condExecutables' gpd) , ppCondTestSuites v (condTestSuites gpd) , ppCondBenchmarks v (condBenchmarks gpd) ] @@ -236,7 +236,7 @@ pdToGpd pd = condLibrary = mapTreeData noImports . mkCondTree <$> library pd , condSubLibraries = fmap (mapTreeData noImports) . mkCondTreeL <$> subLibraries pd , condForeignLibs = fmap (mapTreeData noImports) . mkCondTree' foreignLibName <$> foreignLibs pd - , condExecutables = mkCondTree' exeName <$> executables pd + , condExecutables = fmap (mapTreeData noImports) . mkCondTree' exeName <$> executables pd , condTestSuites = mkCondTree' testName <$> testSuites pd , condBenchmarks = mkCondTree' benchmarkName <$> benchmarks pd } diff --git a/Cabal-syntax/src/Distribution/Types/Executable.hs b/Cabal-syntax/src/Distribution/Types/Executable.hs index 8b140bf7f0b..05e2cc25eb2 100644 --- a/Cabal-syntax/src/Distribution/Types/Executable.hs +++ b/Cabal-syntax/src/Distribution/Types/Executable.hs @@ -7,7 +7,6 @@ module Distribution.Types.Executable , emptyExecutable , exeModules , exeModulesAutogen - , insertExeImports ) where import Distribution.Compat.Prelude @@ -15,9 +14,6 @@ import Prelude () import Distribution.ModuleName import Distribution.Types.BuildInfo -import Distribution.Types.CondTree -import Distribution.Types.ConfVar -import Distribution.Types.Dependency import Distribution.Types.ExecutableScope import Distribution.Types.Imports import Distribution.Types.UnqualComponentName @@ -35,14 +31,6 @@ data Executable = Executable } deriving (Generic, Show, Read, Eq, Ord, Data) -insertExeImports - :: CondTree ConfVar [Dependency] (WithImports Executable) - -> CondTree ConfVar [Dependency] Executable -insertExeImports = mapCondTree f id id - where - f :: WithImports Executable -> Executable - f (WithImports importNames exe) = exe{exeImports = importNames} - instance L.HasBuildInfo Executable where buildInfo f l = (\x -> l{buildInfo = x}) <$> f (buildInfo l) diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index 388b7124d36..c53fa29d5f9 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -13,6 +13,8 @@ module Distribution.Types.GenericPackageDescription , mergeCondSubLibraries , condForeignLibs' , mergeCondForeignLibs + , condExecutables' + , mergeCondExecutables ) where import Distribution.Compat.Prelude @@ -74,7 +76,7 @@ data GenericPackageDescription = GenericPackageDescription ] , condExecutables :: [ ( UnqualComponentName - , CondTree ConfVar [Dependency] Executable + , CondTree ConfVar [Dependency] (WithImports Executable) ) ] , condTestSuites @@ -103,6 +105,9 @@ libraryFromBuildInfo n bi = foreignLibFromBuildInfo :: UnqualComponentName -> BuildInfo -> ForeignLib foreignLibFromBuildInfo n bi = emptyForeignLib{foreignLibName = n, foreignLibBuildInfo = bi} +executableFromBuildInfo :: UnqualComponentName -> BuildInfo -> Executable +executableFromBuildInfo n bi = emptyExecutable{exeName = n, buildInfo = bi} + condLibrary' :: GenericPackageDescription -> Maybe (CondTree ConfVar [Dependency] Library) @@ -136,10 +141,21 @@ mergeCondForeignLibs :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) -> [(UnqualComponentName, CondTree ConfVar [Dependency] (WithImports ForeignLib))] -> [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)] -mergeCondForeignLibs commonStanzas = map go - where - -- TODO(leana8959): is the name within the foreignlib important, on the name in the tuple? - go (name, tree) = (name, mergeImports commonStanzas (const $ foreignLibFromBuildInfo name) tree) +mergeCondForeignLibs commonStanzas = map $ \(name, tree) -> + -- TODO(leana8959): is the name within the foreignlib important or we should use the name in the tuple? + (name, mergeImports commonStanzas (const $ foreignLibFromBuildInfo name) tree) + +condExecutables' + :: GenericPackageDescription + -> [(UnqualComponentName, CondTree ConfVar [Dependency] Executable)] +condExecutables' gpd = mergeCondExecutables (gpdCommonStanzas gpd) (condExecutables gpd) + +mergeCondExecutables + :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) + -> [(UnqualComponentName, CondTree ConfVar [Dependency] (WithImports Executable))] + -> [(UnqualComponentName, CondTree ConfVar [Dependency] Executable)] +mergeCondExecutables commonStanzas = map $ \(name, tree) -> + (name, mergeImports commonStanzas (const $ executableFromBuildInfo name) tree) mergeImports :: forall a diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs index 145b9a7aac7..f749ab9793c 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs @@ -69,7 +69,7 @@ condForeignLibs :: Lens' GenericPackageDescription [(UnqualComponentName, (CondT condForeignLibs f s = fmap (\x -> s{T.condForeignLibs = x}) (f (T.condForeignLibs s)) {-# INLINE condForeignLibs #-} -condExecutables :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] Executable))] +condExecutables :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] (T.WithImports Executable)))] condExecutables f s = fmap (\x -> s{T.condExecutables = x}) (f (T.condExecutables s)) {-# INLINE condExecutables #-} diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs index 2d26800a691..a6ff0761bc3 100644 --- a/Cabal/src/Distribution/PackageDescription/Check.hs +++ b/Cabal/src/Distribution/PackageDescription/Check.hs @@ -326,7 +326,7 @@ checkGenericPackageDescription (checkExecutable ads) (const id) ) - condExecutables_ + (condExecutables' gpd) mapM_ ( checkCondTarget genPackageFlags_ @@ -969,7 +969,7 @@ pd2gpd pd = gpd (foreignLibs pd) , condExecutables = map - (t2cName exeName id) + (fmap (mapTreeData noImports) . t2cName exeName id) (executables pd) , condTestSuites = map diff --git a/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs b/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs index e98bf9910a7..8772683babc 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs @@ -229,7 +229,7 @@ checkCondVars cond = checkDuplicateModules :: GenericPackageDescription -> [PackageCheck] checkDuplicateModules pkg = concatMap checkLib (maybe id (:) (condLibrary' pkg) . map snd $ condSubLibraries' pkg) - ++ concatMap checkExe (map snd $ condExecutables pkg) + ++ concatMap checkExe (map snd $ condExecutables' pkg) ++ concatMap checkTest (map snd $ condTestSuites pkg) ++ concatMap checkBench (map snd $ condBenchmarks pkg) where From ac753221baa05c4b818f04c5938b5f009897ab72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 10 Nov 2025 17:02:42 +0800 Subject: [PATCH 27/60] retain TestSuiteStanza imports We isolated the type TestSuiteStanza and the logic to infer test type --- Cabal-syntax/Cabal-syntax.cabal | 1 + Cabal-syntax/src/Distribution/FieldGrammar.hs | 1 + .../PackageDescription/Configuration.hs | 12 +- .../PackageDescription/FieldGrammar.hs | 116 ++------------ .../Distribution/PackageDescription/Parsec.hs | 21 ++- .../PackageDescription/PrettyPrint.hs | 7 +- .../Types/GenericPackageDescription.hs | 52 +++++-- .../Types/GenericPackageDescription/Lens.hs | 3 +- .../src/Distribution/Types/TestSuiteStanza.hs | 141 ++++++++++++++++++ .../src/Data/TreeDiff/Instances/Cabal.hs | 2 + .../Distribution/PackageDescription/Check.hs | 5 +- .../PackageDescription/Check/Conditional.hs | 2 +- 12 files changed, 228 insertions(+), 135 deletions(-) create mode 100644 Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal index 1095fadedba..1a0e7bba1f9 100644 --- a/Cabal-syntax/Cabal-syntax.cabal +++ b/Cabal-syntax/Cabal-syntax.cabal @@ -185,6 +185,7 @@ library Distribution.Types.SourceRepo Distribution.Types.SourceRepo.Lens Distribution.Types.TestSuite + Distribution.Types.TestSuiteStanza Distribution.Types.TestSuite.Lens Distribution.Types.TestSuiteInterface Distribution.Types.TestType diff --git a/Cabal-syntax/src/Distribution/FieldGrammar.hs b/Cabal-syntax/src/Distribution/FieldGrammar.hs index 78739a37cfa..5bc89460f24 100644 --- a/Cabal-syntax/src/Distribution/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/FieldGrammar.hs @@ -45,6 +45,7 @@ import Distribution.FieldGrammar.Newtypes import Distribution.FieldGrammar.Parsec import Distribution.FieldGrammar.Pretty import Distribution.Fields.Field +import Distribution.Types.TestSuiteStanza import Distribution.Utils.Generic (spanMaybe) type ParsecFieldGrammar' a = ParsecFieldGrammar a a diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs index 24dc04f29fd..6c30484eee6 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs @@ -321,8 +321,8 @@ extractConditions f gpkg = concat [ extractCondition (f . libBuildInfo) <$> maybeToList (condLibrary' gpkg) , extractCondition (f . libBuildInfo) . snd <$> condSubLibraries' gpkg - , extractCondition (f . buildInfo) . snd <$> (condExecutables' gpkg) - , extractCondition (f . testBuildInfo) . snd <$> condTestSuites gpkg + , extractCondition (f . buildInfo) . snd <$> condExecutables' gpkg + , extractCondition (f . testBuildInfo) . snd <$> condTestSuites' gpkg , extractCondition (f . benchmarkBuildInfo) . snd <$> condBenchmarks gpkg ] @@ -458,7 +458,7 @@ finalizePD (Platform arch os) impl constraints - gpd@(GenericPackageDescription pkg _ver flags _commonStanzas _mb_lib0 _sub_libs0 _flibs0 _exes0 tests0 bms0) = do + gpd@(GenericPackageDescription pkg _ver flags _commonStanzas _mb_lib0 _sub_libs0 _flibs0 _exes0 _tests0 bms0) = do (targetSet, flagVals) <- resolveWithFlags flagChoices enabled os arch impl constraints condTrees check let @@ -497,7 +497,7 @@ finalizePD ++ map (\(name, tree) -> mapTreeData (SubComp name . CLib) tree) (condSubLibraries' gpd) ++ map (\(name, tree) -> mapTreeData (SubComp name . CFLib) tree) (condForeignLibs' gpd) ++ map (\(name, tree) -> mapTreeData (SubComp name . CExe) tree) (condExecutables' gpd) - ++ map (\(name, tree) -> mapTreeData (SubComp name . CTest) tree) tests0 + ++ map (\(name, tree) -> mapTreeData (SubComp name . CTest) tree) (condTestSuites' gpd) ++ map (\(name, tree) -> mapTreeData (SubComp name . CBench) tree) bms0 flagChoices = map (\(MkPackageFlag n _ d manual) -> (n, d2c manual n d)) flags @@ -542,7 +542,7 @@ resolveWithFlags [] Distribution.System.Linux Distribution.System.I386 (Distribu -- function. flattenPackageDescription :: GenericPackageDescription -> PackageDescription flattenPackageDescription - gpd@(GenericPackageDescription pkg _ _ _gpdCommonStanzas_ _mlib0 _sub_libs0 _flibs0 _exes0 tests0 bms0) = + gpd@(GenericPackageDescription pkg _ _ _gpdCommonStanzas_ _mlib0 _sub_libs0 _flibs0 _exes0 _tests0 bms0) = pkg { library = mlib , subLibraries = reverse sub_libs @@ -558,7 +558,7 @@ flattenPackageDescription sub_libs = flattenLib <$> (condSubLibraries' gpd) flibs = flattenFLib <$> (condForeignLibs' gpd) exes = flattenExe <$> (condExecutables' gpd) - tests = flattenTst <$> tests0 + tests = flattenTst <$> (condTestSuites' gpd) bms = flattenBm <$> bms0 flattenLib (n, t) = libFillInDefaults $ diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index ab9f80ee9e2..a66aaad436d 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -25,8 +25,9 @@ module Distribution.PackageDescription.FieldGrammar , TestSuiteStanza (..) , testSuiteFieldGrammar , validateTestSuite - , unvalidateTestSuite - , insertTestSuiteStanzaImports + , convertTestSuite + -- TODO(leana8959): move this to gpd + , mergeTestSuiteStanza -- ** Lenses , testStanzaTestType @@ -84,6 +85,8 @@ import Distribution.Package import Distribution.PackageDescription import Distribution.Parsec import Distribution.Pretty (Pretty (..), prettyShow, showToken) +import Distribution.Types.GenericPackageDescription +import Distribution.Types.TestSuiteStanza import Distribution.Types.Imports import Distribution.Utils.Path import Distribution.Version (Version, VersionRange) @@ -293,54 +296,6 @@ executableFieldGrammar n = {-# SPECIALIZE executableFieldGrammar :: UnqualComponentName -> ParsecFieldGrammar' Executable #-} {-# SPECIALIZE executableFieldGrammar :: UnqualComponentName -> PrettyFieldGrammar' Executable #-} -------------------------------------------------------------------------------- --- TestSuite -------------------------------------------------------------------------------- - --- | An intermediate type just used for parsing the test-suite stanza. --- After validation it is converted into the proper 'TestSuite' type. -data TestSuiteStanza = TestSuiteStanza - { _testStanzaImports :: [ImportName] - , _testStanzaTestType :: Maybe TestType - -- ^ Retained imports for exact printing - , _testStanzaMainIs :: Maybe (RelativePath Source File) - , _testStanzaTestModule :: Maybe ModuleName - , _testStanzaBuildInfo :: BuildInfo - , _testStanzaCodeGenerators :: [String] - } - deriving (Show) - -insertTestSuiteStanzaImports - :: CondTree ConfVar [Dependency] (WithImports TestSuiteStanza) - -> CondTree ConfVar [Dependency] TestSuiteStanza -insertTestSuiteStanzaImports = mapCondTree f id id - where - f :: WithImports TestSuiteStanza -> TestSuiteStanza - f (WithImports importNames ts) = ts{_testStanzaImports = importNames} - -instance L.HasBuildInfo TestSuiteStanza where - buildInfo = testStanzaBuildInfo - -testStanzaTestType :: Lens' TestSuiteStanza (Maybe TestType) -testStanzaTestType f s = fmap (\x -> s{_testStanzaTestType = x}) (f (_testStanzaTestType s)) -{-# INLINE testStanzaTestType #-} - -testStanzaMainIs :: Lens' TestSuiteStanza (Maybe (RelativePath Source File)) -testStanzaMainIs f s = fmap (\x -> s{_testStanzaMainIs = x}) (f (_testStanzaMainIs s)) -{-# INLINE testStanzaMainIs #-} - -testStanzaTestModule :: Lens' TestSuiteStanza (Maybe ModuleName) -testStanzaTestModule f s = fmap (\x -> s{_testStanzaTestModule = x}) (f (_testStanzaTestModule s)) -{-# INLINE testStanzaTestModule #-} - -testStanzaBuildInfo :: Lens' TestSuiteStanza BuildInfo -testStanzaBuildInfo f s = fmap (\x -> s{_testStanzaBuildInfo = x}) (f (_testStanzaBuildInfo s)) -{-# INLINE testStanzaBuildInfo #-} - -testStanzaCodeGenerators :: Lens' TestSuiteStanza [String] -testStanzaCodeGenerators f s = fmap (\x -> s{_testStanzaCodeGenerators = x}) (f (_testStanzaCodeGenerators s)) -{-# INLINE testStanzaCodeGenerators #-} - testSuiteFieldGrammar :: ( FieldGrammar c g , Applicative (g TestSuiteStanza) @@ -367,7 +322,7 @@ testSuiteFieldGrammar ) => g TestSuiteStanza TestSuiteStanza testSuiteFieldGrammar = - TestSuiteStanza [] + TestSuiteStanza <$> optionalField "type" testStanzaTestType <*> optionalFieldAla "main-is" RelativePathNT testStanzaMainIs <*> optionalField "test-module" testStanzaTestModule @@ -375,42 +330,22 @@ testSuiteFieldGrammar = <*> monoidalFieldAla "code-generators" (alaList' CommaFSep Token) testStanzaCodeGenerators ^^^ availableSince CabalSpecV3_8 [] -validateTestSuite :: CabalSpecVersion -> Position -> TestSuiteStanza -> ParseResult src TestSuite -validateTestSuite cabalSpecVersion pos stanza = fmap (L.testSuiteImports .~ (_testStanzaImports stanza)) $ case testSuiteType of - Nothing -> pure basicTestSuite - Just tt@(TestTypeUnknown _ _) -> - pure - basicTestSuite - { testInterface = TestSuiteUnsupported tt - } - Just tt - | tt `notElem` knownTestTypes -> - pure - basicTestSuite - { testInterface = TestSuiteUnsupported tt - } +validateTestSuite :: CabalSpecVersion -> Position -> TestSuiteStanza -> ParseResult src () +validateTestSuite cabalSpecVersion pos stanza = case _testStanzaTestType stanza of + Nothing -> pure () + Just tt@(TestTypeUnknown _ _) -> pure () + Just tt | tt `notElem` knownTestTypes -> pure () Just tt@(TestTypeExe ver) -> case _testStanzaMainIs stanza of - Nothing -> do - parseFailure pos (missingField "main-is" tt) - pure emptyTestSuite - Just file -> do + Nothing -> parseFailure pos (missingField "main-is" tt) + Just file -> when (isJust (_testStanzaTestModule stanza)) $ parseWarning pos PWTExtraBenchmarkModule (extraField "test-module" tt) - pure - basicTestSuite - { testInterface = TestSuiteExeV10 ver file - } Just tt@(TestTypeLib ver) -> case _testStanzaTestModule stanza of - Nothing -> do + Nothing -> parseFailure pos (missingField "test-module" tt) - pure emptyTestSuite - Just module_ -> do + Just module_ -> when (isJust (_testStanzaMainIs stanza)) $ parseWarning pos PWTExtraMainIs (extraField "main-is" tt) - pure - basicTestSuite - { testInterface = TestSuiteLibV09 ver module_ - } where testSuiteType = _testStanzaTestType stanza @@ -433,27 +368,6 @@ validateTestSuite cabalSpecVersion pos stanza = fmap (L.testSuiteImports .~ (_te ++ "' field is not used for the '" ++ prettyShow tt ++ "' test suite type." - basicTestSuite = - emptyTestSuite - { testBuildInfo = _testStanzaBuildInfo stanza - , testCodeGenerators = _testStanzaCodeGenerators stanza - } - -unvalidateTestSuite :: TestSuite -> TestSuiteStanza -unvalidateTestSuite t = - TestSuiteStanza - { _testStanzaImports = testSuiteImports t - , _testStanzaTestType = ty - , _testStanzaMainIs = ma - , _testStanzaTestModule = mo - , _testStanzaBuildInfo = testBuildInfo t - , _testStanzaCodeGenerators = testCodeGenerators t - } - where - (ty, ma, mo) = case testInterface t of - TestSuiteExeV10 ver file -> (Just $ TestTypeExe ver, Just file, Nothing) - TestSuiteLibV09 ver modu -> (Just $ TestTypeLib ver, Nothing, Just modu) - _ -> (Nothing, Nothing, Nothing) ------------------------------------------------------------------------------- -- Benchmark diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index 2999b8b235e..5541829e14e 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -35,6 +35,7 @@ import Prelude () import Control.Monad.State.Strict (StateT, execStateT) import Control.Monad.Trans.Class (lift) +import Distribution.Types.TestSuiteStanza import Distribution.CabalSpecVersion import Distribution.Compat.Lens import Distribution.FieldGrammar @@ -341,12 +342,19 @@ goSections specVer fields = do | name == "test-suite" = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args - testStanza <- lift $ parseCondTree' testSuiteFieldGrammar (fromBuildInfo' name') commonStanzas fields - let testStanza' = insertTestSuiteStanzaImports testStanza - testSuite <- lift $ traverse (validateTestSuite specVer pos) testStanza' + + testStanza <- + (fmap . mapTreeData . fmap) (patchTestSuiteType specVer) $ + lift $ parseCondTree' testSuiteFieldGrammar (fromBuildInfo' name') commonStanzas fields + + -- Merge and then validate + let testStanza' :: CondTree ConfVar [Dependency] TestSuiteStanza + testStanza' = mergeTestSuiteStanza commonStanzas testStanza + ok <- lift $ traverse (validateTestSuite specVer pos) testStanza' + let validated = mapTreeData convertTestSuite testStanza' let hasType ts = testInterface ts /= testInterface mempty - unless (onAllBranches hasType testSuite) $ + unless (onAllBranches hasType validated) $ lift $ parseFailure pos $ concat @@ -366,7 +374,8 @@ goSections specVer fields = do ] -- TODO check duplicate name here? - stateGpd . L.condTestSuites %= snoc (name', testSuite) + -- Store the unmerged unvalidated version + stateGpd . L.condTestSuites %= snoc (name', testStanza) | name == "benchmark" = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args @@ -630,7 +639,7 @@ instance FromBuildInfo ForeignLib where fromBuildInfo' n bi = set L.foreignLibNa instance FromBuildInfo Executable where fromBuildInfo' n bi = set L.exeName n $ set L.buildInfo bi emptyExecutable instance FromBuildInfo TestSuiteStanza where - fromBuildInfo' _ bi = TestSuiteStanza [] Nothing Nothing Nothing bi [] + fromBuildInfo' _ bi = TestSuiteStanza Nothing Nothing Nothing bi [] instance FromBuildInfo BenchmarkStanza where fromBuildInfo' _ bi = BenchmarkStanza [] Nothing Nothing Nothing bi diff --git a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs index 19dece7639d..dccc9210b24 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs @@ -56,6 +56,7 @@ import Distribution.Utils.Generic (writeFileAtomic, writeUTF8File) import qualified Distribution.PackageDescription.FieldGrammar as FG import qualified Distribution.Types.BuildInfo.Lens as L import Distribution.Types.Imports +import Distribution.Types.TestSuiteStanza import qualified Distribution.Types.SetupBuildInfo.Lens as L import Text.PrettyPrint (Doc, char, hsep, parens, text) @@ -84,7 +85,7 @@ ppGenericPackageDescription v gpd0 = , ppCondSubLibraries v (condSubLibraries' gpd) , ppCondForeignLibs v (condForeignLibs' gpd) , ppCondExecutables v (condExecutables' gpd) - , ppCondTestSuites v (condTestSuites gpd) + , ppCondTestSuites v (condTestSuites' gpd) , ppCondBenchmarks v (condBenchmarks gpd) ] where @@ -172,7 +173,7 @@ ppCondExecutables v exes = ppCondTestSuites :: CabalSpecVersion -> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)] -> [PrettyField ()] ppCondTestSuites v suites = [ PrettySection () "test-suite" [pretty n] $ - ppCondTree2 v testSuiteFieldGrammar (fmap FG.unvalidateTestSuite condTree) + ppCondTree2 v testSuiteFieldGrammar (fmap unvalidateTestSuite condTree) | (n, condTree) <- suites ] @@ -237,7 +238,7 @@ pdToGpd pd = , condSubLibraries = fmap (mapTreeData noImports) . mkCondTreeL <$> subLibraries pd , condForeignLibs = fmap (mapTreeData noImports) . mkCondTree' foreignLibName <$> foreignLibs pd , condExecutables = fmap (mapTreeData noImports) . mkCondTree' exeName <$> executables pd - , condTestSuites = mkCondTree' testName <$> testSuites pd + , condTestSuites = fmap (mapTreeData $ noImports . unvalidateTestSuite) . mkCondTree' testName <$> testSuites pd , condBenchmarks = mkCondTree' benchmarkName <$> benchmarks pd } where diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index c53fa29d5f9..c564eefbb2a 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -6,15 +6,21 @@ module Distribution.Types.GenericPackageDescription ( GenericPackageDescription (..) , emptyGenericPackageDescription + , mergeImports + -- * Accessors , condLibrary' - , mergeCondLibrary , condSubLibraries' - , mergeCondSubLibraries , condForeignLibs' - , mergeCondForeignLibs , condExecutables' + , condTestSuites' + + -- * Merging helpers + , mergeCondLibrary + , mergeCondSubLibraries + , mergeCondForeignLibs , mergeCondExecutables + , mergeTestSuiteStanza ) where import Distribution.Compat.Prelude @@ -30,12 +36,14 @@ import qualified Distribution.Types.Imports.Lens as L () import Distribution.Types.PackageDescription import Distribution.Package +import Distribution.CabalSpecVersion import Distribution.Types.Benchmark import Distribution.Types.BuildInfo import Distribution.Types.CondTree import Distribution.Types.ConfVar import Distribution.Types.Executable import Distribution.Types.Flag +import Distribution.Types.TestSuiteStanza import Distribution.Types.ForeignLib import Distribution.Types.Imports import Distribution.Types.Library @@ -81,7 +89,7 @@ data GenericPackageDescription = GenericPackageDescription ] , condTestSuites :: [ ( UnqualComponentName - , CondTree ConfVar [Dependency] TestSuite + , CondTree ConfVar [Dependency] (WithImports TestSuiteStanza) ) ] , condBenchmarks @@ -108,6 +116,9 @@ foreignLibFromBuildInfo n bi = emptyForeignLib{foreignLibName = n, foreignLibBui executableFromBuildInfo :: UnqualComponentName -> BuildInfo -> Executable executableFromBuildInfo n bi = emptyExecutable{exeName = n, buildInfo = bi} +testSuiteStanzaFromBuildInfo :: BuildInfo -> TestSuiteStanza +testSuiteStanzaFromBuildInfo bi = TestSuiteStanza Nothing Nothing Nothing bi [] + condLibrary' :: GenericPackageDescription -> Maybe (CondTree ConfVar [Dependency] Library) @@ -157,6 +168,28 @@ mergeCondExecutables mergeCondExecutables commonStanzas = map $ \(name, tree) -> (name, mergeImports commonStanzas (const $ executableFromBuildInfo name) tree) +mergeTestSuiteStanza + :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) + -> CondTree ConfVar [Dependency] (WithImports TestSuiteStanza) + -> CondTree ConfVar [Dependency] TestSuiteStanza +mergeTestSuiteStanza commonStanza = + mergeImports commonStanza (const $ testSuiteStanzaFromBuildInfo) + +condTestSuites' + :: GenericPackageDescription + -> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)] +condTestSuites' gpd = + mergeTestSuiteStanza' (gpdCommonStanzas gpd) (condTestSuites gpd) + & (map . fmap . mapTreeData) convertTestSuite + + +mergeTestSuiteStanza' + :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) + -> [(UnqualComponentName, CondTree ConfVar [Dependency] (WithImports TestSuiteStanza))] + -> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuiteStanza)] +mergeTestSuiteStanza' commonStanza = map $ \(name, tree) -> + (name, mergeImports commonStanza (const $ testSuiteStanzaFromBuildInfo) tree) + mergeImports :: forall a . L.HasBuildInfo a @@ -218,17 +251,6 @@ mergeImports commonStanzas fromBuildInfo (CondNode root c zs) = cs' :: [CondBranch ConfVar [Dependency] a] cs' = map (fromBuildInfo' <$>) bis ++ cs --- condSubLibraries :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)] --- condSubLibraries = () --- condForeignLibs :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)] --- condForeignLibs = () --- condExecutables :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] Executable)] --- condExecutables = () --- condTestSuites :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)] --- condTestSuites = () --- condBenchmarks :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)] --- condBenchmarks = () - instance Package GenericPackageDescription where packageId = packageId . packageDescription diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs index f749ab9793c..c0346fdf8f7 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs @@ -34,6 +34,7 @@ import Distribution.Types.Library (Library) import Distribution.Types.PackageDescription (PackageDescription) import Distribution.Types.TestSuite (TestSuite) import Distribution.Types.UnqualComponentName (UnqualComponentName) +import Distribution.Types.TestSuiteStanza (TestSuiteStanza) import Distribution.Version (Version, VersionRange) ------------------------------------------------------------------------------- @@ -73,7 +74,7 @@ condExecutables :: Lens' GenericPackageDescription [(UnqualComponentName, (CondT condExecutables f s = fmap (\x -> s{T.condExecutables = x}) (f (T.condExecutables s)) {-# INLINE condExecutables #-} -condTestSuites :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] TestSuite))] +condTestSuites :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] (T.WithImports TestSuiteStanza)))] condTestSuites f s = fmap (\x -> s{T.condTestSuites = x}) (f (T.condTestSuites s)) {-# INLINE condTestSuites #-} diff --git a/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs b/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs new file mode 100644 index 00000000000..a652528dda1 --- /dev/null +++ b/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs @@ -0,0 +1,141 @@ +{-# LANGUAGE ConstraintKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE QuantifiedConstraints #-} + +module Distribution.Types.TestSuiteStanza where + +import Distribution.Compat.Lens +import Distribution.Compat.Prelude +import Language.Haskell.Extension +import Prelude () + +import Distribution.CabalSpecVersion +import Distribution.Compat.Newtype (Newtype, pack', unpack') +import Distribution.Compiler (CompilerFlavor (..), PerCompilerFlavor (..)) +import Distribution.Fields +import Distribution.ModuleName (ModuleName) +import Distribution.Package +import Distribution.Parsec +import Distribution.Pretty (Pretty (..), prettyShow, showToken) +import Distribution.Types.Imports +import Distribution.Types.TestType +import Distribution.Types.TestSuite +import Distribution.Types.TestSuiteInterface +import Distribution.Types.BuildInfo +import qualified Distribution.Types.BuildInfo.Lens as L +import Distribution.Utils.Path +import Distribution.Version (Version, VersionRange) + +import qualified Data.ByteString.Char8 as BS8 +import qualified Distribution.Compat.CharParsing as P +import qualified Distribution.SPDX as SPDX + + +-- | An intermediate type just used for parsing the test-suite stanza. +-- After validation it is converted into the proper 'TestSuite' type. +data TestSuiteStanza = TestSuiteStanza + { _testStanzaTestType :: Maybe TestType + , _testStanzaMainIs :: Maybe (RelativePath Source File) + , _testStanzaTestModule :: Maybe ModuleName + , _testStanzaBuildInfo :: BuildInfo + , _testStanzaCodeGenerators :: [String] + } + deriving (Show, Eq, Data, Generic) + +instance Binary TestSuiteStanza +instance Structured TestSuiteStanza +instance NFData TestSuiteStanza where rnf = genericRnf + +instance L.HasBuildInfo TestSuiteStanza where + buildInfo = testStanzaBuildInfo + +-- TODO(leana8959): an experiment to validate directly on the TestSuite data type +-- | Convert a previously validated 'TestSuiteStanza' to 'GenericPackageDescription''s 'TestSuite' type +convertTestSuite :: TestSuiteStanza -> TestSuite +convertTestSuite stanza = case _testStanzaTestType stanza of + Nothing -> basicTestSuite + Just tt@(TestTypeUnknown _ _) -> + basicTestSuite + { testInterface = TestSuiteUnsupported tt + } + Just tt + | tt `notElem` knownTestTypes -> + basicTestSuite + { testInterface = TestSuiteUnsupported tt + } + Just tt@(TestTypeExe ver) -> case _testStanzaMainIs stanza of + Nothing -> failedToConvert + Just file -> + basicTestSuite + { testInterface = TestSuiteExeV10 ver file + } + Just tt@(TestTypeLib ver) -> case _testStanzaTestModule stanza of + Nothing -> failedToConvert + Just module_ -> + basicTestSuite + { testInterface = TestSuiteLibV09 ver module_ + } + where + failedToConvert = + error + $ "Unexpected: the conversion from TestSuiteStanza to TestSuite failed\n" + <> "Did you mess with `GenericPackageDescription`?" + + basicTestSuite = + emptyTestSuite + { testBuildInfo = _testStanzaBuildInfo stanza + , testCodeGenerators = _testStanzaCodeGenerators stanza + } + +unvalidateTestSuite :: TestSuite -> TestSuiteStanza +unvalidateTestSuite t = + TestSuiteStanza + { _testStanzaTestType = ty + , _testStanzaMainIs = ma + , _testStanzaTestModule = mo + , _testStanzaBuildInfo = testBuildInfo t + , _testStanzaCodeGenerators = testCodeGenerators t + } + where + (ty, ma, mo) = case testInterface t of + TestSuiteExeV10 ver file -> (Just $ TestTypeExe ver, Just file, Nothing) + TestSuiteLibV09 ver modu -> (Just $ TestTypeLib ver, Nothing, Just modu) + _ -> (Nothing, Nothing, Nothing) + +-- | We try to guess the TestSuiteType if it's not specified +patchTestSuiteType :: CabalSpecVersion -> TestSuiteStanza -> TestSuiteStanza +patchTestSuiteType cabalSpecVersion stanza = + stanza + { _testStanzaTestType = + _testStanzaTestType stanza + <|> do + guard (cabalSpecVersion >= CabalSpecV3_8) + testTypeExe <$ _testStanzaMainIs stanza + <|> testTypeLib <$ _testStanzaTestModule stanza + } + +testStanzaTestType :: Lens' TestSuiteStanza (Maybe TestType) +testStanzaTestType f s = fmap (\x -> s{_testStanzaTestType = x}) (f (_testStanzaTestType s)) +{-# INLINE testStanzaTestType #-} + +testStanzaMainIs :: Lens' TestSuiteStanza (Maybe (RelativePath Source File)) +testStanzaMainIs f s = fmap (\x -> s{_testStanzaMainIs = x}) (f (_testStanzaMainIs s)) +{-# INLINE testStanzaMainIs #-} + +testStanzaTestModule :: Lens' TestSuiteStanza (Maybe ModuleName) +testStanzaTestModule f s = fmap (\x -> s{_testStanzaTestModule = x}) (f (_testStanzaTestModule s)) +{-# INLINE testStanzaTestModule #-} + +testStanzaBuildInfo :: Lens' TestSuiteStanza BuildInfo +testStanzaBuildInfo f s = fmap (\x -> s{_testStanzaBuildInfo = x}) (f (_testStanzaBuildInfo s)) +{-# INLINE testStanzaBuildInfo #-} + +testStanzaCodeGenerators :: Lens' TestSuiteStanza [String] +testStanzaCodeGenerators f s = fmap (\x -> s{_testStanzaCodeGenerators = x}) (f (_testStanzaCodeGenerators s)) +{-# INLINE testStanzaCodeGenerators #-} + diff --git a/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs b/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs index 0bd75b7a3f5..987f46aa20c 100644 --- a/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs +++ b/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs @@ -27,6 +27,7 @@ import Distribution.Types.DumpBuildInfo (DumpBuildInfo) import Distribution.Types.PackageVersionConstraint import Distribution.Types.UnitId (DefUnitId, UnitId) import Distribution.Types.Imports +import Distribution.Types.TestSuiteStanza import Distribution.Utils.NubList (NubList) import Distribution.Utils.Path (SymbolicPathX) import Distribution.Utils.ShortText (ShortText, fromShortText) @@ -119,6 +120,7 @@ instance ToExpr SetupBuildInfo instance ToExpr SourceRepo instance ToExpr TestShowDetails instance ToExpr TestSuite +instance ToExpr TestSuiteStanza instance ToExpr TestSuiteInterface instance ToExpr TestType instance ToExpr UnitId diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs index a6ff0761bc3..25892db5cc0 100644 --- a/Cabal/src/Distribution/PackageDescription/Check.hs +++ b/Cabal/src/Distribution/PackageDescription/Check.hs @@ -74,6 +74,7 @@ import Distribution.Utils.Path import Distribution.Verbosity import Distribution.Version import System.FilePath (splitExtension, takeFileName) +import Distribution.Types.TestSuiteStanza import qualified Data.ByteString.Lazy as BS import qualified Distribution.SPDX as SPDX @@ -333,7 +334,7 @@ checkGenericPackageDescription (checkTestSuite ads) (\u l -> l{testName = u}) ) - condTestSuites_ + (condTestSuites' gpd) mapM_ ( checkCondTarget genPackageFlags_ @@ -973,7 +974,7 @@ pd2gpd pd = gpd (executables pd) , condTestSuites = map - (t2cName testName remTest) + (fmap (mapTreeData $ noImports . unvalidateTestSuite) . t2cName testName remTest) (testSuites pd) , condBenchmarks = map diff --git a/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs b/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs index 8772683babc..1c6b4635eae 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs @@ -230,7 +230,7 @@ checkDuplicateModules :: GenericPackageDescription -> [PackageCheck] checkDuplicateModules pkg = concatMap checkLib (maybe id (:) (condLibrary' pkg) . map snd $ condSubLibraries' pkg) ++ concatMap checkExe (map snd $ condExecutables' pkg) - ++ concatMap checkTest (map snd $ condTestSuites pkg) + ++ concatMap checkTest (map snd $ condTestSuites' pkg) ++ concatMap checkBench (map snd $ condBenchmarks pkg) where -- the duplicate modules check is has not been thoroughly vetted for backpack From 4cfdbf4c493cb7a147852ee82027214c17103f22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 10 Nov 2025 19:25:29 +0800 Subject: [PATCH 28/60] retain BenchmarkStanza imports We isolated the BenchmarkStanza type and the logic to infer benchmark type. --- Cabal-syntax/Cabal-syntax.cabal | 1 + .../PackageDescription/Configuration.hs | 10 +- .../PackageDescription/FieldGrammar.hs | 112 +----------- .../Distribution/PackageDescription/Parsec.hs | 23 ++- .../PackageDescription/PrettyPrint.hs | 5 +- .../src/Distribution/Types/BenchmarkStanza.hs | 162 ++++++++++++++++++ .../Types/GenericPackageDescription.hs | 30 +++- .../Types/GenericPackageDescription/Lens.hs | 3 +- .../src/Data/TreeDiff/Instances/Cabal.hs | 2 + .../Distribution/PackageDescription/Check.hs | 5 +- .../PackageDescription/Check/Conditional.hs | 2 +- 11 files changed, 225 insertions(+), 130 deletions(-) create mode 100644 Cabal-syntax/src/Distribution/Types/BenchmarkStanza.hs diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal index 1a0e7bba1f9..09edee0eced 100644 --- a/Cabal-syntax/Cabal-syntax.cabal +++ b/Cabal-syntax/Cabal-syntax.cabal @@ -121,6 +121,7 @@ library Distribution.Types.AbiDependency Distribution.Types.AbiHash Distribution.Types.Benchmark + Distribution.Types.BenchmarkStanza Distribution.Types.Benchmark.Lens Distribution.Types.BenchmarkInterface Distribution.Types.BenchmarkType diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs index 6c30484eee6..57047aa8277 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs @@ -323,7 +323,7 @@ extractConditions f gpkg = , extractCondition (f . libBuildInfo) . snd <$> condSubLibraries' gpkg , extractCondition (f . buildInfo) . snd <$> condExecutables' gpkg , extractCondition (f . testBuildInfo) . snd <$> condTestSuites' gpkg - , extractCondition (f . benchmarkBuildInfo) . snd <$> condBenchmarks gpkg + , extractCondition (f . benchmarkBuildInfo) . snd <$> condBenchmarks' gpkg ] freeVars :: CondTree ConfVar c a -> [FlagName] @@ -458,7 +458,7 @@ finalizePD (Platform arch os) impl constraints - gpd@(GenericPackageDescription pkg _ver flags _commonStanzas _mb_lib0 _sub_libs0 _flibs0 _exes0 _tests0 bms0) = do + gpd@(GenericPackageDescription pkg _ver flags _commonStanzas _mb_lib0 _sub_libs0 _flibs0 _exes0 _tests0 _bms0) = do (targetSet, flagVals) <- resolveWithFlags flagChoices enabled os arch impl constraints condTrees check let @@ -498,7 +498,7 @@ finalizePD ++ map (\(name, tree) -> mapTreeData (SubComp name . CFLib) tree) (condForeignLibs' gpd) ++ map (\(name, tree) -> mapTreeData (SubComp name . CExe) tree) (condExecutables' gpd) ++ map (\(name, tree) -> mapTreeData (SubComp name . CTest) tree) (condTestSuites' gpd) - ++ map (\(name, tree) -> mapTreeData (SubComp name . CBench) tree) bms0 + ++ map (\(name, tree) -> mapTreeData (SubComp name . CBench) tree) (condBenchmarks' gpd) flagChoices = map (\(MkPackageFlag n _ d manual) -> (n, d2c manual n d)) flags d2c manual n b = case lookupFlagAssignment n userflags of @@ -542,7 +542,7 @@ resolveWithFlags [] Distribution.System.Linux Distribution.System.I386 (Distribu -- function. flattenPackageDescription :: GenericPackageDescription -> PackageDescription flattenPackageDescription - gpd@(GenericPackageDescription pkg _ _ _gpdCommonStanzas_ _mlib0 _sub_libs0 _flibs0 _exes0 _tests0 bms0) = + gpd@(GenericPackageDescription pkg _ _ _gpdCommonStanzas_ _mlib0 _sub_libs0 _flibs0 _exes0 _tests0 _bms0) = pkg { library = mlib , subLibraries = reverse sub_libs @@ -559,7 +559,7 @@ flattenPackageDescription flibs = flattenFLib <$> (condForeignLibs' gpd) exes = flattenExe <$> (condExecutables' gpd) tests = flattenTst <$> (condTestSuites' gpd) - bms = flattenBm <$> bms0 + bms = flattenBm <$> (condBenchmarks' gpd) flattenLib (n, t) = libFillInDefaults $ (fst $ ignoreConditions t) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index a66aaad436d..84407c8ddad 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -40,7 +40,6 @@ module Distribution.PackageDescription.FieldGrammar , benchmarkFieldGrammar , validateBenchmark , unvalidateBenchmark - , insertBenchmarkStanzaImports -- * Field grammars , formatDependencyList @@ -87,6 +86,7 @@ import Distribution.Parsec import Distribution.Pretty (Pretty (..), prettyShow, showToken) import Distribution.Types.GenericPackageDescription import Distribution.Types.TestSuiteStanza +import Distribution.Types.BenchmarkStanza import Distribution.Types.Imports import Distribution.Utils.Path import Distribution.Version (Version, VersionRange) @@ -373,43 +373,6 @@ validateTestSuite cabalSpecVersion pos stanza = case _testStanzaTestType stanza -- Benchmark ------------------------------------------------------------------------------- --- | An intermediate type just used for parsing the benchmark stanza. --- After validation it is converted into the proper 'Benchmark' type. -data BenchmarkStanza = BenchmarkStanza - { _benchmarkStanzaImports :: [ImportName] - -- ^ retained imports - , _benchmarkStanzaBenchmarkType :: Maybe BenchmarkType - , _benchmarkStanzaMainIs :: Maybe (RelativePath Source File) - , _benchmarkStanzaBenchmarkModule :: Maybe ModuleName - , _benchmarkStanzaBuildInfo :: BuildInfo - } - -insertBenchmarkStanzaImports - :: CondTree ConfVar [Dependency] (WithImports BenchmarkStanza) - -> CondTree ConfVar [Dependency] BenchmarkStanza -insertBenchmarkStanzaImports = mapCondTree f id id - where - f :: WithImports BenchmarkStanza -> BenchmarkStanza - f (WithImports importNames bs) = bs{_benchmarkStanzaImports = importNames} - -instance L.HasBuildInfo BenchmarkStanza where - buildInfo = benchmarkStanzaBuildInfo - -benchmarkStanzaBenchmarkType :: Lens' BenchmarkStanza (Maybe BenchmarkType) -benchmarkStanzaBenchmarkType f s = fmap (\x -> s{_benchmarkStanzaBenchmarkType = x}) (f (_benchmarkStanzaBenchmarkType s)) -{-# INLINE benchmarkStanzaBenchmarkType #-} - -benchmarkStanzaMainIs :: Lens' BenchmarkStanza (Maybe (RelativePath Source File)) -benchmarkStanzaMainIs f s = fmap (\x -> s{_benchmarkStanzaMainIs = x}) (f (_benchmarkStanzaMainIs s)) -{-# INLINE benchmarkStanzaMainIs #-} - -benchmarkStanzaBenchmarkModule :: Lens' BenchmarkStanza (Maybe ModuleName) -benchmarkStanzaBenchmarkModule f s = fmap (\x -> s{_benchmarkStanzaBenchmarkModule = x}) (f (_benchmarkStanzaBenchmarkModule s)) -{-# INLINE benchmarkStanzaBenchmarkModule #-} - -benchmarkStanzaBuildInfo :: Lens' BenchmarkStanza BuildInfo -benchmarkStanzaBuildInfo f s = fmap (\x -> s{_benchmarkStanzaBuildInfo = x}) (f (_benchmarkStanzaBuildInfo s)) -{-# INLINE benchmarkStanzaBuildInfo #-} benchmarkFieldGrammar :: ( FieldGrammar c g @@ -436,83 +399,12 @@ benchmarkFieldGrammar ) => g BenchmarkStanza BenchmarkStanza benchmarkFieldGrammar = - BenchmarkStanza [] + BenchmarkStanza <$> optionalField "type" benchmarkStanzaBenchmarkType <*> optionalFieldAla "main-is" RelativePathNT benchmarkStanzaMainIs <*> optionalField "benchmark-module" benchmarkStanzaBenchmarkModule <*> blurFieldGrammar benchmarkStanzaBuildInfo buildInfoFieldGrammar -validateBenchmark :: CabalSpecVersion -> Position -> BenchmarkStanza -> ParseResult src Benchmark -validateBenchmark cabalSpecVersion pos stanza = fmap (L.benchmarkImports .~ (_benchmarkStanzaImports stanza)) $ case benchmarkStanzaType of - Nothing -> - pure - emptyBenchmark - { benchmarkBuildInfo = _benchmarkStanzaBuildInfo stanza - } - Just tt@(BenchmarkTypeUnknown _ _) -> - pure - emptyBenchmark - { benchmarkInterface = BenchmarkUnsupported tt - , benchmarkBuildInfo = _benchmarkStanzaBuildInfo stanza - } - Just tt - | tt `notElem` knownBenchmarkTypes -> - pure - emptyBenchmark - { benchmarkInterface = BenchmarkUnsupported tt - , benchmarkBuildInfo = _benchmarkStanzaBuildInfo stanza - } - Just tt@(BenchmarkTypeExe ver) -> case _benchmarkStanzaMainIs stanza of - Nothing -> do - parseFailure pos (missingField "main-is" tt) - pure emptyBenchmark - Just file -> do - when (isJust (_benchmarkStanzaBenchmarkModule stanza)) $ - parseWarning pos PWTExtraBenchmarkModule (extraField "benchmark-module" tt) - pure - emptyBenchmark - { benchmarkInterface = BenchmarkExeV10 ver file - , benchmarkBuildInfo = _benchmarkStanzaBuildInfo stanza - } - where - benchmarkStanzaType = - _benchmarkStanzaBenchmarkType stanza <|> do - guard (cabalSpecVersion >= CabalSpecV3_8) - - benchmarkTypeExe <$ _benchmarkStanzaMainIs stanza - - missingField name tt = - "The '" - ++ name - ++ "' field is required for the " - ++ prettyShow tt - ++ " benchmark type." - - extraField name tt = - "The '" - ++ name - ++ "' field is not used for the '" - ++ prettyShow tt - ++ "' benchmark type." - -unvalidateBenchmark :: Benchmark -> BenchmarkStanza -unvalidateBenchmark b = - BenchmarkStanza - { _benchmarkStanzaImports = benchmarkImports b - , _benchmarkStanzaBenchmarkType = ty - , _benchmarkStanzaMainIs = ma - , _benchmarkStanzaBenchmarkModule = mo - , _benchmarkStanzaBuildInfo = benchmarkBuildInfo b - } - where - (ty, ma, mo) = case benchmarkInterface b of - BenchmarkExeV10 ver ma' - | getSymbolicPath ma' == "" -> - (Just $ BenchmarkTypeExe ver, Nothing, Nothing) - | otherwise -> - (Just $ BenchmarkTypeExe ver, Just ma', Nothing) - _ -> (Nothing, Nothing, Nothing) - ------------------------------------------------------------------------------- -- Build info ------------------------------------------------------------------------------- diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index 5541829e14e..39b27d86d63 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -68,6 +68,7 @@ import qualified Distribution.Types.Executable.Lens as L import qualified Distribution.Types.ForeignLib.Lens as L import qualified Distribution.Types.GenericPackageDescription.Lens as L import Distribution.Types.Imports +import Distribution.Types.BenchmarkStanza import qualified Distribution.Types.PackageDescription.Lens as L import qualified Distribution.Types.SetupBuildInfo.Lens as L import qualified Text.Parsec as P @@ -350,7 +351,7 @@ goSections specVer fields = do -- Merge and then validate let testStanza' :: CondTree ConfVar [Dependency] TestSuiteStanza testStanza' = mergeTestSuiteStanza commonStanzas testStanza - ok <- lift $ traverse (validateTestSuite specVer pos) testStanza' + _ok <- lift $ traverse (validateTestSuite specVer pos) testStanza' let validated = mapTreeData convertTestSuite testStanza' let hasType ts = testInterface ts /= testInterface mempty @@ -379,12 +380,18 @@ goSections specVer fields = do | name == "benchmark" = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args - benchStanza <- lift $ parseCondTree' benchmarkFieldGrammar (fromBuildInfo' name') commonStanzas fields - let benchStanza' = insertBenchmarkStanzaImports benchStanza - bench <- lift $ traverse (validateBenchmark specVer pos) benchStanza' + + benchStanza <- + (fmap . mapTreeData . fmap) (patchBenchmarkType specVer) $ + lift $ parseCondTree' benchmarkFieldGrammar (fromBuildInfo' name') commonStanzas fields + + let benchStanza' :: CondTree ConfVar [Dependency] BenchmarkStanza + benchStanza' = mergeBenchmarkStanza commonStanzas benchStanza + _ok <- lift $ traverse (validateBenchmark pos) (fmap unImportNames benchStanza) + let validated = mapTreeData convertBenchmark benchStanza' let hasType ts = benchmarkInterface ts /= benchmarkInterface mempty - unless (onAllBranches hasType bench) $ + unless (onAllBranches hasType validated) $ lift $ parseFailure pos $ concat @@ -404,7 +411,7 @@ goSections specVer fields = do ] -- TODO check duplicate name here? - stateGpd . L.condBenchmarks %= snoc (name', bench) + stateGpd . L.condBenchmarks %= snoc (name', benchStanza) | name == "flag" = do name' <- parseNameBS pos args name'' <- lift $ runFieldParser' [pos] parsec specVer (fieldLineStreamFromBS name') `recoverWith` mkFlagName "" @@ -634,6 +641,8 @@ libraryFromBuildInfo n bi = , libBuildInfo = bi } + +-- TODO(leana8959): remove this typeclass instance FromBuildInfo BuildInfo where fromBuildInfo' _ = id instance FromBuildInfo ForeignLib where fromBuildInfo' n bi = set L.foreignLibName n $ set L.buildInfo bi emptyForeignLib instance FromBuildInfo Executable where fromBuildInfo' n bi = set L.exeName n $ set L.buildInfo bi emptyExecutable @@ -642,7 +651,7 @@ instance FromBuildInfo TestSuiteStanza where fromBuildInfo' _ bi = TestSuiteStanza Nothing Nothing Nothing bi [] instance FromBuildInfo BenchmarkStanza where - fromBuildInfo' _ bi = BenchmarkStanza [] Nothing Nothing Nothing bi + fromBuildInfo' _ bi = BenchmarkStanza Nothing Nothing Nothing bi parseCondTreeWithCommonStanzas :: forall src a diff --git a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs index dccc9210b24..453dcdaa2dc 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs @@ -57,6 +57,7 @@ import qualified Distribution.PackageDescription.FieldGrammar as FG import qualified Distribution.Types.BuildInfo.Lens as L import Distribution.Types.Imports import Distribution.Types.TestSuiteStanza +import Distribution.Types.BenchmarkStanza import qualified Distribution.Types.SetupBuildInfo.Lens as L import Text.PrettyPrint (Doc, char, hsep, parens, text) @@ -86,7 +87,7 @@ ppGenericPackageDescription v gpd0 = , ppCondForeignLibs v (condForeignLibs' gpd) , ppCondExecutables v (condExecutables' gpd) , ppCondTestSuites v (condTestSuites' gpd) - , ppCondBenchmarks v (condBenchmarks gpd) + , ppCondBenchmarks v (condBenchmarks' gpd) ] where gpd = preProcessInternalDeps (specVersion (packageDescription gpd0)) gpd0 @@ -239,7 +240,7 @@ pdToGpd pd = , condForeignLibs = fmap (mapTreeData noImports) . mkCondTree' foreignLibName <$> foreignLibs pd , condExecutables = fmap (mapTreeData noImports) . mkCondTree' exeName <$> executables pd , condTestSuites = fmap (mapTreeData $ noImports . unvalidateTestSuite) . mkCondTree' testName <$> testSuites pd - , condBenchmarks = mkCondTree' benchmarkName <$> benchmarks pd + , condBenchmarks = fmap (mapTreeData $ noImports . unvalidateBenchmark) . mkCondTree' benchmarkName <$> benchmarks pd } where -- We set CondTree's [Dependency] to an empty list, as it diff --git a/Cabal-syntax/src/Distribution/Types/BenchmarkStanza.hs b/Cabal-syntax/src/Distribution/Types/BenchmarkStanza.hs new file mode 100644 index 00000000000..a5850037091 --- /dev/null +++ b/Cabal-syntax/src/Distribution/Types/BenchmarkStanza.hs @@ -0,0 +1,162 @@ +{-# LANGUAGE ConstraintKinds #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE QuantifiedConstraints #-} + +module Distribution.Types.BenchmarkStanza where + +import Distribution.Compat.Lens +import Distribution.Compat.Prelude +import Language.Haskell.Extension +import Prelude () + +import Distribution.CabalSpecVersion +import Distribution.Compat.Newtype (Newtype, pack', unpack') +import Distribution.Compiler (CompilerFlavor (..), PerCompilerFlavor (..)) +import Distribution.FieldGrammar +import Distribution.Fields +import Distribution.ModuleName (ModuleName) +import Distribution.Package +import Distribution.Parsec +import Distribution.Pretty (Pretty (..), prettyShow, showToken) +import Distribution.Types.Imports +import Distribution.Types.ConfVar +import Distribution.Types.CondTree +import Distribution.Types.BuildInfo +import qualified Distribution.Types.BuildInfo.Lens as L +import Distribution.Types.BenchmarkType +import Distribution.Types.BenchmarkInterface +import Distribution.Types.Benchmark +import Distribution.Utils.Path +import Distribution.Version (Version, VersionRange) + +import qualified Data.ByteString.Char8 as BS8 +import qualified Distribution.Compat.CharParsing as P +import qualified Distribution.SPDX as SPDX + +-- | An intermediate type just used for parsing the benchmark stanza. +-- After validation it is converted into the proper 'Benchmark' type. +data BenchmarkStanza = BenchmarkStanza + { _benchmarkStanzaBenchmarkType :: Maybe BenchmarkType + , _benchmarkStanzaMainIs :: Maybe (RelativePath Source File) + , _benchmarkStanzaBenchmarkModule :: Maybe ModuleName + , _benchmarkStanzaBuildInfo :: BuildInfo + } + deriving (Show, Eq, Data, Generic) + +instance Binary BenchmarkStanza +instance Structured BenchmarkStanza +instance NFData BenchmarkStanza where rnf = genericRnf + +convertBenchmark :: BenchmarkStanza -> Benchmark +convertBenchmark stanza = case _benchmarkStanzaBenchmarkType stanza of + Nothing -> + emptyBenchmark + { benchmarkBuildInfo = _benchmarkStanzaBuildInfo stanza + } + Just tt@(BenchmarkTypeUnknown _ _) -> + emptyBenchmark + { benchmarkInterface = BenchmarkUnsupported tt + , benchmarkBuildInfo = _benchmarkStanzaBuildInfo stanza + } + Just tt + | tt `notElem` knownBenchmarkTypes -> + emptyBenchmark + { benchmarkInterface = BenchmarkUnsupported tt + , benchmarkBuildInfo = _benchmarkStanzaBuildInfo stanza + } + Just tt@(BenchmarkTypeExe ver) -> case _benchmarkStanzaMainIs stanza of + Nothing -> emptyBenchmark + Just file -> + emptyBenchmark + { benchmarkInterface = BenchmarkExeV10 ver file + , benchmarkBuildInfo = _benchmarkStanzaBuildInfo stanza + } + where + missingField name tt = + "The '" + ++ name + ++ "' field is required for the " + ++ prettyShow tt + ++ " benchmark type." + + extraField name tt = + "The '" + ++ name + ++ "' field is not used for the '" + ++ prettyShow tt + ++ "' benchmark type." + +validateBenchmark :: Position -> BenchmarkStanza -> ParseResult src () +validateBenchmark pos stanza = case _benchmarkStanzaBenchmarkType stanza of + Nothing -> pure () + Just tt@(BenchmarkTypeUnknown _ _) -> pure () + Just tt | tt `notElem` knownBenchmarkTypes -> pure () + Just tt@(BenchmarkTypeExe ver) -> case _benchmarkStanzaMainIs stanza of + Nothing -> parseFailure pos (missingField "main-is" tt) + Just file -> + when (isJust (_benchmarkStanzaBenchmarkModule stanza)) $ + parseWarning pos PWTExtraBenchmarkModule (extraField "benchmark-module" tt) + where + missingField name tt = + "The '" + ++ name + ++ "' field is required for the " + ++ prettyShow tt + ++ " benchmark type." + + extraField name tt = + "The '" + ++ name + ++ "' field is not used for the '" + ++ prettyShow tt + ++ "' benchmark type." + +unvalidateBenchmark :: Benchmark -> BenchmarkStanza +unvalidateBenchmark b = + BenchmarkStanza + { _benchmarkStanzaBenchmarkType = ty + , _benchmarkStanzaMainIs = ma + , _benchmarkStanzaBenchmarkModule = mo + , _benchmarkStanzaBuildInfo = benchmarkBuildInfo b + } + where + (ty, ma, mo) = case benchmarkInterface b of + BenchmarkExeV10 ver ma' + | getSymbolicPath ma' == "" -> + (Just $ BenchmarkTypeExe ver, Nothing, Nothing) + | otherwise -> + (Just $ BenchmarkTypeExe ver, Just ma', Nothing) + _ -> (Nothing, Nothing, Nothing) + +patchBenchmarkType :: CabalSpecVersion -> BenchmarkStanza -> BenchmarkStanza +patchBenchmarkType cabalSpecVersion stanza = + stanza { + _benchmarkStanzaBenchmarkType = + _benchmarkStanzaBenchmarkType stanza <|> do + guard (cabalSpecVersion >= CabalSpecV3_8) + benchmarkTypeExe <$ _benchmarkStanzaMainIs stanza + } + +instance L.HasBuildInfo BenchmarkStanza where + buildInfo = benchmarkStanzaBuildInfo + +benchmarkStanzaBenchmarkType :: Lens' BenchmarkStanza (Maybe BenchmarkType) +benchmarkStanzaBenchmarkType f s = fmap (\x -> s{_benchmarkStanzaBenchmarkType = x}) (f (_benchmarkStanzaBenchmarkType s)) +{-# INLINE benchmarkStanzaBenchmarkType #-} + +benchmarkStanzaMainIs :: Lens' BenchmarkStanza (Maybe (RelativePath Source File)) +benchmarkStanzaMainIs f s = fmap (\x -> s{_benchmarkStanzaMainIs = x}) (f (_benchmarkStanzaMainIs s)) +{-# INLINE benchmarkStanzaMainIs #-} + +benchmarkStanzaBenchmarkModule :: Lens' BenchmarkStanza (Maybe ModuleName) +benchmarkStanzaBenchmarkModule f s = fmap (\x -> s{_benchmarkStanzaBenchmarkModule = x}) (f (_benchmarkStanzaBenchmarkModule s)) +{-# INLINE benchmarkStanzaBenchmarkModule #-} + +benchmarkStanzaBuildInfo :: Lens' BenchmarkStanza BuildInfo +benchmarkStanzaBuildInfo f s = fmap (\x -> s{_benchmarkStanzaBuildInfo = x}) (f (_benchmarkStanzaBuildInfo s)) +{-# INLINE benchmarkStanzaBuildInfo #-} diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index c564eefbb2a..8d38042291c 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -14,6 +14,7 @@ module Distribution.Types.GenericPackageDescription , condForeignLibs' , condExecutables' , condTestSuites' + , condBenchmarks' -- * Merging helpers , mergeCondLibrary @@ -21,6 +22,7 @@ module Distribution.Types.GenericPackageDescription , mergeCondForeignLibs , mergeCondExecutables , mergeTestSuiteStanza + , mergeBenchmarkStanza ) where import Distribution.Compat.Prelude @@ -44,6 +46,7 @@ import Distribution.Types.ConfVar import Distribution.Types.Executable import Distribution.Types.Flag import Distribution.Types.TestSuiteStanza +import Distribution.Types.BenchmarkStanza import Distribution.Types.ForeignLib import Distribution.Types.Imports import Distribution.Types.Library @@ -94,7 +97,7 @@ data GenericPackageDescription = GenericPackageDescription ] , condBenchmarks :: [ ( UnqualComponentName - , CondTree ConfVar [Dependency] Benchmark + , CondTree ConfVar [Dependency] (WithImports BenchmarkStanza) ) ] } @@ -119,6 +122,9 @@ executableFromBuildInfo n bi = emptyExecutable{exeName = n, buildInfo = bi} testSuiteStanzaFromBuildInfo :: BuildInfo -> TestSuiteStanza testSuiteStanzaFromBuildInfo bi = TestSuiteStanza Nothing Nothing Nothing bi [] +benchmarkStanzaFromBuildInfo :: BuildInfo -> BenchmarkStanza +benchmarkStanzaFromBuildInfo bi = BenchmarkStanza Nothing Nothing Nothing bi + condLibrary' :: GenericPackageDescription -> Maybe (CondTree ConfVar [Dependency] Library) @@ -175,6 +181,13 @@ mergeTestSuiteStanza mergeTestSuiteStanza commonStanza = mergeImports commonStanza (const $ testSuiteStanzaFromBuildInfo) +mergeBenchmarkStanza + :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) + -> CondTree ConfVar [Dependency] (WithImports BenchmarkStanza) + -> CondTree ConfVar [Dependency] BenchmarkStanza +mergeBenchmarkStanza commonStanza = + mergeImports commonStanza (const $ benchmarkStanzaFromBuildInfo) + condTestSuites' :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)] @@ -182,7 +195,6 @@ condTestSuites' gpd = mergeTestSuiteStanza' (gpdCommonStanzas gpd) (condTestSuites gpd) & (map . fmap . mapTreeData) convertTestSuite - mergeTestSuiteStanza' :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) -> [(UnqualComponentName, CondTree ConfVar [Dependency] (WithImports TestSuiteStanza))] @@ -190,6 +202,20 @@ mergeTestSuiteStanza' mergeTestSuiteStanza' commonStanza = map $ \(name, tree) -> (name, mergeImports commonStanza (const $ testSuiteStanzaFromBuildInfo) tree) +condBenchmarks' + :: GenericPackageDescription + -> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)] +condBenchmarks' gpd = + mergeBenchmarkStanza' (gpdCommonStanzas gpd) (condBenchmarks gpd) + & (map . fmap . mapTreeData) convertBenchmark + +mergeBenchmarkStanza' + :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) + -> [(UnqualComponentName, CondTree ConfVar [Dependency] (WithImports BenchmarkStanza))] + -> [(UnqualComponentName, CondTree ConfVar [Dependency] BenchmarkStanza)] +mergeBenchmarkStanza' commonStanza = map $ \(name, tree) -> + (name, mergeImports commonStanza (const $ benchmarkStanzaFromBuildInfo) tree) + mergeImports :: forall a . L.HasBuildInfo a diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs index c0346fdf8f7..c8ddd05f0ac 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs @@ -35,6 +35,7 @@ import Distribution.Types.PackageDescription (PackageDescription) import Distribution.Types.TestSuite (TestSuite) import Distribution.Types.UnqualComponentName (UnqualComponentName) import Distribution.Types.TestSuiteStanza (TestSuiteStanza) +import Distribution.Types.BenchmarkStanza (BenchmarkStanza) import Distribution.Version (Version, VersionRange) ------------------------------------------------------------------------------- @@ -78,7 +79,7 @@ condTestSuites :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTr condTestSuites f s = fmap (\x -> s{T.condTestSuites = x}) (f (T.condTestSuites s)) {-# INLINE condTestSuites #-} -condBenchmarks :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] Benchmark))] +condBenchmarks :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] (T.WithImports BenchmarkStanza)))] condBenchmarks f s = fmap (\x -> s{T.condBenchmarks = x}) (f (T.condBenchmarks s)) {-# INLINE condBenchmarks #-} diff --git a/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs b/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs index 987f46aa20c..9060ef7e38b 100644 --- a/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs +++ b/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs @@ -28,6 +28,7 @@ import Distribution.Types.PackageVersionConstraint import Distribution.Types.UnitId (DefUnitId, UnitId) import Distribution.Types.Imports import Distribution.Types.TestSuiteStanza +import Distribution.Types.BenchmarkStanza import Distribution.Utils.NubList (NubList) import Distribution.Utils.Path (SymbolicPathX) import Distribution.Utils.ShortText (ShortText, fromShortText) @@ -63,6 +64,7 @@ instance ToExpr AbiDependency instance ToExpr AbiHash instance ToExpr Arch instance ToExpr Benchmark +instance ToExpr BenchmarkStanza instance ToExpr BenchmarkInterface instance ToExpr BenchmarkType instance ToExpr BuildInfo diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs index 25892db5cc0..99e08e3c3ca 100644 --- a/Cabal/src/Distribution/PackageDescription/Check.hs +++ b/Cabal/src/Distribution/PackageDescription/Check.hs @@ -75,6 +75,7 @@ import Distribution.Verbosity import Distribution.Version import System.FilePath (splitExtension, takeFileName) import Distribution.Types.TestSuiteStanza +import Distribution.Types.BenchmarkStanza import qualified Data.ByteString.Lazy as BS import qualified Distribution.SPDX as SPDX @@ -341,7 +342,7 @@ checkGenericPackageDescription (checkBenchmark ads) (\u l -> l{benchmarkName = u}) ) - condBenchmarks_ + (condBenchmarks' gpd) -- For unused flags it is clearer and more convenient to fold the -- data rather than walk it, an exception to the rule. @@ -978,7 +979,7 @@ pd2gpd pd = gpd (testSuites pd) , condBenchmarks = map - (t2cName benchmarkName remBench) + (fmap (mapTreeData $ noImports . unvalidateBenchmark). t2cName benchmarkName remBench) (benchmarks pd) } diff --git a/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs b/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs index 1c6b4635eae..1c4b0edfbe4 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs @@ -231,7 +231,7 @@ checkDuplicateModules pkg = concatMap checkLib (maybe id (:) (condLibrary' pkg) . map snd $ condSubLibraries' pkg) ++ concatMap checkExe (map snd $ condExecutables' pkg) ++ concatMap checkTest (map snd $ condTestSuites' pkg) - ++ concatMap checkBench (map snd $ condBenchmarks pkg) + ++ concatMap checkBench (map snd $ condBenchmarks' pkg) where -- the duplicate modules check is has not been thoroughly vetted for backpack checkLib = checkDups "library" (\l -> explicitLibModules l ++ map moduleReexportName (reexportedModules l)) From 6d63351f61c283b610571142a444338b5b686379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 10 Nov 2025 21:13:38 +0800 Subject: [PATCH 29/60] clean up --- Cabal-syntax/src/Distribution/FieldGrammar.hs | 1 - .../PackageDescription/FieldGrammar.hs | 27 ++--- .../Distribution/PackageDescription/Parsec.hs | 107 +++++------------- .../PackageDescription/PrettyPrint.hs | 4 +- .../src/Distribution/Types/BenchmarkStanza.hs | 105 +++++++---------- .../Types/GenericPackageDescription.hs | 25 ++-- .../Types/GenericPackageDescription/Lens.hs | 6 +- .../src/Distribution/Types/Imports.hs | 1 - .../src/Distribution/Types/Imports/Lens.hs | 6 +- .../src/Distribution/Types/TestSuiteStanza.hs | 44 +++---- .../Distribution/PackageDescription/Check.hs | 10 +- 11 files changed, 117 insertions(+), 219 deletions(-) diff --git a/Cabal-syntax/src/Distribution/FieldGrammar.hs b/Cabal-syntax/src/Distribution/FieldGrammar.hs index 5bc89460f24..78739a37cfa 100644 --- a/Cabal-syntax/src/Distribution/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/FieldGrammar.hs @@ -45,7 +45,6 @@ import Distribution.FieldGrammar.Newtypes import Distribution.FieldGrammar.Parsec import Distribution.FieldGrammar.Pretty import Distribution.Fields.Field -import Distribution.Types.TestSuiteStanza import Distribution.Utils.Generic (spanMaybe) type ParsecFieldGrammar' a = ParsecFieldGrammar a a diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index 84407c8ddad..a02ee4f0149 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -84,10 +84,8 @@ import Distribution.Package import Distribution.PackageDescription import Distribution.Parsec import Distribution.Pretty (Pretty (..), prettyShow, showToken) -import Distribution.Types.GenericPackageDescription -import Distribution.Types.TestSuiteStanza import Distribution.Types.BenchmarkStanza -import Distribution.Types.Imports +import Distribution.Types.TestSuiteStanza import Distribution.Utils.Path import Distribution.Version (Version, VersionRange) @@ -330,31 +328,23 @@ testSuiteFieldGrammar = <*> monoidalFieldAla "code-generators" (alaList' CommaFSep Token) testStanzaCodeGenerators ^^^ availableSince CabalSpecV3_8 [] -validateTestSuite :: CabalSpecVersion -> Position -> TestSuiteStanza -> ParseResult src () -validateTestSuite cabalSpecVersion pos stanza = case _testStanzaTestType stanza of +validateTestSuite :: Position -> TestSuiteStanza -> ParseResult src () +validateTestSuite pos stanza = case _testStanzaTestType stanza of Nothing -> pure () - Just tt@(TestTypeUnknown _ _) -> pure () + Just (TestTypeUnknown _ _) -> pure () Just tt | tt `notElem` knownTestTypes -> pure () - Just tt@(TestTypeExe ver) -> case _testStanzaMainIs stanza of + Just tt@(TestTypeExe _ver) -> case _testStanzaMainIs stanza of Nothing -> parseFailure pos (missingField "main-is" tt) - Just file -> + Just _file -> when (isJust (_testStanzaTestModule stanza)) $ parseWarning pos PWTExtraBenchmarkModule (extraField "test-module" tt) - Just tt@(TestTypeLib ver) -> case _testStanzaTestModule stanza of + Just tt@(TestTypeLib _ver) -> case _testStanzaTestModule stanza of Nothing -> parseFailure pos (missingField "test-module" tt) - Just module_ -> + Just _module -> when (isJust (_testStanzaMainIs stanza)) $ parseWarning pos PWTExtraMainIs (extraField "main-is" tt) where - testSuiteType = - _testStanzaTestType stanza - <|> do - guard (cabalSpecVersion >= CabalSpecV3_8) - - testTypeExe <$ _testStanzaMainIs stanza - <|> testTypeLib <$ _testStanzaTestModule stanza - missingField name tt = "The '" ++ name @@ -373,7 +363,6 @@ validateTestSuite cabalSpecVersion pos stanza = case _testStanzaTestType stanza -- Benchmark ------------------------------------------------------------------------------- - benchmarkFieldGrammar :: ( FieldGrammar c g , Applicative (g BenchmarkStanza) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index 39b27d86d63..22d4d0c1225 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -35,7 +35,6 @@ import Prelude () import Control.Monad.State.Strict (StateT, execStateT) import Control.Monad.Trans.Class (lift) -import Distribution.Types.TestSuiteStanza import Distribution.CabalSpecVersion import Distribution.Compat.Lens import Distribution.FieldGrammar @@ -54,6 +53,7 @@ import Distribution.Parsec.FieldLineStream (fieldLineStreamFromBS) import Distribution.Parsec.Position (Position (..), incPos, zeroPos) import Distribution.Parsec.Warning (PWarnType (..)) import Distribution.Pretty (prettyShow) +import Distribution.Types.TestSuiteStanza import Distribution.Utils.Generic (breakMaybe, fromUTF8BS, toUTF8BS, unfoldrM, validateUTF8) import Distribution.Version (Version, mkVersion, versionNumbers) @@ -63,12 +63,10 @@ import qualified Data.Map.Strict as Map import qualified Data.Set as Set import qualified Distribution.Compat.Newtype as Newtype import qualified Distribution.Compat.NonEmptySet as NES +import Distribution.Types.BenchmarkStanza import qualified Distribution.Types.BuildInfo.Lens as L -import qualified Distribution.Types.Executable.Lens as L -import qualified Distribution.Types.ForeignLib.Lens as L import qualified Distribution.Types.GenericPackageDescription.Lens as L import Distribution.Types.Imports -import Distribution.Types.BenchmarkStanza import qualified Distribution.Types.PackageDescription.Lens as L import qualified Distribution.Types.SetupBuildInfo.Lens as L import qualified Text.Parsec as P @@ -244,8 +242,8 @@ cabalFormatVersionsDesc :: String cabalFormatVersionsDesc = "Current cabal-version values are listed at https://cabal.readthedocs.io/en/stable/file-format-changelog.html." goSections :: forall src. CabalSpecVersion -> [Field Position] -> SectionParser src () -goSections specVer fields = do - traverse_ process fields +goSections specVer fieldPositions = do + traverse_ process fieldPositions -- Retain commen stanzas after parsing sections commonStanzas <- use stateCommonStanzas @@ -268,7 +266,6 @@ goSections specVer fields = do :: L.HasBuildInfo a => ParsecFieldGrammar' a -- \^ grammar - -> (BuildInfo -> a) -> Map String CondTreeBuildInfoWithImports -- \^ common stanzas -> [Field Position] @@ -283,7 +280,7 @@ goSections specVer fields = do | name == "common" = do commonStanzas <- use stateCommonStanzas name' <- lift $ parseCommonName pos args - biTree <- lift $ parseCondTree' buildInfoFieldGrammar id commonStanzas fields + biTree <- lift $ parseCondTree' buildInfoFieldGrammar commonStanzas fields case Map.lookup name' commonStanzas of Nothing -> stateCommonStanzas .= Map.insert name' biTree commonStanzas Just _ -> @@ -299,7 +296,7 @@ goSections specVer fields = do commonStanzas <- use stateCommonStanzas let name' = LMainLibName - lib <- lift $ parseCondTree' (libraryFieldGrammar name') (libraryFromBuildInfo name') commonStanzas fields + lib <- lift $ parseCondTree' (libraryFieldGrammar name') commonStanzas fields -- -- TODO check that not set stateGpd . L.condLibrary ?= lib @@ -310,7 +307,7 @@ goSections specVer fields = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args let name'' = LSubLibName name' - lib <- lift $ parseCondTree' (libraryFieldGrammar name'') (libraryFromBuildInfo name'') commonStanzas fields + lib <- lift $ parseCondTree' (libraryFieldGrammar name'') commonStanzas fields -- TODO check duplicate name here? stateGpd . L.condSubLibraries %= snoc (name', lib) @@ -318,7 +315,7 @@ goSections specVer fields = do | name == "foreign-library" = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args - flib <- lift $ parseCondTree' (foreignLibFieldGrammar name') (fromBuildInfo' name') commonStanzas fields + flib <- lift $ parseCondTree' (foreignLibFieldGrammar name') commonStanzas fields let hasType ts = foreignLibType ts /= foreignLibType mempty unless (onAllBranches hasType (mapTreeData unImportNames flib)) $ @@ -337,7 +334,7 @@ goSections specVer fields = do | name == "executable" = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args - exe <- lift $ parseCondTree' (executableFieldGrammar name') (fromBuildInfo' name') commonStanzas fields + exe <- lift $ parseCondTree' (executableFieldGrammar name') commonStanzas fields -- TODO check duplicate name here? stateGpd . L.condExecutables %= snoc (name', exe) | name == "test-suite" = do @@ -346,12 +343,13 @@ goSections specVer fields = do testStanza <- (fmap . mapTreeData . fmap) (patchTestSuiteType specVer) $ - lift $ parseCondTree' testSuiteFieldGrammar (fromBuildInfo' name') commonStanzas fields + lift $ + parseCondTree' testSuiteFieldGrammar commonStanzas fields -- Merge and then validate let testStanza' :: CondTree ConfVar [Dependency] TestSuiteStanza testStanza' = mergeTestSuiteStanza commonStanzas testStanza - _ok <- lift $ traverse (validateTestSuite specVer pos) testStanza' + _ok <- lift $ traverse (validateTestSuite pos) testStanza' let validated = mapTreeData convertTestSuite testStanza' let hasType ts = testInterface ts /= testInterface mempty @@ -383,11 +381,12 @@ goSections specVer fields = do benchStanza <- (fmap . mapTreeData . fmap) (patchBenchmarkType specVer) $ - lift $ parseCondTree' benchmarkFieldGrammar (fromBuildInfo' name') commonStanzas fields + lift $ + parseCondTree' benchmarkFieldGrammar commonStanzas fields let benchStanza' :: CondTree ConfVar [Dependency] BenchmarkStanza benchStanza' = mergeBenchmarkStanza commonStanzas benchStanza - _ok <- lift $ traverse (validateBenchmark pos) (fmap unImportNames benchStanza) + _ok <- lift $ traverse (validateBenchmark pos . unImportNames) benchStanza let validated = mapTreeData convertBenchmark benchStanza' let hasType ts = benchmarkInterface ts /= benchmarkInterface mempty @@ -493,27 +492,24 @@ warnInvalidSubsection (MkSection (Name pos name) _ _) = parseCondTree :: forall src a - . L.HasBuildInfo a - => CabalSpecVersion + . CabalSpecVersion -> HasElif -- ^ accept @elif@ -> ParsecFieldGrammar' a -- ^ grammar -> Map String CondTreeBuildInfoWithImports -- ^ common stanzas - -> (BuildInfo -> a) - -- ^ constructor from buildInfo -> (a -> [Dependency]) -- ^ condition extractor -> [Field Position] -> ParseResult src (CondTree ConfVar [Dependency] (WithImports a)) -parseCondTree v hasElif grammar commonStanzas fromBuildInfo cond = go +parseCondTree v hasElif grammar commonStanzas cond = go where go :: [Field Position] -> ParseResult src (CondTree ConfVar [Dependency] (WithImports a)) go fields0 = do (fields, imports) <- if v >= CabalSpecV3_0 - then processImports v fromBuildInfo commonStanzas fields0 + then processImports v commonStanzas fields0 else traverse (warnImport v) fields0 >>= \fields1 -> return (catMaybes fields1, mempty) let (fs, ss) = partitionFields fields @@ -619,87 +615,42 @@ with new AST, this all need to be rewritten. -- The approach is simple, and have good properties: -- -- * Common stanzas are parsed exactly once, even if not-used. Thus we report errors in them. -type CondTreeBuildInfo = CondTree ConfVar [Dependency] BuildInfo type CondTreeBuildInfoWithImports = CondTree ConfVar [Dependency] (WithImports BuildInfo) --- | Create @a@ from 'BuildInfo'. --- This class is used to implement common stanza parsing. --- --- Law: @view buildInfo . fromBuildInfo = id@ --- --- This takes name, as 'FieldGrammar's take names too. -class L.HasBuildInfo a => FromBuildInfo a where - fromBuildInfo' :: UnqualComponentName -> BuildInfo -> a - -libraryFromBuildInfo :: LibraryName -> BuildInfo -> Library -libraryFromBuildInfo n bi = - emptyLibrary - { libName = n - , libVisibility = case n of - LMainLibName -> LibraryVisibilityPublic - LSubLibName _ -> LibraryVisibilityPrivate - , libBuildInfo = bi - } - - --- TODO(leana8959): remove this typeclass -instance FromBuildInfo BuildInfo where fromBuildInfo' _ = id -instance FromBuildInfo ForeignLib where fromBuildInfo' n bi = set L.foreignLibName n $ set L.buildInfo bi emptyForeignLib -instance FromBuildInfo Executable where fromBuildInfo' n bi = set L.exeName n $ set L.buildInfo bi emptyExecutable - -instance FromBuildInfo TestSuiteStanza where - fromBuildInfo' _ bi = TestSuiteStanza Nothing Nothing Nothing bi [] - -instance FromBuildInfo BenchmarkStanza where - fromBuildInfo' _ bi = BenchmarkStanza Nothing Nothing Nothing bi - parseCondTreeWithCommonStanzas :: forall src a . L.HasBuildInfo a => CabalSpecVersion -> ParsecFieldGrammar' a -- ^ grammar - -> (BuildInfo -> a) - -- ^ construct fromBuildInfo -> Map String CondTreeBuildInfoWithImports -- ^ common stanzas -> [Field Position] -> ParseResult src (CondTree ConfVar [Dependency] (WithImports a)) -parseCondTreeWithCommonStanzas v grammar fromBuildInfo commonStanzas fields = do - (fields', imports) <- processImports v fromBuildInfo commonStanzas fields - x <- parseCondTree v hasElif grammar commonStanzas fromBuildInfo (view L.targetBuildDepends) fields' - -- TODO(leana8959): we replace this with the one from parseCondTree, because - -- it is duplicated (if such imports should exist, that is >= cabal 3.0) - -- However I'm so very unsure so let's do a concat and see what happens - return (prependImportsOnRoot imports $ x) +parseCondTreeWithCommonStanzas v grammar commonStanzas fields = do + (fields', imports) <- processImports v commonStanzas fields + x <- parseCondTree v hasElif grammar commonStanzas (view L.targetBuildDepends) fields' + -- We replace the imports from parseCondTree, because it comes right after + -- the import processing and hence is always empty, if such imports should + -- exist in the grammar, that is >= cabal 3.0. + return (replaceImportsOnRoot imports x) where hasElif = specHasElif v -- | only attach import annotation on root -attachImportsOnRoot +replaceImportsOnRoot :: [ImportName] - -> CondTree v c a -> CondTree v c (WithImports a) -attachImportsOnRoot imports = mapTreeData' (WithImports imports) noImports - --- | only prepend import annotation on root -prependImportsOnRoot - :: [ImportName] -> CondTree v c (WithImports a) - -> CondTree v c (WithImports a) -prependImportsOnRoot imports = mapTreeData' (mapImports (imports <>)) id +replaceImportsOnRoot imports = mapTreeData' (WithImports imports . unImportNames) id processImports - :: forall src a - . L.HasBuildInfo a - => CabalSpecVersion - -> (BuildInfo -> a) - -- ^ construct fromBuildInfo + :: CabalSpecVersion -> Map String CondTreeBuildInfoWithImports -- ^ common stanzas -> [Field Position] -> ParseResult src ([Field Position], [ImportName]) -processImports v fromBuildInfo commonStanzas = go [] +processImports v commonStanzas = go [] where hasCommonStanzas = specHasCommonStanzas v diff --git a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs index 453dcdaa2dc..b4f4490036b 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs @@ -54,11 +54,11 @@ import Distribution.Pretty import Distribution.Utils.Generic (writeFileAtomic, writeUTF8File) import qualified Distribution.PackageDescription.FieldGrammar as FG +import Distribution.Types.BenchmarkStanza import qualified Distribution.Types.BuildInfo.Lens as L import Distribution.Types.Imports -import Distribution.Types.TestSuiteStanza -import Distribution.Types.BenchmarkStanza import qualified Distribution.Types.SetupBuildInfo.Lens as L +import Distribution.Types.TestSuiteStanza import Text.PrettyPrint (Doc, char, hsep, parens, text) diff --git a/Cabal-syntax/src/Distribution/Types/BenchmarkStanza.hs b/Cabal-syntax/src/Distribution/Types/BenchmarkStanza.hs index a5850037091..b57610a2c35 100644 --- a/Cabal-syntax/src/Distribution/Types/BenchmarkStanza.hs +++ b/Cabal-syntax/src/Distribution/Types/BenchmarkStanza.hs @@ -1,7 +1,7 @@ {-# LANGUAGE ConstraintKinds #-} +{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} @@ -11,32 +11,19 @@ module Distribution.Types.BenchmarkStanza where import Distribution.Compat.Lens import Distribution.Compat.Prelude -import Language.Haskell.Extension import Prelude () import Distribution.CabalSpecVersion -import Distribution.Compat.Newtype (Newtype, pack', unpack') -import Distribution.Compiler (CompilerFlavor (..), PerCompilerFlavor (..)) -import Distribution.FieldGrammar import Distribution.Fields import Distribution.ModuleName (ModuleName) -import Distribution.Package import Distribution.Parsec -import Distribution.Pretty (Pretty (..), prettyShow, showToken) -import Distribution.Types.Imports -import Distribution.Types.ConfVar -import Distribution.Types.CondTree +import Distribution.Pretty (prettyShow) +import Distribution.Types.Benchmark +import Distribution.Types.BenchmarkInterface +import Distribution.Types.BenchmarkType import Distribution.Types.BuildInfo import qualified Distribution.Types.BuildInfo.Lens as L -import Distribution.Types.BenchmarkType -import Distribution.Types.BenchmarkInterface -import Distribution.Types.Benchmark import Distribution.Utils.Path -import Distribution.Version (Version, VersionRange) - -import qualified Data.ByteString.Char8 as BS8 -import qualified Distribution.Compat.CharParsing as P -import qualified Distribution.SPDX as SPDX -- | An intermediate type just used for parsing the benchmark stanza. -- After validation it is converted into the proper 'Benchmark' type. @@ -52,53 +39,14 @@ instance Binary BenchmarkStanza instance Structured BenchmarkStanza instance NFData BenchmarkStanza where rnf = genericRnf -convertBenchmark :: BenchmarkStanza -> Benchmark -convertBenchmark stanza = case _benchmarkStanzaBenchmarkType stanza of - Nothing -> - emptyBenchmark - { benchmarkBuildInfo = _benchmarkStanzaBuildInfo stanza - } - Just tt@(BenchmarkTypeUnknown _ _) -> - emptyBenchmark - { benchmarkInterface = BenchmarkUnsupported tt - , benchmarkBuildInfo = _benchmarkStanzaBuildInfo stanza - } - Just tt - | tt `notElem` knownBenchmarkTypes -> - emptyBenchmark - { benchmarkInterface = BenchmarkUnsupported tt - , benchmarkBuildInfo = _benchmarkStanzaBuildInfo stanza - } - Just tt@(BenchmarkTypeExe ver) -> case _benchmarkStanzaMainIs stanza of - Nothing -> emptyBenchmark - Just file -> - emptyBenchmark - { benchmarkInterface = BenchmarkExeV10 ver file - , benchmarkBuildInfo = _benchmarkStanzaBuildInfo stanza - } - where - missingField name tt = - "The '" - ++ name - ++ "' field is required for the " - ++ prettyShow tt - ++ " benchmark type." - - extraField name tt = - "The '" - ++ name - ++ "' field is not used for the '" - ++ prettyShow tt - ++ "' benchmark type." - validateBenchmark :: Position -> BenchmarkStanza -> ParseResult src () validateBenchmark pos stanza = case _benchmarkStanzaBenchmarkType stanza of Nothing -> pure () - Just tt@(BenchmarkTypeUnknown _ _) -> pure () + Just (BenchmarkTypeUnknown _ _) -> pure () Just tt | tt `notElem` knownBenchmarkTypes -> pure () - Just tt@(BenchmarkTypeExe ver) -> case _benchmarkStanzaMainIs stanza of + Just tt@(BenchmarkTypeExe _ver) -> case _benchmarkStanzaMainIs stanza of Nothing -> parseFailure pos (missingField "main-is" tt) - Just file -> + Just _file -> when (isJust (_benchmarkStanzaBenchmarkModule stanza)) $ parseWarning pos PWTExtraBenchmarkModule (extraField "benchmark-module" tt) where @@ -116,6 +64,31 @@ validateBenchmark pos stanza = case _benchmarkStanzaBenchmarkType stanza of ++ prettyShow tt ++ "' benchmark type." +convertBenchmark :: BenchmarkStanza -> Benchmark +convertBenchmark stanza = case _benchmarkStanzaBenchmarkType stanza of + Nothing -> + emptyBenchmark + { benchmarkBuildInfo = _benchmarkStanzaBuildInfo stanza + } + Just tt@(BenchmarkTypeUnknown _ _) -> + emptyBenchmark + { benchmarkInterface = BenchmarkUnsupported tt + , benchmarkBuildInfo = _benchmarkStanzaBuildInfo stanza + } + Just tt + | tt `notElem` knownBenchmarkTypes -> + emptyBenchmark + { benchmarkInterface = BenchmarkUnsupported tt + , benchmarkBuildInfo = _benchmarkStanzaBuildInfo stanza + } + Just (BenchmarkTypeExe ver) -> case _benchmarkStanzaMainIs stanza of + Nothing -> emptyBenchmark + Just file -> + emptyBenchmark + { benchmarkInterface = BenchmarkExeV10 ver file + , benchmarkBuildInfo = _benchmarkStanzaBuildInfo stanza + } + unvalidateBenchmark :: Benchmark -> BenchmarkStanza unvalidateBenchmark b = BenchmarkStanza @@ -135,12 +108,12 @@ unvalidateBenchmark b = patchBenchmarkType :: CabalSpecVersion -> BenchmarkStanza -> BenchmarkStanza patchBenchmarkType cabalSpecVersion stanza = - stanza { - _benchmarkStanzaBenchmarkType = - _benchmarkStanzaBenchmarkType stanza <|> do - guard (cabalSpecVersion >= CabalSpecV3_8) - benchmarkTypeExe <$ _benchmarkStanzaMainIs stanza - } + stanza + { _benchmarkStanzaBenchmarkType = + _benchmarkStanzaBenchmarkType stanza <|> do + guard (cabalSpecVersion >= CabalSpecV3_8) + benchmarkTypeExe <$ _benchmarkStanzaMainIs stanza + } instance L.HasBuildInfo BenchmarkStanza where buildInfo = benchmarkStanzaBuildInfo diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index 8d38042291c..4ecba319736 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -8,7 +8,7 @@ module Distribution.Types.GenericPackageDescription , emptyGenericPackageDescription , mergeImports - -- * Accessors + -- * Accessors , condLibrary' , condSubLibraries' , condForeignLibs' @@ -16,7 +16,7 @@ module Distribution.Types.GenericPackageDescription , condTestSuites' , condBenchmarks' - -- * Merging helpers + -- * Merging helpers , mergeCondLibrary , mergeCondSubLibraries , mergeCondForeignLibs @@ -38,21 +38,20 @@ import qualified Distribution.Types.Imports.Lens as L () import Distribution.Types.PackageDescription import Distribution.Package -import Distribution.CabalSpecVersion import Distribution.Types.Benchmark +import Distribution.Types.BenchmarkStanza import Distribution.Types.BuildInfo import Distribution.Types.CondTree import Distribution.Types.ConfVar import Distribution.Types.Executable import Distribution.Types.Flag -import Distribution.Types.TestSuiteStanza -import Distribution.Types.BenchmarkStanza import Distribution.Types.ForeignLib import Distribution.Types.Imports import Distribution.Types.Library import Distribution.Types.LibraryName import Distribution.Types.LibraryVisibility import Distribution.Types.TestSuite +import Distribution.Types.TestSuiteStanza import Distribution.Types.UnqualComponentName import Distribution.Version @@ -193,28 +192,32 @@ condTestSuites' -> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)] condTestSuites' gpd = mergeTestSuiteStanza' (gpdCommonStanzas gpd) (condTestSuites gpd) - & (map . fmap . mapTreeData) convertTestSuite + & (map . fmap . mapTreeData) convertTestSuite mergeTestSuiteStanza' :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) -> [(UnqualComponentName, CondTree ConfVar [Dependency] (WithImports TestSuiteStanza))] -> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuiteStanza)] -mergeTestSuiteStanza' commonStanza = map $ \(name, tree) -> - (name, mergeImports commonStanza (const $ testSuiteStanzaFromBuildInfo) tree) +mergeTestSuiteStanza' commonStanza = + map $ + fmap $ + mergeImports commonStanza (const $ testSuiteStanzaFromBuildInfo) condBenchmarks' :: GenericPackageDescription -> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)] condBenchmarks' gpd = mergeBenchmarkStanza' (gpdCommonStanzas gpd) (condBenchmarks gpd) - & (map . fmap . mapTreeData) convertBenchmark + & (map . fmap . mapTreeData) convertBenchmark mergeBenchmarkStanza' :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) -> [(UnqualComponentName, CondTree ConfVar [Dependency] (WithImports BenchmarkStanza))] -> [(UnqualComponentName, CondTree ConfVar [Dependency] BenchmarkStanza)] -mergeBenchmarkStanza' commonStanza = map $ \(name, tree) -> - (name, mergeImports commonStanza (const $ benchmarkStanzaFromBuildInfo) tree) +mergeBenchmarkStanza' commonStanza = + map $ + fmap $ + mergeImports commonStanza (const $ benchmarkStanzaFromBuildInfo) mergeImports :: forall a diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs index c8ddd05f0ac..701e29f417e 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs @@ -20,7 +20,7 @@ import qualified Distribution.Types.Imports as T import Distribution.Compiler (CompilerFlavor) import Distribution.System (Arch, OS) -import Distribution.Types.Benchmark (Benchmark) +import Distribution.Types.BenchmarkStanza (BenchmarkStanza) import Distribution.Types.BuildInfo (BuildInfo) import Distribution.Types.CondTree (CondTree) import Distribution.Types.ConfVar (ConfVar (..)) @@ -32,10 +32,8 @@ import Distribution.Types.GenericPackageDescription (GenericPackageDescription ( import Distribution.Types.Imports (ImportName) import Distribution.Types.Library (Library) import Distribution.Types.PackageDescription (PackageDescription) -import Distribution.Types.TestSuite (TestSuite) -import Distribution.Types.UnqualComponentName (UnqualComponentName) import Distribution.Types.TestSuiteStanza (TestSuiteStanza) -import Distribution.Types.BenchmarkStanza (BenchmarkStanza) +import Distribution.Types.UnqualComponentName (UnqualComponentName) import Distribution.Version (Version, VersionRange) ------------------------------------------------------------------------------- diff --git a/Cabal-syntax/src/Distribution/Types/Imports.hs b/Cabal-syntax/src/Distribution/Types/Imports.hs index e66b84717d0..732322fe79d 100644 --- a/Cabal-syntax/src/Distribution/Types/Imports.hs +++ b/Cabal-syntax/src/Distribution/Types/Imports.hs @@ -4,7 +4,6 @@ module Distribution.Types.Imports where -import Distribution.Compat.Lens import Distribution.Compat.Prelude data WithImports a = WithImports diff --git a/Cabal-syntax/src/Distribution/Types/Imports/Lens.hs b/Cabal-syntax/src/Distribution/Types/Imports/Lens.hs index dbf24263ea2..955163acce1 100644 --- a/Cabal-syntax/src/Distribution/Types/Imports/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/Imports/Lens.hs @@ -1,6 +1,6 @@ -{-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE DeriveFunctor #-} -{-# LANGUAGE DeriveGeneric #-} +{-# OPTIONS_GHC "-Wno-orphans" #-} + +-- TODO(leana8959): how can I put HasBuildInfo elsewhere module Distribution.Types.Imports.Lens where diff --git a/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs b/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs index a652528dda1..5449da9fd0b 100644 --- a/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs +++ b/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs @@ -1,7 +1,7 @@ {-# LANGUAGE ConstraintKinds #-} +{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} @@ -11,30 +11,16 @@ module Distribution.Types.TestSuiteStanza where import Distribution.Compat.Lens import Distribution.Compat.Prelude -import Language.Haskell.Extension import Prelude () import Distribution.CabalSpecVersion -import Distribution.Compat.Newtype (Newtype, pack', unpack') -import Distribution.Compiler (CompilerFlavor (..), PerCompilerFlavor (..)) -import Distribution.Fields import Distribution.ModuleName (ModuleName) -import Distribution.Package -import Distribution.Parsec -import Distribution.Pretty (Pretty (..), prettyShow, showToken) -import Distribution.Types.Imports -import Distribution.Types.TestType -import Distribution.Types.TestSuite -import Distribution.Types.TestSuiteInterface import Distribution.Types.BuildInfo import qualified Distribution.Types.BuildInfo.Lens as L +import Distribution.Types.TestSuite +import Distribution.Types.TestSuiteInterface +import Distribution.Types.TestType import Distribution.Utils.Path -import Distribution.Version (Version, VersionRange) - -import qualified Data.ByteString.Char8 as BS8 -import qualified Distribution.Compat.CharParsing as P -import qualified Distribution.SPDX as SPDX - -- | An intermediate type just used for parsing the test-suite stanza. -- After validation it is converted into the proper 'TestSuite' type. @@ -55,6 +41,7 @@ instance L.HasBuildInfo TestSuiteStanza where buildInfo = testStanzaBuildInfo -- TODO(leana8959): an experiment to validate directly on the TestSuite data type + -- | Convert a previously validated 'TestSuiteStanza' to 'GenericPackageDescription''s 'TestSuite' type convertTestSuite :: TestSuiteStanza -> TestSuite convertTestSuite stanza = case _testStanzaTestType stanza of @@ -68,23 +55,23 @@ convertTestSuite stanza = case _testStanzaTestType stanza of basicTestSuite { testInterface = TestSuiteUnsupported tt } - Just tt@(TestTypeExe ver) -> case _testStanzaMainIs stanza of + Just (TestTypeExe ver) -> case _testStanzaMainIs stanza of Nothing -> failedToConvert Just file -> basicTestSuite { testInterface = TestSuiteExeV10 ver file } - Just tt@(TestTypeLib ver) -> case _testStanzaTestModule stanza of + Just (TestTypeLib ver) -> case _testStanzaTestModule stanza of Nothing -> failedToConvert - Just module_ -> + Just module_ -> basicTestSuite { testInterface = TestSuiteLibV09 ver module_ } where failedToConvert = - error - $ "Unexpected: the conversion from TestSuiteStanza to TestSuite failed\n" - <> "Did you mess with `GenericPackageDescription`?" + error $ + "Unexpected: the conversion from TestSuiteStanza to TestSuite failed\n" + <> "Did you mess with `GenericPackageDescription`?" basicTestSuite = emptyTestSuite @@ -113,10 +100,10 @@ patchTestSuiteType cabalSpecVersion stanza = stanza { _testStanzaTestType = _testStanzaTestType stanza - <|> do - guard (cabalSpecVersion >= CabalSpecV3_8) - testTypeExe <$ _testStanzaMainIs stanza - <|> testTypeLib <$ _testStanzaTestModule stanza + <|> do + guard (cabalSpecVersion >= CabalSpecV3_8) + testTypeExe <$ _testStanzaMainIs stanza + <|> testTypeLib <$ _testStanzaTestModule stanza } testStanzaTestType :: Lens' TestSuiteStanza (Maybe TestType) @@ -138,4 +125,3 @@ testStanzaBuildInfo f s = fmap (\x -> s{_testStanzaBuildInfo = x}) (f (_testStan testStanzaCodeGenerators :: Lens' TestSuiteStanza [String] testStanzaCodeGenerators f s = fmap (\x -> s{_testStanzaCodeGenerators = x}) (f (_testStanzaCodeGenerators s)) {-# INLINE testStanzaCodeGenerators #-} - diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs index 99e08e3c3ca..3085e43c921 100644 --- a/Cabal/src/Distribution/PackageDescription/Check.hs +++ b/Cabal/src/Distribution/PackageDescription/Check.hs @@ -69,13 +69,13 @@ import Distribution.Simple.Glob , runDirFileGlob ) import Distribution.Simple.Utils hiding (findPackageDesc, notice) +import Distribution.Types.BenchmarkStanza +import Distribution.Types.TestSuiteStanza import Distribution.Utils.Generic (isAscii) import Distribution.Utils.Path import Distribution.Verbosity import Distribution.Version import System.FilePath (splitExtension, takeFileName) -import Distribution.Types.TestSuiteStanza -import Distribution.Types.BenchmarkStanza import qualified Data.ByteString.Lazy as BS import qualified Distribution.SPDX as SPDX @@ -962,8 +962,8 @@ pd2gpd pd = gpd gpd = emptyGenericPackageDescription { packageDescription = pd - -- TODO(leana8959): think about reverse conversion - , condLibrary = t2c . noImports <$> (library pd) + , -- TODO(leana8959): think about reverse conversion + condLibrary = t2c . noImports <$> (library pd) , condSubLibraries = map (fmap (mapTreeData noImports) . t2cName ln id) (subLibraries pd) , condForeignLibs = map @@ -979,7 +979,7 @@ pd2gpd pd = gpd (testSuites pd) , condBenchmarks = map - (fmap (mapTreeData $ noImports . unvalidateBenchmark). t2cName benchmarkName remBench) + (fmap (mapTreeData $ noImports . unvalidateBenchmark) . t2cName benchmarkName remBench) (benchmarks pd) } From a5f2b3a7d3484c6089218d12cb2d2121778069f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Tue, 11 Nov 2025 18:53:27 +0800 Subject: [PATCH 30/60] remove benchmark import field We now use the WithImports type to tag imports --- .../src/Distribution/Types/Benchmark.hs | 6 +----- .../src/Distribution/Types/Benchmark/Lens.hs | 5 ----- .../PackageDescription/Check/Target.hs | 1 - .../Solver/Modular/IndexConversion.hs | 20 +++++++++---------- .../src/Distribution/Client/IndexUtils.hs | 2 +- 5 files changed, 12 insertions(+), 22 deletions(-) diff --git a/Cabal-syntax/src/Distribution/Types/Benchmark.hs b/Cabal-syntax/src/Distribution/Types/Benchmark.hs index f22f52f94eb..6da7ef9dcae 100644 --- a/Cabal-syntax/src/Distribution/Types/Benchmark.hs +++ b/Cabal-syntax/src/Distribution/Types/Benchmark.hs @@ -15,7 +15,6 @@ import Prelude () import Distribution.Types.BenchmarkInterface import Distribution.Types.BenchmarkType import Distribution.Types.BuildInfo -import Distribution.Types.Imports import Distribution.Types.UnqualComponentName import Distribution.ModuleName @@ -25,7 +24,6 @@ import qualified Distribution.Types.BuildInfo.Lens as L -- | A \"benchmark\" stanza in a cabal file. data Benchmark = Benchmark { benchmarkName :: UnqualComponentName - , benchmarkImports :: [ImportName] , benchmarkInterface :: BenchmarkInterface , benchmarkBuildInfo :: BuildInfo } @@ -36,13 +34,12 @@ instance Structured Benchmark instance NFData Benchmark where rnf = genericRnf instance L.HasBuildInfo Benchmark where - buildInfo f (Benchmark x1 x2 x3 x4) = fmap (\y1 -> Benchmark x1 x2 x3 y1) (f x4) + buildInfo f (Benchmark x1 x2 x3) = fmap (\y1 -> Benchmark x1 x2 y1) (f x3) instance Monoid Benchmark where mempty = Benchmark { benchmarkName = mempty - , benchmarkImports = mempty , benchmarkInterface = mempty , benchmarkBuildInfo = mempty } @@ -52,7 +49,6 @@ instance Semigroup Benchmark where a <> b = Benchmark { benchmarkName = combineNames a b benchmarkName "benchmark" - , benchmarkImports = combine benchmarkImports , benchmarkInterface = combine benchmarkInterface , benchmarkBuildInfo = combine benchmarkBuildInfo } diff --git a/Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs b/Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs index b3bb7e99f36..40b17330fec 100644 --- a/Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/Benchmark/Lens.hs @@ -10,15 +10,10 @@ import Prelude () import Distribution.Types.Benchmark (Benchmark) import Distribution.Types.BenchmarkInterface (BenchmarkInterface) import Distribution.Types.BuildInfo (BuildInfo) -import Distribution.Types.Imports (ImportName) import Distribution.Types.UnqualComponentName (UnqualComponentName) import qualified Distribution.Types.Benchmark as T -benchmarkImports :: Lens' Benchmark [ImportName] -benchmarkImports f s = fmap (\x -> s{T.benchmarkImports = x}) (f (T.benchmarkImports s)) -{-# INLINE benchmarkImports #-} - benchmarkName :: Lens' Benchmark UnqualComponentName benchmarkName f s = fmap (\x -> s{T.benchmarkName = x}) (f (T.benchmarkName s)) {-# INLINE benchmarkName #-} diff --git a/Cabal/src/Distribution/PackageDescription/Check/Target.hs b/Cabal/src/Distribution/PackageDescription/Check/Target.hs index a58ad749623..e953a2b9453 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Target.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Target.hs @@ -260,7 +260,6 @@ checkBenchmark ads bm@( Benchmark benchmarkName_ - _benchmarkImports_ benchmarkInterface_ benchmarkBuildInfo_ ) = do diff --git a/cabal-install-solver/src/Distribution/Solver/Modular/IndexConversion.hs b/cabal-install-solver/src/Distribution/Solver/Modular/IndexConversion.hs index 72d0b8193e3..edb9ed9dfb0 100644 --- a/cabal-install-solver/src/Distribution/Solver/Modular/IndexConversion.hs +++ b/cabal-install-solver/src/Distribution/Solver/Modular/IndexConversion.hs @@ -176,7 +176,7 @@ convGPD :: OS -> Arch -> CompilerInfo -> [LabeledPackageConstraint] -> StrongFlags -> SolveExecutables -> PN -> GenericPackageDescription -> PInfo convGPD os arch cinfo constraints strfl solveExes pn - (GenericPackageDescription pkg scannedVersion flags mlib sub_libs flibs exes tests benchs) = + gpd@(GenericPackageDescription pkg scannedVersion flags _commonStanzas _mlib _sub_libs _flibs _exes _tests _benchs) = let fds = flagInfo strfl flags @@ -190,16 +190,16 @@ convGPD os arch cinfo constraints strfl solveExes pn initDR = DependencyReason pn M.empty S.empty flagged_deps - = concatMap (\ds -> conv ComponentLib libBuildInfo initDR ds) (maybeToList mlib) - ++ concatMap (\(nm, ds) -> conv (ComponentSubLib nm) libBuildInfo initDR ds) sub_libs - ++ concatMap (\(nm, ds) -> conv (ComponentFLib nm) foreignLibBuildInfo initDR ds) flibs - ++ concatMap (\(nm, ds) -> conv (ComponentExe nm) buildInfo initDR ds) exes + = concatMap (\ds -> conv ComponentLib libBuildInfo initDR ds) (maybeToList $ condLibrary' gpd) + ++ concatMap (\(nm, ds) -> conv (ComponentSubLib nm) libBuildInfo initDR ds) (condSubLibraries' gpd) + ++ concatMap (\(nm, ds) -> conv (ComponentFLib nm) foreignLibBuildInfo initDR ds) (condForeignLibs' gpd) + ++ concatMap (\(nm, ds) -> conv (ComponentExe nm) buildInfo initDR ds) (condExecutables' gpd) ++ prefix (Stanza (SN pn TestStanzas)) (L.map (\(nm, ds) -> conv (ComponentTest nm) testBuildInfo (addStanza TestStanzas initDR) ds) - tests) + (condTestSuites' gpd)) ++ prefix (Stanza (SN pn BenchStanzas)) (L.map (\(nm, ds) -> conv (ComponentBench nm) benchmarkBuildInfo (addStanza BenchStanzas initDR) ds) - benchs) + (condBenchmarks' gpd)) ++ maybe [] (convSetupBuildInfo pn) (setupBuildInfo pkg) addStanza :: Stanza -> DependencyReason pn -> DependencyReason pn @@ -216,16 +216,16 @@ convGPD os arch cinfo constraints strfl solveExes pn components = M.fromList $ libComps ++ subLibComps ++ exeComps where libComps = [ (ExposedLib LMainLibName, libToComponentInfo lib) - | lib <- maybeToList mlib ] + | lib <- maybeToList (condLibrary' gpd) ] subLibComps = [ (ExposedLib (LSubLibName name), libToComponentInfo lib) - | (name, lib) <- sub_libs ] + | (name, lib) <- condSubLibraries' gpd ] exeComps = [ ( ExposedExe name , ComponentInfo { compIsVisible = IsVisible True , compIsBuildable = IsBuildable $ testCondition (buildable . buildInfo) exe /= Just False } ) - | (name, exe) <- exes ] + | (name, exe) <- (condExecutables' gpd) ] libToComponentInfo lib = ComponentInfo { diff --git a/cabal-install/src/Distribution/Client/IndexUtils.hs b/cabal-install/src/Distribution/Client/IndexUtils.hs index f85db2b74c1..3e534fd4277 100644 --- a/cabal-install/src/Distribution/Client/IndexUtils.hs +++ b/cabal-install/src/Distribution/Client/IndexUtils.hs @@ -1113,7 +1113,7 @@ packageListFromCache verbosity mkPkg hnd Cache{..} = accum mempty [] mempty cach where dummyPackageDescription :: Version -> GenericPackageDescription dummyPackageDescription specVer = - GenericPackageDescription + emptyPackageDescription { packageDescription = emptyPackageDescription { package = pkgid From 9628f8dd0d7c4f68be95ba55b0239c4595efadd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 12 Nov 2025 11:24:46 +0800 Subject: [PATCH 31/60] introduce type alias in GenericPackageDescription --- .../Types/GenericPackageDescription.hs | 120 ++++++++---------- 1 file changed, 52 insertions(+), 68 deletions(-) diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index 4ecba319736..8ca409439a2 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -1,7 +1,9 @@ {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE ViewPatterns #-} module Distribution.Types.GenericPackageDescription ( GenericPackageDescription (..) @@ -60,6 +62,8 @@ import qualified Data.Map as Map -- --------------------------------------------------------------------------- -- The 'GenericPackageDescription' type +type DependencyTree a = CondTree ConfVar [Dependency] a + data GenericPackageDescription = GenericPackageDescription { packageDescription :: PackageDescription , gpdScannedVersion :: Maybe Version @@ -72,33 +76,13 @@ data GenericPackageDescription = GenericPackageDescription -- Perfectly, PackageIndex should have sum type, so we don't need to -- have dummy GPDs. , genPackageFlags :: [PackageFlag] - , gpdCommonStanzas :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) - , condLibrary :: Maybe (CondTree ConfVar [Dependency] (WithImports Library)) - , condSubLibraries - :: [ ( UnqualComponentName - , CondTree ConfVar [Dependency] (WithImports Library) - ) - ] - , condForeignLibs - :: [ ( UnqualComponentName - , CondTree ConfVar [Dependency] (WithImports ForeignLib) - ) - ] - , condExecutables - :: [ ( UnqualComponentName - , CondTree ConfVar [Dependency] (WithImports Executable) - ) - ] - , condTestSuites - :: [ ( UnqualComponentName - , CondTree ConfVar [Dependency] (WithImports TestSuiteStanza) - ) - ] - , condBenchmarks - :: [ ( UnqualComponentName - , CondTree ConfVar [Dependency] (WithImports BenchmarkStanza) - ) - ] + , gpdCommonStanzas :: Map ImportName (DependencyTree (WithImports BuildInfo)) + , condLibrary :: Maybe (DependencyTree (WithImports Library)) + , condSubLibraries :: [(UnqualComponentName, DependencyTree (WithImports Library))] + , condForeignLibs :: [(UnqualComponentName, DependencyTree (WithImports ForeignLib))] + , condExecutables :: [(UnqualComponentName, DependencyTree (WithImports Executable))] + , condTestSuites :: [(UnqualComponentName, DependencyTree (WithImports TestSuiteStanza))] + , condBenchmarks :: [(UnqualComponentName, DependencyTree (WithImports BenchmarkStanza))] } deriving (Show, Eq, Data, Generic) @@ -126,78 +110,78 @@ benchmarkStanzaFromBuildInfo bi = BenchmarkStanza Nothing Nothing Nothing bi condLibrary' :: GenericPackageDescription - -> Maybe (CondTree ConfVar [Dependency] Library) + -> Maybe (DependencyTree Library) condLibrary' gpd = mergeCondLibrary (gpdCommonStanzas gpd) <$> (condLibrary gpd) mergeCondLibrary - :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) - -> CondTree ConfVar [Dependency] (WithImports Library) - -> CondTree ConfVar [Dependency] Library + :: Map ImportName (DependencyTree (WithImports BuildInfo)) + -> DependencyTree (WithImports Library) + -> DependencyTree Library mergeCondLibrary = flip mergeImports fromBuildInfo where fromBuildInfo = libraryFromBuildInfo . libName condSubLibraries' :: GenericPackageDescription - -> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)] + -> [(UnqualComponentName, DependencyTree Library)] condSubLibraries' gpd = mergeCondSubLibraries (gpdCommonStanzas gpd) (condSubLibraries gpd) mergeCondSubLibraries - :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) - -> [(UnqualComponentName, CondTree ConfVar [Dependency] (WithImports Library))] - -> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)] + :: Map ImportName (DependencyTree (WithImports BuildInfo)) + -> [(UnqualComponentName, DependencyTree (WithImports Library))] + -> [(UnqualComponentName, DependencyTree Library)] mergeCondSubLibraries commonStanzas = map (mergeCondLibrary commonStanzas <$>) condForeignLibs' :: GenericPackageDescription - -> [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)] + -> [(UnqualComponentName, DependencyTree ForeignLib)] condForeignLibs' gpd = mergeCondForeignLibs (gpdCommonStanzas gpd) (condForeignLibs gpd) mergeCondForeignLibs - :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) - -> [(UnqualComponentName, CondTree ConfVar [Dependency] (WithImports ForeignLib))] - -> [(UnqualComponentName, CondTree ConfVar [Dependency] ForeignLib)] + :: Map ImportName (DependencyTree (WithImports BuildInfo)) + -> [(UnqualComponentName, DependencyTree (WithImports ForeignLib))] + -> [(UnqualComponentName, DependencyTree ForeignLib)] mergeCondForeignLibs commonStanzas = map $ \(name, tree) -> -- TODO(leana8959): is the name within the foreignlib important or we should use the name in the tuple? (name, mergeImports commonStanzas (const $ foreignLibFromBuildInfo name) tree) condExecutables' :: GenericPackageDescription - -> [(UnqualComponentName, CondTree ConfVar [Dependency] Executable)] + -> [(UnqualComponentName, DependencyTree Executable)] condExecutables' gpd = mergeCondExecutables (gpdCommonStanzas gpd) (condExecutables gpd) mergeCondExecutables - :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) - -> [(UnqualComponentName, CondTree ConfVar [Dependency] (WithImports Executable))] - -> [(UnqualComponentName, CondTree ConfVar [Dependency] Executable)] + :: Map ImportName (DependencyTree (WithImports BuildInfo)) + -> [(UnqualComponentName, DependencyTree (WithImports Executable))] + -> [(UnqualComponentName, DependencyTree Executable)] mergeCondExecutables commonStanzas = map $ \(name, tree) -> (name, mergeImports commonStanzas (const $ executableFromBuildInfo name) tree) mergeTestSuiteStanza - :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) - -> CondTree ConfVar [Dependency] (WithImports TestSuiteStanza) - -> CondTree ConfVar [Dependency] TestSuiteStanza + :: Map ImportName (DependencyTree (WithImports BuildInfo)) + -> DependencyTree (WithImports TestSuiteStanza) + -> DependencyTree TestSuiteStanza mergeTestSuiteStanza commonStanza = mergeImports commonStanza (const $ testSuiteStanzaFromBuildInfo) mergeBenchmarkStanza - :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) - -> CondTree ConfVar [Dependency] (WithImports BenchmarkStanza) - -> CondTree ConfVar [Dependency] BenchmarkStanza + :: Map ImportName (DependencyTree (WithImports BuildInfo)) + -> DependencyTree (WithImports BenchmarkStanza) + -> DependencyTree BenchmarkStanza mergeBenchmarkStanza commonStanza = mergeImports commonStanza (const $ benchmarkStanzaFromBuildInfo) condTestSuites' :: GenericPackageDescription - -> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuite)] + -> [(UnqualComponentName, DependencyTree TestSuite)] condTestSuites' gpd = mergeTestSuiteStanza' (gpdCommonStanzas gpd) (condTestSuites gpd) & (map . fmap . mapTreeData) convertTestSuite mergeTestSuiteStanza' - :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) - -> [(UnqualComponentName, CondTree ConfVar [Dependency] (WithImports TestSuiteStanza))] - -> [(UnqualComponentName, CondTree ConfVar [Dependency] TestSuiteStanza)] + :: Map ImportName (DependencyTree (WithImports BuildInfo)) + -> [(UnqualComponentName, DependencyTree (WithImports TestSuiteStanza))] + -> [(UnqualComponentName, DependencyTree TestSuiteStanza)] mergeTestSuiteStanza' commonStanza = map $ fmap $ @@ -205,15 +189,15 @@ mergeTestSuiteStanza' commonStanza = condBenchmarks' :: GenericPackageDescription - -> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)] + -> [(UnqualComponentName, DependencyTree Benchmark)] condBenchmarks' gpd = mergeBenchmarkStanza' (gpdCommonStanzas gpd) (condBenchmarks gpd) & (map . fmap . mapTreeData) convertBenchmark mergeBenchmarkStanza' - :: Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) - -> [(UnqualComponentName, CondTree ConfVar [Dependency] (WithImports BenchmarkStanza))] - -> [(UnqualComponentName, CondTree ConfVar [Dependency] BenchmarkStanza)] + :: Map ImportName (DependencyTree (WithImports BuildInfo)) + -> [(UnqualComponentName, DependencyTree (WithImports BenchmarkStanza))] + -> [(UnqualComponentName, DependencyTree BenchmarkStanza)] mergeBenchmarkStanza' commonStanza = map $ fmap $ @@ -222,16 +206,16 @@ mergeBenchmarkStanza' commonStanza = mergeImports :: forall a . L.HasBuildInfo a - => Map ImportName (CondTree ConfVar [Dependency] (WithImports BuildInfo)) + => Map ImportName (DependencyTree (WithImports BuildInfo)) -> (a -> (BuildInfo -> a)) -- ^ We need the information regarding the root node to be able to build such a constructor function - -> CondTree ConfVar [Dependency] (WithImports a) - -> CondTree ConfVar [Dependency] a + -> DependencyTree (WithImports a) + -> DependencyTree a mergeImports commonStanzas fromBuildInfo (CondNode root c zs) = - let endo :: CondTree ConfVar [Dependency] a -> CondTree ConfVar [Dependency] a + let endo :: DependencyTree a -> DependencyTree a endo = resolveImports (getImportNames root) - tree :: CondTree ConfVar [Dependency] a + tree :: DependencyTree a tree = CondNode (unImportNames root) c (map goBranch zs) in endo tree where @@ -246,9 +230,9 @@ mergeImports commonStanzas fromBuildInfo (CondNode root c zs) = resolveImports :: L.HasBuildInfo a => [ImportName] - -> (CondTree ConfVar [Dependency] a -> CondTree ConfVar [Dependency] a) + -> (DependencyTree a -> DependencyTree a) resolveImports importNames = - let commonTrees :: [CondTree ConfVar [Dependency] (WithImports BuildInfo)] + let commonTrees :: [DependencyTree (WithImports BuildInfo)] commonTrees = map ( fromMaybe (error "failed to merge imports, did you mess with GenericPackageDescription?") @@ -256,7 +240,7 @@ mergeImports commonStanzas fromBuildInfo (CondNode root c zs) = ) importNames - commonTrees' :: [CondTree ConfVar [Dependency] BuildInfo] + commonTrees' :: [DependencyTree BuildInfo] commonTrees' = map goNode commonTrees in \x -> foldr mergeCondTree x commonTrees' where @@ -264,9 +248,9 @@ mergeImports commonStanzas fromBuildInfo (CondNode root c zs) = mergeCondTree :: L.HasBuildInfo a - => CondTree ConfVar [Dependency] BuildInfo - -> CondTree ConfVar [Dependency] a - -> CondTree ConfVar [Dependency] a + => DependencyTree BuildInfo + -> DependencyTree a + -> DependencyTree a mergeCondTree (CondNode bi _ bis) (CondNode x _ cs) = CondNode x' (x' ^. L.targetBuildDepends) cs' where fromBuildInfo' :: (BuildInfo -> a) From c204d24acaacadc646f1754f53858cf50ac1cece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 12 Nov 2025 22:10:41 +0800 Subject: [PATCH 32/60] add GenericPackageDescription pattern to hide internal implementation --- .../Types/GenericPackageDescription.hs | 137 +++++++++++++++--- .../Types/GenericPackageDescription/Lens.hs | 42 +++--- 2 files changed, 138 insertions(+), 41 deletions(-) diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index 8ca409439a2..ff2dcc0b473 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -7,9 +7,21 @@ module Distribution.Types.GenericPackageDescription ( GenericPackageDescription (..) + , pattern GenericPackageDescription , emptyGenericPackageDescription , mergeImports + -- * Accessors from 'PatternSynonyms'\'s record syntax + , packageDescription + , gpdScannedVersion + , genPackageFlags + , condLibrary + , condSubLibraries + , condForeignLibs + , condExecutables + , condTestSuites + , condBenchmarks + -- * Accessors , condLibrary' , condSubLibraries' @@ -64,9 +76,11 @@ import qualified Data.Map as Map type DependencyTree a = CondTree ConfVar [Dependency] a -data GenericPackageDescription = GenericPackageDescription - { packageDescription :: PackageDescription - , gpdScannedVersion :: Maybe Version +-- | The internal representation of 'GenericPackageDescription', containing the unmerged stanzas +-- We provide a pattern below for backward compatibility, as well for hiding the internals of wiring the imports +data GenericPackageDescription = GenericPackageDescription' + { packageDescriptionInternal :: PackageDescription + , gpdScannedVersionInternal :: Maybe Version -- ^ This is a version as specified in source. -- We populate this field in index reading for dummy GPDs, -- only when GPD reading failed, but scanning haven't. @@ -75,17 +89,101 @@ data GenericPackageDescription = GenericPackageDescription -- -- Perfectly, PackageIndex should have sum type, so we don't need to -- have dummy GPDs. - , genPackageFlags :: [PackageFlag] + , genPackageFlagsInternal :: [PackageFlag] , gpdCommonStanzas :: Map ImportName (DependencyTree (WithImports BuildInfo)) - , condLibrary :: Maybe (DependencyTree (WithImports Library)) - , condSubLibraries :: [(UnqualComponentName, DependencyTree (WithImports Library))] - , condForeignLibs :: [(UnqualComponentName, DependencyTree (WithImports ForeignLib))] - , condExecutables :: [(UnqualComponentName, DependencyTree (WithImports Executable))] - , condTestSuites :: [(UnqualComponentName, DependencyTree (WithImports TestSuiteStanza))] - , condBenchmarks :: [(UnqualComponentName, DependencyTree (WithImports BenchmarkStanza))] + , condLibraryUnmerged :: Maybe (DependencyTree (WithImports Library)) + , condSubLibrariesUnmerged :: [(UnqualComponentName, DependencyTree (WithImports Library))] + , condForeignLibsUnmerged :: [(UnqualComponentName, DependencyTree (WithImports ForeignLib))] + , condExecutablesUnmerged :: [(UnqualComponentName, DependencyTree (WithImports Executable))] + , condTestSuitesUnmerged :: [(UnqualComponentName, DependencyTree (WithImports TestSuiteStanza))] + , condBenchmarksUnmerged :: [(UnqualComponentName, DependencyTree (WithImports BenchmarkStanza))] } deriving (Show, Eq, Data, Generic) +-- TODO(leana8959): change the name when it compiles + +pattern GenericPackageDescription + :: PackageDescription + -> Maybe Version + -> [PackageFlag] + -> Maybe (DependencyTree Library) + -> [(UnqualComponentName, DependencyTree Library)] + -> [(UnqualComponentName, DependencyTree ForeignLib)] + -> [(UnqualComponentName, DependencyTree Executable)] + -> [(UnqualComponentName, DependencyTree TestSuite)] + -> [(UnqualComponentName, DependencyTree Benchmark)] + -> GenericPackageDescription +pattern GenericPackageDescription + { packageDescription + , gpdScannedVersion + , genPackageFlags + , condLibrary + , condSubLibraries + , condForeignLibs + , condExecutables + , condTestSuites + , condBenchmarks + } + <- ( viewGenericPackageDescription -> + ( packageDescription + , gpdScannedVersion + , genPackageFlags + , condLibrary + , condSubLibraries + , condForeignLibs + , condExecutables + , condTestSuites + , condBenchmarks + ) + ) + where + GenericPackageDescription + pd + scannedVersion + packageFlags + lib + sublibs + flibs + exes + tests + bms + = + GenericPackageDescription' + pd + scannedVersion + packageFlags + mempty + ((fmap . fmap) noImports lib) + ((fmap . fmap . fmap) noImports sublibs) + ((fmap . fmap . fmap) noImports flibs) + ((fmap . fmap . fmap) noImports exes) + ((fmap . fmap . fmap) (noImports . unvalidateTestSuite) tests) + ((fmap . fmap . fmap) (noImports . unvalidateBenchmark) bms) + +viewGenericPackageDescription + :: GenericPackageDescription + -> ( PackageDescription + , Maybe Version + , [PackageFlag] + , Maybe (DependencyTree Library) + , [(UnqualComponentName, DependencyTree Library)] + , [(UnqualComponentName, DependencyTree ForeignLib)] + , [(UnqualComponentName, DependencyTree Executable)] + , [(UnqualComponentName, DependencyTree TestSuite)] + , [(UnqualComponentName, DependencyTree Benchmark)] + ) +viewGenericPackageDescription gpd = + ( packageDescriptionInternal gpd + , gpdScannedVersionInternal gpd + , genPackageFlagsInternal gpd + , condLibrary' gpd + , condSubLibraries' gpd + , condForeignLibs' gpd + , condExecutables' gpd + , condTestSuites' gpd + , condBenchmarks' gpd + ) + libraryFromBuildInfo :: LibraryName -> BuildInfo -> Library libraryFromBuildInfo n bi = emptyLibrary @@ -111,7 +209,7 @@ benchmarkStanzaFromBuildInfo bi = BenchmarkStanza Nothing Nothing Nothing bi condLibrary' :: GenericPackageDescription -> Maybe (DependencyTree Library) -condLibrary' gpd = mergeCondLibrary (gpdCommonStanzas gpd) <$> (condLibrary gpd) +condLibrary' gpd = mergeCondLibrary (gpdCommonStanzas gpd) <$> (condLibraryUnmerged gpd) mergeCondLibrary :: Map ImportName (DependencyTree (WithImports BuildInfo)) @@ -124,7 +222,7 @@ mergeCondLibrary = flip mergeImports fromBuildInfo condSubLibraries' :: GenericPackageDescription -> [(UnqualComponentName, DependencyTree Library)] -condSubLibraries' gpd = mergeCondSubLibraries (gpdCommonStanzas gpd) (condSubLibraries gpd) +condSubLibraries' gpd = mergeCondSubLibraries (gpdCommonStanzas gpd) (condSubLibrariesUnmerged gpd) mergeCondSubLibraries :: Map ImportName (DependencyTree (WithImports BuildInfo)) @@ -135,7 +233,7 @@ mergeCondSubLibraries commonStanzas = map (mergeCondLibrary commonStanzas <$>) condForeignLibs' :: GenericPackageDescription -> [(UnqualComponentName, DependencyTree ForeignLib)] -condForeignLibs' gpd = mergeCondForeignLibs (gpdCommonStanzas gpd) (condForeignLibs gpd) +condForeignLibs' gpd = mergeCondForeignLibs (gpdCommonStanzas gpd) (condForeignLibsUnmerged gpd) mergeCondForeignLibs :: Map ImportName (DependencyTree (WithImports BuildInfo)) @@ -148,7 +246,7 @@ mergeCondForeignLibs commonStanzas = map $ \(name, tree) -> condExecutables' :: GenericPackageDescription -> [(UnqualComponentName, DependencyTree Executable)] -condExecutables' gpd = mergeCondExecutables (gpdCommonStanzas gpd) (condExecutables gpd) +condExecutables' gpd = mergeCondExecutables (gpdCommonStanzas gpd) (condExecutablesUnmerged gpd) mergeCondExecutables :: Map ImportName (DependencyTree (WithImports BuildInfo)) @@ -175,7 +273,7 @@ condTestSuites' :: GenericPackageDescription -> [(UnqualComponentName, DependencyTree TestSuite)] condTestSuites' gpd = - mergeTestSuiteStanza' (gpdCommonStanzas gpd) (condTestSuites gpd) + mergeTestSuiteStanza' (gpdCommonStanzas gpd) (condTestSuitesUnmerged gpd) & (map . fmap . mapTreeData) convertTestSuite mergeTestSuiteStanza' @@ -191,7 +289,7 @@ condBenchmarks' :: GenericPackageDescription -> [(UnqualComponentName, DependencyTree Benchmark)] condBenchmarks' gpd = - mergeBenchmarkStanza' (gpdCommonStanzas gpd) (condBenchmarks gpd) + mergeBenchmarkStanza' (gpdCommonStanzas gpd) (condBenchmarksUnmerged gpd) & (map . fmap . mapTreeData) convertBenchmark mergeBenchmarkStanza' @@ -265,7 +363,7 @@ mergeImports commonStanzas fromBuildInfo (CondNode root c zs) = cs' = map (fromBuildInfo' <$>) bis ++ cs instance Package GenericPackageDescription where - packageId = packageId . packageDescription + packageId = packageId . packageDescriptionInternal instance Binary GenericPackageDescription instance Structured GenericPackageDescription @@ -277,7 +375,6 @@ emptyGenericPackageDescription = { packageDescription = emptyPackageDescription , gpdScannedVersion = Nothing , genPackageFlags = [] - , gpdCommonStanzas = mempty , condLibrary = Nothing , condSubLibraries = [] , condForeignLibs = [] @@ -290,8 +387,8 @@ emptyGenericPackageDescription = -- Traversal Instances instance L.HasBuildInfos GenericPackageDescription where - traverseBuildInfos f (GenericPackageDescription p v a1 commonStanzas x1 x2 x3 x4 x5 x6) = - GenericPackageDescription + traverseBuildInfos f ( GenericPackageDescription' p v a1 commonStanzas x1 x2 x3 x4 x5 x6) = + GenericPackageDescription' <$> L.traverseBuildInfos f p <*> pure v <*> pure a1 diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs index 701e29f417e..a85f755e94a 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs @@ -28,7 +28,7 @@ import Distribution.Types.Dependency (Dependency) import Distribution.Types.Executable (Executable) import Distribution.Types.Flag (FlagName, PackageFlag (MkPackageFlag)) import Distribution.Types.ForeignLib (ForeignLib) -import Distribution.Types.GenericPackageDescription (GenericPackageDescription (GenericPackageDescription)) +import Distribution.Types.GenericPackageDescription import Distribution.Types.Imports (ImportName) import Distribution.Types.Library (Library) import Distribution.Types.PackageDescription (PackageDescription) @@ -57,29 +57,29 @@ gpdCommonStanzas f s = fmap (\x -> s{T.gpdCommonStanzas = x}) (f (T.gpdCommonSta {-# INLINE gpdCommonStanzas #-} -- TODO(leana8959): how to deal with this -condLibrary :: Lens' GenericPackageDescription (Maybe (CondTree ConfVar [Dependency] (T.WithImports Library))) -condLibrary f s = fmap (\x -> s{T.condLibrary = x}) (f (T.condLibrary s)) -{-# INLINE condLibrary #-} +condLibraryUnmerged :: Lens' GenericPackageDescription (Maybe (CondTree ConfVar [Dependency] (T.WithImports Library))) +condLibraryUnmerged f s = fmap (\x -> s{T.condLibraryUnmerged = x}) (f (T.condLibraryUnmerged s)) +{-# INLINE condLibraryUnmerged #-} -condSubLibraries :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] (T.WithImports Library)))] -condSubLibraries f s = fmap (\x -> s{T.condSubLibraries = x}) (f (T.condSubLibraries s)) -{-# INLINE condSubLibraries #-} +condSubLibrariesUnmerged :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] (T.WithImports Library)))] +condSubLibrariesUnmerged f s = fmap (\x -> s{T.condSubLibrariesUnmerged = x}) (f (T.condSubLibrariesUnmerged s)) +{-# INLINE condSubLibrariesUnmerged #-} -condForeignLibs :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] (T.WithImports ForeignLib)))] -condForeignLibs f s = fmap (\x -> s{T.condForeignLibs = x}) (f (T.condForeignLibs s)) -{-# INLINE condForeignLibs #-} +condForeignLibsUnmerged :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] (T.WithImports ForeignLib)))] +condForeignLibsUnmerged f s = fmap (\x -> s{T.condForeignLibsUnmerged = x}) (f (T.condForeignLibsUnmerged s)) +{-# INLINE condForeignLibsUnmerged #-} -condExecutables :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] (T.WithImports Executable)))] -condExecutables f s = fmap (\x -> s{T.condExecutables = x}) (f (T.condExecutables s)) -{-# INLINE condExecutables #-} +condExecutablesUnmerged :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] (T.WithImports Executable)))] +condExecutablesUnmerged f s = fmap (\x -> s{T.condExecutablesUnmerged = x}) (f (T.condExecutablesUnmerged s)) +{-# INLINE condExecutablesUnmerged #-} -condTestSuites :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] (T.WithImports TestSuiteStanza)))] -condTestSuites f s = fmap (\x -> s{T.condTestSuites = x}) (f (T.condTestSuites s)) -{-# INLINE condTestSuites #-} +condTestSuitesUnmerged :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] (T.WithImports TestSuiteStanza)))] +condTestSuitesUnmerged f s = fmap (\x -> s{T.condTestSuitesUnmerged = x}) (f (T.condTestSuitesUnmerged s)) +{-# INLINE condTestSuitesUnmerged #-} -condBenchmarks :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] (T.WithImports BenchmarkStanza)))] -condBenchmarks f s = fmap (\x -> s{T.condBenchmarks = x}) (f (T.condBenchmarks s)) -{-# INLINE condBenchmarks #-} +condBenchmarksUnmerged :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] (T.WithImports BenchmarkStanza)))] +condBenchmarksUnmerged f s = fmap (\x -> s{T.condBenchmarksUnmerged = x}) (f (T.condBenchmarksUnmerged s)) +{-# INLINE condBenchmarksUnmerged #-} allCondTrees :: Applicative f @@ -89,8 +89,8 @@ allCondTrees ) -> GenericPackageDescription -> f GenericPackageDescription -allCondTrees f (GenericPackageDescription p v a1 commonStanzas x1 x2 x3 x4 x5 x6) = - GenericPackageDescription +allCondTrees f (GenericPackageDescription' p v a1 commonStanzas x1 x2 x3 x4 x5 x6) = + GenericPackageDescription' <$> pure p <*> pure v <*> pure a1 From 3e232f308266d110f226a9a2abaf8c7e64eacfa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 12 Nov 2025 22:48:58 +0800 Subject: [PATCH 33/60] backward compatible accessors --- .../Types/GenericPackageDescription.hs | 2 + .../Types/GenericPackageDescription/Lens.hs | 50 +++++++++++++++---- 2 files changed, 42 insertions(+), 10 deletions(-) diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index ff2dcc0b473..d16606260f2 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -160,6 +160,8 @@ pattern GenericPackageDescription ((fmap . fmap . fmap) (noImports . unvalidateTestSuite) tests) ((fmap . fmap . fmap) (noImports . unvalidateBenchmark) bms) +{-# COMPLETE GenericPackageDescription #-} + viewGenericPackageDescription :: GenericPackageDescription -> ( PackageDescription diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs index a85f755e94a..e80f182230f 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs @@ -20,6 +20,7 @@ import qualified Distribution.Types.Imports as T import Distribution.Compiler (CompilerFlavor) import Distribution.System (Arch, OS) +import Distribution.Types.Benchmark (Benchmark) import Distribution.Types.BenchmarkStanza (BenchmarkStanza) import Distribution.Types.BuildInfo (BuildInfo) import Distribution.Types.CondTree (CondTree) @@ -33,6 +34,7 @@ import Distribution.Types.Imports (ImportName) import Distribution.Types.Library (Library) import Distribution.Types.PackageDescription (PackageDescription) import Distribution.Types.TestSuiteStanza (TestSuiteStanza) +import Distribution.Types.TestSuite (TestSuite) import Distribution.Types.UnqualComponentName (UnqualComponentName) import Distribution.Version (Version, VersionRange) @@ -40,6 +42,8 @@ import Distribution.Version (Version, VersionRange) -- GenericPackageDescription ------------------------------------------------------------------------------- +type DependencyTree a = CondTree ConfVar [Dependency] a + packageDescription :: Lens' GenericPackageDescription PackageDescription packageDescription f s = fmap (\x -> s{T.packageDescription = x}) (f (T.packageDescription s)) {-# INLINE packageDescription #-} @@ -52,40 +56,66 @@ genPackageFlags :: Lens' GenericPackageDescription [PackageFlag] genPackageFlags f s = fmap (\x -> s{T.genPackageFlags = x}) (f (T.genPackageFlags s)) {-# INLINE genPackageFlags #-} -gpdCommonStanzas :: Lens' GenericPackageDescription (Map ImportName (CondTree ConfVar [Dependency] (T.WithImports BuildInfo))) +gpdCommonStanzas :: Lens' GenericPackageDescription (Map ImportName (DependencyTree (T.WithImports BuildInfo))) gpdCommonStanzas f s = fmap (\x -> s{T.gpdCommonStanzas = x}) (f (T.gpdCommonStanzas s)) {-# INLINE gpdCommonStanzas #-} --- TODO(leana8959): how to deal with this -condLibraryUnmerged :: Lens' GenericPackageDescription (Maybe (CondTree ConfVar [Dependency] (T.WithImports Library))) +condLibraryUnmerged :: Lens' GenericPackageDescription (Maybe (DependencyTree (T.WithImports Library))) condLibraryUnmerged f s = fmap (\x -> s{T.condLibraryUnmerged = x}) (f (T.condLibraryUnmerged s)) {-# INLINE condLibraryUnmerged #-} -condSubLibrariesUnmerged :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] (T.WithImports Library)))] +condSubLibrariesUnmerged :: Lens' GenericPackageDescription [(UnqualComponentName, (DependencyTree (T.WithImports Library)))] condSubLibrariesUnmerged f s = fmap (\x -> s{T.condSubLibrariesUnmerged = x}) (f (T.condSubLibrariesUnmerged s)) {-# INLINE condSubLibrariesUnmerged #-} -condForeignLibsUnmerged :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] (T.WithImports ForeignLib)))] +condForeignLibsUnmerged :: Lens' GenericPackageDescription [(UnqualComponentName, (DependencyTree (T.WithImports ForeignLib)))] condForeignLibsUnmerged f s = fmap (\x -> s{T.condForeignLibsUnmerged = x}) (f (T.condForeignLibsUnmerged s)) {-# INLINE condForeignLibsUnmerged #-} -condExecutablesUnmerged :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] (T.WithImports Executable)))] +condExecutablesUnmerged :: Lens' GenericPackageDescription [(UnqualComponentName, (DependencyTree (T.WithImports Executable)))] condExecutablesUnmerged f s = fmap (\x -> s{T.condExecutablesUnmerged = x}) (f (T.condExecutablesUnmerged s)) {-# INLINE condExecutablesUnmerged #-} -condTestSuitesUnmerged :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] (T.WithImports TestSuiteStanza)))] +condTestSuitesUnmerged :: Lens' GenericPackageDescription [(UnqualComponentName, (DependencyTree (T.WithImports TestSuiteStanza)))] condTestSuitesUnmerged f s = fmap (\x -> s{T.condTestSuitesUnmerged = x}) (f (T.condTestSuitesUnmerged s)) {-# INLINE condTestSuitesUnmerged #-} -condBenchmarksUnmerged :: Lens' GenericPackageDescription [(UnqualComponentName, (CondTree ConfVar [Dependency] (T.WithImports BenchmarkStanza)))] +condBenchmarksUnmerged :: Lens' GenericPackageDescription [(UnqualComponentName, (DependencyTree (T.WithImports BenchmarkStanza)))] condBenchmarksUnmerged f s = fmap (\x -> s{T.condBenchmarksUnmerged = x}) (f (T.condBenchmarksUnmerged s)) {-# INLINE condBenchmarksUnmerged #-} +-- TODO(leana8959): These accessor will merge the imports, apply f, and then put them back as if the imports weren't there +-- This is a good way to mask the import behaviour. +-- However, I do not know when this might be surprising +condLibrary :: Lens' GenericPackageDescription (Maybe (DependencyTree (Library))) +condLibrary f s = fmap (\x -> s{T.condLibrary = x}) (f (T.condLibrary s)) +{-# INLINE condLibrary #-} + +condSubLibraries :: Lens' GenericPackageDescription [(UnqualComponentName, (DependencyTree Library))] +condSubLibraries f s = fmap (\x -> s{T.condSubLibraries = x}) (f (T.condSubLibraries s)) +{-# INLINE condSubLibraries #-} + +condForeignLibs :: Lens' GenericPackageDescription [(UnqualComponentName, (DependencyTree ForeignLib))] +condForeignLibs f s = fmap (\x -> s{T.condForeignLibs = x}) (f (T.condForeignLibs s)) +{-# INLINE condForeignLibs #-} + +condExecutables :: Lens' GenericPackageDescription [(UnqualComponentName, (DependencyTree Executable))] +condExecutables f s = fmap (\x -> s{T.condExecutables = x}) (f (T.condExecutables s)) +{-# INLINE condExecutables #-} + +condTestSuites :: Lens' GenericPackageDescription [(UnqualComponentName, (DependencyTree TestSuite))] +condTestSuites f s = fmap (\x -> s{T.condTestSuites = x}) (f (T.condTestSuites s)) +{-# INLINE condTestSuites #-} + +condBenchmarks :: Lens' GenericPackageDescription [(UnqualComponentName, (DependencyTree Benchmark))] +condBenchmarks f s = fmap (\x -> s{T.condBenchmarks = x}) (f (T.condBenchmarks s)) +{-# INLINE condBenchmarks #-} + allCondTrees :: Applicative f => ( forall a - . CondTree ConfVar [Dependency] a - -> f (CondTree ConfVar [Dependency] a) + . DependencyTree a + -> f (DependencyTree a) ) -> GenericPackageDescription -> f GenericPackageDescription From 0d37e461ce2d995d9bb3e2365f7c187fe7854975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 12 Nov 2025 22:54:06 +0800 Subject: [PATCH 34/60] fix compiler errors --- .../src/Distribution/PackageDescription.hs | 8 +++ .../PackageDescription/Configuration.hs | 28 ++++----- .../PackageDescription/FieldGrammar.hs | 2 - .../Distribution/PackageDescription/Parsec.hs | 17 +++--- .../PackageDescription/PrettyPrint.hs | 16 ++--- .../Types/GenericPackageDescription.hs | 57 +++++++++--------- .../Types/GenericPackageDescription/Lens.hs | 4 +- .../src/Distribution/Types/TestSuiteStanza.hs | 2 - .../src/Data/TreeDiff/Instances/Cabal.hs | 3 - .../Distribution/PackageDescription/Check.hs | 60 +++++++------------ .../Solver/Modular/IndexConversion.hs | 14 ++--- .../src/Distribution/Client/IndexUtils.hs | 13 +++- .../src/Distribution/Client/Install.hs | 1 + .../src/Distribution/Client/ScriptUtils.hs | 1 + .../src/Distribution/Client/SetupWrapper.hs | 2 +- 15 files changed, 108 insertions(+), 120 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription.hs b/Cabal-syntax/src/Distribution/PackageDescription.hs index 47d46673e5f..bda173bd969 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription.hs @@ -15,6 +15,9 @@ module Distribution.PackageDescription module Distribution.Types.PackageDescription , module Distribution.Types.GenericPackageDescription + -- * Working with Imports + , module Distribution.Types.Imports + -- * Components , module Distribution.Types.ComponentName @@ -29,11 +32,13 @@ module Distribution.PackageDescription -- ** TestSuite , module Distribution.Types.TestSuite + , module Distribution.Types.TestSuiteStanza , module Distribution.Types.TestType , module Distribution.Types.TestSuiteInterface -- ** Benchmark , module Distribution.Types.Benchmark + , module Distribution.Types.BenchmarkStanza , module Distribution.Types.BenchmarkType , module Distribution.Types.BenchmarkInterface @@ -88,6 +93,7 @@ import Prelude () import Distribution.Types.Benchmark import Distribution.Types.BenchmarkInterface +import Distribution.Types.BenchmarkStanza import Distribution.Types.BenchmarkType import Distribution.Types.BuildInfo import Distribution.Types.BuildType @@ -105,6 +111,7 @@ import Distribution.Types.ForeignLibOption import Distribution.Types.ForeignLibType import Distribution.Types.GenericPackageDescription import Distribution.Types.HookedBuildInfo +import Distribution.Types.Imports import Distribution.Types.IncludeRenaming import Distribution.Types.LegacyExeDependency import Distribution.Types.Library @@ -124,5 +131,6 @@ import Distribution.Types.SetupBuildInfo import Distribution.Types.SourceRepo import Distribution.Types.TestSuite import Distribution.Types.TestSuiteInterface +import Distribution.Types.TestSuiteStanza import Distribution.Types.TestType import Distribution.Types.UnqualComponentName diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs index 57047aa8277..79a780fb614 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs @@ -458,7 +458,7 @@ finalizePD (Platform arch os) impl constraints - gpd@(GenericPackageDescription pkg _ver flags _commonStanzas _mb_lib0 _sub_libs0 _flibs0 _exes0 _tests0 _bms0) = do + (GenericPackageDescription pkg _ver flags mb_lib0 sub_libs0 flibs0 exes0 tests0 bms0) = do (targetSet, flagVals) <- resolveWithFlags flagChoices enabled os arch impl constraints condTrees check let @@ -493,12 +493,12 @@ finalizePD where -- Combine lib, exes, and tests into one list of @CondTree@s with tagged data condTrees = - maybeToList (mapTreeData Lib <$> condLibrary' gpd) - ++ map (\(name, tree) -> mapTreeData (SubComp name . CLib) tree) (condSubLibraries' gpd) - ++ map (\(name, tree) -> mapTreeData (SubComp name . CFLib) tree) (condForeignLibs' gpd) - ++ map (\(name, tree) -> mapTreeData (SubComp name . CExe) tree) (condExecutables' gpd) - ++ map (\(name, tree) -> mapTreeData (SubComp name . CTest) tree) (condTestSuites' gpd) - ++ map (\(name, tree) -> mapTreeData (SubComp name . CBench) tree) (condBenchmarks' gpd) + maybeToList (fmap (mapTreeData Lib) mb_lib0) + ++ map (\(name, tree) -> mapTreeData (SubComp name . CLib) tree) sub_libs0 + ++ map (\(name, tree) -> mapTreeData (SubComp name . CFLib) tree) flibs0 + ++ map (\(name, tree) -> mapTreeData (SubComp name . CExe) tree) exes0 + ++ map (\(name, tree) -> mapTreeData (SubComp name . CTest) tree) tests0 + ++ map (\(name, tree) -> mapTreeData (SubComp name . CBench) tree) bms0 flagChoices = map (\(MkPackageFlag n _ d manual) -> (n, d2c manual n d)) flags d2c manual n b = case lookupFlagAssignment n userflags of @@ -542,7 +542,7 @@ resolveWithFlags [] Distribution.System.Linux Distribution.System.I386 (Distribu -- function. flattenPackageDescription :: GenericPackageDescription -> PackageDescription flattenPackageDescription - gpd@(GenericPackageDescription pkg _ _ _gpdCommonStanzas_ _mlib0 _sub_libs0 _flibs0 _exes0 _tests0 _bms0) = + (GenericPackageDescription pkg _ _ mlib0 sub_libs0 flibs0 exes0 tests0 bms0) = pkg { library = mlib , subLibraries = reverse sub_libs @@ -552,14 +552,14 @@ flattenPackageDescription , benchmarks = reverse bms } where - mlib = f <$> condLibrary' gpd + mlib = f <$> mlib0 where f lib = (libFillInDefaults . fst . ignoreConditions $ lib){libName = LMainLibName} - sub_libs = flattenLib <$> (condSubLibraries' gpd) - flibs = flattenFLib <$> (condForeignLibs' gpd) - exes = flattenExe <$> (condExecutables' gpd) - tests = flattenTst <$> (condTestSuites' gpd) - bms = flattenBm <$> (condBenchmarks' gpd) + sub_libs = flattenLib <$> sub_libs0 + flibs = flattenFLib <$> flibs0 + exes = flattenExe <$> exes0 + tests = flattenTst <$> tests0 + bms = flattenBm <$> bms0 flattenLib (n, t) = libFillInDefaults $ (fst $ ignoreConditions t) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index a02ee4f0149..1b2845b2a06 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -84,8 +84,6 @@ import Distribution.Package import Distribution.PackageDescription import Distribution.Parsec import Distribution.Pretty (Pretty (..), prettyShow, showToken) -import Distribution.Types.BenchmarkStanza -import Distribution.Types.TestSuiteStanza import Distribution.Utils.Path import Distribution.Version (Version, VersionRange) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index 22d4d0c1225..75edb7c84f9 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -53,7 +53,6 @@ import Distribution.Parsec.FieldLineStream (fieldLineStreamFromBS) import Distribution.Parsec.Position (Position (..), incPos, zeroPos) import Distribution.Parsec.Warning (PWarnType (..)) import Distribution.Pretty (prettyShow) -import Distribution.Types.TestSuiteStanza import Distribution.Utils.Generic (breakMaybe, fromUTF8BS, toUTF8BS, unfoldrM, validateUTF8) import Distribution.Version (Version, mkVersion, versionNumbers) @@ -63,10 +62,8 @@ import qualified Data.Map.Strict as Map import qualified Data.Set as Set import qualified Distribution.Compat.Newtype as Newtype import qualified Distribution.Compat.NonEmptySet as NES -import Distribution.Types.BenchmarkStanza import qualified Distribution.Types.BuildInfo.Lens as L import qualified Distribution.Types.GenericPackageDescription.Lens as L -import Distribution.Types.Imports import qualified Distribution.Types.PackageDescription.Lens as L import qualified Distribution.Types.SetupBuildInfo.Lens as L import qualified Text.Parsec as P @@ -288,7 +285,7 @@ goSections specVer fieldPositions = do parseFailure pos $ "Duplicate common stanza: " ++ name' | name == "library" && null args = do - prev <- use $ stateGpd . L.condLibrary + prev <- use $ stateGpd . L.condLibraryUnmerged when (isJust prev) $ lift $ parseFailure pos $ @@ -299,7 +296,7 @@ goSections specVer fieldPositions = do lib <- lift $ parseCondTree' (libraryFieldGrammar name') commonStanzas fields -- -- TODO check that not set - stateGpd . L.condLibrary ?= lib + stateGpd . L.condLibraryUnmerged ?= lib -- Sublibraries -- TODO: check cabal-version @@ -309,7 +306,7 @@ goSections specVer fieldPositions = do let name'' = LSubLibName name' lib <- lift $ parseCondTree' (libraryFieldGrammar name'') commonStanzas fields -- TODO check duplicate name here? - stateGpd . L.condSubLibraries %= snoc (name', lib) + stateGpd . L.condSubLibrariesUnmerged %= snoc (name', lib) -- TODO: check cabal-version | name == "foreign-library" = do @@ -330,13 +327,13 @@ goSections specVer fieldPositions = do ] -- TODO check duplicate name here? - stateGpd . L.condForeignLibs %= snoc (name', flib) + stateGpd . L.condForeignLibsUnmerged %= snoc (name', flib) | name == "executable" = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args exe <- lift $ parseCondTree' (executableFieldGrammar name') commonStanzas fields -- TODO check duplicate name here? - stateGpd . L.condExecutables %= snoc (name', exe) + stateGpd . L.condExecutablesUnmerged %= snoc (name', exe) | name == "test-suite" = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args @@ -374,7 +371,7 @@ goSections specVer fieldPositions = do -- TODO check duplicate name here? -- Store the unmerged unvalidated version - stateGpd . L.condTestSuites %= snoc (name', testStanza) + stateGpd . L.condTestSuitesUnmerged %= snoc (name', testStanza) | name == "benchmark" = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args @@ -410,7 +407,7 @@ goSections specVer fieldPositions = do ] -- TODO check duplicate name here? - stateGpd . L.condBenchmarks %= snoc (name', benchStanza) + stateGpd . L.condBenchmarksUnmerged %= snoc (name', benchStanza) | name == "flag" = do name' <- parseNameBS pos args name'' <- lift $ runFieldParser' [pos] parsec specVer (fieldLineStreamFromBS name') `recoverWith` mkFlagName "" diff --git a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs index b4f4490036b..af2d336110c 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs @@ -54,11 +54,8 @@ import Distribution.Pretty import Distribution.Utils.Generic (writeFileAtomic, writeUTF8File) import qualified Distribution.PackageDescription.FieldGrammar as FG -import Distribution.Types.BenchmarkStanza import qualified Distribution.Types.BuildInfo.Lens as L -import Distribution.Types.Imports import qualified Distribution.Types.SetupBuildInfo.Lens as L -import Distribution.Types.TestSuiteStanza import Text.PrettyPrint (Doc, char, hsep, parens, text) @@ -234,13 +231,12 @@ pdToGpd pd = { packageDescription = pd , gpdScannedVersion = Nothing , genPackageFlags = [] - , -- TODO(leana8959): what to do here - condLibrary = mapTreeData noImports . mkCondTree <$> library pd - , condSubLibraries = fmap (mapTreeData noImports) . mkCondTreeL <$> subLibraries pd - , condForeignLibs = fmap (mapTreeData noImports) . mkCondTree' foreignLibName <$> foreignLibs pd - , condExecutables = fmap (mapTreeData noImports) . mkCondTree' exeName <$> executables pd - , condTestSuites = fmap (mapTreeData $ noImports . unvalidateTestSuite) . mkCondTree' testName <$> testSuites pd - , condBenchmarks = fmap (mapTreeData $ noImports . unvalidateBenchmark) . mkCondTree' benchmarkName <$> benchmarks pd + , condLibrary = mkCondTree <$> library pd + , condSubLibraries = mkCondTreeL <$> subLibraries pd + , condForeignLibs = mkCondTree' foreignLibName <$> foreignLibs pd + , condExecutables = mkCondTree' exeName <$> executables pd + , condTestSuites = mkCondTree' testName <$> testSuites pd + , condBenchmarks = mkCondTree' benchmarkName <$> benchmarks pd } where -- We set CondTree's [Dependency] to an empty list, as it diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index d16606260f2..88212b58757 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -11,7 +11,7 @@ module Distribution.Types.GenericPackageDescription , emptyGenericPackageDescription , mergeImports - -- * Accessors from 'PatternSynonyms'\'s record syntax + -- * Accessors from 'PatternSynonyms'\'s record syntax , packageDescription , gpdScannedVersion , genPackageFlags @@ -100,8 +100,6 @@ data GenericPackageDescription = GenericPackageDescription' } deriving (Show, Eq, Data, Generic) --- TODO(leana8959): change the name when it compiles - pattern GenericPackageDescription :: PackageDescription -> Maybe Version @@ -123,19 +121,19 @@ pattern GenericPackageDescription , condExecutables , condTestSuites , condBenchmarks - } - <- ( viewGenericPackageDescription -> - ( packageDescription - , gpdScannedVersion - , genPackageFlags - , condLibrary - , condSubLibraries - , condForeignLibs - , condExecutables - , condTestSuites - , condBenchmarks - ) - ) + } <- + ( viewGenericPackageDescription -> + ( packageDescription + , gpdScannedVersion + , genPackageFlags + , condLibrary + , condSubLibraries + , condForeignLibs + , condExecutables + , condTestSuites + , condBenchmarks + ) + ) where GenericPackageDescription pd @@ -146,19 +144,18 @@ pattern GenericPackageDescription flibs exes tests - bms - = - GenericPackageDescription' - pd - scannedVersion - packageFlags - mempty - ((fmap . fmap) noImports lib) - ((fmap . fmap . fmap) noImports sublibs) - ((fmap . fmap . fmap) noImports flibs) - ((fmap . fmap . fmap) noImports exes) - ((fmap . fmap . fmap) (noImports . unvalidateTestSuite) tests) - ((fmap . fmap . fmap) (noImports . unvalidateBenchmark) bms) + bms = + GenericPackageDescription' + pd + scannedVersion + packageFlags + mempty + ((fmap . fmap) noImports lib) + ((fmap . fmap . fmap) noImports sublibs) + ((fmap . fmap . fmap) noImports flibs) + ((fmap . fmap . fmap) noImports exes) + ((fmap . fmap . fmap) (noImports . unvalidateTestSuite) tests) + ((fmap . fmap . fmap) (noImports . unvalidateBenchmark) bms) {-# COMPLETE GenericPackageDescription #-} @@ -389,7 +386,7 @@ emptyGenericPackageDescription = -- Traversal Instances instance L.HasBuildInfos GenericPackageDescription where - traverseBuildInfos f ( GenericPackageDescription' p v a1 commonStanzas x1 x2 x3 x4 x5 x6) = + traverseBuildInfos f (GenericPackageDescription' p v a1 commonStanzas x1 x2 x3 x4 x5 x6) = GenericPackageDescription' <$> L.traverseBuildInfos f p <*> pure v diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs index e80f182230f..2c0ba4d144f 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs @@ -33,8 +33,8 @@ import Distribution.Types.GenericPackageDescription import Distribution.Types.Imports (ImportName) import Distribution.Types.Library (Library) import Distribution.Types.PackageDescription (PackageDescription) -import Distribution.Types.TestSuiteStanza (TestSuiteStanza) import Distribution.Types.TestSuite (TestSuite) +import Distribution.Types.TestSuiteStanza (TestSuiteStanza) import Distribution.Types.UnqualComponentName (UnqualComponentName) import Distribution.Version (Version, VersionRange) @@ -87,6 +87,8 @@ condBenchmarksUnmerged f s = fmap (\x -> s{T.condBenchmarksUnmerged = x}) (f (T. -- TODO(leana8959): These accessor will merge the imports, apply f, and then put them back as if the imports weren't there -- This is a good way to mask the import behaviour. -- However, I do not know when this might be surprising +-- +-- If this is used in the parser for example, it would be a massive footgun because it would essentially "erase" all the imports and put the merged one back condLibrary :: Lens' GenericPackageDescription (Maybe (DependencyTree (Library))) condLibrary f s = fmap (\x -> s{T.condLibrary = x}) (f (T.condLibrary s)) {-# INLINE condLibrary #-} diff --git a/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs b/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs index 5449da9fd0b..134050378f7 100644 --- a/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs +++ b/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs @@ -40,8 +40,6 @@ instance NFData TestSuiteStanza where rnf = genericRnf instance L.HasBuildInfo TestSuiteStanza where buildInfo = testStanzaBuildInfo --- TODO(leana8959): an experiment to validate directly on the TestSuite data type - -- | Convert a previously validated 'TestSuiteStanza' to 'GenericPackageDescription''s 'TestSuite' type convertTestSuite :: TestSuiteStanza -> TestSuite convertTestSuite stanza = case _testStanzaTestType stanza of diff --git a/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs b/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs index 9060ef7e38b..592fa053c31 100644 --- a/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs +++ b/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs @@ -26,9 +26,6 @@ import Distribution.Types.ComponentId (ComponentId) import Distribution.Types.DumpBuildInfo (DumpBuildInfo) import Distribution.Types.PackageVersionConstraint import Distribution.Types.UnitId (DefUnitId, UnitId) -import Distribution.Types.Imports -import Distribution.Types.TestSuiteStanza -import Distribution.Types.BenchmarkStanza import Distribution.Utils.NubList (NubList) import Distribution.Utils.Path (SymbolicPathX) import Distribution.Utils.ShortText (ShortText, fromShortText) diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs index 3085e43c921..b4e66d1aee3 100644 --- a/Cabal/src/Distribution/PackageDescription/Check.hs +++ b/Cabal/src/Distribution/PackageDescription/Check.hs @@ -69,8 +69,6 @@ import Distribution.Simple.Glob , runDirFileGlob ) import Distribution.Simple.Utils hiding (findPackageDesc, notice) -import Distribution.Types.BenchmarkStanza -import Distribution.Types.TestSuiteStanza import Distribution.Utils.Generic (isAscii) import Distribution.Utils.Path import Distribution.Verbosity @@ -88,7 +86,6 @@ import qualified Data.Set as Set import qualified Distribution.Utils.ShortText as ShortText import qualified Distribution.Types.GenericPackageDescription.Lens as L -import Distribution.Types.Imports import Control.Monad @@ -229,9 +226,8 @@ checkGenericPackageDescription packageDescription_ _gpdScannedVersion_ genPackageFlags_ - gpdCommonStanzas_ condLibrary_ - _condSubLibraries_ -- we use the merged version + condSubLibraries_ condForeignLibs_ condExecutables_ condTestSuites_ @@ -242,8 +238,7 @@ checkGenericPackageDescription checkPackageDescription packageDescription_ -- Targets should be present... let condAllLibraries = - maybeToList (condLibrary' gpd) - ++ (map snd $ condSubLibraries' gpd) + maybeToList condLibrary_ ++ map snd condSubLibraries_ checkP ( and [ null condExecutables_ @@ -297,7 +292,7 @@ checkGenericPackageDescription . ccNames ) let ads = - maybe [] ((: []) . extractAssocDeps pName . (mergeCondLibrary gpdCommonStanzas_)) condLibrary_ + maybe [] ((: []) . extractAssocDeps pName) condLibrary_ ++ map (uncurry extractAssocDeps) (condSubLibraries' gpd) case condLibrary_ of @@ -306,7 +301,7 @@ checkGenericPackageDescription genPackageFlags_ (checkLibrary False ads) (const id) - (mempty, mergeCondLibrary gpdCommonStanzas_ cl) + (mempty, cl) Nothing -> return () mapM_ ( checkCondTarget @@ -314,35 +309,35 @@ checkGenericPackageDescription (checkLibrary False ads) (\u l -> l{libName = maybeToLibraryName (Just u)}) ) - (condSubLibraries' gpd) + condSubLibraries_ mapM_ ( checkCondTarget genPackageFlags_ checkForeignLib (const id) ) - (condForeignLibs' gpd) + condForeignLibs_ mapM_ ( checkCondTarget genPackageFlags_ (checkExecutable ads) (const id) ) - (condExecutables' gpd) + condExecutables_ mapM_ ( checkCondTarget genPackageFlags_ (checkTestSuite ads) (\u l -> l{testName = u}) ) - (condTestSuites' gpd) + condTestSuites_ mapM_ ( checkCondTarget genPackageFlags_ (checkBenchmark ads) (\u l -> l{benchmarkName = u}) ) - (condBenchmarks' gpd) + condBenchmarks_ -- For unused flags it is clearer and more convenient to fold the -- data rather than walk it, an exception to the rule. @@ -370,12 +365,12 @@ checkGenericPackageDescription usedFlags :: Set.Set FlagName usedFlags = mconcat - [ toSetOf (L.condLibrary . traverse . traverseCondTreeV . L._PackageFlag) gpd - , toSetOf (L.condSubLibraries . traverse . _2 . traverseCondTreeV . L._PackageFlag) gpd - , toSetOf (L.condForeignLibs . traverse . _2 . traverseCondTreeV . L._PackageFlag) gpd - , toSetOf (L.condExecutables . traverse . _2 . traverseCondTreeV . L._PackageFlag) gpd - , toSetOf (L.condTestSuites . traverse . _2 . traverseCondTreeV . L._PackageFlag) gpd - , toSetOf (L.condBenchmarks . traverse . _2 . traverseCondTreeV . L._PackageFlag) gpd + [ toSetOf (traverse . traverseCondTreeV . L._PackageFlag) (condLibrary gpd) + , toSetOf (L.condSubLibrariesUnmerged . traverse . _2 . traverseCondTreeV . L._PackageFlag) gpd + , toSetOf (L.condForeignLibsUnmerged . traverse . _2 . traverseCondTreeV . L._PackageFlag) gpd + , toSetOf (L.condExecutablesUnmerged . traverse . _2 . traverseCondTreeV . L._PackageFlag) gpd + , toSetOf (L.condTestSuitesUnmerged . traverse . _2 . traverseCondTreeV . L._PackageFlag) gpd + , toSetOf (L.condBenchmarksUnmerged . traverse . _2 . traverseCondTreeV . L._PackageFlag) gpd ] checkPackageDescription :: Monad m => PackageDescription -> CheckM m () @@ -962,25 +957,12 @@ pd2gpd pd = gpd gpd = emptyGenericPackageDescription { packageDescription = pd - , -- TODO(leana8959): think about reverse conversion - condLibrary = t2c . noImports <$> (library pd) - , condSubLibraries = map (fmap (mapTreeData noImports) . t2cName ln id) (subLibraries pd) - , condForeignLibs = - map - (fmap (mapTreeData noImports) . t2cName foreignLibName id) - (foreignLibs pd) - , condExecutables = - map - (fmap (mapTreeData noImports) . t2cName exeName id) - (executables pd) - , condTestSuites = - map - (fmap (mapTreeData $ noImports . unvalidateTestSuite) . t2cName testName remTest) - (testSuites pd) - , condBenchmarks = - map - (fmap (mapTreeData $ noImports . unvalidateBenchmark) . t2cName benchmarkName remBench) - (benchmarks pd) + , condLibrary = t2c <$> (library pd) + , condSubLibraries = map (t2cName ln id) (subLibraries pd) + , condForeignLibs = map (t2cName foreignLibName id) (foreignLibs pd) + , condExecutables = map (t2cName exeName id) (executables pd) + , condTestSuites = map (t2cName testName remTest) (testSuites pd) + , condBenchmarks = map (t2cName benchmarkName remBench) (benchmarks pd) } -- From target to simple, unconditional CondTree. diff --git a/cabal-install-solver/src/Distribution/Solver/Modular/IndexConversion.hs b/cabal-install-solver/src/Distribution/Solver/Modular/IndexConversion.hs index edb9ed9dfb0..94e24835545 100644 --- a/cabal-install-solver/src/Distribution/Solver/Modular/IndexConversion.hs +++ b/cabal-install-solver/src/Distribution/Solver/Modular/IndexConversion.hs @@ -176,7 +176,7 @@ convGPD :: OS -> Arch -> CompilerInfo -> [LabeledPackageConstraint] -> StrongFlags -> SolveExecutables -> PN -> GenericPackageDescription -> PInfo convGPD os arch cinfo constraints strfl solveExes pn - gpd@(GenericPackageDescription pkg scannedVersion flags _commonStanzas _mlib _sub_libs _flibs _exes _tests _benchs) = + gpd@(GenericPackageDescription pkg scannedVersion flags mlib sub_libs flibs exes tests benchs) = let fds = flagInfo strfl flags @@ -190,16 +190,16 @@ convGPD os arch cinfo constraints strfl solveExes pn initDR = DependencyReason pn M.empty S.empty flagged_deps - = concatMap (\ds -> conv ComponentLib libBuildInfo initDR ds) (maybeToList $ condLibrary' gpd) - ++ concatMap (\(nm, ds) -> conv (ComponentSubLib nm) libBuildInfo initDR ds) (condSubLibraries' gpd) - ++ concatMap (\(nm, ds) -> conv (ComponentFLib nm) foreignLibBuildInfo initDR ds) (condForeignLibs' gpd) - ++ concatMap (\(nm, ds) -> conv (ComponentExe nm) buildInfo initDR ds) (condExecutables' gpd) + = concatMap (\ds -> conv ComponentLib libBuildInfo initDR ds) (maybeToList mlib) + ++ concatMap (\(nm, ds) -> conv (ComponentSubLib nm) libBuildInfo initDR ds) sub_libs + ++ concatMap (\(nm, ds) -> conv (ComponentFLib nm) foreignLibBuildInfo initDR ds) flibs + ++ concatMap (\(nm, ds) -> conv (ComponentExe nm) buildInfo initDR ds) exes ++ prefix (Stanza (SN pn TestStanzas)) (L.map (\(nm, ds) -> conv (ComponentTest nm) testBuildInfo (addStanza TestStanzas initDR) ds) - (condTestSuites' gpd)) + tests) ++ prefix (Stanza (SN pn BenchStanzas)) (L.map (\(nm, ds) -> conv (ComponentBench nm) benchmarkBuildInfo (addStanza BenchStanzas initDR) ds) - (condBenchmarks' gpd)) + benchs) ++ maybe [] (convSetupBuildInfo pn) (setupBuildInfo pkg) addStanza :: Stanza -> DependencyReason pn -> DependencyReason pn diff --git a/cabal-install/src/Distribution/Client/IndexUtils.hs b/cabal-install/src/Distribution/Client/IndexUtils.hs index 3e534fd4277..8d30ac06c73 100644 --- a/cabal-install/src/Distribution/Client/IndexUtils.hs +++ b/cabal-install/src/Distribution/Client/IndexUtils.hs @@ -4,6 +4,7 @@ {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} @@ -80,7 +81,17 @@ import Distribution.Package import Distribution.PackageDescription ( GenericPackageDescription (..) , PackageDescription (..) + , condBenchmarks + , condExecutables + , condForeignLibs + , condLibrary + , condSubLibraries + , condTestSuites , emptyPackageDescription + , genPackageFlags + , gpdScannedVersion + , packageDescription + , pattern GenericPackageDescription ) import Distribution.Simple.Compiler import qualified Distribution.Simple.Configure as Configure @@ -1113,7 +1124,7 @@ packageListFromCache verbosity mkPkg hnd Cache{..} = accum mempty [] mempty cach where dummyPackageDescription :: Version -> GenericPackageDescription dummyPackageDescription specVer = - emptyPackageDescription + GenericPackageDescription { packageDescription = emptyPackageDescription { package = pkgid diff --git a/cabal-install/src/Distribution/Client/Install.hs b/cabal-install/src/Distribution/Client/Install.hs index bd28046db6e..3afeb18da65 100644 --- a/cabal-install/src/Distribution/Client/Install.hs +++ b/cabal-install/src/Distribution/Client/Install.hs @@ -165,6 +165,7 @@ import Distribution.Package import Distribution.PackageDescription ( GenericPackageDescription (..) , PackageDescription + , genPackageFlags ) import qualified Distribution.PackageDescription as PackageDescription import Distribution.PackageDescription.Configuration diff --git a/cabal-install/src/Distribution/Client/ScriptUtils.hs b/cabal-install/src/Distribution/Client/ScriptUtils.hs index 1c78d537c19..4e437d28766 100644 --- a/cabal-install/src/Distribution/Client/ScriptUtils.hs +++ b/cabal-install/src/Distribution/Client/ScriptUtils.hs @@ -157,6 +157,7 @@ import Distribution.Types.Executable import Distribution.Types.GenericPackageDescription as GPD ( GenericPackageDescription (..) , emptyGenericPackageDescription + , packageDescription ) import Distribution.Types.PackageDescription ( PackageDescription (..) diff --git a/cabal-install/src/Distribution/Client/SetupWrapper.hs b/cabal-install/src/Distribution/Client/SetupWrapper.hs index 69c8f888698..f11790c7441 100644 --- a/cabal-install/src/Distribution/Client/SetupWrapper.hs +++ b/cabal-install/src/Distribution/Client/SetupWrapper.hs @@ -48,7 +48,7 @@ import Distribution.Package ) import Distribution.PackageDescription ( BuildType (..) - , GenericPackageDescription (packageDescription) + , packageDescription , PackageDescription (..) , buildType , specVersion From 9c989908004086476b19d02edbc61abbc745957d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 13 Nov 2025 20:34:13 +0800 Subject: [PATCH 35/60] tests: add tests for accessors --- Cabal-tests/tests/ParserTests.hs | 22 +- .../ParserTests/regressions/Octree-0.5.expr | 495 +- .../ParserTests/regressions/anynone.expr | 176 +- .../ParserTests/regressions/big-version.expr | 171 +- .../regressions/common-conditional.expr | 804 +- .../tests/ParserTests/regressions/common.expr | 284 +- .../ParserTests/regressions/common2.expr | 837 +- .../ParserTests/regressions/common3.expr | 308 +- .../tests/ParserTests/regressions/elif.expr | 269 +- .../tests/ParserTests/regressions/elif2.expr | 488 +- .../ParserTests/regressions/encoding-0.8.expr | 212 +- .../ParserTests/regressions/generics-sop.expr | 995 +- .../ParserTests/regressions/hasktorch.expr | 10376 +++++++++++++++- .../regressions/hidden-main-lib.expr | 180 +- .../ParserTests/regressions/indentation.expr | 191 +- .../ParserTests/regressions/indentation2.expr | 177 +- .../ParserTests/regressions/indentation3.expr | 181 +- .../ParserTests/regressions/issue-5055.expr | 352 +- .../ParserTests/regressions/issue-5846.expr | 239 +- .../ParserTests/regressions/issue-6083-a.expr | 450 +- .../ParserTests/regressions/issue-6083-b.expr | 460 +- .../ParserTests/regressions/issue-6083-c.expr | 268 +- .../regressions/issue-6083-pkg-pkg.expr | 183 +- .../ParserTests/regressions/issue-774.expr | 190 +- .../regressions/jaeger-flamegraph.expr | 582 +- .../regressions/leading-comma-2.expr | 227 +- .../regressions/leading-comma.expr | 220 +- .../tests/ParserTests/regressions/libpq1.expr | 899 +- .../tests/ParserTests/regressions/libpq2.expr | 905 +- .../ParserTests/regressions/mixin-1.expr | 220 +- .../ParserTests/regressions/mixin-2.expr | 220 +- .../ParserTests/regressions/mixin-3.expr | 203 +- .../ParserTests/regressions/monad-param.expr | 227 +- .../regressions/multiple-libs-2.expr | 264 +- .../ParserTests/regressions/noVersion.expr | 180 +- .../regressions/nothing-unicode.expr | 275 +- .../tests/ParserTests/regressions/shake.expr | 2722 +++- .../tests/ParserTests/regressions/spdx-1.expr | 169 +- .../tests/ParserTests/regressions/spdx-2.expr | 177 +- .../tests/ParserTests/regressions/spdx-3.expr | 177 +- .../regressions/th-lift-instances.expr | 694 +- .../ParserTests/regressions/version-sets.expr | 323 +- .../regressions/wl-pprint-indef.expr | 324 +- .../src/Data/TreeDiff/Instances/Cabal.hs | 4 + 44 files changed, 24573 insertions(+), 2747 deletions(-) diff --git a/Cabal-tests/tests/ParserTests.hs b/Cabal-tests/tests/ParserTests.hs index 8368ed19451..d13e5207577 100644 --- a/Cabal-tests/tests/ParserTests.hs +++ b/Cabal-tests/tests/ParserTests.hs @@ -14,7 +14,16 @@ import Control.Monad (unless, void) import Data.Algorithm.Diff (PolyDiff (..), getGroupedDiff) import Data.Maybe (isNothing) import Distribution.Fields (pwarning) -import Distribution.PackageDescription (GenericPackageDescription) +import Distribution.PackageDescription + ( GenericPackageDescription + ( condLibrary + , condSubLibraries + , condForeignLibs + , condExecutables + , condTestSuites + , condBenchmarks + ) + ) import Distribution.PackageDescription.Parsec (parseGenericPackageDescription) import Distribution.PackageDescription.PrettyPrint (showGenericPackageDescription) import Distribution.Parsec (PWarnType (..), PWarning (..), showPErrorWithSource, showPWarningWithSource) @@ -237,7 +246,16 @@ treeDiffGoldenTest fp = ediffGolden goldenTest "expr" exprFile $ do let res = withSource (PCabalFile (fp, contents)) $ parseGenericPackageDescription contents let (_, x) = runParseResult res case x of - Right gpd -> pure (toExpr gpd) + Right gpd -> pure $ toExpr + ( gpd + -- Test accessors because they encapsulate the merging behaviour + , condLibrary gpd + , condSubLibraries gpd + , condForeignLibs gpd + , condExecutables gpd + , condTestSuites gpd + , condBenchmarks gpd + ) Left (_, errs) -> fail $ unlines $ "ERROR" : map (showPErrorWithSource . fmap renderCabalFileSource) (NE.toList errs) where input = "tests" "ParserTests" "regressions" fp diff --git a/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.expr b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.expr index 634b27b8828..d6bab7e77ed 100644 --- a/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.expr +++ b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.expr @@ -1,76 +1,409 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_8, - package = PackageIdentifier { - pkgName = PackageName "Octree", - pkgVersion = mkVersion [0, 5]}, - licenseRaw = Right BSD3, - licenseFiles = [ - SymbolicPath "LICENSE"], - copyright = - "Copyright by Michal J. Gajda '2012", - maintainer = - "mjgajda@googlemail.com", - author = "Michal J. Gajda", - stability = "beta", - testedWith = [ - _×_ - GHC - (ThisVersion - (mkVersion [7, 0, 4])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 4, 1])), +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV1_8, + package = PackageIdentifier { + pkgName = PackageName "Octree", + pkgVersion = mkVersion [0, 5]}, + licenseRaw = Right BSD3, + licenseFiles = [ + SymbolicPath "LICENSE"], + copyright = + "Copyright by Michal J. Gajda '2012", + maintainer = + "mjgajda@googlemail.com", + author = "Michal J. Gajda", + stability = "beta", + testedWith = [ + _×_ + GHC + (ThisVersion + (mkVersion [7, 0, 4])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 4, 1])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 4, 2])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 6, 0]))], + homepage = + "https://github.com/mgajda/octree", + pkgUrl = + "http://hackage.haskell.org/package/octree", + bugReports = + "mailto:mjgajda@googlemail.com", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "git@github.com:mgajda/octree.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Simple unbalanced Octree for storing data about 3D points", + description = + "Octree data structure is relatively shallow data structure for space partitioning.", + category = "Data", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "Data.Octree"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [ + ModuleName + "Data.Octree.Internal"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [ + EnableExtension + ScopedTypeVariables], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 0])) + (EarlierVersion + (mkVersion [4, 7]))) + mainLibSet, + Dependency + (PackageName "AC-Vector") + (OrLaterVersion + (mkVersion [2, 3, 0])) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (OrLaterVersion + (mkVersion [2, 4, 0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 0])) + (EarlierVersion + (mkVersion [4, 7]))) + mainLibSet, + Dependency + (PackageName "AC-Vector") + (OrLaterVersion + (mkVersion [2, 3, 0])) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (OrLaterVersion + (mkVersion [2, 4, 0])) + mainLibSet], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [ _×_ - GHC - (ThisVersion - (mkVersion [7, 4, 2])), + (UnqualComponentName + "test_Octree") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath + "tests/test_Octree.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 0])) + (EarlierVersion + (mkVersion [4, 7]))) + mainLibSet, + Dependency + (PackageName "AC-Vector") + (OrLaterVersion + (mkVersion [2, 3, 0])) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (OrLaterVersion + (mkVersion [2, 4, 0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 0])) + (EarlierVersion + (mkVersion [4, 7]))) + mainLibSet, + Dependency + (PackageName "AC-Vector") + (OrLaterVersion + (mkVersion [2, 3, 0])) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (OrLaterVersion + (mkVersion [2, 4, 0])) + mainLibSet], + condTreeComponents = []}, _×_ - GHC - (ThisVersion - (mkVersion [7, 6, 0]))], - homepage = - "https://github.com/mgajda/octree", - pkgUrl = - "http://hackage.haskell.org/package/octree", - bugReports = - "mailto:mjgajda@googlemail.com", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "git@github.com:mgajda/octree.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "Simple unbalanced Octree for storing data about 3D points", - description = - "Octree data structure is relatively shallow data structure for space partitioning.", - category = "Data", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just + (UnqualComponentName "readme") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "README.lhs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-pgmL", "markdown-unlit"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 0])) + (EarlierVersion + (mkVersion [4, 7]))) + mainLibSet, + Dependency + (PackageName "AC-Vector") + (OrLaterVersion + (mkVersion [2, 3, 0])) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (OrLaterVersion + (mkVersion [2, 4, 0])) + mainLibSet, + Dependency + (PackageName "markdown-unlit") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 0])) + (EarlierVersion + (mkVersion [4, 7]))) + mainLibSet, + Dependency + (PackageName "AC-Vector") + (OrLaterVersion + (mkVersion [2, 3, 0])) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (OrLaterVersion + (mkVersion [2, 4, 0])) + mainLibSet, + Dependency + (PackageName "markdown-unlit") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -86,11 +419,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -178,11 +511,11 @@ GenericPackageDescription { (OrLaterVersion (mkVersion [2, 4, 0])) mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [ + condTreeComponents = []}) + [] + [] + [] + [ _×_ (UnqualComponentName "test_Octree") @@ -199,11 +532,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -303,11 +636,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -400,5 +733,5 @@ GenericPackageDescription { (PackageName "markdown-unlit") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}], - condBenchmarks = []} + condTreeComponents = []}] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/anynone.expr b/Cabal-tests/tests/ParserTests/regressions/anynone.expr index 927605d6058..6bd1ad53ed5 100644 --- a/Cabal-tests/tests/ParserTests/regressions/anynone.expr +++ b/Cabal-tests/tests/ParserTests/regressions/anynone.expr @@ -1,42 +1,126 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName "anynone", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "The -any none demo", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName "anynone", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "The -any none demo", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "AnyNone"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -52,11 +136,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -113,9 +197,9 @@ GenericPackageDescription { (PackageName "base") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/big-version.expr b/Cabal-tests/tests/ParserTests/regressions/big-version.expr index 4d3659e4592..e0214ae62f7 100644 --- a/Cabal-tests/tests/ParserTests/regressions/big-version.expr +++ b/Cabal-tests/tests/ParserTests/regressions/big-version.expr @@ -1,44 +1,119 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName - "big-version", - pkgVersion = mkVersion - [123456789]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName + "big-version", + pkgVersion = mkVersion + [123456789]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -53,11 +128,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -106,9 +181,9 @@ GenericPackageDescription { targetBuildDepends = [], mixins = []}}, condTreeConstraints = [], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/common-conditional.expr b/Cabal-tests/tests/ParserTests/regressions/common-conditional.expr index 41e0fd5377a..7d6de691f2a 100644 --- a/Cabal-tests/tests/ParserTests/regressions/common-conditional.expr +++ b/Cabal-tests/tests/ParserTests/regressions/common-conditional.expr @@ -1,59 +1,721 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName - "common-conditional", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/hvr/-.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "Common-stanza demo demo", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [ - MkPackageFlag { - flagName = FlagName "foo", - flagDescription = "", - flagDefault = True, - flagManual = True}], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName + "common-conditional", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/hvr/-.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Common-stanza demo demo", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [ + MkPackageFlag { + flagName = FlagName "foo", + flagDescription = "", + flagDefault = True, + flagManual = True}], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "ElseIf"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "foo"))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}, + condBranchIfFalse = Nothing}]}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [ + _×_ + (UnqualComponentName "tests") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "Tests.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "HUnit") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "HUnit") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = False, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "foo"))`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}, + condBranchIfFalse = Nothing}]}], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -69,11 +731,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -148,11 +810,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -242,11 +904,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -304,11 +966,11 @@ GenericPackageDescription { mainLibSet], condTreeComponents = []}, condBranchIfFalse = Nothing}]}, - condBranchIfFalse = Nothing}]}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [ + condBranchIfFalse = Nothing}]}) + [] + [] + [] + [ _×_ (UnqualComponentName "tests") CondNode { @@ -323,11 +985,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -402,11 +1064,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -474,11 +1136,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -569,11 +1231,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -649,11 +1311,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -712,5 +1374,5 @@ GenericPackageDescription { mainLibSet], condTreeComponents = []}, condBranchIfFalse = Nothing}]}, - condBranchIfFalse = Nothing}]}], - condBenchmarks = []} + condBranchIfFalse = Nothing}]}] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/common.expr b/Cabal-tests/tests/ParserTests/regressions/common.expr index e8c766460f2..370320c539c 100644 --- a/Cabal-tests/tests/ParserTests/regressions/common.expr +++ b/Cabal-tests/tests/ParserTests/regressions/common.expr @@ -1,57 +1,217 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_10, - package = PackageIdentifier { - pkgName = PackageName "common", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/hvr/-.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "Common-stanza demo demo", - description = "", - category = "", - customFieldsPD = [ - _×_ "x-revision" "1", +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV1_10, + package = PackageIdentifier { + pkgName = PackageName "common", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/hvr/-.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Common-stanza demo demo", + description = "", + category = "", + customFieldsPD = [ + _×_ "x-revision" "1", + _×_ + "x-follows-version-policy" + ""], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "ElseIf"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [ _×_ - "x-follows-version-policy" - ""], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just + (UnqualComponentName "tests") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "Tests.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "HUnit") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "HUnit") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -67,11 +227,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -128,11 +288,11 @@ GenericPackageDescription { (PackageName "ghc-prim") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [ + condTreeComponents = []}) + [] + [] + [] + [ _×_ (UnqualComponentName "tests") CondNode { @@ -147,11 +307,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -208,5 +368,5 @@ GenericPackageDescription { (PackageName "HUnit") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}], - condBenchmarks = []} + condTreeComponents = []}] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/common2.expr b/Cabal-tests/tests/ParserTests/regressions/common2.expr index af882207fc4..edb5f4a663b 100644 --- a/Cabal-tests/tests/ParserTests/regressions/common2.expr +++ b/Cabal-tests/tests/ParserTests/regressions/common2.expr @@ -1,53 +1,758 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_2, - package = PackageIdentifier { - pkgName = PackageName "common", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/hvr/-.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "Common-stanza demo demo", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV2_2, + package = PackageIdentifier { + pkgName = PackageName "common", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/hvr/-.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Common-stanza demo demo", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "ElseIf"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}, + condSubLibraries = [ + _×_ + (UnqualComponentName "internal") + CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName + "internal"), + exposedModules = [ + ModuleName "ElseIf2"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName + "internal"), + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [ + _×_ + (UnqualComponentName "tests") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "Tests.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "HUnit") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "HUnit") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = False, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -63,11 +768,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -166,11 +871,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -227,8 +932,8 @@ GenericPackageDescription { (OrLaterVersion (mkVersion [0])) mainLibSet], condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condSubLibraries = [ + condBranchIfFalse = Nothing}]}) + [ _×_ (UnqualComponentName "internal") CondNode { @@ -248,11 +953,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -353,11 +1058,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -414,10 +1119,10 @@ GenericPackageDescription { (OrLaterVersion (mkVersion [0])) mainLibSet], condTreeComponents = []}, - condBranchIfFalse = Nothing}]}], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [ + condBranchIfFalse = Nothing}]}] + [] + [] + [ _×_ (UnqualComponentName "tests") CondNode { @@ -432,11 +1137,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -535,11 +1240,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -615,11 +1320,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -695,11 +1400,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -749,5 +1454,5 @@ GenericPackageDescription { testCodeGenerators = []}, condTreeConstraints = [], condTreeComponents = []}, - condBranchIfFalse = Nothing}]}], - condBenchmarks = []} + condBranchIfFalse = Nothing}]}] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/common3.expr b/Cabal-tests/tests/ParserTests/regressions/common3.expr index be783c4cab6..5f039c087b4 100644 --- a/Cabal-tests/tests/ParserTests/regressions/common3.expr +++ b/Cabal-tests/tests/ParserTests/regressions/common3.expr @@ -1,57 +1,241 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_2, - package = PackageIdentifier { - pkgName = PackageName "common", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/hvr/-.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "Common-stanza demo demo", - description = "", - category = "", - customFieldsPD = [ - _×_ "x-revision" "1", +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV2_2, + package = PackageIdentifier { + pkgName = PackageName "common", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/hvr/-.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Common-stanza demo demo", + description = "", + category = "", + customFieldsPD = [ + _×_ "x-revision" "1", + _×_ + "x-follows-version-policy" + ""], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "ElseIf"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [ _×_ - "x-follows-version-policy" - ""], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just + (UnqualComponentName "tests") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "Tests.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "HUnit") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "HUnit") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -67,11 +251,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -128,11 +312,11 @@ GenericPackageDescription { (PackageName "ghc-prim") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [ + condTreeComponents = []}) + [] + [] + [] + [ _×_ (UnqualComponentName "tests") CondNode { @@ -147,11 +331,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -232,5 +416,5 @@ GenericPackageDescription { (PackageName "HUnit") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}], - condBenchmarks = []} + condTreeComponents = []}] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/elif.expr b/Cabal-tests/tests/ParserTests/regressions/elif.expr index e04821eaaef..019d393ea54 100644 --- a/Cabal-tests/tests/ParserTests/regressions/elif.expr +++ b/Cabal-tests/tests/ParserTests/regressions/elif.expr @@ -1,52 +1,207 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_10, - package = PackageIdentifier { - pkgName = PackageName "elif", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/hvr/-.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = "The elif demo", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV1_10, + package = PackageIdentifier { + pkgName = PackageName "elif", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/hvr/-.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = "The elif demo", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "ElseIf"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Linux)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "unix") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "unix") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -62,11 +217,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -133,11 +288,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -194,9 +349,9 @@ GenericPackageDescription { (OrLaterVersion (mkVersion [0])) mainLibSet], condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condBranchIfFalse = Nothing}]}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/elif2.expr b/Cabal-tests/tests/ParserTests/regressions/elif2.expr index 88eb02d59d7..b31aaa2f869 100644 --- a/Cabal-tests/tests/ParserTests/regressions/elif2.expr +++ b/Cabal-tests/tests/ParserTests/regressions/elif2.expr @@ -1,52 +1,420 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_2, - package = PackageIdentifier { - pkgName = PackageName "elif", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/hvr/-.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = "The elif demo", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV2_2, + package = PackageIdentifier { + pkgName = PackageName "elif", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/hvr/-.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = "The elif demo", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "ElseIf"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Linux)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "unix") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "unix") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = False, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}}]}}]}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -62,11 +430,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -133,11 +501,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -209,11 +577,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -279,11 +647,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -355,11 +723,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -407,9 +775,9 @@ GenericPackageDescription { targetBuildDepends = [], mixins = []}}, condTreeConstraints = [], - condTreeComponents = []}}]}}]}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}}]}}]}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.expr b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.expr index 02c4a4222c7..553c70282c7 100644 --- a/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.expr +++ b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.expr @@ -1,57 +1,153 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_12, - package = PackageIdentifier { - pkgName = PackageName - "encoding", - pkgVersion = mkVersion [0, 8]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Just - SetupBuildInfo { - setupDepends = [ +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV1_12, + package = PackageIdentifier { + pkgName = PackageName + "encoding", + pkgVersion = mkVersion [0, 8]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Just + SetupBuildInfo { + setupDepends = [ + Dependency + (PackageName "base") + (EarlierVersion (mkVersion [5])) + mainLibSet, + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + defaultSetupDepends = False}, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [ + SymbolicPath "README.md", + SymbolicPath "--", + SymbolicPath "--"], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "Data.Encoding"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [ + "-Wall", + "-O2", + "-threaded", + "-rtsopts", + "-with-rtsopts=-N1 -A64m"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (UnionVersionRanges + (LaterVersion + (mkVersion [4, 4])) + (ThisVersion + (mkVersion [4, 4]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ Dependency (PackageName "base") - (EarlierVersion (mkVersion [5])) - mainLibSet, - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) + (UnionVersionRanges + (LaterVersion + (mkVersion [4, 4])) + (ThisVersion + (mkVersion [4, 4]))) mainLibSet], - defaultSetupDepends = False}, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [ - SymbolicPath "README.md", - SymbolicPath "--", - SymbolicPath "--"], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -67,11 +163,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -140,9 +236,9 @@ GenericPackageDescription { (ThisVersion (mkVersion [4, 4]))) mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/generics-sop.expr b/Cabal-tests/tests/ParserTests/regressions/generics-sop.expr index a7cdf1a4300..7e8387e84bb 100644 --- a/Cabal-tests/tests/ParserTests/regressions/generics-sop.expr +++ b/Cabal-tests/tests/ParserTests/regressions/generics-sop.expr @@ -1,133 +1,860 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_10, - package = PackageIdentifier { - pkgName = PackageName - "generics-sop", - pkgVersion = mkVersion - [0, 3, 1, 0]}, - licenseRaw = Right BSD3, - licenseFiles = [ - SymbolicPath "LICENSE"], - copyright = "", - maintainer = - "andres@well-typed.com", - author = - "Edsko de Vries , Andres L\246h ", - stability = "", - testedWith = [ - _×_ - GHC - (ThisVersion - (mkVersion [7, 8, 4])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 10, 3])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 0, 1])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 0, 2])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 2, 1])), - _×_ - GHC - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [8, 3])) - (EarlierVersion - (mkVersion [8, 4])))], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/well-typed/generics-sop", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "Generic Programming using True Sums of Products", - description = - concat - [ - "A library to support the definition of generic functions.\n", - "Datatypes are viewed in a uniform, structured way:\n", - "the choice between constructors is represented using an n-ary\n", - "sum, and the arguments of each constructor are represented using\n", - "an n-ary product.\n", - "\n", - "The module \"Generics.SOP\" is the main module of this library and contains\n", - "more detailed documentation.\n", - "\n", - "Examples of using this library are provided by the following\n", - "packages:\n", - "\n", - "* @@ basic examples,\n", - "\n", - "* @@ generic pretty printing,\n", - "\n", - "* @@ generically computed lenses,\n", - "\n", - "* @@ generic JSON conversions.\n", - "\n", - "A detailed description of the ideas behind this library is provided by\n", - "the paper:\n", - "\n", - "* Edsko de Vries and Andres L\246h.\n", - ".\n", - "Workshop on Generic Programming (WGP) 2014.\n"], - category = "Generics", - customFieldsPD = [], - buildTypeRaw = Just Custom, - setupBuildInfo = Just - SetupBuildInfo { - setupDepends = [ +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV1_10, + package = PackageIdentifier { + pkgName = PackageName + "generics-sop", + pkgVersion = mkVersion + [0, 3, 1, 0]}, + licenseRaw = Right BSD3, + licenseFiles = [ + SymbolicPath "LICENSE"], + copyright = "", + maintainer = + "andres@well-typed.com", + author = + "Edsko de Vries , Andres L\246h ", + stability = "", + testedWith = [ + _×_ + GHC + (ThisVersion + (mkVersion [7, 8, 4])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 10, 3])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 0, 1])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 0, 2])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 2, 1])), + _×_ + GHC + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [8, 3])) + (EarlierVersion + (mkVersion [8, 4])))], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/well-typed/generics-sop", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Generic Programming using True Sums of Products", + description = + concat + [ + "A library to support the definition of generic functions.\n", + "Datatypes are viewed in a uniform, structured way:\n", + "the choice between constructors is represented using an n-ary\n", + "sum, and the arguments of each constructor are represented using\n", + "an n-ary product.\n", + "\n", + "The module \"Generics.SOP\" is the main module of this library and contains\n", + "more detailed documentation.\n", + "\n", + "Examples of using this library are provided by the following\n", + "packages:\n", + "\n", + "* @@ basic examples,\n", + "\n", + "* @@ generic pretty printing,\n", + "\n", + "* @@ generically computed lenses,\n", + "\n", + "* @@ generic JSON conversions.\n", + "\n", + "A detailed description of the ideas behind this library is provided by\n", + "the paper:\n", + "\n", + "* Edsko de Vries and Andres L\246h.\n", + ".\n", + "Workshop on Generic Programming (WGP) 2014.\n"], + category = "Generics", + customFieldsPD = [], + buildTypeRaw = Just Custom, + setupBuildInfo = Just + SetupBuildInfo { + setupDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "Cabal") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "cabal-doctest") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [1, 0, 2])) + (EarlierVersion + (mkVersion [1, 1]))) + mainLibSet], + defaultSetupDepends = False}, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [ + SymbolicPath "CHANGELOG.md"], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "Generics.SOP", + ModuleName "Generics.SOP.GGP", + ModuleName "Generics.SOP.TH", + ModuleName "Generics.SOP.Dict", + ModuleName + "Generics.SOP.Type.Metadata", + ModuleName + "Generics.SOP.BasicFunctors", + ModuleName + "Generics.SOP.Classes", + ModuleName + "Generics.SOP.Constraint", + ModuleName + "Generics.SOP.Instances", + ModuleName + "Generics.SOP.Metadata", + ModuleName "Generics.SOP.NP", + ModuleName "Generics.SOP.NS", + ModuleName + "Generics.SOP.Universe", + ModuleName "Generics.SOP.Sing"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "src"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [ + EnableExtension CPP, + EnableExtension + ScopedTypeVariables, + EnableExtension TypeFamilies, + EnableExtension RankNTypes, + EnableExtension TypeOperators, + EnableExtension GADTs, + EnableExtension ConstraintKinds, + EnableExtension + MultiParamTypeClasses, + EnableExtension + TypeSynonymInstances, + EnableExtension + FlexibleInstances, + EnableExtension + FlexibleContexts, + EnableExtension DeriveFunctor, + EnableExtension DeriveFoldable, + EnableExtension + DeriveTraversable, + EnableExtension + DefaultSignatures, + EnableExtension KindSignatures, + EnableExtension DataKinds, + EnableExtension + FunctionalDependencies], + otherExtensions = [ + EnableExtension + OverloadedStrings, + EnableExtension PolyKinds, + EnableExtension + UndecidableInstances, + EnableExtension TemplateHaskell, + EnableExtension DeriveGeneric, + EnableExtension + StandaloneDeriving], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-Wall"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 7])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "template-haskell") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 8])) + (EarlierVersion + (mkVersion [2, 13]))) + mainLibSet, + Dependency + (PackageName "ghc-prim") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 3])) + (EarlierVersion + (mkVersion [0, 6]))) + mainLibSet, + Dependency + (PackageName "deepseq") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [1, 3])) + (EarlierVersion + (mkVersion [1, 5]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ Dependency (PackageName "base") - (OrLaterVersion (mkVersion [0])) + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 7])) + (EarlierVersion + (mkVersion [5]))) mainLibSet, Dependency - (PackageName "Cabal") - (OrLaterVersion (mkVersion [0])) + (PackageName "template-haskell") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 8])) + (EarlierVersion + (mkVersion [2, 13]))) + mainLibSet, + Dependency + (PackageName "ghc-prim") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 3])) + (EarlierVersion + (mkVersion [0, 6]))) mainLibSet, Dependency - (PackageName "cabal-doctest") + (PackageName "deepseq") (IntersectVersionRanges (OrLaterVersion - (mkVersion [1, 0, 2])) + (mkVersion [1, 3])) (EarlierVersion - (mkVersion [1, 1]))) + (mkVersion [1, 5]))) mainLibSet], - defaultSetupDepends = False}, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [ - SymbolicPath "CHANGELOG.md"], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just + condTreeComponents = [ + CondBranch { + condBranchCondition = + `CNot (Var (Impl GHC (OrLaterVersion (mkVersion [7,8]))))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "tagged") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 7])) + (EarlierVersion + (mkVersion [0, 9]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "tagged") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 7])) + (EarlierVersion + (mkVersion [0, 9]))) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `CNot (Var (Impl GHC (OrLaterVersion (mkVersion [8,0]))))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName + "transformers-compat") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 3])) + (EarlierVersion + (mkVersion [0, 6]))) + mainLibSet, + Dependency + (PackageName "transformers") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 3])) + (EarlierVersion + (mkVersion [0, 6]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName + "transformers-compat") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 3])) + (EarlierVersion + (mkVersion [0, 6]))) + mainLibSet, + Dependency + (PackageName "transformers") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 3])) + (EarlierVersion + (mkVersion [0, 6]))) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (Impl GHC (OrLaterVersion (mkVersion [7,8])))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [ + EnableExtension + AutoDeriveTypeable], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (Impl GHC (EarlierVersion (mkVersion [7,10])))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [ + EnableExtension + OverlappingInstances], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [ + _×_ + (UnqualComponentName "doctests") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "doctests.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "test"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-Wall", "-threaded"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [ + _×_ + "x-doctest-options" + "--preserve-it"], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "doctest") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 13])) + (EarlierVersion + (mkVersion [0, 14]))) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "doctest") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 13])) + (EarlierVersion + (mkVersion [0, 14]))) + mainLibSet], + condTreeComponents = []}, + _×_ + (UnqualComponentName + "generics-sop-examples") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "Example.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "test"], + otherModules = [ + ModuleName "HTransExample"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-Wall"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 6])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "generics-sop") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 6])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "generics-sop") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -163,11 +890,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -334,11 +1061,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -421,11 +1148,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -526,11 +1253,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -599,11 +1326,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -654,11 +1381,11 @@ GenericPackageDescription { mixins = []}}, condTreeConstraints = [], condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [ + condBranchIfFalse = Nothing}]}) + [] + [] + [] + [ _×_ (UnqualComponentName "doctests") CondNode { @@ -673,11 +1400,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -771,11 +1498,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -851,5 +1578,5 @@ GenericPackageDescription { (PackageName "generics-sop") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}], - condBenchmarks = []} + condTreeComponents = []}] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/hasktorch.expr b/Cabal-tests/tests/ParserTests/regressions/hasktorch.expr index 9dfa089a3d5..463fcf14dd4 100644 --- a/Cabal-tests/tests/ParserTests/regressions/hasktorch.expr +++ b/Cabal-tests/tests/ParserTests/regressions/hasktorch.expr @@ -1,76 +1,10253 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_2, - package = PackageIdentifier { - pkgName = PackageName - "hasktorch", - pkgVersion = mkVersion - [0, 0, 1, 0]}, - licenseRaw = Left - (License - (ELicense - (ELicenseId BSD_3_Clause) - Nothing)), - licenseFiles = [], - copyright = "", - maintainer = - "Sam Stites , Austin Huang - cipher:ROT13", - author = "Hasktorch dev team", - stability = "", - testedWith = [], - homepage = - "https://github.com/hasktorch/hasktorch#readme", - pkgUrl = "", - bugReports = - "https://github.com/hasktorch/hasktorch/issues", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/hasktorch/hasktorch", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "Torch for tensors and neural networks in Haskell", - description = - "Hasktorch is a library for tensors and neural networks in Haskell. It is an independent open source community project which leverages the core C libraries shared by Torch and PyTorch. This library leverages @cabal v2-build@ and @backpack@. *Note that this project is in early development and should only be used by contributing developers. Expect substantial changes to the library API as it evolves. Contributions and PRs are welcome (see details on github).*", - category = - "Tensors, Machine Learning, AI", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [ - MkPackageFlag { - flagName = FlagName "cuda", - flagDescription = - "build with THC support", - flagDefault = False, - flagManual = False}, - MkPackageFlag { - flagName = FlagName "lite", - flagDescription = - "only build with Double and Long support", - flagDefault = False, - flagManual = False}], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV2_2, + package = PackageIdentifier { + pkgName = PackageName + "hasktorch", + pkgVersion = mkVersion + [0, 0, 1, 0]}, + licenseRaw = Left + (License + (ELicense + (ELicenseId BSD_3_Clause) + Nothing)), + licenseFiles = [], + copyright = "", + maintainer = + "Sam Stites , Austin Huang - cipher:ROT13", + author = "Hasktorch dev team", + stability = "", + testedWith = [], + homepage = + "https://github.com/hasktorch/hasktorch#readme", + pkgUrl = "", + bugReports = + "https://github.com/hasktorch/hasktorch/issues", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/hasktorch/hasktorch", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Torch for tensors and neural networks in Haskell", + description = + "Hasktorch is a library for tensors and neural networks in Haskell. It is an independent open source community project which leverages the core C libraries shared by Torch and PyTorch. This library leverages @cabal v2-build@ and @backpack@. *Note that this project is in early development and should only be used by contributing developers. Expect substantial changes to the library API as it evolves. Contributions and PRs are welcome (see details on github).*", + category = + "Tensors, Machine Learning, AI", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [ + MkPackageFlag { + flagName = FlagName "cuda", + flagDescription = + "build with THC support", + flagDefault = False, + flagManual = False}, + MkPackageFlag { + flagName = FlagName "lite", + flagDescription = + "only build with Double and Long support", + flagDefault = False, + flagManual = False}], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName + "Torch.Core.Exceptions", + ModuleName "Torch.Core.Random", + ModuleName "Torch.Core.LogAdd"], + reexportedModules = [ + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Types.Numeric", + moduleReexportName = ModuleName + "Torch.Types.Numeric"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Long", + moduleReexportName = ModuleName + "Torch.Long"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Long.Dynamic", + moduleReexportName = ModuleName + "Torch.Long.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Long.Storage", + moduleReexportName = ModuleName + "Torch.Long.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Double", + moduleReexportName = ModuleName + "Torch.Double"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.Dynamic", + moduleReexportName = ModuleName + "Torch.Double.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.Storage", + moduleReexportName = ModuleName + "Torch.Double.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Double.NN", + moduleReexportName = ModuleName + "Torch.Double.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Activation", + moduleReexportName = ModuleName + "Torch.Double.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Backprop", + moduleReexportName = ModuleName + "Torch.Double.NN.Backprop"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Conv1d", + moduleReexportName = ModuleName + "Torch.Double.NN.Conv1d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Conv2d", + moduleReexportName = ModuleName + "Torch.Double.NN.Conv2d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Double.NN.Criterion"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Layers", + moduleReexportName = ModuleName + "Torch.Double.NN.Layers"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Linear", + moduleReexportName = ModuleName + "Torch.Double.NN.Linear"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Math", + moduleReexportName = ModuleName + "Torch.Double.NN.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Padding", + moduleReexportName = ModuleName + "Torch.Double.NN.Padding"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Double.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Sampling", + moduleReexportName = ModuleName + "Torch.Double.NN.Sampling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.Dynamic.NN", + moduleReexportName = ModuleName + "Torch.Double.Dynamic.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.Dynamic.NN.Activation", + moduleReexportName = ModuleName + "Torch.Double.Dynamic.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.Dynamic.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Double.Dynamic.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.Dynamic.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Double.Dynamic.NN.Criterion"}], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "utils"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [ + EnableExtension LambdaCase, + EnableExtension DataKinds, + EnableExtension TypeFamilies, + EnableExtension + TypeSynonymInstances, + EnableExtension + ScopedTypeVariables, + EnableExtension + FlexibleContexts, + EnableExtension CPP], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "dimensions") + (UnionVersionRanges + (ThisVersion (mkVersion [1, 0])) + (LaterVersion + (mkVersion [1, 0]))) + mainLibSet, + Dependency + (PackageName "safe-exceptions") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 1, 0])) + (LaterVersion + (mkVersion [0, 1, 0]))) + mainLibSet, + Dependency + (PackageName "singletons") + (UnionVersionRanges + (ThisVersion (mkVersion [2, 2])) + (LaterVersion + (mkVersion [2, 2]))) + mainLibSet, + Dependency + (PackageName "text") + (UnionVersionRanges + (ThisVersion + (mkVersion [1, 2, 2])) + (LaterVersion + (mkVersion [1, 2, 2]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-cpu")])), + Dependency + (PackageName "hasktorch-ffi-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "dimensions") + (UnionVersionRanges + (ThisVersion (mkVersion [1, 0])) + (LaterVersion + (mkVersion [1, 0]))) + mainLibSet, + Dependency + (PackageName "safe-exceptions") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 1, 0])) + (LaterVersion + (mkVersion [0, 1, 0]))) + mainLibSet, + Dependency + (PackageName "singletons") + (UnionVersionRanges + (ThisVersion (mkVersion [2, 2])) + (LaterVersion + (mkVersion [2, 2]))) + mainLibSet, + Dependency + (PackageName "text") + (UnionVersionRanges + (ThisVersion + (mkVersion [1, 2, 2])) + (LaterVersion + (mkVersion [1, 2, 2]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-cpu")])), + Dependency + (PackageName "hasktorch-ffi-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `CNot (Var (PackageFlag (FlagName "lite")))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [ + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Byte", + moduleReexportName = ModuleName + "Torch.Byte"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Byte.Dynamic", + moduleReexportName = ModuleName + "Torch.Byte.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Byte.Storage", + moduleReexportName = ModuleName + "Torch.Byte.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Char", + moduleReexportName = ModuleName + "Torch.Char"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Char.Dynamic", + moduleReexportName = ModuleName + "Torch.Char.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Char.Storage", + moduleReexportName = ModuleName + "Torch.Char.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Short", + moduleReexportName = ModuleName + "Torch.Short"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Short.Dynamic", + moduleReexportName = ModuleName + "Torch.Short.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Short.Storage", + moduleReexportName = ModuleName + "Torch.Short.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Int", + moduleReexportName = ModuleName + "Torch.Int"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Int.Dynamic", + moduleReexportName = ModuleName + "Torch.Int.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Int.Storage", + moduleReexportName = ModuleName + "Torch.Int.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Float", + moduleReexportName = ModuleName + "Torch.Float"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.Dynamic", + moduleReexportName = ModuleName + "Torch.Float.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.Storage", + moduleReexportName = ModuleName + "Torch.Float.Storage"}], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "cuda"))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [ + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Cuda.Long", + moduleReexportName = ModuleName + "Torch.Cuda.Long"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Long.Dynamic", + moduleReexportName = ModuleName + "Torch.Cuda.Long.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Long.Storage", + moduleReexportName = ModuleName + "Torch.Cuda.Long.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Cuda.Double", + moduleReexportName = ModuleName + "Torch.Cuda.Double"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.Dynamic", + moduleReexportName = ModuleName + "Torch.Cuda.Double.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.Storage", + moduleReexportName = ModuleName + "Torch.Cuda.Double.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Activation", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Backprop", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Backprop"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Conv1d", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Conv1d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Conv2d", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Conv2d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Criterion"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Layers", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Layers"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Linear", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Linear"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Math", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Padding", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Padding"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Sampling", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Sampling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.Dynamic.NN", + moduleReexportName = ModuleName + "Torch.Cuda.Double.Dynamic.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.Dynamic.NN.Activation", + moduleReexportName = ModuleName + "Torch.Cuda.Double.Dynamic.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.Dynamic.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Cuda.Double.Dynamic.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.Dynamic.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Cuda.Double.Dynamic.NN.Criterion"}], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-gpu")]))], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-gpu")]))], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `CNot (Var (PackageFlag (FlagName "lite")))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [ + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Cuda.Byte", + moduleReexportName = ModuleName + "Torch.Cuda.Byte"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Byte.Dynamic", + moduleReexportName = ModuleName + "Torch.Cuda.Byte.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Byte.Storage", + moduleReexportName = ModuleName + "Torch.Cuda.Byte.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Cuda.Char", + moduleReexportName = ModuleName + "Torch.Cuda.Char"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Char.Dynamic", + moduleReexportName = ModuleName + "Torch.Cuda.Char.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Char.Storage", + moduleReexportName = ModuleName + "Torch.Cuda.Char.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Cuda.Short", + moduleReexportName = ModuleName + "Torch.Cuda.Short"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Short.Dynamic", + moduleReexportName = ModuleName + "Torch.Cuda.Short.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Short.Storage", + moduleReexportName = ModuleName + "Torch.Cuda.Short.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Cuda.Int", + moduleReexportName = ModuleName + "Torch.Cuda.Int"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Int.Dynamic", + moduleReexportName = ModuleName + "Torch.Cuda.Int.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Int.Storage", + moduleReexportName = ModuleName + "Torch.Cuda.Int.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Cuda.Float", + moduleReexportName = ModuleName + "Torch.Cuda.Float"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Float.Dynamic", + moduleReexportName = ModuleName + "Torch.Cuda.Float.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Float.Storage", + moduleReexportName = ModuleName + "Torch.Cuda.Float.Storage"}], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}, + condBranchIfFalse = Nothing}]}, + condSubLibraries = + [ + _×_ + (UnqualComponentName + "hasktorch-cpu") + CondNode { + condTreeData = + Library { + libName = LSubLibName + (UnqualComponentName + "hasktorch-cpu"), + exposedModules = [ + ModuleName "Torch.Long", + ModuleName "Torch.Long.Dynamic", + ModuleName "Torch.Long.Storage", + ModuleName "Torch.Double", + ModuleName + "Torch.Double.Dynamic", + ModuleName + "Torch.Double.Storage"], + reexportedModules = [ + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Double.NN", + moduleReexportName = ModuleName + "Torch.Double.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Activation", + moduleReexportName = ModuleName + "Torch.Double.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Backprop", + moduleReexportName = ModuleName + "Torch.Double.NN.Backprop"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Conv1d", + moduleReexportName = ModuleName + "Torch.Double.NN.Conv1d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Conv2d", + moduleReexportName = ModuleName + "Torch.Double.NN.Conv2d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Double.NN.Criterion"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Layers", + moduleReexportName = ModuleName + "Torch.Double.NN.Layers"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Linear", + moduleReexportName = ModuleName + "Torch.Double.NN.Linear"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Math", + moduleReexportName = ModuleName + "Torch.Double.NN.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Padding", + moduleReexportName = ModuleName + "Torch.Double.NN.Padding"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Double.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Sampling", + moduleReexportName = ModuleName + "Torch.Double.NN.Sampling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.Dynamic.NN", + moduleReexportName = ModuleName + "Torch.Double.Dynamic.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.Dynamic.NN.Activation", + moduleReexportName = ModuleName + "Torch.Double.Dynamic.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.Dynamic.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Double.Dynamic.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.Dynamic.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Double.Dynamic.NN.Criterion"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Float.NN", + moduleReexportName = ModuleName + "Torch.Float.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Activation", + moduleReexportName = ModuleName + "Torch.Float.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Backprop", + moduleReexportName = ModuleName + "Torch.Float.NN.Backprop"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Conv1d", + moduleReexportName = ModuleName + "Torch.Float.NN.Conv1d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Conv2d", + moduleReexportName = ModuleName + "Torch.Float.NN.Conv2d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Float.NN.Criterion"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Layers", + moduleReexportName = ModuleName + "Torch.Float.NN.Layers"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Linear", + moduleReexportName = ModuleName + "Torch.Float.NN.Linear"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Math", + moduleReexportName = ModuleName + "Torch.Float.NN.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Padding", + moduleReexportName = ModuleName + "Torch.Float.NN.Padding"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Float.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Sampling", + moduleReexportName = ModuleName + "Torch.Float.NN.Sampling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.Dynamic.NN", + moduleReexportName = ModuleName + "Torch.Float.Dynamic.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.Dynamic.NN.Activation", + moduleReexportName = ModuleName + "Torch.Float.Dynamic.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.Dynamic.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Float.Dynamic.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.Dynamic.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Float.Dynamic.NN.Criterion"}], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = + BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "utils", + SymbolicPath "src"], + otherModules = [ + ModuleName + "Torch.Core.Exceptions", + ModuleName "Torch.Core.Random", + ModuleName "Torch.Core.LogAdd"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [ + EnableExtension LambdaCase, + EnableExtension DataKinds, + EnableExtension TypeFamilies, + EnableExtension + TypeSynonymInstances, + EnableExtension + ScopedTypeVariables, + EnableExtension + FlexibleContexts, + EnableExtension CPP], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "dimensions") + (UnionVersionRanges + (ThisVersion (mkVersion [1, 0])) + (LaterVersion + (mkVersion [1, 0]))) + mainLibSet, + Dependency + (PackageName "hasktorch-ffi-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "safe-exceptions") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 1, 0])) + (LaterVersion + (mkVersion [0, 1, 0]))) + mainLibSet, + Dependency + (PackageName "singletons") + (UnionVersionRanges + (ThisVersion (mkVersion [2, 2])) + (LaterVersion + (mkVersion [2, 2]))) + mainLibSet, + Dependency + (PackageName "text") + (UnionVersionRanges + (ThisVersion + (mkVersion [1, 2, 2])) + (LaterVersion + (mkVersion [1, 2, 2]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-floating")])), + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-signed")]))], + mixins = + [ + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-signed"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Long.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Long.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Long.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Long.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Long.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Long.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Long.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Long.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Long.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Long.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Long.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Long.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Long.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Long.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Long.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Long.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Long.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName "Torch.Long.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName "Torch.Long.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName "Torch.Long.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Long.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Math.Pointwise.Signed")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.TH.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.TH.Long.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.TH.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.TH.Byte.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.TH.Long"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.TH.Long.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.TH.Long.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.TH.Long.FreeStorage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.TH.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.TH.Long.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.TH.Long.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.FFI.TH.Long.TensorMath")]}}, + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-floating"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Double.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Double.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Double.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Double.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Double.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Double.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Double.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Double.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Double.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Double.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Double.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Double.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Double.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Double.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName + "Torch.Double.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Blas") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Blas"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Lapack") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Lapack"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise.Floating"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Reduce.Floating"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Floating") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Blas") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Blas"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Lapack") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Lapack"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Pointwise.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Reduce.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Floating") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Random.TH") + (ModuleName + "Torch.Indef.Double.Tensor.Random.TH"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Random.TH") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Random.TH"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Random.TH") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Random.TH"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Random.TH") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Random.TH"), + _×_ + (ModuleName + "Torch.Undefined.Tensor.Random.THC") + (ModuleName + "Torch.Undefined.Double.Tensor.Random.THC"), + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Double.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Double.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Double.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Double.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Double.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Double.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Double.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Double.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Double.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Double.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Double.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Double.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Double.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Double.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName + "Torch.Double.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN") + (ModuleName + "Torch.Double.Dynamic.NN"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN.Activation") + (ModuleName + "Torch.Double.Dynamic.NN.Activation"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN.Pooling") + (ModuleName + "Torch.Double.Dynamic.NN.Pooling"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN.Criterion") + (ModuleName + "Torch.Double.Dynamic.NN.Criterion"), + _×_ + (ModuleName + "Torch.Indef.Static.NN") + (ModuleName "Torch.Double.NN"), + _×_ + (ModuleName + "Torch.Indef.Static.NN") + (ModuleName "Torch.Double.NN"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Activation") + (ModuleName + "Torch.Double.NN.Activation"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Backprop") + (ModuleName + "Torch.Double.NN.Backprop"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Conv1d") + (ModuleName + "Torch.Double.NN.Conv1d"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Conv2d") + (ModuleName + "Torch.Double.NN.Conv2d"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Criterion") + (ModuleName + "Torch.Double.NN.Criterion"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Layers") + (ModuleName + "Torch.Double.NN.Layers"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Linear") + (ModuleName + "Torch.Double.NN.Linear"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Math") + (ModuleName + "Torch.Double.NN.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Padding") + (ModuleName + "Torch.Double.NN.Padding"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Pooling") + (ModuleName + "Torch.Double.NN.Pooling"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Sampling") + (ModuleName + "Torch.Double.NN.Sampling")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.TH.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.TH.Long.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.TH.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.TH.Byte.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.TH.Double"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.TH.Double.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.TH.Double.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.TH.Double.FreeStorage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.TH.Double.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.TH.Double.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.TH.Double.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Floating") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Blas") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Lapack") + (ModuleName + "Torch.FFI.TH.Double.TensorLapack"), + _×_ + (ModuleName "Torch.Sig.NN") + (ModuleName + "Torch.FFI.TH.NN.Double"), + _×_ + (ModuleName + "Torch.Sig.Types.NN") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Random.TH") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Random.TH") + (ModuleName + "Torch.FFI.TH.Double.TensorRandom"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Random.THC") + (ModuleName + "Torch.Undefined.Double.Tensor.Random.THC")]}}]}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "dimensions") + (UnionVersionRanges + (ThisVersion (mkVersion [1, 0])) + (LaterVersion + (mkVersion [1, 0]))) + mainLibSet, + Dependency + (PackageName "hasktorch-ffi-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "safe-exceptions") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 1, 0])) + (LaterVersion + (mkVersion [0, 1, 0]))) + mainLibSet, + Dependency + (PackageName "singletons") + (UnionVersionRanges + (ThisVersion (mkVersion [2, 2])) + (LaterVersion + (mkVersion [2, 2]))) + mainLibSet, + Dependency + (PackageName "text") + (UnionVersionRanges + (ThisVersion + (mkVersion [1, 2, 2])) + (LaterVersion + (mkVersion [1, 2, 2]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-floating")])), + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-signed")]))], + condTreeComponents = + [ + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "lite"))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName + "hasktorch-cpu"), + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = + Just + CondNode { + condTreeData = + Library { + libName = LSubLibName + (UnqualComponentName + "hasktorch-cpu"), + exposedModules = [ + ModuleName "Torch.Byte", + ModuleName "Torch.Byte.Dynamic", + ModuleName "Torch.Byte.Storage", + ModuleName "Torch.Char", + ModuleName "Torch.Char.Dynamic", + ModuleName "Torch.Char.Storage", + ModuleName "Torch.Short", + ModuleName + "Torch.Short.Dynamic", + ModuleName + "Torch.Short.Storage", + ModuleName "Torch.Int", + ModuleName "Torch.Int.Dynamic", + ModuleName "Torch.Int.Storage", + ModuleName "Torch.Float", + ModuleName + "Torch.Float.Dynamic", + ModuleName + "Torch.Float.Storage"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = + BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-unsigned")]))], + mixins = + [ + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-unsigned"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Byte.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Byte.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Byte.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Byte.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Byte.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Byte.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Byte.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Byte.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Byte.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Byte.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Byte.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Byte.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Byte.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Byte.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Byte.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Byte.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName "Torch.Byte.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName "Torch.Byte.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName "Torch.Byte.Mask")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.TH.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.TH.Long.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.TH.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.TH.Byte.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.TH.Byte"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.TH.Byte.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.TH.Byte.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.TH.Byte.FreeStorage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.TH.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.TH.Byte.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.TH.Byte.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath")]}}, + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-unsigned"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Char.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Char.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Char.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Char.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Char.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Char.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Char.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Char.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Char.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Char.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Char.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Char.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Char.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Char.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Char.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Char.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Char.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName "Torch.Char.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName "Torch.Char.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName "Torch.Char.Mask")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.TH.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.TH.Long.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.TH.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.TH.Byte.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.TH.Char"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.TH.Char.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.TH.Char.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.TH.Char.FreeStorage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.TH.Char.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.TH.Char.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.TH.Char.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.TH.Char.TensorMath")]}}, + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-signed"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Short.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Short.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Short.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Short.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Short.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Short.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Short.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Short.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Short.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Short.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Short.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Short.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Short.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Short.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Short.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Short.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Short.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Short.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Short.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName "Torch.Short.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Short.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Math.Pointwise.Signed")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.TH.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.TH.Long.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.TH.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.TH.Byte.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.TH.Short"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.TH.Short.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.TH.Short.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.TH.Short.FreeStorage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.TH.Short.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.TH.Short.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.TH.Short.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.FFI.TH.Short.TensorMath")]}}, + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-signed"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Int.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Int.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Int.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Int.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Int.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Int.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Int.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Int.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Int.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Int.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Int.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Int.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Int.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Int.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Int.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Int.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Int.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName "Torch.Int.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName "Torch.Int.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName "Torch.Int.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Int.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Math.Pointwise.Signed")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.TH.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.TH.Long.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.TH.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.TH.Byte.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.TH.Int"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.TH.Int.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.TH.Int.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.TH.Int.FreeStorage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.TH.Int.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.TH.Int.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.TH.Int.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.FFI.TH.Int.TensorMath")]}}, + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-floating"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Float.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Float.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Float.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Float.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Float.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Float.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Float.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Float.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Float.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Float.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Float.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Float.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Float.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Float.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName "Torch.Float.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Blas") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Blas"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Lapack") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Lapack"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise.Floating"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Reduce.Floating"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Floating") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Blas") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Blas"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Lapack") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Lapack"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Pointwise.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Reduce.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Floating") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Random.TH") + (ModuleName + "Torch.Indef.Float.Tensor.Random.TH"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Random.TH") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Random.TH"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Random.TH") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Random.TH"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Random.TH") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Random.TH"), + _×_ + (ModuleName + "Torch.Undefined.Tensor.Random.THC") + (ModuleName + "Torch.Undefined.Float.Tensor.Random.THC"), + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Float.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Float.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Float.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Float.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Float.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Float.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Float.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Float.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Float.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Float.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Float.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Float.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Float.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Float.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName "Torch.Float.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN") + (ModuleName + "Torch.Float.Dynamic.NN"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN.Activation") + (ModuleName + "Torch.Float.Dynamic.NN.Activation"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN.Pooling") + (ModuleName + "Torch.Float.Dynamic.NN.Pooling"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN.Criterion") + (ModuleName + "Torch.Float.Dynamic.NN.Criterion"), + _×_ + (ModuleName + "Torch.Indef.Static.NN") + (ModuleName "Torch.Float.NN"), + _×_ + (ModuleName + "Torch.Indef.Static.NN") + (ModuleName "Torch.Float.NN"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Activation") + (ModuleName + "Torch.Float.NN.Activation"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Backprop") + (ModuleName + "Torch.Float.NN.Backprop"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Conv1d") + (ModuleName + "Torch.Float.NN.Conv1d"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Conv2d") + (ModuleName + "Torch.Float.NN.Conv2d"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Criterion") + (ModuleName + "Torch.Float.NN.Criterion"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Layers") + (ModuleName + "Torch.Float.NN.Layers"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Linear") + (ModuleName + "Torch.Float.NN.Linear"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Math") + (ModuleName + "Torch.Float.NN.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Padding") + (ModuleName + "Torch.Float.NN.Padding"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Pooling") + (ModuleName + "Torch.Float.NN.Pooling"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Sampling") + (ModuleName + "Torch.Float.NN.Sampling")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.TH.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.TH.Long.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.TH.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.TH.Byte.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.TH.Float"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.TH.Float.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.TH.Float.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.TH.Float.FreeStorage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.TH.Float.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.TH.Float.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.TH.Float.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Floating") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Blas") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Lapack") + (ModuleName + "Torch.FFI.TH.Float.TensorLapack"), + _×_ + (ModuleName "Torch.Sig.NN") + (ModuleName + "Torch.FFI.TH.NN.Float"), + _×_ + (ModuleName + "Torch.Sig.Types.NN") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Random.TH") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Random.TH") + (ModuleName + "Torch.FFI.TH.Float.TensorRandom"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Random.THC") + (ModuleName + "Torch.Undefined.Float.Tensor.Random.THC")]}}]}}, + condTreeConstraints = [ + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-unsigned")]))], + condTreeComponents = []}}]}, + _×_ + (UnqualComponentName + "hasktorch-gpu") + CondNode { + condTreeData = + Library { + libName = LSubLibName + (UnqualComponentName + "hasktorch-gpu"), + exposedModules = [ + ModuleName "Torch.Cuda.Long", + ModuleName + "Torch.Cuda.Long.Dynamic", + ModuleName + "Torch.Cuda.Long.Storage", + ModuleName "Torch.Cuda.Double", + ModuleName + "Torch.Cuda.Double.Dynamic", + ModuleName + "Torch.Cuda.Double.Storage"], + reexportedModules = [ + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Activation", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Backprop", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Backprop"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Conv1d", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Conv1d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Conv2d", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Conv2d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Criterion"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Layers", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Layers"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Linear", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Linear"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Math", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Padding", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Padding"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Sampling", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Sampling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.Dynamic.NN", + moduleReexportName = ModuleName + "Torch.Cuda.Double.Dynamic.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.Dynamic.NN.Activation", + moduleReexportName = ModuleName + "Torch.Cuda.Double.Dynamic.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.Dynamic.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Cuda.Double.Dynamic.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.Dynamic.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Cuda.Double.Dynamic.NN.Criterion"}], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = + BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [ + "-DCUDA", + "-DHASKTORCH_INTERNAL_CUDA"], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "utils", + SymbolicPath "src"], + otherModules = [ + ModuleName + "Torch.Core.Exceptions", + ModuleName "Torch.Core.Random", + ModuleName "Torch.Core.LogAdd"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [ + EnableExtension LambdaCase, + EnableExtension DataKinds, + EnableExtension TypeFamilies, + EnableExtension + TypeSynonymInstances, + EnableExtension + ScopedTypeVariables, + EnableExtension + FlexibleContexts, + EnableExtension CPP], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "dimensions") + (UnionVersionRanges + (ThisVersion (mkVersion [1, 0])) + (LaterVersion + (mkVersion [1, 0]))) + mainLibSet, + Dependency + (PackageName "hasktorch-ffi-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "safe-exceptions") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 1, 0])) + (LaterVersion + (mkVersion [0, 1, 0]))) + mainLibSet, + Dependency + (PackageName "singletons") + (UnionVersionRanges + (ThisVersion (mkVersion [2, 2])) + (LaterVersion + (mkVersion [2, 2]))) + mainLibSet, + Dependency + (PackageName "text") + (UnionVersionRanges + (ThisVersion + (mkVersion [1, 2, 2])) + (LaterVersion + (mkVersion [1, 2, 2]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-floating")])), + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-signed")])), + Dependency + (PackageName + "hasktorch-ffi-thc") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-thc") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet], + mixins = + [ + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-signed"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Cuda.Long.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Cuda.Long.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Cuda.Long.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Cuda.Long.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName + "Torch.Cuda.Long.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Pointwise.Signed")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathReduce"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName + "Torch.FFI.THC.State"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.THC"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.THC.Long"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.THC.Long.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.THC.Long.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.THC.Long.Storage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.THC.Long.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.THC.Long.TensorIndex"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.THC.Long.TensorMasked"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.THC.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.THC.Long.TensorMathCompare"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.THC.Long.TensorMathCompareT"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.THC.Long.TensorMathPairwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.THC.Long.TensorMathPointwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.THC.Long.TensorMathReduce"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.THC.Long.TensorMathScan"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.THC.Long.TensorMode"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.THC.Long.TensorScatterGather"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.THC.Long.TensorSort"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.THC.Long.TensorTopK"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.FFI.THC.Long.TensorMathPointwise")]}}, + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-floating"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Cuda.Double.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Cuda.Double.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Cuda.Double.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Cuda.Double.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName + "Torch.Cuda.Double.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Blas") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Blas"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Lapack") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Lapack"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise.Floating"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Reduce.Floating"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Floating") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Blas") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Blas"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Lapack") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Lapack"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Pointwise.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Reduce.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Floating") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Floating"), + _×_ + (ModuleName + "Torch.Undefined.Tensor.Random.TH") + (ModuleName + "Torch.Undefined.Cuda.Double.Tensor.Random.TH"), + _×_ + (ModuleName + "Torch.Undefined.Tensor.Math.Random.TH") + (ModuleName + "Torch.Undefined.Cuda.Double.Tensor.Math.Random.TH"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Random.THC") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Random.THC"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Random.THC") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Random.THC"), + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Cuda.Double.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Cuda.Double.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Cuda.Double.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Cuda.Double.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName + "Torch.Cuda.Double.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN") + (ModuleName + "Torch.Cuda.Double.Dynamic.NN"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN.Activation") + (ModuleName + "Torch.Cuda.Double.Dynamic.NN.Activation"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN.Pooling") + (ModuleName + "Torch.Cuda.Double.Dynamic.NN.Pooling"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN.Criterion") + (ModuleName + "Torch.Cuda.Double.Dynamic.NN.Criterion"), + _×_ + (ModuleName + "Torch.Indef.Static.NN") + (ModuleName + "Torch.Cuda.Double.NN"), + _×_ + (ModuleName + "Torch.Indef.Static.NN") + (ModuleName + "Torch.Cuda.Double.NN"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Activation") + (ModuleName + "Torch.Cuda.Double.NN.Activation"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Backprop") + (ModuleName + "Torch.Cuda.Double.NN.Backprop"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Conv1d") + (ModuleName + "Torch.Cuda.Double.NN.Conv1d"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Conv2d") + (ModuleName + "Torch.Cuda.Double.NN.Conv2d"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Criterion") + (ModuleName + "Torch.Cuda.Double.NN.Criterion"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Layers") + (ModuleName + "Torch.Cuda.Double.NN.Layers"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Linear") + (ModuleName + "Torch.Cuda.Double.NN.Linear"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Math") + (ModuleName + "Torch.Cuda.Double.NN.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Padding") + (ModuleName + "Torch.Cuda.Double.NN.Padding"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Pooling") + (ModuleName + "Torch.Cuda.Double.NN.Pooling"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Sampling") + (ModuleName + "Torch.Cuda.Double.NN.Sampling")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathReduce"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName + "Torch.FFI.THC.State"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.THC"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.THC.Double"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.THC.Double.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.THC.Double.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.THC.Double.Storage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.THC.Double.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.THC.Double.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.THC.Double.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.THC.Double.TensorIndex"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.THC.Double.TensorMasked"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.THC.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.THC.Double.TensorMathCompare"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.THC.Double.TensorMathCompareT"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.THC.Double.TensorMathPairwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.THC.Double.TensorMathPointwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.THC.Double.TensorMathReduce"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.THC.Double.TensorMathScan"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.THC.Double.TensorMode"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.THC.Double.TensorScatterGather"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.THC.Double.TensorSort"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.THC.Double.TensorTopK"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.FFI.THC.Double.TensorMathPointwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.FFI.THC.Double.TensorMathPointwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.FFI.THC.Double.TensorMathReduce"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Floating") + (ModuleName + "Torch.FFI.THC.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Blas") + (ModuleName + "Torch.FFI.THC.Double.TensorMathBlas"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Lapack") + (ModuleName + "Torch.FFI.THC.Double.TensorMathMagma"), + _×_ + (ModuleName "Torch.Sig.NN") + (ModuleName + "Torch.FFI.THC.NN.Double"), + _×_ + (ModuleName + "Torch.Sig.Types.NN") + (ModuleName "Torch.Types.THC"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Random.TH") + (ModuleName + "Torch.Undefined.Cuda.Double.Tensor.Math.Random.TH"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Random.TH") + (ModuleName + "Torch.Undefined.Cuda.Double.Tensor.Random.TH"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Random.THC") + (ModuleName + "Torch.FFI.THC.Double.TensorRandom")]}}]}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "dimensions") + (UnionVersionRanges + (ThisVersion (mkVersion [1, 0])) + (LaterVersion + (mkVersion [1, 0]))) + mainLibSet, + Dependency + (PackageName "hasktorch-ffi-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "safe-exceptions") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 1, 0])) + (LaterVersion + (mkVersion [0, 1, 0]))) + mainLibSet, + Dependency + (PackageName "singletons") + (UnionVersionRanges + (ThisVersion (mkVersion [2, 2])) + (LaterVersion + (mkVersion [2, 2]))) + mainLibSet, + Dependency + (PackageName "text") + (UnionVersionRanges + (ThisVersion + (mkVersion [1, 2, 2])) + (LaterVersion + (mkVersion [1, 2, 2]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-floating")])), + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-signed")])), + Dependency + (PackageName + "hasktorch-ffi-thc") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-thc") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet], + condTreeComponents = + [ + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "lite"))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName + "hasktorch-gpu"), + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = + Just + CondNode { + condTreeData = + Library { + libName = LSubLibName + (UnqualComponentName + "hasktorch-gpu"), + exposedModules = [ + ModuleName "Torch.Cuda.Byte", + ModuleName + "Torch.Cuda.Byte.Dynamic", + ModuleName + "Torch.Cuda.Byte.Storage", + ModuleName "Torch.Cuda.Char", + ModuleName + "Torch.Cuda.Char.Dynamic", + ModuleName + "Torch.Cuda.Char.Storage", + ModuleName "Torch.Cuda.Short", + ModuleName + "Torch.Cuda.Short.Dynamic", + ModuleName + "Torch.Cuda.Short.Storage", + ModuleName "Torch.Cuda.Int", + ModuleName + "Torch.Cuda.Int.Dynamic", + ModuleName + "Torch.Cuda.Int.Storage"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = + BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-unsigned")]))], + mixins = + [ + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-unsigned"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Cuda.Byte.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Cuda.Byte.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Cuda.Byte.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Cuda.Byte.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName + "Torch.Cuda.Byte.Mask")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathReduce"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName + "Torch.FFI.THC.State"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.THC"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.THC.Byte"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.THC.Byte.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.THC.Byte.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.THC.Byte.Storage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.THC.Byte.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.THC.Byte.TensorIndex"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.THC.Byte.TensorMasked"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.THC.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathCompare"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathCompareT"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathPairwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathPointwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathReduce"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathScan"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.THC.Byte.TensorMode"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.THC.Byte.TensorScatterGather"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.THC.Byte.TensorSort"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.THC.Byte.TensorTopK")]}}, + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-unsigned"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Cuda.Char.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Cuda.Char.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Cuda.Char.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Cuda.Char.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName + "Torch.Cuda.Char.Mask")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathReduce"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName + "Torch.FFI.THC.State"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.THC"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.THC.Char"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.THC.Char.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.THC.Char.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.THC.Char.Storage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.THC.Char.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.THC.Char.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.THC.Char.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.THC.Char.TensorIndex"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.THC.Char.TensorMasked"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.THC.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.THC.Char.TensorMathCompare"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.THC.Char.TensorMathCompareT"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.THC.Char.TensorMathPairwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.THC.Char.TensorMathPointwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.THC.Char.TensorMathReduce"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.THC.Char.TensorMathScan"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.THC.Char.TensorMode"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.THC.Char.TensorScatterGather"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.THC.Char.TensorSort"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.THC.Char.TensorTopK")]}}, + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-signed"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Cuda.Short.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Cuda.Short.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Cuda.Short.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Cuda.Short.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName + "Torch.Cuda.Short.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Pointwise.Signed")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathReduce"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName + "Torch.FFI.THC.State"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.THC"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.THC.Short"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.THC.Short.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.THC.Short.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.THC.Short.Storage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.THC.Short.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.THC.Short.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.THC.Short.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.THC.Short.TensorIndex"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.THC.Short.TensorMasked"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.THC.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.THC.Short.TensorMathCompare"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.THC.Short.TensorMathCompareT"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.THC.Short.TensorMathPairwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.THC.Short.TensorMathPointwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.THC.Short.TensorMathReduce"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.THC.Short.TensorMathScan"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.THC.Short.TensorMode"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.THC.Short.TensorScatterGather"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.THC.Short.TensorSort"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.THC.Short.TensorTopK"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.FFI.THC.Short.TensorMathPointwise")]}}, + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-signed"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Cuda.Int.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Cuda.Int.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Cuda.Int.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Cuda.Int.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName + "Torch.Cuda.Int.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Pointwise.Signed")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathReduce"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName + "Torch.FFI.THC.State"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.THC"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.THC.Int"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.THC.Int.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.THC.Int.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.THC.Int.Storage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.THC.Int.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.THC.Int.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.THC.Int.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.THC.Int.TensorIndex"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.THC.Int.TensorMasked"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.THC.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.THC.Int.TensorMathCompare"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.THC.Int.TensorMathCompareT"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.THC.Int.TensorMathPairwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.THC.Int.TensorMathPointwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.THC.Int.TensorMathReduce"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.THC.Int.TensorMathScan"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.THC.Int.TensorMode"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.THC.Int.TensorScatterGather"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.THC.Int.TensorSort"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.THC.Int.TensorTopK"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.FFI.THC.Int.TensorMathPointwise")]}}]}}, + condTreeConstraints = [ + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-unsigned")]))], + condTreeComponents = []}}]}, + _×_ + (UnqualComponentName + "hasktorch-indef-unsigned") + CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName + "hasktorch-indef-unsigned"), + exposedModules = [], + reexportedModules = [ + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Indef.Index", + moduleReexportName = ModuleName + "Torch.Indef.Index"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Indef.Mask", + moduleReexportName = ModuleName + "Torch.Indef.Mask"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Indef.Types", + moduleReexportName = ModuleName + "Torch.Indef.Types"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Storage", + moduleReexportName = ModuleName + "Torch.Indef.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Storage.Copy", + moduleReexportName = ModuleName + "Torch.Indef.Storage.Copy"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Print", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Print"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Copy", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Copy"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Index", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Index"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Masked", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Masked"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Mode", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Mode"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Sort", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Sort"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.TopK", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.TopK"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Copy", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Copy"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Index", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Index"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Masked", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Masked"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Compare", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Compare"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Scan", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Scan"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Mode", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Mode"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.ScatterGather", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.ScatterGather"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Sort", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Sort"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.TopK", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.TopK"}], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-signatures-partial") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "hasktorch-indef") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = [ + Mixin { + mixinPackageName = PackageName + "hasktorch-indef", + mixinLibraryName = LMainLibName, + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + DefaultRenaming, + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName "Torch.Sig.NN") + (ModuleName + "Torch.Undefined.NN"), + _×_ + (ModuleName + "Torch.Sig.Types.NN") + (ModuleName + "Torch.Undefined.Types.NN"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Blas") + (ModuleName + "Torch.Undefined.Tensor.Math.Blas"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Floating") + (ModuleName + "Torch.Undefined.Tensor.Math.Floating"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Lapack") + (ModuleName + "Torch.Undefined.Tensor.Math.Lapack"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Undefined.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.Undefined.Tensor.Math.Pointwise.Floating"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.Undefined.Tensor.Math.Reduce.Floating"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Random.TH") + (ModuleName + "Torch.Undefined.Tensor.Math.Random.TH"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Random.TH") + (ModuleName + "Torch.Undefined.Tensor.Random.TH"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Random.THC") + (ModuleName + "Torch.Undefined.Tensor.Random.THC")]}}]}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-signatures-partial") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "hasktorch-indef") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + _×_ + (UnqualComponentName + "hasktorch-indef-signed") + CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName + "hasktorch-indef-signed"), + exposedModules = [], + reexportedModules = [ + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Indef.Index", + moduleReexportName = ModuleName + "Torch.Indef.Index"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Indef.Mask", + moduleReexportName = ModuleName + "Torch.Indef.Mask"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Indef.Types", + moduleReexportName = ModuleName + "Torch.Indef.Types"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Storage", + moduleReexportName = ModuleName + "Torch.Indef.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Storage.Copy", + moduleReexportName = ModuleName + "Torch.Indef.Storage.Copy"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Print", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Print"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Copy", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Copy"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Index", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Index"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Masked", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Masked"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Mode", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Mode"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Sort", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Sort"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.TopK", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.TopK"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Copy", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Copy"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Index", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Index"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Masked", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Masked"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Compare", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Compare"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Scan", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Scan"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Mode", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Mode"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.ScatterGather", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.ScatterGather"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Sort", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Sort"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.TopK", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.TopK"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed"}], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-signatures-partial") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "hasktorch-indef") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = [ + Mixin { + mixinPackageName = PackageName + "hasktorch-indef", + mixinLibraryName = LMainLibName, + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + DefaultRenaming, + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName "Torch.Sig.NN") + (ModuleName + "Torch.Undefined.NN"), + _×_ + (ModuleName + "Torch.Sig.Types.NN") + (ModuleName + "Torch.Undefined.Types.NN"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Blas") + (ModuleName + "Torch.Undefined.Tensor.Math.Blas"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Floating") + (ModuleName + "Torch.Undefined.Tensor.Math.Floating"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Lapack") + (ModuleName + "Torch.Undefined.Tensor.Math.Lapack"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.Undefined.Tensor.Math.Pointwise.Floating"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.Undefined.Tensor.Math.Reduce.Floating"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Random.TH") + (ModuleName + "Torch.Undefined.Tensor.Math.Random.TH"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Random.TH") + (ModuleName + "Torch.Undefined.Tensor.Random.TH"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Random.THC") + (ModuleName + "Torch.Undefined.Tensor.Random.THC")]}}]}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-signatures-partial") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "hasktorch-indef") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + _×_ + (UnqualComponentName + "hasktorch-indef-floating") + CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName + "hasktorch-indef-floating"), + exposedModules = [], + reexportedModules = [ + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Indef.Index", + moduleReexportName = ModuleName + "Torch.Indef.Index"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Indef.Mask", + moduleReexportName = ModuleName + "Torch.Indef.Mask"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Indef.Types", + moduleReexportName = ModuleName + "Torch.Indef.Types"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Storage", + moduleReexportName = ModuleName + "Torch.Indef.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Storage.Copy", + moduleReexportName = ModuleName + "Torch.Indef.Storage.Copy"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Print", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Print"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Copy", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Copy"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Index", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Index"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Masked", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Masked"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Mode", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Mode"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Sort", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Sort"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.TopK", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.TopK"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Copy", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Copy"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Index", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Index"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Masked", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Masked"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Compare", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Compare"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Scan", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Scan"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Mode", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Mode"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.ScatterGather", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.ScatterGather"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Sort", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Sort"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.TopK", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.TopK"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Blas", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Blas"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Floating", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Floating"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Lapack", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Lapack"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Random.TH", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Random.TH"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Random.THC", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Random.THC"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Random.TH", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Random.TH"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Blas", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Blas"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Floating", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Floating"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Lapack", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Lapack"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Floating", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Floating"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce.Floating", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce.Floating"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Random.TH", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Random.TH"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Random.THC", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Random.THC"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Random.TH", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Random.TH"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.NN", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.NN.Activation", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.NN.Criterion"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Activation", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Backprop", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Backprop"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Conv1d", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Conv1d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Conv2d", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Conv2d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Criterion"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Layers", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Layers"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Linear", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Linear"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Math", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Padding", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Padding"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Sampling", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Sampling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Undefined.Tensor.Math.Random.TH", + moduleReexportName = ModuleName + "Torch.Undefined.Tensor.Math.Random.TH"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Undefined.Tensor.Random.TH", + moduleReexportName = ModuleName + "Torch.Undefined.Tensor.Random.TH"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Undefined.Tensor.Random.THC", + moduleReexportName = ModuleName + "Torch.Undefined.Tensor.Random.THC"}], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "hasktorch-indef") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName + "hasktorch-signatures-partial") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "hasktorch-indef") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName + "hasktorch-signatures-partial") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet], + condTreeComponents = []}], + condForeignLibs = [], + condExecutables = [ + _×_ + (UnqualComponentName + "isdefinite-cpu") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "isdefinite-cpu", + modulePath = SymbolicPath + "Noop.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "exe"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-cpu")]))], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-cpu")]))], + condTreeComponents = []}, + _×_ + (UnqualComponentName + "isdefinite-gpu") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "isdefinite-gpu", + modulePath = SymbolicPath + "Noop.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "exe"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-gpu")]))], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-gpu")]))], + condTreeComponents = []}, + _×_ + (UnqualComponentName + "isdefinite") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "isdefinite", + modulePath = SymbolicPath + "Noop.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "exe"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + _×_ + (UnqualComponentName "memcheck") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "memcheck", + modulePath = SymbolicPath + "Memcheck.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "exe"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}], + condTestSuites = [ + _×_ + (UnqualComponentName "spec") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "Spec.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "tests"], + otherModules = [ + ModuleName "Orphans", + ModuleName "MemorySpec", + ModuleName "RawLapackSVDSpec", + ModuleName + "GarbageCollectionSpec", + ModuleName + "Torch.Prelude.Extras", + ModuleName + "Torch.Core.LogAddSpec", + ModuleName + "Torch.Core.RandomSpec", + ModuleName + "Torch.Static.NN.AbsSpec", + ModuleName + "Torch.Static.NN.LinearSpec"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [ + EnableExtension LambdaCase, + EnableExtension DataKinds, + EnableExtension TypeFamilies, + EnableExtension + TypeSynonymInstances, + EnableExtension + ScopedTypeVariables, + EnableExtension + FlexibleContexts, + EnableExtension CPP], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "QuickCheck") + (UnionVersionRanges + (ThisVersion + (mkVersion [2, 11])) + (LaterVersion + (mkVersion [2, 11]))) + mainLibSet, + Dependency + (PackageName "backprop") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 2, 5])) + (LaterVersion + (mkVersion [0, 2, 5]))) + mainLibSet, + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "dimensions") + (UnionVersionRanges + (ThisVersion (mkVersion [1, 0])) + (LaterVersion + (mkVersion [1, 0]))) + mainLibSet, + Dependency + (PackageName + "ghc-typelits-natnormalise") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hspec") + (UnionVersionRanges + (ThisVersion + (mkVersion [2, 4, 4])) + (LaterVersion + (mkVersion [2, 4, 4]))) + mainLibSet, + Dependency + (PackageName "singletons") + (UnionVersionRanges + (ThisVersion (mkVersion [2, 2])) + (LaterVersion + (mkVersion [2, 2]))) + mainLibSet, + Dependency + (PackageName "mtl") + (UnionVersionRanges + (ThisVersion + (mkVersion [2, 2, 2])) + (LaterVersion + (mkVersion [2, 2, 2]))) + mainLibSet, + Dependency + (PackageName + "microlens-platform") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 3, 10])) + (LaterVersion + (mkVersion [0, 3, 10]))) + mainLibSet, + Dependency + (PackageName "monad-loops") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 4, 3])) + (LaterVersion + (mkVersion [0, 4, 3]))) + mainLibSet, + Dependency + (PackageName "time") + (UnionVersionRanges + (ThisVersion + (mkVersion [1, 8, 0])) + (LaterVersion + (mkVersion [1, 8, 0]))) + mainLibSet, + Dependency + (PackageName "transformers") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 5, 5])) + (LaterVersion + (mkVersion [0, 5, 5]))) + mainLibSet, + Dependency + (PackageName "generic-lens") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "QuickCheck") + (UnionVersionRanges + (ThisVersion + (mkVersion [2, 11])) + (LaterVersion + (mkVersion [2, 11]))) + mainLibSet, + Dependency + (PackageName "backprop") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 2, 5])) + (LaterVersion + (mkVersion [0, 2, 5]))) + mainLibSet, + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "dimensions") + (UnionVersionRanges + (ThisVersion (mkVersion [1, 0])) + (LaterVersion + (mkVersion [1, 0]))) + mainLibSet, + Dependency + (PackageName + "ghc-typelits-natnormalise") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hspec") + (UnionVersionRanges + (ThisVersion + (mkVersion [2, 4, 4])) + (LaterVersion + (mkVersion [2, 4, 4]))) + mainLibSet, + Dependency + (PackageName "singletons") + (UnionVersionRanges + (ThisVersion (mkVersion [2, 2])) + (LaterVersion + (mkVersion [2, 2]))) + mainLibSet, + Dependency + (PackageName "mtl") + (UnionVersionRanges + (ThisVersion + (mkVersion [2, 2, 2])) + (LaterVersion + (mkVersion [2, 2, 2]))) + mainLibSet, + Dependency + (PackageName + "microlens-platform") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 3, 10])) + (LaterVersion + (mkVersion [0, 3, 10]))) + mainLibSet, + Dependency + (PackageName "monad-loops") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 4, 3])) + (LaterVersion + (mkVersion [0, 4, 3]))) + mainLibSet, + Dependency + (PackageName "time") + (UnionVersionRanges + (ThisVersion + (mkVersion [1, 8, 0])) + (LaterVersion + (mkVersion [1, 8, 0]))) + mainLibSet, + Dependency + (PackageName "transformers") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 5, 5])) + (LaterVersion + (mkVersion [0, 5, 5]))) + mainLibSet, + Dependency + (PackageName "generic-lens") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -268,11 +10445,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -603,11 +10780,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -848,11 +11025,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -1051,11 +11228,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -1105,8 +11282,7 @@ GenericPackageDescription { condTreeConstraints = [], condTreeComponents = []}, condBranchIfFalse = Nothing}]}, - condBranchIfFalse = Nothing}]}, - condSubLibraries = + condBranchIfFalse = Nothing}]}) [ _×_ (UnqualComponentName @@ -1391,11 +11567,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -2713,11 +12889,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -2805,11 +12981,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -5034,11 +15210,11 @@ GenericPackageDescription { cppOptions = [ "-DCUDA", "-DHASKTORCH_INTERNAL_CUDA"], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -6406,11 +16582,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -6499,11 +16675,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -8169,11 +18345,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -8660,11 +18836,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -9426,11 +19602,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -9531,9 +19707,9 @@ GenericPackageDescription { (EarlierVersion (mkVersion [0, 0, 2]))) mainLibSet], - condTreeComponents = []}], - condForeignLibs = [], - condExecutables = [ + condTreeComponents = []}] + [] + [ _×_ (UnqualComponentName "isdefinite-cpu") @@ -9549,11 +19725,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -9657,11 +19833,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -9765,11 +19941,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -9862,11 +20038,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -9944,8 +20120,8 @@ GenericPackageDescription { (PackageName "hasktorch") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}], - condTestSuites = [ + condTreeComponents = []}] + [ _×_ (UnqualComponentName "spec") CondNode { @@ -9960,11 +20136,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -10244,5 +20420,5 @@ GenericPackageDescription { (PackageName "generic-lens") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}], - condBenchmarks = []} + condTreeComponents = []}] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.expr b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.expr index 553b88dc595..73c1a2e04b7 100644 --- a/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.expr +++ b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.expr @@ -1,44 +1,128 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName - "hidden-main-lib", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "main lib have to be visible", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName + "hidden-main-lib", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "main lib have to be visible", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "ElseIf"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -54,11 +138,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -115,9 +199,9 @@ GenericPackageDescription { (PackageName "base") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation.expr b/Cabal-tests/tests/ParserTests/regressions/indentation.expr index f36a8997717..dbe88d4deff 100644 --- a/Cabal-tests/tests/ParserTests/regressions/indentation.expr +++ b/Cabal-tests/tests/ParserTests/regressions/indentation.expr @@ -1,54 +1,129 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName - "indentation", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = concat - [ - "* foo\n", - "\n", - " * foo-bar\n", - "\n", - " * foo-baz\n", - "\n", - ".\n", - ".\n", - ".\n", - "some dots"], - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName + "indentation", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = concat + [ + "* foo\n", + "\n", + " * foo-bar\n", + "\n", + " * foo-baz\n", + "\n", + ".\n", + ".\n", + ".\n", + "some dots"], + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -63,11 +138,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -116,9 +191,9 @@ GenericPackageDescription { targetBuildDepends = [], mixins = []}}, condTreeConstraints = [], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation2.expr b/Cabal-tests/tests/ParserTests/regressions/indentation2.expr index 11afbcfd5d3..063b53e419a 100644 --- a/Cabal-tests/tests/ParserTests/regressions/indentation2.expr +++ b/Cabal-tests/tests/ParserTests/regressions/indentation2.expr @@ -1,47 +1,122 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName - "indentation", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = concat - [ - "foo\n", - " indent2\n", - " indent4"], - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName + "indentation", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = concat + [ + "foo\n", + " indent2\n", + " indent4"], + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -56,11 +131,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -109,9 +184,9 @@ GenericPackageDescription { targetBuildDepends = [], mixins = []}}, condTreeConstraints = [], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation3.expr b/Cabal-tests/tests/ParserTests/regressions/indentation3.expr index 964bad3f924..01f7f273f95 100644 --- a/Cabal-tests/tests/ParserTests/regressions/indentation3.expr +++ b/Cabal-tests/tests/ParserTests/regressions/indentation3.expr @@ -1,49 +1,124 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName - "indentation", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = concat - [ - "indent0\n", - "\n", - " indent2\n", - "indent0\n", - " indent2"], - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName + "indentation", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = concat + [ + "indent0\n", + "\n", + " indent2\n", + "indent0\n", + " indent2"], + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -58,11 +133,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -111,9 +186,9 @@ GenericPackageDescription { targetBuildDepends = [], mixins = []}}, condTreeConstraints = [], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5055.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5055.expr index 996fa26eece..9bff381b097 100644 --- a/Cabal-tests/tests/ParserTests/regressions/issue-5055.expr +++ b/Cabal-tests/tests/ParserTests/regressions/issue-5055.expr @@ -1,47 +1,297 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_0, - package = PackageIdentifier { - pkgName = PackageName "issue", - pkgVersion = mkVersion [5055]}, - licenseRaw = Right BSD3, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "no type in all branches", - description = - "no type in all branches.", - category = "Test", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Nothing, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [ +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV2_0, + package = PackageIdentifier { + pkgName = PackageName "issue", + pkgVersion = mkVersion [5055]}, + licenseRaw = Right BSD3, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "no type in all branches", + description = + "no type in all branches.", + category = "Test", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Nothing, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [ + _×_ + (UnqualComponentName + "flag-test-exe") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "flag-test-exe", + modulePath = SymbolicPath + "FirstMain.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 8])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 8])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet], + condTreeComponents = []}], + condTestSuites = [ + _×_ + (UnqualComponentName + "flag-cabal-test") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "SecondMain.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 8])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 8])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}], + condBenchmarks = []} + Nothing + [] + [] + [ _×_ (UnqualComponentName "flag-test-exe") @@ -57,11 +307,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -126,8 +376,8 @@ GenericPackageDescription { (EarlierVersion (mkVersion [5]))) mainLibSet], - condTreeComponents = []}], - condTestSuites = [ + condTreeComponents = []}] + [ _×_ (UnqualComponentName "flag-cabal-test") @@ -143,11 +393,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -231,11 +481,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -285,5 +535,5 @@ GenericPackageDescription { testCodeGenerators = []}, condTreeConstraints = [], condTreeComponents = []}, - condBranchIfFalse = Nothing}]}], - condBenchmarks = []} + condBranchIfFalse = Nothing}]}] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5846.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5846.expr index c3e08359046..969abe42e5b 100644 --- a/Cabal-tests/tests/ParserTests/regressions/issue-5846.expr +++ b/Cabal-tests/tests/ParserTests/regressions/issue-5846.expr @@ -1,42 +1,189 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName "issue", - pkgVersion = mkVersion [5846]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName "issue", + pkgVersion = mkVersion [5846]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "lib1") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName "a"), + LSubLibName + (UnqualComponentName "b")])), + Dependency + (PackageName "lib2") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName "c")])), + Dependency + (PackageName "lib3") + (OrLaterVersion (mkVersion [1])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName "d")])), + Dependency + (PackageName "lib4") + (OrLaterVersion (mkVersion [1])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName "a"), + LSubLibName + (UnqualComponentName "b")]))], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "lib1") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName "a"), + LSubLibName + (UnqualComponentName "b")])), + Dependency + (PackageName "lib2") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName "c")])), + Dependency + (PackageName "lib3") + (OrLaterVersion (mkVersion [1])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName "d")])), + Dependency + (PackageName "lib4") + (OrLaterVersion (mkVersion [1])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName "a"), + LSubLibName + (UnqualComponentName "b")]))], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -51,11 +198,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -176,9 +323,9 @@ GenericPackageDescription { (UnqualComponentName "a"), LSubLibName (UnqualComponentName "b")]))], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.expr index 001d3c86515..bd1873d9444 100644 --- a/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.expr +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.expr @@ -1,42 +1,390 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_4, - package = PackageIdentifier { - pkgName = PackageName "issue", - pkgVersion = mkVersion [6083]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV3_4, + package = PackageIdentifier { + pkgName = PackageName "issue", + pkgVersion = mkVersion [6083]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + condTreeComponents = []}, + condSubLibraries = [ + _×_ + (UnqualComponentName "sublib") + CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName "sublib"), + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}], + condForeignLibs = [], + condExecutables = [ + _×_ + (UnqualComponentName "demo-a") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "demo-a", + modulePath = SymbolicPath + "Main.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "sublib") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "sublib") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + _×_ + (UnqualComponentName "demo-b") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "demo-b", + modulePath = SymbolicPath + "Main.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + condTreeComponents = []}], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -51,11 +399,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -130,8 +478,8 @@ GenericPackageDescription { LSubLibName (UnqualComponentName "sublib")]))], - condTreeComponents = []}, - condSubLibraries = [ + condTreeComponents = []}) + [ _×_ (UnqualComponentName "sublib") CondNode { @@ -149,11 +497,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -202,9 +550,9 @@ GenericPackageDescription { targetBuildDepends = [], mixins = []}}, condTreeConstraints = [], - condTreeComponents = []}], - condForeignLibs = [], - condExecutables = [ + condTreeComponents = []}] + [] + [ _×_ (UnqualComponentName "demo-a") CondNode { @@ -219,11 +567,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -302,11 +650,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -380,6 +728,6 @@ GenericPackageDescription { LSubLibName (UnqualComponentName "sublib")]))], - condTreeComponents = []}], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.expr index ca99e3d554f..2bbe2858491 100644 --- a/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.expr +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.expr @@ -1,42 +1,400 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName "issue", - pkgVersion = mkVersion [6083]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName "issue", + pkgVersion = mkVersion [6083]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + condTreeComponents = []}, + condSubLibraries = [ + _×_ + (UnqualComponentName "sublib") + CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName "sublib"), + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}], + condForeignLibs = [], + condExecutables = [ + _×_ + (UnqualComponentName "demo-a") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "demo-a", + modulePath = SymbolicPath + "Main.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + condTreeComponents = []}, + _×_ + (UnqualComponentName "demo-b") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "demo-b", + modulePath = SymbolicPath + "Main.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + condTreeComponents = []}], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -51,11 +409,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -130,8 +488,8 @@ GenericPackageDescription { LSubLibName (UnqualComponentName "sublib")]))], - condTreeComponents = []}, - condSubLibraries = [ + condTreeComponents = []}) + [ _×_ (UnqualComponentName "sublib") CondNode { @@ -149,11 +507,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -202,9 +560,9 @@ GenericPackageDescription { targetBuildDepends = [], mixins = []}}, condTreeConstraints = [], - condTreeComponents = []}], - condForeignLibs = [], - condExecutables = [ + condTreeComponents = []}] + [] + [ _×_ (UnqualComponentName "demo-a") CondNode { @@ -219,11 +577,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -312,11 +670,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -390,6 +748,6 @@ GenericPackageDescription { LSubLibName (UnqualComponentName "sublib")]))], - condTreeComponents = []}], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.expr index b2f47a1a938..11815012edb 100644 --- a/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.expr +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.expr @@ -1,42 +1,214 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_4, - package = PackageIdentifier { - pkgName = PackageName "issue", - pkgVersion = mkVersion [6083]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV2_4, + package = PackageIdentifier { + pkgName = PackageName "issue", + pkgVersion = mkVersion [6083]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + condTreeComponents = []}, + condSubLibraries = [ + _×_ + (UnqualComponentName "sublib") + CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName "sublib"), + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -51,11 +223,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -130,8 +302,8 @@ GenericPackageDescription { LSubLibName (UnqualComponentName "sublib")]))], - condTreeComponents = []}, - condSubLibraries = [ + condTreeComponents = []}) + [ _×_ (UnqualComponentName "sublib") CondNode { @@ -149,11 +321,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -202,8 +374,8 @@ GenericPackageDescription { targetBuildDepends = [], mixins = []}}, condTreeConstraints = [], - condTreeComponents = []}], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.expr index ce7c453e697..be6b67518bb 100644 --- a/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.expr +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.expr @@ -1,42 +1,133 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName "issue", - pkgVersion = mkVersion [6083]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName "issue", + pkgVersion = mkVersion [6083]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "freetype") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "freetype") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "freetype") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "freetype") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -51,11 +142,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -120,9 +211,9 @@ GenericPackageDescription { (PackageName "freetype") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-774.expr b/Cabal-tests/tests/ParserTests/regressions/issue-774.expr index 4aeb65cb960..8752e9af17b 100644 --- a/Cabal-tests/tests/ParserTests/regressions/issue-774.expr +++ b/Cabal-tests/tests/ParserTests/regressions/issue-774.expr @@ -1,51 +1,131 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_12, - package = PackageIdentifier { - pkgName = PackageName "issue", - pkgVersion = mkVersion [744]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "Package description parser interprets curly braces in the description field", - description = concat - [ - "Here is some C code:\n", - "\n", - "> for(i = 0; i < 100; i++) {\n", - "> printf(\"%d\\n\",i);\n", - "> }\n", - "\n", - "What does it look like?"], - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV1_12, + package = PackageIdentifier { + pkgName = PackageName "issue", + pkgVersion = mkVersion [744]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "Package description parser interprets curly braces in the description field", + description = concat + [ + "Here is some C code:\n", + "\n", + "> for(i = 0; i < 100; i++) {\n", + "> printf(\"%d\\n\",i);\n", + "> }\n", + "\n", + "What does it look like?"], + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "Issue"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [ + "-Wall", + "-threaded", + "-with-rtsopts=-N -s -M1G -c", + "-rtsopts"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -61,11 +141,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -118,9 +198,9 @@ GenericPackageDescription { targetBuildDepends = [], mixins = []}}, condTreeConstraints = [], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.expr b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.expr index b6dc81fee1b..04e7f2f62d9 100644 --- a/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.expr +++ b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.expr @@ -1,83 +1,485 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_2, - package = PackageIdentifier { - pkgName = PackageName - "jaeger-flamegraph", - pkgVersion = mkVersion - [1, 0, 0]}, - licenseRaw = Left - (License - (ELicense - (ELicenseId BSD_3_Clause) - Nothing)), - licenseFiles = [ - SymbolicPath "LICENSE"], - copyright = - "(c) 2018 Symbiont.io", - maintainer = "Sam Halliday", - author = "Sam Halliday", - stability = "", - testedWith = [ +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV2_2, + package = PackageIdentifier { + pkgName = PackageName + "jaeger-flamegraph", + pkgVersion = mkVersion + [1, 0, 0]}, + licenseRaw = Left + (License + (ELicense + (ELicenseId BSD_3_Clause) + Nothing)), + licenseFiles = [ + SymbolicPath "LICENSE"], + copyright = + "(c) 2018 Symbiont.io", + maintainer = "Sam Halliday", + author = "Sam Halliday", + stability = "", + testedWith = [ + _×_ + GHC + (UnionVersionRanges + (MajorBoundVersion + (mkVersion [8, 4, 4])) + (MajorBoundVersion + (mkVersion [8, 6, 2])))], + homepage = "", + pkgUrl = "", + bugReports = + "https://github.com/symbiont-io/jaeger-flamegraph/pulls", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/symbiont-io/jaeger-flamegraph", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Generate flamegraphs from Jaeger .json dumps.", + description = + concat + [ + "This is a small tool to convert JSON dumps obtained from a Jaeger\n", + "server () into a format consumable\n", + "by [FlameGraph](https://github.com/brendangregg/FlameGraph).\n", + "\n", + "First download the traces for your SERVICE limiting to LIMIT traces\n", + "\n", + "> $ curl http://your-jaeger-installation/api/traces?service=SERVICE&limit=LIMIT > input.json\n", + "\n", + "using the [undocumented Jaeger API](https://github.com/jaegertracing/jaeger/issues/456#issuecomment-412560321)\n", + "then use @jaeger-flamegraph@ to convert the data and send to @flamegraph.pl@\n", + "\n", + "> $ jaeger-flamegraph -f input.json | flamegraph.pl > output.svg\n"], + category = "Testing", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "Interval"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "library"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [ + "-Wall", + "-Werror=missing-home-modules"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (UnionVersionRanges + (MajorBoundVersion + (mkVersion [4, 11, 1, 0])) + (MajorBoundVersion + (mkVersion [4, 12, 0, 0]))) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (MajorBoundVersion + (mkVersion [2, 12, 6, 1])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (UnionVersionRanges + (MajorBoundVersion + (mkVersion [4, 11, 1, 0])) + (MajorBoundVersion + (mkVersion [4, 12, 0, 0]))) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (MajorBoundVersion + (mkVersion [2, 12, 6, 1])) + mainLibSet], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [ _×_ - GHC - (UnionVersionRanges - (MajorBoundVersion - (mkVersion [8, 4, 4])) - (MajorBoundVersion - (mkVersion [8, 6, 2])))], - homepage = "", - pkgUrl = "", - bugReports = - "https://github.com/symbiont-io/jaeger-flamegraph/pulls", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/symbiont-io/jaeger-flamegraph", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "Generate flamegraphs from Jaeger .json dumps.", - description = - concat - [ - "This is a small tool to convert JSON dumps obtained from a Jaeger\n", - "server () into a format consumable\n", - "by [FlameGraph](https://github.com/brendangregg/FlameGraph).\n", - "\n", - "First download the traces for your SERVICE limiting to LIMIT traces\n", - "\n", - "> $ curl http://your-jaeger-installation/api/traces?service=SERVICE&limit=LIMIT > input.json\n", - "\n", - "using the [undocumented Jaeger API](https://github.com/jaegertracing/jaeger/issues/456#issuecomment-412560321)\n", - "then use @jaeger-flamegraph@ to convert the data and send to @flamegraph.pl@\n", - "\n", - "> $ jaeger-flamegraph -f input.json | flamegraph.pl > output.svg\n"], - category = "Testing", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just + (UnqualComponentName + "jaeger-flamegraph") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "jaeger-flamegraph", + modulePath = SymbolicPath + "Main.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "exe"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [ + "-Wall", + "-Werror=missing-home-modules", + "-threaded"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (UnionVersionRanges + (MajorBoundVersion + (mkVersion [4, 11, 1, 0])) + (MajorBoundVersion + (mkVersion [4, 12, 0, 0]))) + mainLibSet, + Dependency + (PackageName + "jaeger-flamegraph") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "bytestring") + (MajorBoundVersion + (mkVersion [0, 10, 8, 2])) + mainLibSet, + Dependency + (PackageName "containers") + (MajorBoundVersion + (mkVersion [0, 6, 0, 1])) + mainLibSet, + Dependency + (PackageName "extra") + (MajorBoundVersion + (mkVersion [1, 6, 13])) + mainLibSet, + Dependency + (PackageName "aeson") + (MajorBoundVersion + (mkVersion [1, 4, 1, 0])) + mainLibSet, + Dependency + (PackageName + "optparse-applicative") + (MajorBoundVersion + (mkVersion [0, 14, 3, 0])) + mainLibSet, + Dependency + (PackageName "text") + (MajorBoundVersion + (mkVersion [1, 2, 3, 1])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (UnionVersionRanges + (MajorBoundVersion + (mkVersion [4, 11, 1, 0])) + (MajorBoundVersion + (mkVersion [4, 12, 0, 0]))) + mainLibSet, + Dependency + (PackageName + "jaeger-flamegraph") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "bytestring") + (MajorBoundVersion + (mkVersion [0, 10, 8, 2])) + mainLibSet, + Dependency + (PackageName "containers") + (MajorBoundVersion + (mkVersion [0, 6, 0, 1])) + mainLibSet, + Dependency + (PackageName "extra") + (MajorBoundVersion + (mkVersion [1, 6, 13])) + mainLibSet, + Dependency + (PackageName "aeson") + (MajorBoundVersion + (mkVersion [1, 4, 1, 0])) + mainLibSet, + Dependency + (PackageName + "optparse-applicative") + (MajorBoundVersion + (mkVersion [0, 14, 3, 0])) + mainLibSet, + Dependency + (PackageName "text") + (MajorBoundVersion + (mkVersion [1, 2, 3, 1])) + mainLibSet], + condTreeComponents = []}], + condTestSuites = [ + _×_ + (UnqualComponentName "tests") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "Driver.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [ + ExeDependency + (PackageName "tasty-discover") + (UnqualComponentName + "tasty-discover") + (MajorBoundVersion + (mkVersion [4, 2, 1]))], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "test"], + otherModules = [ + ModuleName "IntervalTest"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [ + "-Wall", + "-Werror=missing-home-modules", + "-threaded"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (UnionVersionRanges + (MajorBoundVersion + (mkVersion [4, 11, 1, 0])) + (MajorBoundVersion + (mkVersion [4, 12, 0, 0]))) + mainLibSet, + Dependency + (PackageName + "jaeger-flamegraph") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "tasty") + (MajorBoundVersion + (mkVersion [1, 1, 0, 4])) + mainLibSet, + Dependency + (PackageName "tasty-hspec") + (MajorBoundVersion + (mkVersion [1, 1, 5])) + mainLibSet, + Dependency + (PackageName "tasty-quickcheck") + (MajorBoundVersion + (mkVersion [0, 10])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (UnionVersionRanges + (MajorBoundVersion + (mkVersion [4, 11, 1, 0])) + (MajorBoundVersion + (mkVersion [4, 12, 0, 0]))) + mainLibSet, + Dependency + (PackageName + "jaeger-flamegraph") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "tasty") + (MajorBoundVersion + (mkVersion [1, 1, 0, 4])) + mainLibSet, + Dependency + (PackageName "tasty-hspec") + (MajorBoundVersion + (mkVersion [1, 1, 5])) + mainLibSet, + Dependency + (PackageName "tasty-quickcheck") + (MajorBoundVersion + (mkVersion [0, 10])) + mainLibSet], + condTreeComponents = []}], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -93,11 +495,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -175,10 +577,10 @@ GenericPackageDescription { (MajorBoundVersion (mkVersion [2, 12, 6, 1])) mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [ + condTreeComponents = []}) + [] + [] + [ _×_ (UnqualComponentName "jaeger-flamegraph") @@ -194,11 +596,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -339,8 +741,8 @@ GenericPackageDescription { (MajorBoundVersion (mkVersion [1, 2, 3, 1])) mainLibSet], - condTreeComponents = []}], - condTestSuites = [ + condTreeComponents = []}] + [ _×_ (UnqualComponentName "tests") CondNode { @@ -361,11 +763,11 @@ GenericPackageDescription { (MajorBoundVersion (mkVersion [4, 2, 1]))], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -476,5 +878,5 @@ GenericPackageDescription { (MajorBoundVersion (mkVersion [0, 10])) mainLibSet], - condTreeComponents = []}], - condBenchmarks = []} + condTreeComponents = []}] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.expr index 3a1d7d5f075..a9cece7336e 100644 --- a/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.expr +++ b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.expr @@ -1,44 +1,175 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName - "leading-comma", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "leading comma, trailing comma, or ordinary", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName + "leading-comma", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "leading comma, trailing comma, or ordinary", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "LeadingComma", + ModuleName "LeadingComma2", + ModuleName "TrailingComma", + ModuleName "TrailingComma", + ModuleName "Comma", + ModuleName "InBetween", + ModuleName "NoCommas", + ModuleName "NoCommas"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "deepseq") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "transformers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "deepseq") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "transformers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -61,11 +192,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -162,9 +293,9 @@ GenericPackageDescription { (PackageName "directory") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma.expr index 230ebf53136..8a5ec7124a0 100644 --- a/Cabal-tests/tests/ParserTests/regressions/leading-comma.expr +++ b/Cabal-tests/tests/ParserTests/regressions/leading-comma.expr @@ -1,44 +1,168 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_2, - package = PackageIdentifier { - pkgName = PackageName - "leading-comma", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "leading comma, trailing comma, or ordinary", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV2_2, + package = PackageIdentifier { + pkgName = PackageName + "leading-comma", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "leading comma, trailing comma, or ordinary", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "LeadingComma"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "deepseq") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "transformers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "deepseq") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "transformers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -54,11 +178,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -155,9 +279,9 @@ GenericPackageDescription { (PackageName "directory") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq1.expr b/Cabal-tests/tests/ParserTests/regressions/libpq1.expr index b331abffcca..54dfbf957be 100644 --- a/Cabal-tests/tests/ParserTests/regressions/libpq1.expr +++ b/Cabal-tests/tests/ParserTests/regressions/libpq1.expr @@ -1,127 +1,774 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_8, - package = PackageIdentifier { - pkgName = PackageName - "postgresql-libpq", - pkgVersion = mkVersion - [0, 9, 4, 2]}, - licenseRaw = Right BSD3, - licenseFiles = [ - SymbolicPath "LICENSE"], - copyright = concat - [ - "(c) 2010 Grant Monroe\n", - "(c) 2011 Leon P Smith"], - maintainer = - "Oleg Grenrus ", - author = - "Grant Monroe, Leon P Smith, Joey Adams", - stability = "", - testedWith = [ - _×_ - GHC - (ThisVersion - (mkVersion [7, 0, 4])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 2, 2])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 4, 2])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 6, 3])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 8, 4])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 10, 3])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 0, 2])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 2, 2])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 4, 3])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 6, 1]))], - homepage = - "https://github.com/phadej/postgresql-libpq", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "low-level binding to libpq", - description = concat - [ - "This is a binding to libpq: the C application\n", - "programmer's interface to PostgreSQL. libpq is a\n", - "set of library functions that allow client\n", - "programs to pass queries to the PostgreSQL\n", - "backend server and to receive the results of\n", - "these queries."], - category = "Database", - customFieldsPD = [], - buildTypeRaw = Just Custom, - setupBuildInfo = Just - SetupBuildInfo { - setupDepends = [ +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV1_8, + package = PackageIdentifier { + pkgName = PackageName + "postgresql-libpq", + pkgVersion = mkVersion + [0, 9, 4, 2]}, + licenseRaw = Right BSD3, + licenseFiles = [ + SymbolicPath "LICENSE"], + copyright = concat + [ + "(c) 2010 Grant Monroe\n", + "(c) 2011 Leon P Smith"], + maintainer = + "Oleg Grenrus ", + author = + "Grant Monroe, Leon P Smith, Joey Adams", + stability = "", + testedWith = [ + _×_ + GHC + (ThisVersion + (mkVersion [7, 0, 4])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 2, 2])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 4, 2])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 6, 3])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 8, 4])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 10, 3])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 0, 2])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 2, 2])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 4, 3])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 6, 1]))], + homepage = + "https://github.com/phadej/postgresql-libpq", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "low-level binding to libpq", + description = concat + [ + "This is a binding to libpq: the C application\n", + "programmer's interface to PostgreSQL. libpq is a\n", + "set of library functions that allow client\n", + "programs to pass queries to the PostgreSQL\n", + "backend server and to receive the results of\n", + "these queries."], + category = "Database", + customFieldsPD = [], + buildTypeRaw = Just Custom, + setupBuildInfo = Just + SetupBuildInfo { + setupDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 3])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "Cabal") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [1, 10])) + (EarlierVersion + (mkVersion [2, 5]))) + mainLibSet], + defaultSetupDepends = False}, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [ + SymbolicPath + "cbits/noticehandlers.h", + SymbolicPath "CHANGELOG.md"], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [ + MkPackageFlag { + flagName = FlagName + "use-pkg-config", + flagDescription = "", + flagDefault = False, + flagManual = True}], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName + "Database.PostgreSQL.LibPQ", + ModuleName + "Database.PostgreSQL.LibPQ.Internal"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [ + LegacyExeDependency + "hsc2hs" + (OrLaterVersion + (mkVersion [0]))], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [ + SymbolicPath + "cbits/noticehandlers.c"], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "src"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [ + SymbolicPath "cbits"], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-Wall"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 3])) + (EarlierVersion + (mkVersion [4, 13]))) + mainLibSet, + Dependency + (PackageName "bytestring") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9, 1, 0])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ Dependency (PackageName "base") (IntersectVersionRanges (OrLaterVersion (mkVersion [4, 3])) (EarlierVersion - (mkVersion [5]))) + (mkVersion [4, 13]))) mainLibSet, Dependency - (PackageName "Cabal") + (PackageName "bytestring") (IntersectVersionRanges (OrLaterVersion - (mkVersion [1, 10])) + (mkVersion [0, 9, 1, 0])) (EarlierVersion - (mkVersion [2, 5]))) + (mkVersion [0, 11]))) mainLibSet], - defaultSetupDepends = False}, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [ - SymbolicPath - "cbits/noticehandlers.h", - SymbolicPath "CHANGELOG.md"], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [ - MkPackageFlag { - flagName = FlagName - "use-pkg-config", - flagDescription = "", - flagDefault = False, - flagManual = True}], - condLibrary = Just + condTreeComponents = [ + CondBranch { + condBranchCondition = + `CNot (Var (OS Windows))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "unix") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 4, 2, 0])) + (EarlierVersion + (mkVersion [2, 8]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "unix") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 4, 2, 0])) + (EarlierVersion + (mkVersion [2, 8]))) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 2, 0, 2])) + (EarlierVersion + (mkVersion [2, 7]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 2, 0, 2])) + (EarlierVersion + (mkVersion [2, 7]))) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "use-pkg-config"))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [ + PkgconfigDependency + (PkgconfigName "libpq") + (PcIntersectVersionRanges + (PcOrLaterVersion + (PkgconfigVersion "9")) + (PcEarlierVersion + (PkgconfigVersion "10")))], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = ["libpq"], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = ["pq"], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS OpenBSD)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = ["crypto", "ssl"], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = + Nothing}]}}]}}]}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -144,11 +791,11 @@ GenericPackageDescription { (mkVersion [0]))], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -250,11 +897,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -337,11 +984,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -424,11 +1071,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [ @@ -499,11 +1146,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -569,11 +1216,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -637,11 +1284,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -707,11 +1354,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -761,9 +1408,9 @@ GenericPackageDescription { condTreeConstraints = [], condTreeComponents = []}, condBranchIfFalse = - Nothing}]}}]}}]}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + Nothing}]}}]}}]}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq2.expr b/Cabal-tests/tests/ParserTests/regressions/libpq2.expr index 9f6a16ada6e..33bb75d5ff7 100644 --- a/Cabal-tests/tests/ParserTests/regressions/libpq2.expr +++ b/Cabal-tests/tests/ParserTests/regressions/libpq2.expr @@ -1,131 +1,776 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName - "postgresql-libpq", - pkgVersion = mkVersion - [0, 9, 4, 2]}, - licenseRaw = Left - (License - (ELicense - (ELicenseId BSD_3_Clause) - Nothing)), - licenseFiles = [ - SymbolicPath "LICENSE"], - copyright = concat - [ - "(c) 2010 Grant Monroe\n", - "(c) 2011 Leon P Smith"], - maintainer = - "Oleg Grenrus ", - author = - "Grant Monroe, Leon P Smith, Joey Adams", - stability = "", - testedWith = [ - _×_ - GHC - (ThisVersion - (mkVersion [7, 0, 4])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 2, 2])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 4, 2])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 6, 3])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 8, 4])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 10, 3])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 0, 2])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 2, 2])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 4, 3])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 6, 1]))], - homepage = - "https://github.com/phadej/postgresql-libpq", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "low-level binding to libpq", - description = concat - [ - "This is a binding to libpq: the C application\n", - "programmer's interface to PostgreSQL. libpq is a\n", - "set of library functions that allow client\n", - "programs to pass queries to the PostgreSQL\n", - "backend server and to receive the results of\n", - "these queries."], - category = "Database", - customFieldsPD = [], - buildTypeRaw = Just Custom, - setupBuildInfo = Just - SetupBuildInfo { - setupDepends = [ +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName + "postgresql-libpq", + pkgVersion = mkVersion + [0, 9, 4, 2]}, + licenseRaw = Left + (License + (ELicense + (ELicenseId BSD_3_Clause) + Nothing)), + licenseFiles = [ + SymbolicPath "LICENSE"], + copyright = concat + [ + "(c) 2010 Grant Monroe\n", + "(c) 2011 Leon P Smith"], + maintainer = + "Oleg Grenrus ", + author = + "Grant Monroe, Leon P Smith, Joey Adams", + stability = "", + testedWith = [ + _×_ + GHC + (ThisVersion + (mkVersion [7, 0, 4])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 2, 2])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 4, 2])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 6, 3])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 8, 4])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 10, 3])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 0, 2])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 2, 2])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 4, 3])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 6, 1]))], + homepage = + "https://github.com/phadej/postgresql-libpq", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "low-level binding to libpq", + description = concat + [ + "This is a binding to libpq: the C application\n", + "programmer's interface to PostgreSQL. libpq is a\n", + "set of library functions that allow client\n", + "programs to pass queries to the PostgreSQL\n", + "backend server and to receive the results of\n", + "these queries."], + category = "Database", + customFieldsPD = [], + buildTypeRaw = Just Custom, + setupBuildInfo = Just + SetupBuildInfo { + setupDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 3])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "Cabal") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [1, 10])) + (EarlierVersion + (mkVersion [2, 5]))) + mainLibSet], + defaultSetupDepends = False}, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [ + SymbolicPath + "cbits/noticehandlers.h", + SymbolicPath "CHANGELOG.md"], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [ + MkPackageFlag { + flagName = FlagName + "use-pkg-config", + flagDescription = "", + flagDefault = False, + flagManual = True}], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName + "Database.PostgreSQL.LibPQ", + ModuleName + "Database.PostgreSQL.LibPQ.Internal"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [ + ExeDependency + (PackageName "hsc2hs") + (UnqualComponentName "hsc2hs") + (OrLaterVersion + (mkVersion [0]))], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [ + SymbolicPath + "cbits/noticehandlers.c"], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "src"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [ + SymbolicPath "cbits"], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-Wall"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 3])) + (EarlierVersion + (mkVersion [4, 13]))) + mainLibSet, + Dependency + (PackageName "bytestring") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9, 1, 0])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ Dependency (PackageName "base") (IntersectVersionRanges (OrLaterVersion (mkVersion [4, 3])) (EarlierVersion - (mkVersion [5]))) + (mkVersion [4, 13]))) mainLibSet, Dependency - (PackageName "Cabal") + (PackageName "bytestring") (IntersectVersionRanges (OrLaterVersion - (mkVersion [1, 10])) + (mkVersion [0, 9, 1, 0])) (EarlierVersion - (mkVersion [2, 5]))) + (mkVersion [0, 11]))) mainLibSet], - defaultSetupDepends = False}, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [ - SymbolicPath - "cbits/noticehandlers.h", - SymbolicPath "CHANGELOG.md"], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [ - MkPackageFlag { - flagName = FlagName - "use-pkg-config", - flagDescription = "", - flagDefault = False, - flagManual = True}], - condLibrary = Just + condTreeComponents = [ + CondBranch { + condBranchCondition = + `CNot (Var (OS Windows))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "unix") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 4, 2, 0])) + (EarlierVersion + (mkVersion [2, 8]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "unix") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 4, 2, 0])) + (EarlierVersion + (mkVersion [2, 8]))) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 2, 0, 2])) + (EarlierVersion + (mkVersion [2, 7]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 2, 0, 2])) + (EarlierVersion + (mkVersion [2, 7]))) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "use-pkg-config"))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [ + PkgconfigDependency + (PkgconfigName "libpq") + (PcOrLaterVersion + (PkgconfigVersion "9.3h"))], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = ["libpq"], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = ["pq"], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS OpenBSD)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = ["crypto", "ssl"], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = + Nothing}]}}]}}]}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -149,11 +794,11 @@ GenericPackageDescription { (OrLaterVersion (mkVersion [0]))], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -255,11 +900,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -342,11 +987,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -429,11 +1074,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [ @@ -501,11 +1146,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -571,11 +1216,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -639,11 +1284,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -709,11 +1354,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -763,9 +1408,9 @@ GenericPackageDescription { condTreeConstraints = [], condTreeComponents = []}, condBranchIfFalse = - Nothing}]}}]}}]}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + Nothing}]}}]}}]}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-1.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-1.expr index 0a137660468..a6235b30211 100644 --- a/Cabal-tests/tests/ParserTests/regressions/mixin-1.expr +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-1.expr @@ -1,45 +1,173 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_0, - package = PackageIdentifier { - pkgName = PackageName "mixin", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Nothing, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [ +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV2_0, + package = PackageIdentifier { + pkgName = PackageName "mixin", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Nothing, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [ + _×_ + (UnqualComponentName + "str-example") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "str-example", + modulePath = SymbolicPath + "Main.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "str-example"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-string") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = [ + Mixin { + mixinPackageName = PackageName + "str-string", + mixinLibraryName = LMainLibName, + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName "Str") + (ModuleName "Str.String")], + includeRequiresRn = + DefaultRenaming}}, + Mixin { + mixinPackageName = PackageName + "str-bytestring", + mixinLibraryName = LMainLibName, + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName "Str") + (ModuleName "Str.ByteString")], + includeRequiresRn = + DefaultRenaming}}]}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-string") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}], + condTestSuites = [], + condBenchmarks = []} + Nothing + [] + [] + [ _×_ (UnqualComponentName "str-example") @@ -55,11 +183,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -160,6 +288,6 @@ GenericPackageDescription { (PackageName "str-bytestring") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-2.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-2.expr index 6c2239df825..ff20592c4d2 100644 --- a/Cabal-tests/tests/ParserTests/regressions/mixin-2.expr +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-2.expr @@ -1,45 +1,173 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName "mixin", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Nothing, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [ +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName "mixin", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Nothing, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [ + _×_ + (UnqualComponentName + "str-example") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "str-example", + modulePath = SymbolicPath + "Main.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "str-example"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-string") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = [ + Mixin { + mixinPackageName = PackageName + "str-string", + mixinLibraryName = LMainLibName, + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName "Str") + (ModuleName "Str.String")], + includeRequiresRn = + DefaultRenaming}}, + Mixin { + mixinPackageName = PackageName + "str-bytestring", + mixinLibraryName = LMainLibName, + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName "Str") + (ModuleName "Str.ByteString")], + includeRequiresRn = + DefaultRenaming}}]}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-string") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}], + condTestSuites = [], + condBenchmarks = []} + Nothing + [] + [] + [ _×_ (UnqualComponentName "str-example") @@ -55,11 +183,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -160,6 +288,6 @@ GenericPackageDescription { (PackageName "str-bytestring") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-3.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-3.expr index a4a94aac32c..786c9037e07 100644 --- a/Cabal-tests/tests/ParserTests/regressions/mixin-3.expr +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-3.expr @@ -1,45 +1,156 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName "mixin", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Nothing, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [ +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName "mixin", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Nothing, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [ + _×_ + (UnqualComponentName + "str-example") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "str-example", + modulePath = SymbolicPath + "Main.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "str-example"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-string") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = [ + Mixin { + mixinPackageName = PackageName + "str", + mixinLibraryName = LMainLibName, + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + HidingRenaming + [ModuleName "Foo"], + includeRequiresRn = + DefaultRenaming}}]}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-string") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}], + condTestSuites = [], + condBenchmarks = []} + Nothing + [] + [] + [ _×_ (UnqualComponentName "str-example") @@ -55,11 +166,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -143,6 +254,6 @@ GenericPackageDescription { (PackageName "str-bytestring") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/monad-param.expr b/Cabal-tests/tests/ParserTests/regressions/monad-param.expr index db28c928ddb..b4464952082 100644 --- a/Cabal-tests/tests/ParserTests/regressions/monad-param.expr +++ b/Cabal-tests/tests/ParserTests/regressions/monad-param.expr @@ -1,52 +1,167 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_0, - package = PackageIdentifier { - pkgName = PackageName - "monad-param", - pkgVersion = mkVersion - [0, 0, 1]}, - licenseRaw = Right BSD3, - licenseFiles = [ - SymbolicPath "LICENSE"], - copyright = - "Copyright (C) 2006-2007, Edward Kmett", - maintainer = - "Edward Kmett ", - author = - "Edward Kmett ", - stability = "alpha", - testedWith = [], - homepage = - "http://comonad.com/haskell/monad-param/dist/doc/html/Control-Monad-Parameterized.html", - pkgUrl = - "http://comonad.com/haskell/monad-param", - bugReports = "", - sourceRepos = [], - synopsis = - "Parameterized monads", - description = - "Implements parameterized monads by overloading the monad sugar with more liberal types.", - category = "Control", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV1_0, + package = PackageIdentifier { + pkgName = PackageName + "monad-param", + pkgVersion = mkVersion + [0, 0, 1]}, + licenseRaw = Right BSD3, + licenseFiles = [ + SymbolicPath "LICENSE"], + copyright = + "Copyright (C) 2006-2007, Edward Kmett", + maintainer = + "Edward Kmett ", + author = + "Edward Kmett ", + stability = "alpha", + testedWith = [], + homepage = + "http://comonad.com/haskell/monad-param/dist/doc/html/Control-Monad-Parameterized.html", + pkgUrl = + "http://comonad.com/haskell/monad-param", + bugReports = "", + sourceRepos = [], + synopsis = + "Parameterized monads", + description = + "Implements parameterized monads by overloading the monad sugar with more liberal types.", + category = "Control", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName + "Control.Monad.Parameterized"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "src"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [ + EnableExtension + MultiParamTypeClasses, + EnableExtension + FunctionalDependencies, + EnableExtension + OverlappingInstances, + EnableExtension + UndecidableInstances, + EnableExtension EmptyDataDecls, + DisableExtension + ImplicitPrelude], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [ + "-funbox-strict-fields", + "-threaded", + "-fasm"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "mtl") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "stm") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "mtl") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "stm") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -63,11 +178,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -154,9 +269,9 @@ GenericPackageDescription { (PackageName "stm") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.expr b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.expr index d2f1efdd913..be750628dd0 100644 --- a/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.expr +++ b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.expr @@ -1,44 +1,208 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_0, - package = PackageIdentifier { - pkgName = PackageName - "multiple-libs", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "visible flag only since 3.0", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV2_0, + package = PackageIdentifier { + pkgName = PackageName + "multiple-libs", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "visible flag only since 3.0", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "ElseIf"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condSubLibraries = [ + _×_ + (UnqualComponentName "public") + CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName "public"), + exposedModules = [ + ModuleName "ElseIf2"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -54,11 +218,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -115,8 +279,8 @@ GenericPackageDescription { (PackageName "base") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}, - condSubLibraries = [ + condTreeComponents = []}) + [ _×_ (UnqualComponentName "public") CondNode { @@ -135,11 +299,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -196,8 +360,8 @@ GenericPackageDescription { (PackageName "base") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/noVersion.expr b/Cabal-tests/tests/ParserTests/regressions/noVersion.expr index 838f87733eb..92ed401ed1f 100644 --- a/Cabal-tests/tests/ParserTests/regressions/noVersion.expr +++ b/Cabal-tests/tests/ParserTests/regressions/noVersion.expr @@ -1,44 +1,128 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_22, - package = PackageIdentifier { - pkgName = PackageName - "noVersion", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "-none in build-depends", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV1_22, + package = PackageIdentifier { + pkgName = PackageName + "noVersion", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "-none in build-depends", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "ElseIf"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "bad-package") + (EarlierVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "bad-package") + (EarlierVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -54,11 +138,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -115,9 +199,9 @@ GenericPackageDescription { (PackageName "bad-package") (EarlierVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.expr b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.expr index ccfe4421c7b..b4ee335af16 100644 --- a/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.expr +++ b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.expr @@ -1,59 +1,206 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_10, - package = PackageIdentifier { - pkgName = PackageName "\28961", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/hvr/-.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "The canonical non-package \28961", - description = "", - category = "", - customFieldsPD = [ - _×_ "x-\28961" "\28961"], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [ - MkPackageFlag { - flagName = FlagName "\28961", - flagDescription = "\28961", - flagDefault = True, - flagManual = False}], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV1_10, + package = PackageIdentifier { + pkgName = PackageName "\28961", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/hvr/-.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "The canonical non-package \28961", + description = "", + category = "", + customFieldsPD = [ + _×_ "x-\28961" "\28961"], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [ + MkPackageFlag { + flagName = FlagName "\28961", + flagDescription = "\28961", + flagDefault = True, + flagManual = False}], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "\937"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `CNot (Var (PackageFlag (FlagName "\\28961")))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = False, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -69,11 +216,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -140,11 +287,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -193,9 +340,9 @@ GenericPackageDescription { mixins = []}}, condTreeConstraints = [], condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condBranchIfFalse = Nothing}]}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/shake.expr b/Cabal-tests/tests/ParserTests/regressions/shake.expr index 5be08b04064..4710e735e3f 100644 --- a/Cabal-tests/tests/ParserTests/regressions/shake.expr +++ b/Cabal-tests/tests/ParserTests/regressions/shake.expr @@ -1,165 +1,2509 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_18, - package = PackageIdentifier { - pkgName = PackageName "shake", - pkgVersion = mkVersion - [0, 15, 11]}, - licenseRaw = Right BSD3, - licenseFiles = [ - SymbolicPath "LICENSE"], - copyright = - "Neil Mitchell 2011-2017", - maintainer = - "Neil Mitchell ", - author = - "Neil Mitchell ", - stability = "", - testedWith = [ - _×_ - GHC - (ThisVersion - (mkVersion [8, 0, 1])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 10, 3])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 8, 4])), +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV1_18, + package = PackageIdentifier { + pkgName = PackageName "shake", + pkgVersion = mkVersion + [0, 15, 11]}, + licenseRaw = Right BSD3, + licenseFiles = [ + SymbolicPath "LICENSE"], + copyright = + "Neil Mitchell 2011-2017", + maintainer = + "Neil Mitchell ", + author = + "Neil Mitchell ", + stability = "", + testedWith = [ + _×_ + GHC + (ThisVersion + (mkVersion [8, 0, 1])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 10, 3])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 8, 4])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 6, 3])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 4, 2]))], + homepage = + "http://shakebuild.com", + pkgUrl = "", + bugReports = + "https://github.com/ndmitchell/shake/issues", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/ndmitchell/shake.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Build system library, like Make, but more accurate dependencies.", + description = + concat + [ + "Shake is a Haskell library for writing build systems - designed as a\n", + "replacement for @make@. See \"Development.Shake\" for an introduction,\n", + "including an example. Further examples are included in the Cabal tarball,\n", + "under the @Examples@ directory. The homepage contains links to a user\n", + "manual, an academic paper and further information:\n", + "\n", + "\n", + "To use Shake the user writes a Haskell program\n", + "that imports \"Development.Shake\", defines some build rules, and calls\n", + "the 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\n", + "operators, a simple Shake build system\n", + "is not too dissimilar from a simple Makefile. However, as build systems\n", + "get more complex, Shake is able to take advantage of the excellent\n", + "abstraction facilities offered by Haskell and easily support much larger\n", + "projects. The Shake library provides all the standard features available in other\n", + "build systems, including automatic parallelism and minimal rebuilds.\n", + "Shake also provides more accurate dependency tracking, including seamless\n", + "support for generated files, and dependencies on system information\n", + "(e.g. compiler version)."], + category = "Development, Shake", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [ + SymbolicPath "html/viz.js", + SymbolicPath + "html/profile.html", + SymbolicPath + "html/progress.html", + SymbolicPath "html/shake.js", + SymbolicPath + "docs/manual/build.bat", + SymbolicPath + "docs/manual/Build.hs", + SymbolicPath + "docs/manual/build.sh", + SymbolicPath + "docs/manual/constants.c", + SymbolicPath + "docs/manual/constants.h", + SymbolicPath + "docs/manual/main.c"], + dataDir = SymbolicPath ".", + extraSrcFiles = [ + SymbolicPath + "src/Test/C/constants.c", + SymbolicPath + "src/Test/C/constants.h", + SymbolicPath + "src/Test/C/main.c", + SymbolicPath + "src/Test/MakeTutor/Makefile", + SymbolicPath + "src/Test/MakeTutor/hellofunc.c", + SymbolicPath + "src/Test/MakeTutor/hellomake.c", + SymbolicPath + "src/Test/MakeTutor/hellomake.h", + SymbolicPath + "src/Test/Tar/list.txt", + SymbolicPath + "src/Test/Ninja/*.ninja", + SymbolicPath + "src/Test/Ninja/subdir/*.ninja", + SymbolicPath + "src/Test/Ninja/*.output", + SymbolicPath + "src/Test/Progress/*.prog", + SymbolicPath + "src/Test/Tup/hello.c", + SymbolicPath + "src/Test/Tup/root.cfg", + SymbolicPath + "src/Test/Tup/newmath/root.cfg", + SymbolicPath + "src/Test/Tup/newmath/square.c", + SymbolicPath + "src/Test/Tup/newmath/square.h", + SymbolicPath "src/Paths.hs", + SymbolicPath "docs/Manual.md", + SymbolicPath + "docs/shake-progress.png"], + extraTmpFiles = [], + extraDocFiles = [ + SymbolicPath "CHANGES.txt", + SymbolicPath "README.md"], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [ + MkPackageFlag { + flagName = FlagName "portable", + flagDescription = + "Obtain FileTime using portable functions", + flagDefault = False, + flagManual = True}], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "Development.Shake", + ModuleName + "Development.Shake.Classes", + ModuleName + "Development.Shake.Command", + ModuleName + "Development.Shake.Config", + ModuleName + "Development.Shake.FilePath", + ModuleName + "Development.Shake.Forward", + ModuleName + "Development.Shake.Rule", + ModuleName + "Development.Shake.Util"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath ".", + SymbolicPath "src"], + otherModules = [ + ModuleName + "Development.Ninja.Env", + ModuleName + "Development.Ninja.Lexer", + ModuleName + "Development.Ninja.Parse", + ModuleName + "Development.Ninja.Type", + ModuleName + "Development.Shake.Args", + ModuleName + "Development.Shake.ByteString", + ModuleName + "Development.Shake.Core", + ModuleName + "Development.Shake.CmdOption", + ModuleName + "Development.Shake.Database", + ModuleName + "Development.Shake.Demo", + ModuleName + "Development.Shake.Derived", + ModuleName + "Development.Shake.Errors", + ModuleName + "Development.Shake.FileInfo", + ModuleName + "Development.Shake.FilePattern", + ModuleName + "Development.Shake.Monad", + ModuleName + "Development.Shake.Pool", + ModuleName + "Development.Shake.Profile", + ModuleName + "Development.Shake.Progress", + ModuleName + "Development.Shake.Resource", + ModuleName + "Development.Shake.Rules.Directory", + ModuleName + "Development.Shake.Rules.File", + ModuleName + "Development.Shake.Rules.Files", + ModuleName + "Development.Shake.Rules.Oracle", + ModuleName + "Development.Shake.Rules.OrderOnly", + ModuleName + "Development.Shake.Rules.Rerun", + ModuleName + "Development.Shake.Shake", + ModuleName + "Development.Shake.Special", + ModuleName + "Development.Shake.Storage", + ModuleName + "Development.Shake.Types", + ModuleName + "Development.Shake.Value", + ModuleName "General.Bilist", + ModuleName "General.Binary", + ModuleName "General.Cleanup", + ModuleName "General.Concurrent", + ModuleName "General.Extra", + ModuleName "General.FileLock", + ModuleName "General.Intern", + ModuleName "General.Process", + ModuleName "General.String", + ModuleName "General.Template", + ModuleName "General.Timing", + ModuleName "Paths_shake"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion + (mkVersion [4, 5])) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hashable") + (OrLaterVersion + (mkVersion [1, 1, 2, 3])) + mainLibSet, + Dependency + (PackageName "binary") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "process") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet, + Dependency + (PackageName + "unordered-containers") + (OrLaterVersion + (mkVersion [0, 2, 1])) + mainLibSet, + Dependency + (PackageName "bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "utf8-string") + (OrLaterVersion + (mkVersion [0, 3])) + mainLibSet, + Dependency + (PackageName "time") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "random") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-jquery") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-flot") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "transformers") + (OrLaterVersion + (mkVersion [0, 2])) + mainLibSet, + Dependency + (PackageName "extra") + (OrLaterVersion + (mkVersion [1, 4, 8])) + mainLibSet, + Dependency + (PackageName "deepseq") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion + (mkVersion [4, 5])) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hashable") + (OrLaterVersion + (mkVersion [1, 1, 2, 3])) + mainLibSet, + Dependency + (PackageName "binary") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "process") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet, + Dependency + (PackageName + "unordered-containers") + (OrLaterVersion + (mkVersion [0, 2, 1])) + mainLibSet, + Dependency + (PackageName "bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "utf8-string") + (OrLaterVersion + (mkVersion [0, 3])) + mainLibSet, + Dependency + (PackageName "time") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "random") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-jquery") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-flot") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "transformers") + (OrLaterVersion + (mkVersion [0, 2])) + mainLibSet, + Dependency + (PackageName "extra") + (OrLaterVersion + (mkVersion [1, 4, 8])) + mainLibSet, + Dependency + (PackageName "deepseq") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "portable"))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = ["-DPORTABLE"], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (Impl GHC (EarlierVersion (mkVersion [7,6])))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "old-time") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "old-time") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}, + condBranchIfFalse = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `CNot (Var (OS Windows))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "unix") + (OrLaterVersion + (mkVersion [2, 5, 1])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "unix") + (OrLaterVersion + (mkVersion [2, 5, 1])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}}, + CondBranch { + condBranchCondition = + `CNot (Var (OS Windows))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "unix") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "unix") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [ _×_ - GHC - (ThisVersion - (mkVersion [7, 6, 3])), + (UnqualComponentName "shake") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "shake", + modulePath = SymbolicPath + "Run.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "src"], + otherModules = [ + ModuleName + "Development.Make.All", + ModuleName + "Development.Make.Env", + ModuleName + "Development.Make.Parse", + ModuleName + "Development.Make.Rules", + ModuleName + "Development.Make.Type", + ModuleName + "Development.Ninja.All", + ModuleName + "Development.Ninja.Env", + ModuleName + "Development.Ninja.Lexer", + ModuleName + "Development.Ninja.Parse", + ModuleName + "Development.Ninja.Type", + ModuleName "Development.Shake", + ModuleName + "Development.Shake.Args", + ModuleName + "Development.Shake.ByteString", + ModuleName + "Development.Shake.Classes", + ModuleName + "Development.Shake.CmdOption", + ModuleName + "Development.Shake.Command", + ModuleName + "Development.Shake.Core", + ModuleName + "Development.Shake.Database", + ModuleName + "Development.Shake.Demo", + ModuleName + "Development.Shake.Derived", + ModuleName + "Development.Shake.Errors", + ModuleName + "Development.Shake.FileInfo", + ModuleName + "Development.Shake.FilePath", + ModuleName + "Development.Shake.FilePattern", + ModuleName + "Development.Shake.Forward", + ModuleName + "Development.Shake.Monad", + ModuleName + "Development.Shake.Pool", + ModuleName + "Development.Shake.Profile", + ModuleName + "Development.Shake.Progress", + ModuleName + "Development.Shake.Resource", + ModuleName + "Development.Shake.Rule", + ModuleName + "Development.Shake.Rules.Directory", + ModuleName + "Development.Shake.Rules.File", + ModuleName + "Development.Shake.Rules.Files", + ModuleName + "Development.Shake.Rules.Oracle", + ModuleName + "Development.Shake.Rules.OrderOnly", + ModuleName + "Development.Shake.Rules.Rerun", + ModuleName + "Development.Shake.Shake", + ModuleName + "Development.Shake.Special", + ModuleName + "Development.Shake.Storage", + ModuleName + "Development.Shake.Types", + ModuleName + "Development.Shake.Value", + ModuleName "General.Bilist", + ModuleName "General.Binary", + ModuleName "General.Cleanup", + ModuleName "General.Concurrent", + ModuleName "General.Extra", + ModuleName "General.FileLock", + ModuleName "General.Intern", + ModuleName "General.Process", + ModuleName "General.String", + ModuleName "General.Template", + ModuleName "General.Timing", + ModuleName "Paths_shake", + ModuleName "Run"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [ + "-main-is", + "Run.main", + "-rtsopts"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion (mkVersion [4])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hashable") + (OrLaterVersion + (mkVersion [1, 1, 2, 3])) + mainLibSet, + Dependency + (PackageName "binary") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "process") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet, + Dependency + (PackageName + "unordered-containers") + (OrLaterVersion + (mkVersion [0, 2, 1])) + mainLibSet, + Dependency + (PackageName "bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "utf8-string") + (OrLaterVersion + (mkVersion [0, 3])) + mainLibSet, + Dependency + (PackageName "time") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "random") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-jquery") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-flot") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "transformers") + (OrLaterVersion + (mkVersion [0, 2])) + mainLibSet, + Dependency + (PackageName "extra") + (OrLaterVersion + (mkVersion [1, 4, 8])) + mainLibSet, + Dependency + (PackageName "deepseq") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet, + Dependency + (PackageName "primitive") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion (mkVersion [4])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hashable") + (OrLaterVersion + (mkVersion [1, 1, 2, 3])) + mainLibSet, + Dependency + (PackageName "binary") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "process") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet, + Dependency + (PackageName + "unordered-containers") + (OrLaterVersion + (mkVersion [0, 2, 1])) + mainLibSet, + Dependency + (PackageName "bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "utf8-string") + (OrLaterVersion + (mkVersion [0, 3])) + mainLibSet, + Dependency + (PackageName "time") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "random") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-jquery") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-flot") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "transformers") + (OrLaterVersion + (mkVersion [0, 2])) + mainLibSet, + Dependency + (PackageName "extra") + (OrLaterVersion + (mkVersion [1, 4, 8])) + mainLibSet, + Dependency + (PackageName "deepseq") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet, + Dependency + (PackageName "primitive") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (Impl GHC (OrLaterVersion (mkVersion [7,8])))`, + condBranchIfTrue = CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "shake", + modulePath = SymbolicPath "", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [ + "-threaded", + "-with-rtsopts=-I0 -qg -qb"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "portable"))`, + condBranchIfTrue = CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "shake", + modulePath = SymbolicPath "", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = ["-DPORTABLE"], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (Impl GHC (EarlierVersion (mkVersion [7,6])))`, + condBranchIfTrue = CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "shake", + modulePath = SymbolicPath "", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "old-time") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "old-time") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}, + condBranchIfFalse = Just + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "shake", + modulePath = SymbolicPath "", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `CNot (Var (OS Windows))`, + condBranchIfTrue = CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "shake", + modulePath = SymbolicPath "", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "unix") + (OrLaterVersion + (mkVersion [2, 5, 1])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "unix") + (OrLaterVersion + (mkVersion [2, 5, 1])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}}, + CondBranch { + condBranchCondition = + `CNot (Var (OS Windows))`, + condBranchIfTrue = CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "shake", + modulePath = SymbolicPath "", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "unix") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "unix") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}], + condTestSuites = [ _×_ - GHC - (ThisVersion - (mkVersion [7, 4, 2]))], - homepage = - "http://shakebuild.com", - pkgUrl = "", - bugReports = - "https://github.com/ndmitchell/shake/issues", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/ndmitchell/shake.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "Build system library, like Make, but more accurate dependencies.", - description = - concat - [ - "Shake is a Haskell library for writing build systems - designed as a\n", - "replacement for @make@. See \"Development.Shake\" for an introduction,\n", - "including an example. Further examples are included in the Cabal tarball,\n", - "under the @Examples@ directory. The homepage contains links to a user\n", - "manual, an academic paper and further information:\n", - "\n", - "\n", - "To use Shake the user writes a Haskell program\n", - "that imports \"Development.Shake\", defines some build rules, and calls\n", - "the 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\n", - "operators, a simple Shake build system\n", - "is not too dissimilar from a simple Makefile. However, as build systems\n", - "get more complex, Shake is able to take advantage of the excellent\n", - "abstraction facilities offered by Haskell and easily support much larger\n", - "projects. The Shake library provides all the standard features available in other\n", - "build systems, including automatic parallelism and minimal rebuilds.\n", - "Shake also provides more accurate dependency tracking, including seamless\n", - "support for generated files, and dependencies on system information\n", - "(e.g. compiler version)."], - category = "Development, Shake", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [ - SymbolicPath "html/viz.js", - SymbolicPath - "html/profile.html", - SymbolicPath - "html/progress.html", - SymbolicPath "html/shake.js", - SymbolicPath - "docs/manual/build.bat", - SymbolicPath - "docs/manual/Build.hs", - SymbolicPath - "docs/manual/build.sh", - SymbolicPath - "docs/manual/constants.c", - SymbolicPath - "docs/manual/constants.h", - SymbolicPath - "docs/manual/main.c"], - dataDir = SymbolicPath ".", - extraSrcFiles = [ - SymbolicPath - "src/Test/C/constants.c", - SymbolicPath - "src/Test/C/constants.h", - SymbolicPath - "src/Test/C/main.c", - SymbolicPath - "src/Test/MakeTutor/Makefile", - SymbolicPath - "src/Test/MakeTutor/hellofunc.c", - SymbolicPath - "src/Test/MakeTutor/hellomake.c", - SymbolicPath - "src/Test/MakeTutor/hellomake.h", - SymbolicPath - "src/Test/Tar/list.txt", - SymbolicPath - "src/Test/Ninja/*.ninja", - SymbolicPath - "src/Test/Ninja/subdir/*.ninja", - SymbolicPath - "src/Test/Ninja/*.output", - SymbolicPath - "src/Test/Progress/*.prog", - SymbolicPath - "src/Test/Tup/hello.c", - SymbolicPath - "src/Test/Tup/root.cfg", - SymbolicPath - "src/Test/Tup/newmath/root.cfg", - SymbolicPath - "src/Test/Tup/newmath/square.c", - SymbolicPath - "src/Test/Tup/newmath/square.h", - SymbolicPath "src/Paths.hs", - SymbolicPath "docs/Manual.md", - SymbolicPath - "docs/shake-progress.png"], - extraTmpFiles = [], - extraDocFiles = [ - SymbolicPath "CHANGES.txt", - SymbolicPath "README.md"], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [ - MkPackageFlag { - flagName = FlagName "portable", - flagDescription = - "Obtain FileTime using portable functions", - flagDefault = False, - flagManual = True}], - condLibrary = Just + (UnqualComponentName + "shake-test") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "Test.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "src"], + otherModules = [ + ModuleName + "Development.Make.All", + ModuleName + "Development.Make.Env", + ModuleName + "Development.Make.Parse", + ModuleName + "Development.Make.Rules", + ModuleName + "Development.Make.Type", + ModuleName + "Development.Ninja.All", + ModuleName + "Development.Ninja.Env", + ModuleName + "Development.Ninja.Lexer", + ModuleName + "Development.Ninja.Parse", + ModuleName + "Development.Ninja.Type", + ModuleName "Development.Shake", + ModuleName + "Development.Shake.Args", + ModuleName + "Development.Shake.ByteString", + ModuleName + "Development.Shake.Classes", + ModuleName + "Development.Shake.CmdOption", + ModuleName + "Development.Shake.Command", + ModuleName + "Development.Shake.Config", + ModuleName + "Development.Shake.Core", + ModuleName + "Development.Shake.Database", + ModuleName + "Development.Shake.Demo", + ModuleName + "Development.Shake.Derived", + ModuleName + "Development.Shake.Errors", + ModuleName + "Development.Shake.FileInfo", + ModuleName + "Development.Shake.FilePath", + ModuleName + "Development.Shake.FilePattern", + ModuleName + "Development.Shake.Forward", + ModuleName + "Development.Shake.Monad", + ModuleName + "Development.Shake.Pool", + ModuleName + "Development.Shake.Profile", + ModuleName + "Development.Shake.Progress", + ModuleName + "Development.Shake.Resource", + ModuleName + "Development.Shake.Rule", + ModuleName + "Development.Shake.Rules.Directory", + ModuleName + "Development.Shake.Rules.File", + ModuleName + "Development.Shake.Rules.Files", + ModuleName + "Development.Shake.Rules.Oracle", + ModuleName + "Development.Shake.Rules.OrderOnly", + ModuleName + "Development.Shake.Rules.Rerun", + ModuleName + "Development.Shake.Shake", + ModuleName + "Development.Shake.Special", + ModuleName + "Development.Shake.Storage", + ModuleName + "Development.Shake.Types", + ModuleName + "Development.Shake.Util", + ModuleName + "Development.Shake.Value", + ModuleName "General.Bilist", + ModuleName "General.Binary", + ModuleName "General.Cleanup", + ModuleName "General.Concurrent", + ModuleName "General.Extra", + ModuleName "General.FileLock", + ModuleName "General.Intern", + ModuleName "General.Process", + ModuleName "General.String", + ModuleName "General.Template", + ModuleName "General.Timing", + ModuleName "Paths_shake", + ModuleName "Run", + ModuleName "Test.Assume", + ModuleName "Test.Basic", + ModuleName "Test.Benchmark", + ModuleName "Test.C", + ModuleName "Test.Cache", + ModuleName "Test.Command", + ModuleName "Test.Config", + ModuleName "Test.Digest", + ModuleName "Test.Directory", + ModuleName "Test.Docs", + ModuleName "Test.Errors", + ModuleName "Test.FileLock", + ModuleName "Test.FilePath", + ModuleName "Test.FilePattern", + ModuleName "Test.Files", + ModuleName "Test.Forward", + ModuleName "Test.Journal", + ModuleName "Test.Lint", + ModuleName "Test.Live", + ModuleName "Test.Makefile", + ModuleName "Test.Manual", + ModuleName "Test.Match", + ModuleName "Test.Monad", + ModuleName "Test.Ninja", + ModuleName "Test.Oracle", + ModuleName "Test.OrderOnly", + ModuleName "Test.Parallel", + ModuleName "Test.Pool", + ModuleName "Test.Progress", + ModuleName "Test.Random", + ModuleName "Test.Resources", + ModuleName "Test.Self", + ModuleName "Test.Tar", + ModuleName "Test.Tup", + ModuleName "Test.Type", + ModuleName "Test.Unicode", + ModuleName "Test.Util", + ModuleName "Test.Verbosity", + ModuleName "Test.Version"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [ + "-main-is", + "Test.main", + "-rtsopts"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion (mkVersion [4])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hashable") + (OrLaterVersion + (mkVersion [1, 1, 2, 3])) + mainLibSet, + Dependency + (PackageName "binary") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "process") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet, + Dependency + (PackageName + "unordered-containers") + (OrLaterVersion + (mkVersion [0, 2, 1])) + mainLibSet, + Dependency + (PackageName "bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "utf8-string") + (OrLaterVersion + (mkVersion [0, 3])) + mainLibSet, + Dependency + (PackageName "time") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "random") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-jquery") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-flot") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "transformers") + (OrLaterVersion + (mkVersion [0, 2])) + mainLibSet, + Dependency + (PackageName "deepseq") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet, + Dependency + (PackageName "extra") + (OrLaterVersion + (mkVersion [1, 4, 8])) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (OrLaterVersion + (mkVersion [2, 0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion (mkVersion [4])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hashable") + (OrLaterVersion + (mkVersion [1, 1, 2, 3])) + mainLibSet, + Dependency + (PackageName "binary") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "process") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet, + Dependency + (PackageName + "unordered-containers") + (OrLaterVersion + (mkVersion [0, 2, 1])) + mainLibSet, + Dependency + (PackageName "bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "utf8-string") + (OrLaterVersion + (mkVersion [0, 3])) + mainLibSet, + Dependency + (PackageName "time") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "random") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-jquery") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-flot") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "transformers") + (OrLaterVersion + (mkVersion [0, 2])) + mainLibSet, + Dependency + (PackageName "deepseq") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet, + Dependency + (PackageName "extra") + (OrLaterVersion + (mkVersion [1, 4, 8])) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (OrLaterVersion + (mkVersion [2, 0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (Impl GHC (OrLaterVersion (mkVersion [7,6])))`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-with-rtsopts=-K1K"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (Impl GHC (OrLaterVersion (mkVersion [7,8])))`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-threaded"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "portable"))`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = ["-DPORTABLE"], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (Impl GHC (EarlierVersion (mkVersion [7,6])))`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "old-time") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "old-time") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}, + condBranchIfFalse = Just + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `CNot (Var (OS Windows))`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "unix") + (OrLaterVersion + (mkVersion [2, 5, 1])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "unix") + (OrLaterVersion + (mkVersion [2, 5, 1])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}}, + CondBranch { + condBranchCondition = + `CNot (Var (OS Windows))`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "unix") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "unix") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -189,11 +2533,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -480,11 +2824,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = ["-DPORTABLE"], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -550,11 +2894,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -627,11 +2971,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -697,11 +3041,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -778,11 +3122,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -839,10 +3183,10 @@ GenericPackageDescription { (OrLaterVersion (mkVersion [0])) mainLibSet], condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [ + condBranchIfFalse = Nothing}]}) + [] + [] + [ _×_ (UnqualComponentName "shake") CondNode { @@ -857,11 +3201,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -1183,11 +3527,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -1253,11 +3597,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = ["-DPORTABLE"], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -1320,11 +3664,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -1394,11 +3738,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -1461,11 +3805,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -1539,11 +3883,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -1600,8 +3944,8 @@ GenericPackageDescription { (OrLaterVersion (mkVersion [0])) mainLibSet], condTreeComponents = []}, - condBranchIfFalse = Nothing}]}], - condTestSuites = [ + condBranchIfFalse = Nothing}]}] + [ _×_ (UnqualComponentName "shake-test") @@ -1617,11 +3961,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -1992,11 +4336,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -2064,11 +4408,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -2136,11 +4480,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = ["-DPORTABLE"], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -2207,11 +4551,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -2285,11 +4629,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -2356,11 +4700,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -2438,11 +4782,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -2500,5 +4844,5 @@ GenericPackageDescription { (OrLaterVersion (mkVersion [0])) mainLibSet], condTreeComponents = []}, - condBranchIfFalse = Nothing}]}], - condBenchmarks = []} + condBranchIfFalse = Nothing}]}] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-1.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-1.expr index 88500d2d365..05f34efcedb 100644 --- a/Cabal-tests/tests/ParserTests/regressions/spdx-1.expr +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-1.expr @@ -1,43 +1,118 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_0, - package = PackageIdentifier { - pkgName = PackageName "spdx", - pkgVersion = mkVersion [0]}, - licenseRaw = Right BSD3, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "testing positive parsing of spdx identifiers", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV2_0, + package = PackageIdentifier { + pkgName = PackageName "spdx", + pkgVersion = mkVersion [0]}, + licenseRaw = Right BSD3, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "testing positive parsing of spdx identifiers", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -52,11 +127,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -105,9 +180,9 @@ GenericPackageDescription { targetBuildDepends = [], mixins = []}}, condTreeConstraints = [], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-2.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-2.expr index 9cd00ea1103..0d01a949610 100644 --- a/Cabal-tests/tests/ParserTests/regressions/spdx-2.expr +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-2.expr @@ -1,47 +1,122 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_2, - package = PackageIdentifier { - pkgName = PackageName "spdx", - pkgVersion = mkVersion [0]}, - licenseRaw = Left - (License - (ELicense - (ELicenseId AGPL_1_0) - Nothing)), - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "testing positive parsing of spdx identifiers", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV2_2, + package = PackageIdentifier { + pkgName = PackageName "spdx", + pkgVersion = mkVersion [0]}, + licenseRaw = Left + (License + (ELicense + (ELicenseId AGPL_1_0) + Nothing)), + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "testing positive parsing of spdx identifiers", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -56,11 +131,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -109,9 +184,9 @@ GenericPackageDescription { targetBuildDepends = [], mixins = []}}, condTreeConstraints = [], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-3.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-3.expr index e8b2eca8989..a0c51712a51 100644 --- a/Cabal-tests/tests/ParserTests/regressions/spdx-3.expr +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-3.expr @@ -1,47 +1,122 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_4, - package = PackageIdentifier { - pkgName = PackageName "spdx", - pkgVersion = mkVersion [0]}, - licenseRaw = Left - (License - (ELicense - (ELicenseId AGPL_1_0_only) - Nothing)), - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "testing positive parsing of spdx identifiers", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV2_4, + package = PackageIdentifier { + pkgName = PackageName "spdx", + pkgVersion = mkVersion [0]}, + licenseRaw = Left + (License + (ELicense + (ELicenseId AGPL_1_0_only) + Nothing)), + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "testing positive parsing of spdx identifiers", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -56,11 +131,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -109,9 +184,9 @@ GenericPackageDescription { targetBuildDepends = [], mixins = []}}, condTreeConstraints = [], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.expr b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.expr index 2db686aa40f..b0e8214de15 100644 --- a/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.expr +++ b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.expr @@ -1,71 +1,607 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_10, - package = PackageIdentifier { - pkgName = PackageName - "th-lift-instances", - pkgVersion = mkVersion - [0, 1, 4]}, - licenseRaw = Right BSD3, - licenseFiles = [ - SymbolicPath "LICENSE"], - copyright = - "Copyright (C) 2013-2014 Benno F\252nfst\252ck", - maintainer = - "Benno F\252nfst\252ck ", - author = - "Benno F\252nfst\252ck", - stability = "experimental", - testedWith = [], - homepage = - "http://github.com/bennofs/th-lift-instances/", - pkgUrl = "", - bugReports = - "http://github.com/bennofs/th-lift-instances/issues", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/bennofs/th-lift-instances.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "Lift instances for template-haskell for common data types.", - description = - concat - [ - "Most data types in haskell platform do not have Lift instances. This package provides orphan instances\n", - "for containers, text, bytestring and vector."], - category = "Template Haskell", - customFieldsPD = [ - _×_ "x-revision" "1"], - buildTypeRaw = Just Custom, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [ - SymbolicPath ".ghci", - SymbolicPath ".gitignore", - SymbolicPath ".travis.yml", - SymbolicPath ".vim.custom", - SymbolicPath "README.md"], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV1_10, + package = PackageIdentifier { + pkgName = PackageName + "th-lift-instances", + pkgVersion = mkVersion + [0, 1, 4]}, + licenseRaw = Right BSD3, + licenseFiles = [ + SymbolicPath "LICENSE"], + copyright = + "Copyright (C) 2013-2014 Benno F\252nfst\252ck", + maintainer = + "Benno F\252nfst\252ck ", + author = + "Benno F\252nfst\252ck", + stability = "experimental", + testedWith = [], + homepage = + "http://github.com/bennofs/th-lift-instances/", + pkgUrl = "", + bugReports = + "http://github.com/bennofs/th-lift-instances/issues", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/bennofs/th-lift-instances.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Lift instances for template-haskell for common data types.", + description = + concat + [ + "Most data types in haskell platform do not have Lift instances. This package provides orphan instances\n", + "for containers, text, bytestring and vector."], + category = "Template Haskell", + customFieldsPD = [ + _×_ "x-revision" "1"], + buildTypeRaw = Just Custom, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [ + SymbolicPath ".ghci", + SymbolicPath ".gitignore", + SymbolicPath ".travis.yml", + SymbolicPath ".vim.custom", + SymbolicPath "README.md"], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "Instances.TH.Lift"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "src"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [ + EnableExtension + TemplateHaskell], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-Wall", "-fwarn-tabs"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 4])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "template-haskell") + (EarlierVersion + (mkVersion [2, 10])) + mainLibSet, + Dependency + (PackageName "th-lift") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "containers") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 4])) + (EarlierVersion + (mkVersion [0, 6]))) + mainLibSet, + Dependency + (PackageName "vector") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet, + Dependency + (PackageName "text") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 11])) + (EarlierVersion + (mkVersion [1, 3]))) + mainLibSet, + Dependency + (PackageName "bytestring") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 4])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "template-haskell") + (EarlierVersion + (mkVersion [2, 10])) + mainLibSet, + Dependency + (PackageName "th-lift") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "containers") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 4])) + (EarlierVersion + (mkVersion [0, 6]))) + mainLibSet, + Dependency + (PackageName "vector") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet, + Dependency + (PackageName "text") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 11])) + (EarlierVersion + (mkVersion [1, 3]))) + mainLibSet, + Dependency + (PackageName "bytestring") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [ + _×_ + (UnqualComponentName "tests") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "Main.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "tests"], + otherModules = [ + ModuleName "Data"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [ + EnableExtension + TemplateHaskell], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "template-haskell") + (EarlierVersion + (mkVersion [2, 10])) + mainLibSet, + Dependency + (PackageName "containers") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 4])) + (EarlierVersion + (mkVersion [0, 6]))) + mainLibSet, + Dependency + (PackageName "vector") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet, + Dependency + (PackageName "text") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 11])) + (EarlierVersion + (mkVersion [1, 2]))) + mainLibSet, + Dependency + (PackageName "bytestring") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet, + Dependency + (PackageName + "th-lift-instances") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 6])) + (EarlierVersion + (mkVersion [2, 8]))) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "template-haskell") + (EarlierVersion + (mkVersion [2, 10])) + mainLibSet, + Dependency + (PackageName "containers") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 4])) + (EarlierVersion + (mkVersion [0, 6]))) + mainLibSet, + Dependency + (PackageName "vector") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet, + Dependency + (PackageName "text") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 11])) + (EarlierVersion + (mkVersion [1, 2]))) + mainLibSet, + Dependency + (PackageName "bytestring") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet, + Dependency + (PackageName + "th-lift-instances") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 6])) + (EarlierVersion + (mkVersion [2, 8]))) + mainLibSet], + condTreeComponents = []}, + _×_ + (UnqualComponentName "doctests") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "doctests.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "tests"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-Wall", "-threaded"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion + (mkVersion [1, 0])) + mainLibSet, + Dependency + (PackageName "doctest") + (OrLaterVersion + (mkVersion [0, 9, 1])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion + (mkVersion [1, 0])) + mainLibSet, + Dependency + (PackageName "doctest") + (OrLaterVersion + (mkVersion [0, 9, 1])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (Impl GHC (EarlierVersion (mkVersion [7,6,1])))`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-Werror"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -81,11 +617,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -235,11 +771,11 @@ GenericPackageDescription { (EarlierVersion (mkVersion [0, 11]))) mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [ + condTreeComponents = []}) + [] + [] + [] + [ _×_ (UnqualComponentName "tests") CondNode { @@ -254,11 +790,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -435,11 +971,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -544,11 +1080,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -598,5 +1134,5 @@ GenericPackageDescription { testCodeGenerators = []}, condTreeConstraints = [], condTreeComponents = []}, - condBranchIfFalse = Nothing}]}], - condBenchmarks = []} + condBranchIfFalse = Nothing}]}] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/version-sets.expr b/Cabal-tests/tests/ParserTests/regressions/version-sets.expr index c086ae618aa..40bb3115a4c 100644 --- a/Cabal-tests/tests/ParserTests/regressions/version-sets.expr +++ b/Cabal-tests/tests/ParserTests/regressions/version-sets.expr @@ -1,69 +1,272 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName - "version-sets", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [ - _×_ - GHC - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 6, 3])) +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName + "version-sets", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [ + _×_ + GHC (UnionVersionRanges (ThisVersion - (mkVersion [8, 4, 4])) + (mkVersion [8, 6, 3])) (UnionVersionRanges (ThisVersion - (mkVersion [8, 2, 2])) + (mkVersion [8, 4, 4])) (UnionVersionRanges (ThisVersion - (mkVersion [8, 0, 2])) + (mkVersion [8, 2, 2])) (UnionVersionRanges (ThisVersion - (mkVersion [7, 10, 3])) + (mkVersion [8, 0, 2])) (UnionVersionRanges (ThisVersion - (mkVersion [7, 8, 4])) + (mkVersion [7, 10, 3])) (UnionVersionRanges (ThisVersion - (mkVersion [7, 6, 3])) + (mkVersion [7, 8, 4])) + (UnionVersionRanges + (ThisVersion + (mkVersion [7, 6, 3])) + (ThisVersion + (mkVersion [7, 4, 2])))))))))], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "version set notation", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "network") + (MajorBoundVersion + (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "base") + (ThisVersion (mkVersion [1])) + mainLibSet, + Dependency + (PackageName "base") + (ThisVersion (mkVersion [1])) + mainLibSet, + Dependency + (PackageName "base") + (UnionVersionRanges + (ThisVersion (mkVersion [1])) + (ThisVersion (mkVersion [2]))) + mainLibSet, + Dependency + (PackageName "base") + (ThisVersion (mkVersion [1, 2])) + mainLibSet, + Dependency + (PackageName "base") + (UnionVersionRanges + (ThisVersion (mkVersion [1, 2])) + (ThisVersion + (mkVersion [3, 4]))) + mainLibSet, + Dependency + (PackageName "ghc") + (UnionVersionRanges + (ThisVersion + (mkVersion [8, 6, 3])) + (UnionVersionRanges + (ThisVersion + (mkVersion [8, 4, 4])) + (UnionVersionRanges + (ThisVersion + (mkVersion [8, 2, 2])) + (UnionVersionRanges + (ThisVersion + (mkVersion [8, 0, 2])) + (UnionVersionRanges + (ThisVersion + (mkVersion [7, 10, 3])) + (UnionVersionRanges + (ThisVersion + (mkVersion [7, 8, 4])) + (UnionVersionRanges + (ThisVersion + (mkVersion [7, 6, 3])) + (ThisVersion + (mkVersion [7, 4, 2]))))))))) + mainLibSet, + Dependency + (PackageName "Cabal") + (UnionVersionRanges + (MajorBoundVersion + (mkVersion [2, 4, 1, 1])) + (MajorBoundVersion + (mkVersion [2, 2, 0, 0]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "network") + (MajorBoundVersion + (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "base") + (ThisVersion (mkVersion [1])) + mainLibSet, + Dependency + (PackageName "base") + (ThisVersion (mkVersion [1])) + mainLibSet, + Dependency + (PackageName "base") + (UnionVersionRanges + (ThisVersion (mkVersion [1])) + (ThisVersion (mkVersion [2]))) + mainLibSet, + Dependency + (PackageName "base") + (ThisVersion (mkVersion [1, 2])) + mainLibSet, + Dependency + (PackageName "base") + (UnionVersionRanges + (ThisVersion (mkVersion [1, 2])) + (ThisVersion + (mkVersion [3, 4]))) + mainLibSet, + Dependency + (PackageName "ghc") + (UnionVersionRanges + (ThisVersion + (mkVersion [8, 6, 3])) + (UnionVersionRanges + (ThisVersion + (mkVersion [8, 4, 4])) + (UnionVersionRanges + (ThisVersion + (mkVersion [8, 2, 2])) + (UnionVersionRanges + (ThisVersion + (mkVersion [8, 0, 2])) + (UnionVersionRanges (ThisVersion - (mkVersion [7, 4, 2])))))))))], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "version set notation", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just + (mkVersion [7, 10, 3])) + (UnionVersionRanges + (ThisVersion + (mkVersion [7, 8, 4])) + (UnionVersionRanges + (ThisVersion + (mkVersion [7, 6, 3])) + (ThisVersion + (mkVersion [7, 4, 2]))))))))) + mainLibSet, + Dependency + (PackageName "Cabal") + (UnionVersionRanges + (MajorBoundVersion + (mkVersion [2, 4, 1, 1])) + (MajorBoundVersion + (mkVersion [2, 2, 0, 0]))) + mainLibSet], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -78,11 +281,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -259,9 +462,9 @@ GenericPackageDescription { (MajorBoundVersion (mkVersion [2, 2, 0, 0]))) mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}) + [] + [] + [] + [] + [] diff --git a/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.expr b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.expr index e4e6a457a3d..d17a50cf38f 100644 --- a/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.expr +++ b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.expr @@ -1,61 +1,251 @@ -GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_6, - package = PackageIdentifier { - pkgName = PackageName - "wl-pprint-indef", - pkgVersion = mkVersion [1, 2]}, - licenseRaw = Right BSD3, - licenseFiles = [ - SymbolicPath "LICENSE"], - copyright = "", - maintainer = - "Noam Lewis ", - author = "Daan Leijen", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "git@github.com:danidiaz/wl-pprint-indef.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "The Wadler/Leijen Pretty Printer", - description = - concat - [ - "This is a pretty printing library based on Wadler's paper \"A Prettier\n", - "Printer\". See the haddocks for full info. This version allows the\n", - "library user to declare overlapping instances of the 'Pretty' class."], - category = "Text", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just +`(,,,,,,)` + GenericPackageDescription { + packageDescription = + PackageDescription { + specVersion = CabalSpecV1_6, + package = PackageIdentifier { + pkgName = PackageName + "wl-pprint-indef", + pkgVersion = mkVersion [1, 2]}, + licenseRaw = Right BSD3, + licenseFiles = [ + SymbolicPath "LICENSE"], + copyright = "", + maintainer = + "Noam Lewis ", + author = "Daan Leijen", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "git@github.com:danidiaz/wl-pprint-indef.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "The Wadler/Leijen Pretty Printer", + description = + concat + [ + "This is a pretty printing library based on Wadler's paper \"A Prettier\n", + "Printer\". See the haddocks for full info. This version allows the\n", + "library user to declare overlapping instances of the 'Pretty' class."], + category = "Text", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersion = Nothing, + genPackageFlags = [], + condLibrary = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName + "Text.PrettyPrint.Leijen"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (EarlierVersion (mkVersion [5])) + mainLibSet, + Dependency + (PackageName "str-sig") + (OrLaterVersion + (mkVersion [0, 1, 0, 0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (EarlierVersion (mkVersion [5])) + mainLibSet, + Dependency + (PackageName "str-sig") + (OrLaterVersion + (mkVersion [0, 1, 0, 0])) + mainLibSet], + condTreeComponents = []}, + condSubLibraries = [], + condForeignLibs = [], + condExecutables = [ + _×_ + (UnqualComponentName + "wl-pprint-string-example") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "wl-pprint-string-example", + modulePath = SymbolicPath + "Main.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "example-string"], + otherModules = [ + ModuleName "StringImpl"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (EarlierVersion (mkVersion [5])) + mainLibSet, + Dependency + (PackageName "str-string") + (OrLaterVersion + (mkVersion [0, 1, 0, 0])) + mainLibSet, + Dependency + (PackageName "wl-pprint-indef") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (EarlierVersion (mkVersion [5])) + mainLibSet, + Dependency + (PackageName "str-string") + (OrLaterVersion + (mkVersion [0, 1, 0, 0])) + mainLibSet, + Dependency + (PackageName "wl-pprint-indef") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}], + condTestSuites = [], + condBenchmarks = []} + (Just CondNode { condTreeData = Library { libName = LMainLibName, @@ -72,11 +262,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -142,10 +332,10 @@ GenericPackageDescription { (OrLaterVersion (mkVersion [0, 1, 0, 0])) mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [ + condTreeComponents = []}) + [] + [] + [ _×_ (UnqualComponentName "wl-pprint-string-example") @@ -161,11 +351,11 @@ GenericPackageDescription { buildTools = [], buildToolDepends = [], cppOptions = [], - jsppOptions = [], asmOptions = [], cmmOptions = [], ccOptions = [], cxxOptions = [], + jsppOptions = [], ldOptions = [], hsc2hsOptions = [], pkgconfigDepends = [], @@ -241,6 +431,6 @@ GenericPackageDescription { (PackageName "wl-pprint-indef") (OrLaterVersion (mkVersion [0])) mainLibSet], - condTreeComponents = []}], - condTestSuites = [], - condBenchmarks = []} + condTreeComponents = []}] + [] + [] diff --git a/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs b/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs index f7e7ca5b7b6..39ec8ab9f05 100644 --- a/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs +++ b/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs @@ -56,6 +56,10 @@ instance ToExpr (SymbolicPathX allowAbs from to) instance ToExpr a => ToExpr (InstallDirs a) +-- For gpd and its accessors +-- Upstream only supports up to quintuples +instance (ToExpr a, ToExpr b, ToExpr c, ToExpr d, ToExpr e, ToExpr f, ToExpr g) => ToExpr (a, b, c, d, e, f, g) + instance ToExpr AbiDependency instance ToExpr AbiHash instance ToExpr Arch From 791eb8ca2f6cf450b0cb7c60d4db9840064f8742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 13 Nov 2025 21:46:02 +0800 Subject: [PATCH 36/60] test: check equality on each field --- Cabal-tests/tests/ParserTests.hs | 47 ++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/Cabal-tests/tests/ParserTests.hs b/Cabal-tests/tests/ParserTests.hs index d13e5207577..a15a2978391 100644 --- a/Cabal-tests/tests/ParserTests.hs +++ b/Cabal-tests/tests/ParserTests.hs @@ -16,7 +16,10 @@ import Data.Maybe (isNothing) import Distribution.Fields (pwarning) import Distribution.PackageDescription ( GenericPackageDescription - ( condLibrary + ( packageDescription + , gpdScannedVersion + , genPackageFlags + , condLibrary , condSubLibraries , condForeignLibs , condExecutables @@ -268,24 +271,38 @@ formatRoundTripTest fp = testCase "roundtrip" $ do x <- parse contents let contents' = showGenericPackageDescription x y <- parse (toUTF8BS contents') - -- previously we mangled licenses a bit - let y' = y + + let checkField field = + unless (field x == field y) $ {- FOURMOLU_DISABLE -} - unless (x == y') $ #ifdef MIN_VERSION_tree_diff - assertFailure $ unlines - [ "re-parsed doesn't match" - , show $ ansiWlEditExpr $ ediff x y - ] + assertFailure $ unlines + [ "re-parsed doesn't match" + , show $ ansiWlEditExpr $ ediff x y + ] #else - assertFailure $ unlines - [ "re-parsed doesn't match" - , "expected" - , show x - , "actual" - , show y - ] + assertFailure $ unlines + [ "re-parsed doesn't match" + , "expected" + , show x + , "actual" + , show y + ] #endif + -- Due to the imports being merged, the structural comparison will fail + -- Instead, we check the equality after merging + sequence_ + [ checkField packageDescription + , checkField gpdScannedVersion + , checkField genPackageFlags + , checkField condLibrary + , checkField condSubLibraries + , checkField condForeignLibs + , checkField condExecutables + , checkField condTestSuites + , checkField condBenchmarks + ] + where parse :: BS.ByteString -> IO GenericPackageDescription parse c = do From 70813d160679be5de7ae68a04f7ef0a4320d8c8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 14 Nov 2025 08:47:19 +0800 Subject: [PATCH 37/60] tests: use distinct file for each field --- Cabal-tests/tests/ParserTests.hs | 42 +- .../Octree-0.5.condBenchmarks.expr | 1 + .../Octree-0.5.condExecutables.expr | 1 + .../Octree-0.5.condForeignLibs.expr | 1 + .../regressions/Octree-0.5.condLibrary.expr | 109 + .../Octree-0.5.condSubLibraries.expr | 1 + .../Octree-0.5.condTestSuites.expr | 219 + .../ParserTests/regressions/Octree-0.5.expr | 737 - .../Octree-0.5.genPackageFlags.expr | 1 + .../Octree-0.5.gpdScannedVersion.expr | 1 + .../Octree-0.5.packageDescription.expr | 68 + .../regressions/anynone.condBenchmarks.expr | 1 + .../regressions/anynone.condExecutables.expr | 1 + .../regressions/anynone.condForeignLibs.expr | 1 + .../regressions/anynone.condLibrary.expr | 78 + .../regressions/anynone.condSubLibraries.expr | 1 + .../regressions/anynone.condTestSuites.expr | 1 + .../ParserTests/regressions/anynone.expr | 205 - .../regressions/anynone.genPackageFlags.expr | 1 + .../anynone.gpdScannedVersion.expr | 1 + .../anynone.packageDescription.expr | 34 + .../big-version.condBenchmarks.expr | 1 + .../big-version.condExecutables.expr | 1 + .../big-version.condForeignLibs.expr | 1 + .../regressions/big-version.condLibrary.expr | 69 + .../big-version.condSubLibraries.expr | 1 + .../big-version.condTestSuites.expr | 1 + .../ParserTests/regressions/big-version.expr | 189 - .../big-version.genPackageFlags.expr | 1 + .../big-version.gpdScannedVersion.expr | 1 + .../big-version.packageDescription.expr | 36 + .../common-conditional.condBenchmarks.expr | 1 + .../common-conditional.condExecutables.expr | 1 + .../common-conditional.condForeignLibs.expr | 1 + .../common-conditional.condLibrary.expr | 252 + .../common-conditional.condSubLibraries.expr | 1 + .../common-conditional.condTestSuites.expr | 405 + .../regressions/common-conditional.expr | 1378 -- .../common-conditional.genPackageFlags.expr | 6 + .../common-conditional.gpdScannedVersion.expr | 1 + ...common-conditional.packageDescription.expr | 46 + .../regressions/common.condBenchmarks.expr | 1 + .../regressions/common.condExecutables.expr | 1 + .../regressions/common.condForeignLibs.expr | 1 + .../regressions/common.condLibrary.expr | 78 + .../regressions/common.condSubLibraries.expr | 1 + .../regressions/common.condTestSuites.expr | 77 + .../tests/ParserTests/regressions/common.expr | 372 - .../regressions/common.genPackageFlags.expr | 1 + .../regressions/common.gpdScannedVersion.expr | 1 + .../common.packageDescription.expr | 49 + .../regressions/common2.condBenchmarks.expr | 1 + .../regressions/common2.condExecutables.expr | 1 + .../regressions/common2.condForeignLibs.expr | 1 + .../regressions/common2.condLibrary.expr | 181 + .../regressions/common2.condSubLibraries.expr | 187 + .../regressions/common2.condTestSuites.expr | 333 + .../ParserTests/regressions/common2.expr | 1458 -- .../regressions/common2.genPackageFlags.expr | 1 + .../common2.gpdScannedVersion.expr | 1 + .../common2.packageDescription.expr | 45 + .../regressions/common3.condBenchmarks.expr | 1 + .../regressions/common3.condExecutables.expr | 1 + .../regressions/common3.condForeignLibs.expr | 1 + .../regressions/common3.condLibrary.expr | 78 + .../regressions/common3.condSubLibraries.expr | 1 + .../regressions/common3.condTestSuites.expr | 101 + .../ParserTests/regressions/common3.expr | 420 - .../regressions/common3.genPackageFlags.expr | 1 + .../common3.gpdScannedVersion.expr | 1 + .../common3.packageDescription.expr | 49 + .../regressions/elif.condBenchmarks.expr | 1 + .../regressions/elif.condExecutables.expr | 1 + .../regressions/elif.condForeignLibs.expr | 1 + .../regressions/elif.condLibrary.expr | 149 + .../regressions/elif.condSubLibraries.expr | 1 + .../regressions/elif.condTestSuites.expr | 1 + .../tests/ParserTests/regressions/elif.expr | 357 - .../regressions/elif.genPackageFlags.expr | 1 + .../regressions/elif.gpdScannedVersion.expr | 1 + .../regressions/elif.packageDescription.expr | 44 + .../regressions/elif2.condBenchmarks.expr | 1 + .../regressions/elif2.condExecutables.expr | 1 + .../regressions/elif2.condForeignLibs.expr | 1 + .../regressions/elif2.condLibrary.expr | 362 + .../regressions/elif2.condSubLibraries.expr | 1 + .../regressions/elif2.condTestSuites.expr | 1 + .../tests/ParserTests/regressions/elif2.expr | 783 - .../regressions/elif2.genPackageFlags.expr | 1 + .../regressions/elif2.gpdScannedVersion.expr | 1 + .../regressions/elif2.packageDescription.expr | 44 + .../encoding-0.8.condBenchmarks.expr | 1 + .../encoding-0.8.condExecutables.expr | 1 + .../encoding-0.8.condForeignLibs.expr | 1 + .../regressions/encoding-0.8.condLibrary.expr | 90 + .../encoding-0.8.condSubLibraries.expr | 1 + .../encoding-0.8.condTestSuites.expr | 1 + .../ParserTests/regressions/encoding-0.8.expr | 244 - .../encoding-0.8.genPackageFlags.expr | 1 + .../encoding-0.8.gpdScannedVersion.expr | 1 + .../encoding-0.8.packageDescription.expr | 49 + .../generics-sop.condBenchmarks.expr | 1 + .../generics-sop.condExecutables.expr | 1 + .../generics-sop.condForeignLibs.expr | 1 + .../regressions/generics-sop.condLibrary.expr | 528 + .../generics-sop.condSubLibraries.expr | 1 + .../generics-sop.condTestSuites.expr | 194 + .../ParserTests/regressions/generics-sop.expr | 1582 -- .../generics-sop.genPackageFlags.expr | 1 + .../generics-sop.gpdScannedVersion.expr | 1 + .../generics-sop.packageDescription.expr | 125 + .../regressions/hasktorch.condBenchmarks.expr | 1 + .../hasktorch.condExecutables.expr | 412 + .../hasktorch.condForeignLibs.expr | 1 + .../regressions/hasktorch.condLibrary.expr | 1036 + .../hasktorch.condSubLibraries.expr | 8425 +++++++ .../regressions/hasktorch.condTestSuites.expr | 300 + .../ParserTests/regressions/hasktorch.expr | 20424 ---------------- .../hasktorch.genPackageFlags.expr | 13 + .../hasktorch.gpdScannedVersion.expr | 1 + .../hasktorch.packageDescription.expr | 56 + .../hidden-main-lib.condBenchmarks.expr | 1 + .../hidden-main-lib.condExecutables.expr | 1 + .../hidden-main-lib.condForeignLibs.expr | 1 + .../hidden-main-lib.condLibrary.expr | 78 + .../hidden-main-lib.condSubLibraries.expr | 1 + .../hidden-main-lib.condTestSuites.expr | 1 + .../regressions/hidden-main-lib.expr | 207 - .../hidden-main-lib.genPackageFlags.expr | 1 + .../hidden-main-lib.gpdScannedVersion.expr | 1 + .../hidden-main-lib.packageDescription.expr | 36 + .../indentation.condBenchmarks.expr | 1 + .../indentation.condExecutables.expr | 1 + .../indentation.condForeignLibs.expr | 1 + .../regressions/indentation.condLibrary.expr | 69 + .../indentation.condSubLibraries.expr | 1 + .../indentation.condTestSuites.expr | 1 + .../ParserTests/regressions/indentation.expr | 199 - .../indentation.genPackageFlags.expr | 1 + .../indentation.gpdScannedVersion.expr | 1 + .../indentation.packageDescription.expr | 46 + .../indentation2.condBenchmarks.expr | 1 + .../indentation2.condExecutables.expr | 1 + .../indentation2.condForeignLibs.expr | 1 + .../regressions/indentation2.condLibrary.expr | 69 + .../indentation2.condSubLibraries.expr | 1 + .../indentation2.condTestSuites.expr | 1 + .../ParserTests/regressions/indentation2.expr | 192 - .../indentation2.genPackageFlags.expr | 1 + .../indentation2.gpdScannedVersion.expr | 1 + .../indentation2.packageDescription.expr | 39 + .../indentation3.condBenchmarks.expr | 1 + .../indentation3.condExecutables.expr | 1 + .../indentation3.condForeignLibs.expr | 1 + .../regressions/indentation3.condLibrary.expr | 69 + .../indentation3.condSubLibraries.expr | 1 + .../indentation3.condTestSuites.expr | 1 + .../ParserTests/regressions/indentation3.expr | 194 - .../indentation3.genPackageFlags.expr | 1 + .../indentation3.gpdScannedVersion.expr | 1 + .../indentation3.packageDescription.expr | 41 + .../issue-5055.condBenchmarks.expr | 1 + .../issue-5055.condExecutables.expr | 86 + .../issue-5055.condForeignLibs.expr | 1 + .../regressions/issue-5055.condLibrary.expr | 1 + .../issue-5055.condSubLibraries.expr | 1 + .../issue-5055.condTestSuites.expr | 159 + .../ParserTests/regressions/issue-5055.expr | 539 - .../issue-5055.genPackageFlags.expr | 1 + .../issue-5055.gpdScannedVersion.expr | 1 + .../issue-5055.packageDescription.expr | 36 + .../issue-5846.condBenchmarks.expr | 1 + .../issue-5846.condExecutables.expr | 1 + .../issue-5846.condForeignLibs.expr | 1 + .../regressions/issue-5846.condLibrary.expr | 141 + .../issue-5846.condSubLibraries.expr | 1 + .../issue-5846.condTestSuites.expr | 1 + .../ParserTests/regressions/issue-5846.expr | 331 - .../issue-5846.genPackageFlags.expr | 1 + .../issue-5846.gpdScannedVersion.expr | 1 + .../issue-5846.packageDescription.expr | 34 + .../issue-6083-a.condBenchmarks.expr | 1 + .../issue-6083-a.condExecutables.expr | 177 + .../issue-6083-a.condForeignLibs.expr | 1 + .../regressions/issue-6083-a.condLibrary.expr | 95 + .../issue-6083-a.condSubLibraries.expr | 72 + .../issue-6083-a.condTestSuites.expr | 1 + .../ParserTests/regressions/issue-6083-a.expr | 733 - .../issue-6083-a.genPackageFlags.expr | 1 + .../issue-6083-a.gpdScannedVersion.expr | 1 + .../issue-6083-a.packageDescription.expr | 34 + .../issue-6083-b.condBenchmarks.expr | 1 + .../issue-6083-b.condExecutables.expr | 187 + .../issue-6083-b.condForeignLibs.expr | 1 + .../regressions/issue-6083-b.condLibrary.expr | 95 + .../issue-6083-b.condSubLibraries.expr | 72 + .../issue-6083-b.condTestSuites.expr | 1 + .../ParserTests/regressions/issue-6083-b.expr | 753 - .../issue-6083-b.genPackageFlags.expr | 1 + .../issue-6083-b.gpdScannedVersion.expr | 1 + .../issue-6083-b.packageDescription.expr | 34 + .../issue-6083-c.condBenchmarks.expr | 1 + .../issue-6083-c.condExecutables.expr | 1 + .../issue-6083-c.condForeignLibs.expr | 1 + .../regressions/issue-6083-c.condLibrary.expr | 95 + .../issue-6083-c.condSubLibraries.expr | 72 + .../issue-6083-c.condTestSuites.expr | 1 + .../ParserTests/regressions/issue-6083-c.expr | 381 - .../issue-6083-c.genPackageFlags.expr | 1 + .../issue-6083-c.gpdScannedVersion.expr | 1 + .../issue-6083-c.packageDescription.expr | 34 + .../issue-6083-pkg-pkg.condBenchmarks.expr | 1 + .../issue-6083-pkg-pkg.condExecutables.expr | 1 + .../issue-6083-pkg-pkg.condForeignLibs.expr | 1 + .../issue-6083-pkg-pkg.condLibrary.expr | 85 + .../issue-6083-pkg-pkg.condSubLibraries.expr | 1 + .../issue-6083-pkg-pkg.condTestSuites.expr | 1 + .../regressions/issue-6083-pkg-pkg.expr | 219 - .../issue-6083-pkg-pkg.genPackageFlags.expr | 1 + .../issue-6083-pkg-pkg.gpdScannedVersion.expr | 1 + ...issue-6083-pkg-pkg.packageDescription.expr | 34 + .../regressions/issue-774.condBenchmarks.expr | 1 + .../issue-774.condExecutables.expr | 1 + .../issue-774.condForeignLibs.expr | 1 + .../regressions/issue-774.condLibrary.expr | 74 + .../issue-774.condSubLibraries.expr | 1 + .../regressions/issue-774.condTestSuites.expr | 1 + .../ParserTests/regressions/issue-774.expr | 206 - .../issue-774.genPackageFlags.expr | 1 + .../issue-774.gpdScannedVersion.expr | 1 + .../issue-774.packageDescription.expr | 43 + .../jaeger-flamegraph.condBenchmarks.expr | 1 + .../jaeger-flamegraph.condExecutables.expr | 162 + .../jaeger-flamegraph.condForeignLibs.expr | 1 + .../jaeger-flamegraph.condLibrary.expr | 99 + .../jaeger-flamegraph.condSubLibraries.expr | 1 + .../jaeger-flamegraph.condTestSuites.expr | 137 + .../regressions/jaeger-flamegraph.expr | 882 - .../jaeger-flamegraph.genPackageFlags.expr | 1 + .../jaeger-flamegraph.gpdScannedVersion.expr | 1 + .../jaeger-flamegraph.packageDescription.expr | 75 + .../leading-comma-2.condBenchmarks.expr | 1 + .../leading-comma-2.condExecutables.expr | 1 + .../leading-comma-2.condForeignLibs.expr | 1 + .../leading-comma-2.condLibrary.expr | 125 + .../leading-comma-2.condSubLibraries.expr | 1 + .../leading-comma-2.condTestSuites.expr | 1 + .../regressions/leading-comma-2.expr | 301 - .../leading-comma-2.genPackageFlags.expr | 1 + .../leading-comma-2.gpdScannedVersion.expr | 1 + .../leading-comma-2.packageDescription.expr | 36 + .../leading-comma.condBenchmarks.expr | 1 + .../leading-comma.condExecutables.expr | 1 + .../leading-comma.condForeignLibs.expr | 1 + .../leading-comma.condLibrary.expr | 118 + .../leading-comma.condSubLibraries.expr | 1 + .../leading-comma.condTestSuites.expr | 1 + .../regressions/leading-comma.expr | 287 - .../leading-comma.genPackageFlags.expr | 1 + .../leading-comma.gpdScannedVersion.expr | 1 + .../leading-comma.packageDescription.expr | 36 + .../regressions/libpq1.condBenchmarks.expr | 1 + .../regressions/libpq1.condExecutables.expr | 1 + .../regressions/libpq1.condForeignLibs.expr | 1 + .../regressions/libpq1.condLibrary.expr | 641 + .../regressions/libpq1.condSubLibraries.expr | 1 + .../regressions/libpq1.condTestSuites.expr | 1 + .../tests/ParserTests/regressions/libpq1.expr | 1416 -- .../regressions/libpq1.genPackageFlags.expr | 7 + .../regressions/libpq1.gpdScannedVersion.expr | 1 + .../libpq1.packageDescription.expr | 113 + .../regressions/libpq2.condBenchmarks.expr | 1 + .../regressions/libpq2.condExecutables.expr | 1 + .../regressions/libpq2.condForeignLibs.expr | 1 + .../regressions/libpq2.condLibrary.expr | 639 + .../regressions/libpq2.condSubLibraries.expr | 1 + .../regressions/libpq2.condTestSuites.expr | 1 + .../tests/ParserTests/regressions/libpq2.expr | 1416 -- .../regressions/libpq2.genPackageFlags.expr | 7 + .../regressions/libpq2.gpdScannedVersion.expr | 1 + .../libpq2.packageDescription.expr | 117 + .../regressions/mixin-1.condBenchmarks.expr | 1 + .../regressions/mixin-1.condExecutables.expr | 122 + .../regressions/mixin-1.condForeignLibs.expr | 1 + .../regressions/mixin-1.condLibrary.expr | 1 + .../regressions/mixin-1.condSubLibraries.expr | 1 + .../regressions/mixin-1.condTestSuites.expr | 1 + .../ParserTests/regressions/mixin-1.expr | 293 - .../regressions/mixin-1.genPackageFlags.expr | 1 + .../mixin-1.gpdScannedVersion.expr | 1 + .../mixin-1.packageDescription.expr | 34 + .../regressions/mixin-2.condBenchmarks.expr | 1 + .../regressions/mixin-2.condExecutables.expr | 122 + .../regressions/mixin-2.condForeignLibs.expr | 1 + .../regressions/mixin-2.condLibrary.expr | 1 + .../regressions/mixin-2.condSubLibraries.expr | 1 + .../regressions/mixin-2.condTestSuites.expr | 1 + .../ParserTests/regressions/mixin-2.expr | 293 - .../regressions/mixin-2.genPackageFlags.expr | 1 + .../mixin-2.gpdScannedVersion.expr | 1 + .../mixin-2.packageDescription.expr | 34 + .../regressions/mixin-3.condBenchmarks.expr | 1 + .../regressions/mixin-3.condExecutables.expr | 105 + .../regressions/mixin-3.condForeignLibs.expr | 1 + .../regressions/mixin-3.condLibrary.expr | 1 + .../regressions/mixin-3.condSubLibraries.expr | 1 + .../regressions/mixin-3.condTestSuites.expr | 1 + .../ParserTests/regressions/mixin-3.expr | 259 - .../regressions/mixin-3.genPackageFlags.expr | 1 + .../mixin-3.gpdScannedVersion.expr | 1 + .../mixin-3.packageDescription.expr | 34 + .../monad-param.condBenchmarks.expr | 1 + .../monad-param.condExecutables.expr | 1 + .../monad-param.condForeignLibs.expr | 1 + .../regressions/monad-param.condLibrary.expr | 109 + .../monad-param.condSubLibraries.expr | 1 + .../monad-param.condTestSuites.expr | 1 + .../ParserTests/regressions/monad-param.expr | 277 - .../monad-param.genPackageFlags.expr | 1 + .../monad-param.gpdScannedVersion.expr | 1 + .../monad-param.packageDescription.expr | 44 + .../multiple-libs-2.condBenchmarks.expr | 1 + .../multiple-libs-2.condExecutables.expr | 1 + .../multiple-libs-2.condForeignLibs.expr | 1 + .../multiple-libs-2.condLibrary.expr | 78 + .../multiple-libs-2.condSubLibraries.expr | 81 + .../multiple-libs-2.condTestSuites.expr | 1 + .../regressions/multiple-libs-2.expr | 367 - .../multiple-libs-2.genPackageFlags.expr | 1 + .../multiple-libs-2.gpdScannedVersion.expr | 1 + .../multiple-libs-2.packageDescription.expr | 36 + .../regressions/noVersion.condBenchmarks.expr | 1 + .../noVersion.condExecutables.expr | 1 + .../noVersion.condForeignLibs.expr | 1 + .../regressions/noVersion.condLibrary.expr | 78 + .../noVersion.condSubLibraries.expr | 1 + .../regressions/noVersion.condTestSuites.expr | 1 + .../ParserTests/regressions/noVersion.expr | 207 - .../noVersion.genPackageFlags.expr | 1 + .../noVersion.gpdScannedVersion.expr | 1 + .../noVersion.packageDescription.expr | 36 + .../nothing-unicode.condBenchmarks.expr | 1 + .../nothing-unicode.condExecutables.expr | 1 + .../nothing-unicode.condForeignLibs.expr | 1 + .../nothing-unicode.condLibrary.expr | 141 + .../nothing-unicode.condSubLibraries.expr | 1 + .../nothing-unicode.condTestSuites.expr | 1 + .../regressions/nothing-unicode.expr | 348 - .../nothing-unicode.genPackageFlags.expr | 6 + .../nothing-unicode.gpdScannedVersion.expr | 1 + .../nothing-unicode.packageDescription.expr | 46 + .../regressions/shake.condBenchmarks.expr | 1 + .../regressions/shake.condExecutables.expr | 759 + .../regressions/shake.condForeignLibs.expr | 1 + .../regressions/shake.condLibrary.expr | 681 + .../regressions/shake.condSubLibraries.expr | 1 + .../regressions/shake.condTestSuites.expr | 900 + .../tests/ParserTests/regressions/shake.expr | 4848 ---- .../regressions/shake.genPackageFlags.expr | 7 + .../regressions/shake.gpdScannedVersion.expr | 1 + .../regressions/shake.packageDescription.expr | 151 + .../regressions/spdx-1.condBenchmarks.expr | 1 + .../regressions/spdx-1.condExecutables.expr | 1 + .../regressions/spdx-1.condForeignLibs.expr | 1 + .../regressions/spdx-1.condLibrary.expr | 69 + .../regressions/spdx-1.condSubLibraries.expr | 1 + .../regressions/spdx-1.condTestSuites.expr | 1 + .../tests/ParserTests/regressions/spdx-1.expr | 188 - .../regressions/spdx-1.genPackageFlags.expr | 1 + .../regressions/spdx-1.gpdScannedVersion.expr | 1 + .../spdx-1.packageDescription.expr | 35 + .../regressions/spdx-2.condBenchmarks.expr | 1 + .../regressions/spdx-2.condExecutables.expr | 1 + .../regressions/spdx-2.condForeignLibs.expr | 1 + .../regressions/spdx-2.condLibrary.expr | 69 + .../regressions/spdx-2.condSubLibraries.expr | 1 + .../regressions/spdx-2.condTestSuites.expr | 1 + .../tests/ParserTests/regressions/spdx-2.expr | 192 - .../regressions/spdx-2.genPackageFlags.expr | 1 + .../regressions/spdx-2.gpdScannedVersion.expr | 1 + .../spdx-2.packageDescription.expr | 39 + .../regressions/spdx-3.condBenchmarks.expr | 1 + .../regressions/spdx-3.condExecutables.expr | 1 + .../regressions/spdx-3.condForeignLibs.expr | 1 + .../regressions/spdx-3.condLibrary.expr | 69 + .../regressions/spdx-3.condSubLibraries.expr | 1 + .../regressions/spdx-3.condTestSuites.expr | 1 + .../tests/ParserTests/regressions/spdx-3.expr | 192 - .../regressions/spdx-3.genPackageFlags.expr | 1 + .../regressions/spdx-3.gpdScannedVersion.expr | 1 + .../spdx-3.packageDescription.expr | 39 + .../th-lift-instances.condBenchmarks.expr | 1 + .../th-lift-instances.condExecutables.expr | 1 + .../th-lift-instances.condForeignLibs.expr | 1 + .../th-lift-instances.condLibrary.expr | 171 + .../th-lift-instances.condSubLibraries.expr | 1 + .../th-lift-instances.condTestSuites.expr | 360 + .../regressions/th-lift-instances.expr | 1138 - .../th-lift-instances.genPackageFlags.expr | 1 + .../th-lift-instances.gpdScannedVersion.expr | 1 + .../th-lift-instances.packageDescription.expr | 63 + .../version-sets.condBenchmarks.expr | 1 + .../version-sets.condExecutables.expr | 1 + .../version-sets.condForeignLibs.expr | 1 + .../regressions/version-sets.condLibrary.expr | 197 + .../version-sets.condSubLibraries.expr | 1 + .../version-sets.condTestSuites.expr | 1 + .../ParserTests/regressions/version-sets.expr | 470 - .../version-sets.genPackageFlags.expr | 1 + .../version-sets.gpdScannedVersion.expr | 1 + .../version-sets.packageDescription.expr | 61 + .../wl-pprint-indef.condBenchmarks.expr | 1 + .../wl-pprint-indef.condExecutables.expr | 97 + .../wl-pprint-indef.condForeignLibs.expr | 1 + .../wl-pprint-indef.condLibrary.expr | 88 + .../wl-pprint-indef.condSubLibraries.expr | 1 + .../wl-pprint-indef.condTestSuites.expr | 1 + .../regressions/wl-pprint-indef.expr | 436 - .../wl-pprint-indef.genPackageFlags.expr | 1 + .../wl-pprint-indef.gpdScannedVersion.expr | 1 + .../wl-pprint-indef.packageDescription.expr | 53 + 421 files changed, 24047 insertions(+), 45932 deletions(-) create mode 100644 Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/Octree-0.5.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/Octree-0.5.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/Octree-0.5.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/Octree-0.5.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/anynone.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/anynone.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/anynone.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/anynone.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/anynone.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/anynone.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/anynone.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/anynone.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/anynone.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/anynone.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/big-version.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/big-version.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/big-version.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/big-version.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/big-version.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/big-version.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/big-version.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/big-version.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/big-version.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/big-version.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common-conditional.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common-conditional.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common-conditional.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common-conditional.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common-conditional.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common-conditional.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/common-conditional.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common-conditional.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common-conditional.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common-conditional.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/common.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common2.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common2.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common2.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common2.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common2.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common2.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/common2.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common2.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common2.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common2.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common3.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common3.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common3.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common3.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common3.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common3.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/common3.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common3.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common3.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/common3.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/elif.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/elif.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/elif.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/elif.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/elif.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/elif.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/elif.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/elif.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/elif.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/elif.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/elif2.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/elif2.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/elif2.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/elif2.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/elif2.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/elif2.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/elif2.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/elif2.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/elif2.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/elif2.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/encoding-0.8.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/encoding-0.8.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/encoding-0.8.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/encoding-0.8.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/generics-sop.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/generics-sop.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/generics-sop.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/generics-sop.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/generics-sop.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/generics-sop.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/generics-sop.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/generics-sop.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/generics-sop.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/generics-sop.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/hasktorch.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/hasktorch.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/hasktorch.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/hasktorch.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/hasktorch.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/hasktorch.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/hasktorch.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/hasktorch.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/hasktorch.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/hasktorch.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation2.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation2.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation2.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation2.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation2.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation2.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation2.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation2.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation2.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation2.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation3.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation3.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation3.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation3.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation3.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation3.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation3.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation3.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation3.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/indentation3.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-5055.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-5055.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-5055.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-5055.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-5055.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-5055.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-5055.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-5055.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-5055.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-5055.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-5846.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-5846.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-5846.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-5846.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-5846.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-5846.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-5846.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-5846.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-5846.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-5846.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-a.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-a.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-a.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-a.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-b.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-b.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-b.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-b.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-c.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-c.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-c.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-c.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-774.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-774.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-774.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-774.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-774.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-774.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-774.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-774.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-774.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/issue-774.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/leading-comma-2.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/leading-comma-2.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/leading-comma-2.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/leading-comma-2.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/leading-comma.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/leading-comma.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/leading-comma.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/leading-comma.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/leading-comma.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/leading-comma.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/leading-comma.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/leading-comma.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/leading-comma.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/leading-comma.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/libpq1.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/libpq1.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/libpq1.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/libpq1.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/libpq1.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/libpq1.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/libpq1.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/libpq1.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/libpq1.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/libpq1.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/libpq2.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/libpq2.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/libpq2.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/libpq2.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/libpq2.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/libpq2.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/libpq2.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/libpq2.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/libpq2.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/libpq2.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-1.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-1.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-1.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-1.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-1.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-1.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-1.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-1.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-1.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-1.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-2.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-2.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-2.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-2.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-2.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-2.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-2.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-2.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-2.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-2.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-3.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-3.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-3.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-3.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-3.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-3.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-3.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-3.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-3.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/mixin-3.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/monad-param.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/monad-param.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/monad-param.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/monad-param.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/monad-param.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/monad-param.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/monad-param.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/monad-param.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/monad-param.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/monad-param.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/noVersion.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/noVersion.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/noVersion.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/noVersion.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/noVersion.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/noVersion.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/noVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/noVersion.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/noVersion.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/noVersion.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/nothing-unicode.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/nothing-unicode.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/nothing-unicode.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/nothing-unicode.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/shake.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/shake.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/shake.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/shake.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/shake.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/shake.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/shake.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/shake.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/shake.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/shake.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-1.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-1.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-1.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-1.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-1.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-1.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-1.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-1.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-1.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-1.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-2.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-2.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-2.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-2.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-2.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-2.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-2.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-2.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-2.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-2.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-3.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-3.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-3.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-3.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-3.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-3.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-3.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-3.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-3.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/spdx-3.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/th-lift-instances.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/th-lift-instances.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/th-lift-instances.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/th-lift-instances.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/version-sets.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/version-sets.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/version-sets.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/version-sets.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/version-sets.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/version-sets.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/version-sets.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/version-sets.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/version-sets.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/version-sets.packageDescription.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condBenchmarks.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condExecutables.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condForeignLibs.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condLibrary.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condSubLibraries.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condTestSuites.expr delete mode 100644 Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.genPackageFlags.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.gpdScannedVersion.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.packageDescription.expr diff --git a/Cabal-tests/tests/ParserTests.hs b/Cabal-tests/tests/ParserTests.hs index a15a2978391..43174271c4f 100644 --- a/Cabal-tests/tests/ParserTests.hs +++ b/Cabal-tests/tests/ParserTests.hs @@ -244,25 +244,29 @@ formatGoldenTest fp = cabalGoldenTest "format" correct $ do #ifdef MIN_VERSION_tree_diff treeDiffGoldenTest :: FilePath -> TestTree -treeDiffGoldenTest fp = ediffGolden goldenTest "expr" exprFile $ do - contents <- BS.readFile input - let res = withSource (PCabalFile (fp, contents)) $ parseGenericPackageDescription contents - let (_, x) = runParseResult res - case x of - Right gpd -> pure $ toExpr - ( gpd - -- Test accessors because they encapsulate the merging behaviour - , condLibrary gpd - , condSubLibraries gpd - , condForeignLibs gpd - , condExecutables gpd - , condTestSuites gpd - , condBenchmarks gpd - ) - Left (_, errs) -> fail $ unlines $ "ERROR" : map (showPErrorWithSource . fmap renderCabalFileSource) (NE.toList errs) - where - input = "tests" "ParserTests" "regressions" fp - exprFile = replaceExtension input "expr" +treeDiffGoldenTest fp = + let go label f = ediffGolden goldenTest label exprFile $ do + contents <- BS.readFile input + let res = withSource (PCabalFile (fp, contents)) $ parseGenericPackageDescription contents + let (_, x) = runParseResult res + case x of + Right gpd -> pure (toExpr $ f gpd) + Left (_, errs) -> fail $ unlines $ "ERROR" : map (showPErrorWithSource . fmap renderCabalFileSource) (NE.toList errs) + where + input = "tests" "ParserTests" "regressions" fp + exprFile = replaceExtension input (label <> ".expr") + in testGroup "expr" + [ go "packageDescription" packageDescription + , go "gpdScannedVersion" gpdScannedVersion + , go "genPackageFlags" genPackageFlags + -- Test accessors because they encapsulate the merging behaviour + , go "condLibrary" condLibrary + , go "condSubLibraries" condSubLibraries + , go "condForeignLibs" condForeignLibs + , go "condExecutables" condExecutables + , go "condTestSuites" condTestSuites + , go "condBenchmarks" condBenchmarks + ] #endif formatRoundTripTest :: FilePath -> TestTree diff --git a/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condLibrary.expr new file mode 100644 index 00000000000..3238fef0f66 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condLibrary.expr @@ -0,0 +1,109 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "Data.Octree"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [ + ModuleName + "Data.Octree.Internal"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [ + EnableExtension + ScopedTypeVariables], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 0])) + (EarlierVersion + (mkVersion [4, 7]))) + mainLibSet, + Dependency + (PackageName "AC-Vector") + (OrLaterVersion + (mkVersion [2, 3, 0])) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (OrLaterVersion + (mkVersion [2, 4, 0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 0])) + (EarlierVersion + (mkVersion [4, 7]))) + mainLibSet, + Dependency + (PackageName "AC-Vector") + (OrLaterVersion + (mkVersion [2, 3, 0])) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (OrLaterVersion + (mkVersion [2, 4, 0])) + mainLibSet], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condTestSuites.expr new file mode 100644 index 00000000000..4acb3c74a80 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.condTestSuites.expr @@ -0,0 +1,219 @@ +[ + _×_ + (UnqualComponentName + "test_Octree") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath + "tests/test_Octree.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 0])) + (EarlierVersion + (mkVersion [4, 7]))) + mainLibSet, + Dependency + (PackageName "AC-Vector") + (OrLaterVersion + (mkVersion [2, 3, 0])) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (OrLaterVersion + (mkVersion [2, 4, 0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 0])) + (EarlierVersion + (mkVersion [4, 7]))) + mainLibSet, + Dependency + (PackageName "AC-Vector") + (OrLaterVersion + (mkVersion [2, 3, 0])) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (OrLaterVersion + (mkVersion [2, 4, 0])) + mainLibSet], + condTreeComponents = []}, + _×_ + (UnqualComponentName "readme") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "README.lhs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-pgmL", "markdown-unlit"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 0])) + (EarlierVersion + (mkVersion [4, 7]))) + mainLibSet, + Dependency + (PackageName "AC-Vector") + (OrLaterVersion + (mkVersion [2, 3, 0])) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (OrLaterVersion + (mkVersion [2, 4, 0])) + mainLibSet, + Dependency + (PackageName "markdown-unlit") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 0])) + (EarlierVersion + (mkVersion [4, 7]))) + mainLibSet, + Dependency + (PackageName "AC-Vector") + (OrLaterVersion + (mkVersion [2, 3, 0])) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (OrLaterVersion + (mkVersion [2, 4, 0])) + mainLibSet, + Dependency + (PackageName "markdown-unlit") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}] diff --git a/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.expr b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.expr deleted file mode 100644 index d6bab7e77ed..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.expr +++ /dev/null @@ -1,737 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_8, - package = PackageIdentifier { - pkgName = PackageName "Octree", - pkgVersion = mkVersion [0, 5]}, - licenseRaw = Right BSD3, - licenseFiles = [ - SymbolicPath "LICENSE"], - copyright = - "Copyright by Michal J. Gajda '2012", - maintainer = - "mjgajda@googlemail.com", - author = "Michal J. Gajda", - stability = "beta", - testedWith = [ - _×_ - GHC - (ThisVersion - (mkVersion [7, 0, 4])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 4, 1])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 4, 2])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 6, 0]))], - homepage = - "https://github.com/mgajda/octree", - pkgUrl = - "http://hackage.haskell.org/package/octree", - bugReports = - "mailto:mjgajda@googlemail.com", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "git@github.com:mgajda/octree.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "Simple unbalanced Octree for storing data about 3D points", - description = - "Octree data structure is relatively shallow data structure for space partitioning.", - category = "Data", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "Data.Octree"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [ - ModuleName - "Data.Octree.Internal"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [ - EnableExtension - ScopedTypeVariables], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 0])) - (EarlierVersion - (mkVersion [4, 7]))) - mainLibSet, - Dependency - (PackageName "AC-Vector") - (OrLaterVersion - (mkVersion [2, 3, 0])) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (OrLaterVersion - (mkVersion [2, 4, 0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 0])) - (EarlierVersion - (mkVersion [4, 7]))) - mainLibSet, - Dependency - (PackageName "AC-Vector") - (OrLaterVersion - (mkVersion [2, 3, 0])) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (OrLaterVersion - (mkVersion [2, 4, 0])) - mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [ - _×_ - (UnqualComponentName - "test_Octree") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath - "tests/test_Octree.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 0])) - (EarlierVersion - (mkVersion [4, 7]))) - mainLibSet, - Dependency - (PackageName "AC-Vector") - (OrLaterVersion - (mkVersion [2, 3, 0])) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (OrLaterVersion - (mkVersion [2, 4, 0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 0])) - (EarlierVersion - (mkVersion [4, 7]))) - mainLibSet, - Dependency - (PackageName "AC-Vector") - (OrLaterVersion - (mkVersion [2, 3, 0])) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (OrLaterVersion - (mkVersion [2, 4, 0])) - mainLibSet], - condTreeComponents = []}, - _×_ - (UnqualComponentName "readme") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "README.lhs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-pgmL", "markdown-unlit"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 0])) - (EarlierVersion - (mkVersion [4, 7]))) - mainLibSet, - Dependency - (PackageName "AC-Vector") - (OrLaterVersion - (mkVersion [2, 3, 0])) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (OrLaterVersion - (mkVersion [2, 4, 0])) - mainLibSet, - Dependency - (PackageName "markdown-unlit") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 0])) - (EarlierVersion - (mkVersion [4, 7]))) - mainLibSet, - Dependency - (PackageName "AC-Vector") - (OrLaterVersion - (mkVersion [2, 3, 0])) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (OrLaterVersion - (mkVersion [2, 4, 0])) - mainLibSet, - Dependency - (PackageName "markdown-unlit") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "Data.Octree"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [ - ModuleName - "Data.Octree.Internal"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [ - EnableExtension - ScopedTypeVariables], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 0])) - (EarlierVersion - (mkVersion [4, 7]))) - mainLibSet, - Dependency - (PackageName "AC-Vector") - (OrLaterVersion - (mkVersion [2, 3, 0])) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (OrLaterVersion - (mkVersion [2, 4, 0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 0])) - (EarlierVersion - (mkVersion [4, 7]))) - mainLibSet, - Dependency - (PackageName "AC-Vector") - (OrLaterVersion - (mkVersion [2, 3, 0])) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (OrLaterVersion - (mkVersion [2, 4, 0])) - mainLibSet], - condTreeComponents = []}) - [] - [] - [] - [ - _×_ - (UnqualComponentName - "test_Octree") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath - "tests/test_Octree.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 0])) - (EarlierVersion - (mkVersion [4, 7]))) - mainLibSet, - Dependency - (PackageName "AC-Vector") - (OrLaterVersion - (mkVersion [2, 3, 0])) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (OrLaterVersion - (mkVersion [2, 4, 0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 0])) - (EarlierVersion - (mkVersion [4, 7]))) - mainLibSet, - Dependency - (PackageName "AC-Vector") - (OrLaterVersion - (mkVersion [2, 3, 0])) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (OrLaterVersion - (mkVersion [2, 4, 0])) - mainLibSet], - condTreeComponents = []}, - _×_ - (UnqualComponentName "readme") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "README.lhs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-pgmL", "markdown-unlit"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 0])) - (EarlierVersion - (mkVersion [4, 7]))) - mainLibSet, - Dependency - (PackageName "AC-Vector") - (OrLaterVersion - (mkVersion [2, 3, 0])) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (OrLaterVersion - (mkVersion [2, 4, 0])) - mainLibSet, - Dependency - (PackageName "markdown-unlit") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 0])) - (EarlierVersion - (mkVersion [4, 7]))) - mainLibSet, - Dependency - (PackageName "AC-Vector") - (OrLaterVersion - (mkVersion [2, 3, 0])) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (OrLaterVersion - (mkVersion [2, 4, 0])) - mainLibSet, - Dependency - (PackageName "markdown-unlit") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.packageDescription.expr new file mode 100644 index 00000000000..1d3cf682eb0 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.packageDescription.expr @@ -0,0 +1,68 @@ +PackageDescription { + specVersion = CabalSpecV1_8, + package = PackageIdentifier { + pkgName = PackageName "Octree", + pkgVersion = mkVersion [0, 5]}, + licenseRaw = Right BSD3, + licenseFiles = [ + SymbolicPath "LICENSE"], + copyright = + "Copyright by Michal J. Gajda '2012", + maintainer = + "mjgajda@googlemail.com", + author = "Michal J. Gajda", + stability = "beta", + testedWith = [ + _×_ + GHC + (ThisVersion + (mkVersion [7, 0, 4])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 4, 1])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 4, 2])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 6, 0]))], + homepage = + "https://github.com/mgajda/octree", + pkgUrl = + "http://hackage.haskell.org/package/octree", + bugReports = + "mailto:mjgajda@googlemail.com", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "git@github.com:mgajda/octree.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Simple unbalanced Octree for storing data about 3D points", + description = + "Octree data structure is relatively shallow data structure for space partitioning.", + category = "Data", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/anynone.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/anynone.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/anynone.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/anynone.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/anynone.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/anynone.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/anynone.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/anynone.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/anynone.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/anynone.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/anynone.condLibrary.expr new file mode 100644 index 00000000000..ddc7e748430 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/anynone.condLibrary.expr @@ -0,0 +1,78 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "AnyNone"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/anynone.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/anynone.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/anynone.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/anynone.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/anynone.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/anynone.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/anynone.expr b/Cabal-tests/tests/ParserTests/regressions/anynone.expr deleted file mode 100644 index 6bd1ad53ed5..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/anynone.expr +++ /dev/null @@ -1,205 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName "anynone", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "The -any none demo", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "AnyNone"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "AnyNone"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/anynone.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/anynone.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/anynone.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/anynone.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/anynone.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/anynone.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/anynone.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/anynone.packageDescription.expr new file mode 100644 index 00000000000..9f37dbb5280 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/anynone.packageDescription.expr @@ -0,0 +1,34 @@ +PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName "anynone", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "The -any none demo", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/big-version.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/big-version.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/big-version.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/big-version.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/big-version.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/big-version.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/big-version.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/big-version.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/big-version.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/big-version.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/big-version.condLibrary.expr new file mode 100644 index 00000000000..acc4281010f --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/big-version.condLibrary.expr @@ -0,0 +1,69 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/big-version.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/big-version.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/big-version.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/big-version.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/big-version.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/big-version.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/big-version.expr b/Cabal-tests/tests/ParserTests/regressions/big-version.expr deleted file mode 100644 index e0214ae62f7..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/big-version.expr +++ /dev/null @@ -1,189 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName - "big-version", - pkgVersion = mkVersion - [123456789]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/big-version.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/big-version.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/big-version.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/big-version.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/big-version.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/big-version.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/big-version.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/big-version.packageDescription.expr new file mode 100644 index 00000000000..6b6f2eb5bd5 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/big-version.packageDescription.expr @@ -0,0 +1,36 @@ +PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName + "big-version", + pkgVersion = mkVersion + [123456789]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/common-conditional.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/common-conditional.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common-conditional.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/common-conditional.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/common-conditional.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common-conditional.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/common-conditional.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/common-conditional.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common-conditional.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/common-conditional.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/common-conditional.condLibrary.expr new file mode 100644 index 00000000000..0e3d49ae740 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common-conditional.condLibrary.expr @@ -0,0 +1,252 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "ElseIf"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "foo"))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}, + condBranchIfFalse = Nothing}]} diff --git a/Cabal-tests/tests/ParserTests/regressions/common-conditional.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/common-conditional.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common-conditional.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/common-conditional.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/common-conditional.condTestSuites.expr new file mode 100644 index 00000000000..f0110fa556a --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common-conditional.condTestSuites.expr @@ -0,0 +1,405 @@ +[ + _×_ + (UnqualComponentName "tests") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "Tests.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "HUnit") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "HUnit") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = False, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "foo"))`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}, + condBranchIfFalse = Nothing}]}] diff --git a/Cabal-tests/tests/ParserTests/regressions/common-conditional.expr b/Cabal-tests/tests/ParserTests/regressions/common-conditional.expr deleted file mode 100644 index 7d6de691f2a..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/common-conditional.expr +++ /dev/null @@ -1,1378 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName - "common-conditional", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/hvr/-.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "Common-stanza demo demo", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [ - MkPackageFlag { - flagName = FlagName "foo", - flagDescription = "", - flagDefault = True, - flagManual = True}], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "ElseIf"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "foo"))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condBranchIfFalse = Nothing}]}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [ - _×_ - (UnqualComponentName "tests") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "Tests.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "HUnit") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "HUnit") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = False, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "foo"))`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condBranchIfFalse = Nothing}]}], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "ElseIf"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "foo"))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condBranchIfFalse = Nothing}]}) - [] - [] - [] - [ - _×_ - (UnqualComponentName "tests") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "Tests.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "HUnit") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "HUnit") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = False, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "foo"))`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condBranchIfFalse = Nothing}]}] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/common-conditional.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/common-conditional.genPackageFlags.expr new file mode 100644 index 00000000000..e28e3de5409 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common-conditional.genPackageFlags.expr @@ -0,0 +1,6 @@ +[ + MkPackageFlag { + flagName = FlagName "foo", + flagDescription = "", + flagDefault = True, + flagManual = True}] diff --git a/Cabal-tests/tests/ParserTests/regressions/common-conditional.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/common-conditional.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common-conditional.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/common-conditional.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/common-conditional.packageDescription.expr new file mode 100644 index 00000000000..f9bbedb99bb --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common-conditional.packageDescription.expr @@ -0,0 +1,46 @@ +PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName + "common-conditional", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/hvr/-.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Common-stanza demo demo", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/common.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/common.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/common.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/common.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/common.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/common.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/common.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/common.condLibrary.expr new file mode 100644 index 00000000000..d2670399e96 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common.condLibrary.expr @@ -0,0 +1,78 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "ElseIf"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/common.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/common.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/common.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/common.condTestSuites.expr new file mode 100644 index 00000000000..3c9a50860f2 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common.condTestSuites.expr @@ -0,0 +1,77 @@ +[ + _×_ + (UnqualComponentName "tests") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "Tests.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "HUnit") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "HUnit") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}] diff --git a/Cabal-tests/tests/ParserTests/regressions/common.expr b/Cabal-tests/tests/ParserTests/regressions/common.expr deleted file mode 100644 index 370320c539c..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/common.expr +++ /dev/null @@ -1,372 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_10, - package = PackageIdentifier { - pkgName = PackageName "common", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/hvr/-.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "Common-stanza demo demo", - description = "", - category = "", - customFieldsPD = [ - _×_ "x-revision" "1", - _×_ - "x-follows-version-policy" - ""], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "ElseIf"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [ - _×_ - (UnqualComponentName "tests") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "Tests.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "HUnit") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "HUnit") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "ElseIf"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}) - [] - [] - [] - [ - _×_ - (UnqualComponentName "tests") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "Tests.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "HUnit") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "HUnit") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/common.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/common.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/common.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/common.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/common.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/common.packageDescription.expr new file mode 100644 index 00000000000..7fe8c58c01c --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common.packageDescription.expr @@ -0,0 +1,49 @@ +PackageDescription { + specVersion = CabalSpecV1_10, + package = PackageIdentifier { + pkgName = PackageName "common", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/hvr/-.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Common-stanza demo demo", + description = "", + category = "", + customFieldsPD = [ + _×_ "x-revision" "1", + _×_ + "x-follows-version-policy" + ""], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/common2.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/common2.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common2.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/common2.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/common2.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common2.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/common2.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/common2.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common2.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/common2.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/common2.condLibrary.expr new file mode 100644 index 00000000000..ab9d347d4e0 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common2.condLibrary.expr @@ -0,0 +1,181 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "ElseIf"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]} diff --git a/Cabal-tests/tests/ParserTests/regressions/common2.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/common2.condSubLibraries.expr new file mode 100644 index 00000000000..b8f3d8fb865 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common2.condSubLibraries.expr @@ -0,0 +1,187 @@ +[ + _×_ + (UnqualComponentName "internal") + CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName + "internal"), + exposedModules = [ + ModuleName "ElseIf2"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName + "internal"), + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}] diff --git a/Cabal-tests/tests/ParserTests/regressions/common2.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/common2.condTestSuites.expr new file mode 100644 index 00000000000..0a139c37f93 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common2.condTestSuites.expr @@ -0,0 +1,333 @@ +[ + _×_ + (UnqualComponentName "tests") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "Tests.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "HUnit") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "HUnit") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = False, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}] diff --git a/Cabal-tests/tests/ParserTests/regressions/common2.expr b/Cabal-tests/tests/ParserTests/regressions/common2.expr deleted file mode 100644 index edb5f4a663b..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/common2.expr +++ /dev/null @@ -1,1458 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_2, - package = PackageIdentifier { - pkgName = PackageName "common", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/hvr/-.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "Common-stanza demo demo", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "ElseIf"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condSubLibraries = [ - _×_ - (UnqualComponentName "internal") - CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName - "internal"), - exposedModules = [ - ModuleName "ElseIf2"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName - "internal"), - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [ - _×_ - (UnqualComponentName "tests") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "Tests.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "HUnit") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "HUnit") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = False, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "ElseIf"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}) - [ - _×_ - (UnqualComponentName "internal") - CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName - "internal"), - exposedModules = [ - ModuleName "ElseIf2"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName - "internal"), - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}] - [] - [] - [ - _×_ - (UnqualComponentName "tests") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "Tests.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "HUnit") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "HUnit") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = False, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/common2.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/common2.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common2.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/common2.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/common2.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common2.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/common2.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/common2.packageDescription.expr new file mode 100644 index 00000000000..35b398ff00b --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common2.packageDescription.expr @@ -0,0 +1,45 @@ +PackageDescription { + specVersion = CabalSpecV2_2, + package = PackageIdentifier { + pkgName = PackageName "common", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/hvr/-.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Common-stanza demo demo", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/common3.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/common3.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common3.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/common3.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/common3.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common3.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/common3.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/common3.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common3.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/common3.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/common3.condLibrary.expr new file mode 100644 index 00000000000..d2670399e96 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common3.condLibrary.expr @@ -0,0 +1,78 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "ElseIf"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/common3.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/common3.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common3.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/common3.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/common3.condTestSuites.expr new file mode 100644 index 00000000000..f1841f497bf --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common3.condTestSuites.expr @@ -0,0 +1,101 @@ +[ + _×_ + (UnqualComponentName "tests") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "Tests.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "HUnit") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "HUnit") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}] diff --git a/Cabal-tests/tests/ParserTests/regressions/common3.expr b/Cabal-tests/tests/ParserTests/regressions/common3.expr deleted file mode 100644 index 5f039c087b4..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/common3.expr +++ /dev/null @@ -1,420 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_2, - package = PackageIdentifier { - pkgName = PackageName "common", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/hvr/-.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "Common-stanza demo demo", - description = "", - category = "", - customFieldsPD = [ - _×_ "x-revision" "1", - _×_ - "x-follows-version-policy" - ""], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "ElseIf"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [ - _×_ - (UnqualComponentName "tests") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "Tests.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "HUnit") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "HUnit") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "ElseIf"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}) - [] - [] - [] - [ - _×_ - (UnqualComponentName "tests") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "Tests.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "HUnit") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "HUnit") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/common3.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/common3.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common3.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/common3.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/common3.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common3.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/common3.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/common3.packageDescription.expr new file mode 100644 index 00000000000..a142753eef8 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/common3.packageDescription.expr @@ -0,0 +1,49 @@ +PackageDescription { + specVersion = CabalSpecV2_2, + package = PackageIdentifier { + pkgName = PackageName "common", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/hvr/-.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Common-stanza demo demo", + description = "", + category = "", + customFieldsPD = [ + _×_ "x-revision" "1", + _×_ + "x-follows-version-policy" + ""], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/elif.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/elif.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/elif.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/elif.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/elif.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/elif.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/elif.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/elif.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/elif.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/elif.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/elif.condLibrary.expr new file mode 100644 index 00000000000..1e463e8bded --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/elif.condLibrary.expr @@ -0,0 +1,149 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "ElseIf"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Linux)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "unix") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "unix") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]} diff --git a/Cabal-tests/tests/ParserTests/regressions/elif.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/elif.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/elif.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/elif.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/elif.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/elif.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/elif.expr b/Cabal-tests/tests/ParserTests/regressions/elif.expr deleted file mode 100644 index 019d393ea54..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/elif.expr +++ /dev/null @@ -1,357 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_10, - package = PackageIdentifier { - pkgName = PackageName "elif", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/hvr/-.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = "The elif demo", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "ElseIf"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Linux)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "unix") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "unix") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "ElseIf"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Linux)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "unix") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "unix") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/elif.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/elif.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/elif.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/elif.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/elif.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/elif.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/elif.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/elif.packageDescription.expr new file mode 100644 index 00000000000..ea2a00f7d2a --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/elif.packageDescription.expr @@ -0,0 +1,44 @@ +PackageDescription { + specVersion = CabalSpecV1_10, + package = PackageIdentifier { + pkgName = PackageName "elif", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/hvr/-.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = "The elif demo", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/elif2.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/elif2.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/elif2.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/elif2.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/elif2.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/elif2.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/elif2.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/elif2.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/elif2.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/elif2.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/elif2.condLibrary.expr new file mode 100644 index 00000000000..4eb2a84e2f5 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/elif2.condLibrary.expr @@ -0,0 +1,362 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "ElseIf"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Linux)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "unix") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "unix") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = False, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}}]}}]} diff --git a/Cabal-tests/tests/ParserTests/regressions/elif2.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/elif2.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/elif2.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/elif2.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/elif2.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/elif2.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/elif2.expr b/Cabal-tests/tests/ParserTests/regressions/elif2.expr deleted file mode 100644 index b31aaa2f869..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/elif2.expr +++ /dev/null @@ -1,783 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_2, - package = PackageIdentifier { - pkgName = PackageName "elif", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/hvr/-.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = "The elif demo", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "ElseIf"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Linux)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "unix") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "unix") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = False, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}}]}}]}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "ElseIf"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Linux)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "unix") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "unix") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = False, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}}]}}]}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/elif2.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/elif2.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/elif2.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/elif2.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/elif2.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/elif2.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/elif2.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/elif2.packageDescription.expr new file mode 100644 index 00000000000..0bd95cbf42d --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/elif2.packageDescription.expr @@ -0,0 +1,44 @@ +PackageDescription { + specVersion = CabalSpecV2_2, + package = PackageIdentifier { + pkgName = PackageName "elif", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/hvr/-.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = "The elif demo", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condLibrary.expr new file mode 100644 index 00000000000..353f9b25e8f --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condLibrary.expr @@ -0,0 +1,90 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "Data.Encoding"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [ + "-Wall", + "-O2", + "-threaded", + "-rtsopts", + "-with-rtsopts=-N1 -A64m"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (UnionVersionRanges + (LaterVersion + (mkVersion [4, 4])) + (ThisVersion + (mkVersion [4, 4]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (UnionVersionRanges + (LaterVersion + (mkVersion [4, 4])) + (ThisVersion + (mkVersion [4, 4]))) + mainLibSet], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.expr b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.expr deleted file mode 100644 index 553c70282c7..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.expr +++ /dev/null @@ -1,244 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_12, - package = PackageIdentifier { - pkgName = PackageName - "encoding", - pkgVersion = mkVersion [0, 8]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Just - SetupBuildInfo { - setupDepends = [ - Dependency - (PackageName "base") - (EarlierVersion (mkVersion [5])) - mainLibSet, - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - defaultSetupDepends = False}, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [ - SymbolicPath "README.md", - SymbolicPath "--", - SymbolicPath "--"], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "Data.Encoding"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [ - "-Wall", - "-O2", - "-threaded", - "-rtsopts", - "-with-rtsopts=-N1 -A64m"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (UnionVersionRanges - (LaterVersion - (mkVersion [4, 4])) - (ThisVersion - (mkVersion [4, 4]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (UnionVersionRanges - (LaterVersion - (mkVersion [4, 4])) - (ThisVersion - (mkVersion [4, 4]))) - mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "Data.Encoding"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [ - "-Wall", - "-O2", - "-threaded", - "-rtsopts", - "-with-rtsopts=-N1 -A64m"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (UnionVersionRanges - (LaterVersion - (mkVersion [4, 4])) - (ThisVersion - (mkVersion [4, 4]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (UnionVersionRanges - (LaterVersion - (mkVersion [4, 4])) - (ThisVersion - (mkVersion [4, 4]))) - mainLibSet], - condTreeComponents = []}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.packageDescription.expr new file mode 100644 index 00000000000..e979a3cf116 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/encoding-0.8.packageDescription.expr @@ -0,0 +1,49 @@ +PackageDescription { + specVersion = CabalSpecV1_12, + package = PackageIdentifier { + pkgName = PackageName + "encoding", + pkgVersion = mkVersion [0, 8]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Just + SetupBuildInfo { + setupDepends = [ + Dependency + (PackageName "base") + (EarlierVersion (mkVersion [5])) + mainLibSet, + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + defaultSetupDepends = False}, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [ + SymbolicPath "README.md", + SymbolicPath "--", + SymbolicPath "--"], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/generics-sop.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/generics-sop.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/generics-sop.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/generics-sop.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/generics-sop.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/generics-sop.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/generics-sop.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/generics-sop.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/generics-sop.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/generics-sop.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/generics-sop.condLibrary.expr new file mode 100644 index 00000000000..76630720e45 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/generics-sop.condLibrary.expr @@ -0,0 +1,528 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "Generics.SOP", + ModuleName "Generics.SOP.GGP", + ModuleName "Generics.SOP.TH", + ModuleName "Generics.SOP.Dict", + ModuleName + "Generics.SOP.Type.Metadata", + ModuleName + "Generics.SOP.BasicFunctors", + ModuleName + "Generics.SOP.Classes", + ModuleName + "Generics.SOP.Constraint", + ModuleName + "Generics.SOP.Instances", + ModuleName + "Generics.SOP.Metadata", + ModuleName "Generics.SOP.NP", + ModuleName "Generics.SOP.NS", + ModuleName + "Generics.SOP.Universe", + ModuleName "Generics.SOP.Sing"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "src"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [ + EnableExtension CPP, + EnableExtension + ScopedTypeVariables, + EnableExtension TypeFamilies, + EnableExtension RankNTypes, + EnableExtension TypeOperators, + EnableExtension GADTs, + EnableExtension ConstraintKinds, + EnableExtension + MultiParamTypeClasses, + EnableExtension + TypeSynonymInstances, + EnableExtension + FlexibleInstances, + EnableExtension + FlexibleContexts, + EnableExtension DeriveFunctor, + EnableExtension DeriveFoldable, + EnableExtension + DeriveTraversable, + EnableExtension + DefaultSignatures, + EnableExtension KindSignatures, + EnableExtension DataKinds, + EnableExtension + FunctionalDependencies], + otherExtensions = [ + EnableExtension + OverloadedStrings, + EnableExtension PolyKinds, + EnableExtension + UndecidableInstances, + EnableExtension TemplateHaskell, + EnableExtension DeriveGeneric, + EnableExtension + StandaloneDeriving], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-Wall"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 7])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "template-haskell") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 8])) + (EarlierVersion + (mkVersion [2, 13]))) + mainLibSet, + Dependency + (PackageName "ghc-prim") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 3])) + (EarlierVersion + (mkVersion [0, 6]))) + mainLibSet, + Dependency + (PackageName "deepseq") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [1, 3])) + (EarlierVersion + (mkVersion [1, 5]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 7])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "template-haskell") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 8])) + (EarlierVersion + (mkVersion [2, 13]))) + mainLibSet, + Dependency + (PackageName "ghc-prim") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 3])) + (EarlierVersion + (mkVersion [0, 6]))) + mainLibSet, + Dependency + (PackageName "deepseq") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [1, 3])) + (EarlierVersion + (mkVersion [1, 5]))) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `CNot (Var (Impl GHC (OrLaterVersion (mkVersion [7,8]))))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "tagged") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 7])) + (EarlierVersion + (mkVersion [0, 9]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "tagged") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 7])) + (EarlierVersion + (mkVersion [0, 9]))) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `CNot (Var (Impl GHC (OrLaterVersion (mkVersion [8,0]))))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName + "transformers-compat") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 3])) + (EarlierVersion + (mkVersion [0, 6]))) + mainLibSet, + Dependency + (PackageName "transformers") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 3])) + (EarlierVersion + (mkVersion [0, 6]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName + "transformers-compat") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 3])) + (EarlierVersion + (mkVersion [0, 6]))) + mainLibSet, + Dependency + (PackageName "transformers") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 3])) + (EarlierVersion + (mkVersion [0, 6]))) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (Impl GHC (OrLaterVersion (mkVersion [7,8])))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [ + EnableExtension + AutoDeriveTypeable], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (Impl GHC (EarlierVersion (mkVersion [7,10])))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [ + EnableExtension + OverlappingInstances], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]} diff --git a/Cabal-tests/tests/ParserTests/regressions/generics-sop.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/generics-sop.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/generics-sop.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/generics-sop.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/generics-sop.condTestSuites.expr new file mode 100644 index 00000000000..7e22ac9c4a2 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/generics-sop.condTestSuites.expr @@ -0,0 +1,194 @@ +[ + _×_ + (UnqualComponentName "doctests") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "doctests.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "test"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-Wall", "-threaded"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [ + _×_ + "x-doctest-options" + "--preserve-it"], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "doctest") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 13])) + (EarlierVersion + (mkVersion [0, 14]))) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "doctest") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 13])) + (EarlierVersion + (mkVersion [0, 14]))) + mainLibSet], + condTreeComponents = []}, + _×_ + (UnqualComponentName + "generics-sop-examples") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "Example.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "test"], + otherModules = [ + ModuleName "HTransExample"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-Wall"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 6])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "generics-sop") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 6])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "generics-sop") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}] diff --git a/Cabal-tests/tests/ParserTests/regressions/generics-sop.expr b/Cabal-tests/tests/ParserTests/regressions/generics-sop.expr deleted file mode 100644 index 7e8387e84bb..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/generics-sop.expr +++ /dev/null @@ -1,1582 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_10, - package = PackageIdentifier { - pkgName = PackageName - "generics-sop", - pkgVersion = mkVersion - [0, 3, 1, 0]}, - licenseRaw = Right BSD3, - licenseFiles = [ - SymbolicPath "LICENSE"], - copyright = "", - maintainer = - "andres@well-typed.com", - author = - "Edsko de Vries , Andres L\246h ", - stability = "", - testedWith = [ - _×_ - GHC - (ThisVersion - (mkVersion [7, 8, 4])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 10, 3])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 0, 1])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 0, 2])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 2, 1])), - _×_ - GHC - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [8, 3])) - (EarlierVersion - (mkVersion [8, 4])))], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/well-typed/generics-sop", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "Generic Programming using True Sums of Products", - description = - concat - [ - "A library to support the definition of generic functions.\n", - "Datatypes are viewed in a uniform, structured way:\n", - "the choice between constructors is represented using an n-ary\n", - "sum, and the arguments of each constructor are represented using\n", - "an n-ary product.\n", - "\n", - "The module \"Generics.SOP\" is the main module of this library and contains\n", - "more detailed documentation.\n", - "\n", - "Examples of using this library are provided by the following\n", - "packages:\n", - "\n", - "* @@ basic examples,\n", - "\n", - "* @@ generic pretty printing,\n", - "\n", - "* @@ generically computed lenses,\n", - "\n", - "* @@ generic JSON conversions.\n", - "\n", - "A detailed description of the ideas behind this library is provided by\n", - "the paper:\n", - "\n", - "* Edsko de Vries and Andres L\246h.\n", - ".\n", - "Workshop on Generic Programming (WGP) 2014.\n"], - category = "Generics", - customFieldsPD = [], - buildTypeRaw = Just Custom, - setupBuildInfo = Just - SetupBuildInfo { - setupDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "Cabal") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "cabal-doctest") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [1, 0, 2])) - (EarlierVersion - (mkVersion [1, 1]))) - mainLibSet], - defaultSetupDepends = False}, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [ - SymbolicPath "CHANGELOG.md"], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "Generics.SOP", - ModuleName "Generics.SOP.GGP", - ModuleName "Generics.SOP.TH", - ModuleName "Generics.SOP.Dict", - ModuleName - "Generics.SOP.Type.Metadata", - ModuleName - "Generics.SOP.BasicFunctors", - ModuleName - "Generics.SOP.Classes", - ModuleName - "Generics.SOP.Constraint", - ModuleName - "Generics.SOP.Instances", - ModuleName - "Generics.SOP.Metadata", - ModuleName "Generics.SOP.NP", - ModuleName "Generics.SOP.NS", - ModuleName - "Generics.SOP.Universe", - ModuleName "Generics.SOP.Sing"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "src"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [ - EnableExtension CPP, - EnableExtension - ScopedTypeVariables, - EnableExtension TypeFamilies, - EnableExtension RankNTypes, - EnableExtension TypeOperators, - EnableExtension GADTs, - EnableExtension ConstraintKinds, - EnableExtension - MultiParamTypeClasses, - EnableExtension - TypeSynonymInstances, - EnableExtension - FlexibleInstances, - EnableExtension - FlexibleContexts, - EnableExtension DeriveFunctor, - EnableExtension DeriveFoldable, - EnableExtension - DeriveTraversable, - EnableExtension - DefaultSignatures, - EnableExtension KindSignatures, - EnableExtension DataKinds, - EnableExtension - FunctionalDependencies], - otherExtensions = [ - EnableExtension - OverloadedStrings, - EnableExtension PolyKinds, - EnableExtension - UndecidableInstances, - EnableExtension TemplateHaskell, - EnableExtension DeriveGeneric, - EnableExtension - StandaloneDeriving], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-Wall"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 7])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "template-haskell") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 8])) - (EarlierVersion - (mkVersion [2, 13]))) - mainLibSet, - Dependency - (PackageName "ghc-prim") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 3])) - (EarlierVersion - (mkVersion [0, 6]))) - mainLibSet, - Dependency - (PackageName "deepseq") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [1, 3])) - (EarlierVersion - (mkVersion [1, 5]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 7])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "template-haskell") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 8])) - (EarlierVersion - (mkVersion [2, 13]))) - mainLibSet, - Dependency - (PackageName "ghc-prim") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 3])) - (EarlierVersion - (mkVersion [0, 6]))) - mainLibSet, - Dependency - (PackageName "deepseq") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [1, 3])) - (EarlierVersion - (mkVersion [1, 5]))) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `CNot (Var (Impl GHC (OrLaterVersion (mkVersion [7,8]))))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "tagged") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 7])) - (EarlierVersion - (mkVersion [0, 9]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "tagged") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 7])) - (EarlierVersion - (mkVersion [0, 9]))) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `CNot (Var (Impl GHC (OrLaterVersion (mkVersion [8,0]))))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName - "transformers-compat") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 3])) - (EarlierVersion - (mkVersion [0, 6]))) - mainLibSet, - Dependency - (PackageName "transformers") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 3])) - (EarlierVersion - (mkVersion [0, 6]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName - "transformers-compat") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 3])) - (EarlierVersion - (mkVersion [0, 6]))) - mainLibSet, - Dependency - (PackageName "transformers") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 3])) - (EarlierVersion - (mkVersion [0, 6]))) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (Impl GHC (OrLaterVersion (mkVersion [7,8])))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [ - EnableExtension - AutoDeriveTypeable], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (Impl GHC (EarlierVersion (mkVersion [7,10])))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [ - EnableExtension - OverlappingInstances], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [ - _×_ - (UnqualComponentName "doctests") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "doctests.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "test"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-Wall", "-threaded"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [ - _×_ - "x-doctest-options" - "--preserve-it"], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "doctest") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 13])) - (EarlierVersion - (mkVersion [0, 14]))) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "doctest") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 13])) - (EarlierVersion - (mkVersion [0, 14]))) - mainLibSet], - condTreeComponents = []}, - _×_ - (UnqualComponentName - "generics-sop-examples") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "Example.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "test"], - otherModules = [ - ModuleName "HTransExample"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-Wall"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 6])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "generics-sop") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 6])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "generics-sop") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "Generics.SOP", - ModuleName "Generics.SOP.GGP", - ModuleName "Generics.SOP.TH", - ModuleName "Generics.SOP.Dict", - ModuleName - "Generics.SOP.Type.Metadata", - ModuleName - "Generics.SOP.BasicFunctors", - ModuleName - "Generics.SOP.Classes", - ModuleName - "Generics.SOP.Constraint", - ModuleName - "Generics.SOP.Instances", - ModuleName - "Generics.SOP.Metadata", - ModuleName "Generics.SOP.NP", - ModuleName "Generics.SOP.NS", - ModuleName - "Generics.SOP.Universe", - ModuleName "Generics.SOP.Sing"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "src"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [ - EnableExtension CPP, - EnableExtension - ScopedTypeVariables, - EnableExtension TypeFamilies, - EnableExtension RankNTypes, - EnableExtension TypeOperators, - EnableExtension GADTs, - EnableExtension ConstraintKinds, - EnableExtension - MultiParamTypeClasses, - EnableExtension - TypeSynonymInstances, - EnableExtension - FlexibleInstances, - EnableExtension - FlexibleContexts, - EnableExtension DeriveFunctor, - EnableExtension DeriveFoldable, - EnableExtension - DeriveTraversable, - EnableExtension - DefaultSignatures, - EnableExtension KindSignatures, - EnableExtension DataKinds, - EnableExtension - FunctionalDependencies], - otherExtensions = [ - EnableExtension - OverloadedStrings, - EnableExtension PolyKinds, - EnableExtension - UndecidableInstances, - EnableExtension TemplateHaskell, - EnableExtension DeriveGeneric, - EnableExtension - StandaloneDeriving], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-Wall"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 7])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "template-haskell") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 8])) - (EarlierVersion - (mkVersion [2, 13]))) - mainLibSet, - Dependency - (PackageName "ghc-prim") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 3])) - (EarlierVersion - (mkVersion [0, 6]))) - mainLibSet, - Dependency - (PackageName "deepseq") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [1, 3])) - (EarlierVersion - (mkVersion [1, 5]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 7])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "template-haskell") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 8])) - (EarlierVersion - (mkVersion [2, 13]))) - mainLibSet, - Dependency - (PackageName "ghc-prim") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 3])) - (EarlierVersion - (mkVersion [0, 6]))) - mainLibSet, - Dependency - (PackageName "deepseq") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [1, 3])) - (EarlierVersion - (mkVersion [1, 5]))) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `CNot (Var (Impl GHC (OrLaterVersion (mkVersion [7,8]))))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "tagged") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 7])) - (EarlierVersion - (mkVersion [0, 9]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "tagged") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 7])) - (EarlierVersion - (mkVersion [0, 9]))) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `CNot (Var (Impl GHC (OrLaterVersion (mkVersion [8,0]))))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName - "transformers-compat") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 3])) - (EarlierVersion - (mkVersion [0, 6]))) - mainLibSet, - Dependency - (PackageName "transformers") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 3])) - (EarlierVersion - (mkVersion [0, 6]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName - "transformers-compat") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 3])) - (EarlierVersion - (mkVersion [0, 6]))) - mainLibSet, - Dependency - (PackageName "transformers") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 3])) - (EarlierVersion - (mkVersion [0, 6]))) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (Impl GHC (OrLaterVersion (mkVersion [7,8])))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [ - EnableExtension - AutoDeriveTypeable], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (Impl GHC (EarlierVersion (mkVersion [7,10])))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [ - EnableExtension - OverlappingInstances], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}) - [] - [] - [] - [ - _×_ - (UnqualComponentName "doctests") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "doctests.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "test"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-Wall", "-threaded"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [ - _×_ - "x-doctest-options" - "--preserve-it"], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "doctest") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 13])) - (EarlierVersion - (mkVersion [0, 14]))) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "doctest") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 13])) - (EarlierVersion - (mkVersion [0, 14]))) - mainLibSet], - condTreeComponents = []}, - _×_ - (UnqualComponentName - "generics-sop-examples") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "Example.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "test"], - otherModules = [ - ModuleName "HTransExample"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-Wall"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 6])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "generics-sop") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 6])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "generics-sop") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/generics-sop.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/generics-sop.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/generics-sop.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/generics-sop.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/generics-sop.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/generics-sop.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/generics-sop.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/generics-sop.packageDescription.expr new file mode 100644 index 00000000000..8e3c834bea9 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/generics-sop.packageDescription.expr @@ -0,0 +1,125 @@ +PackageDescription { + specVersion = CabalSpecV1_10, + package = PackageIdentifier { + pkgName = PackageName + "generics-sop", + pkgVersion = mkVersion + [0, 3, 1, 0]}, + licenseRaw = Right BSD3, + licenseFiles = [ + SymbolicPath "LICENSE"], + copyright = "", + maintainer = + "andres@well-typed.com", + author = + "Edsko de Vries , Andres L\246h ", + stability = "", + testedWith = [ + _×_ + GHC + (ThisVersion + (mkVersion [7, 8, 4])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 10, 3])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 0, 1])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 0, 2])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 2, 1])), + _×_ + GHC + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [8, 3])) + (EarlierVersion + (mkVersion [8, 4])))], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/well-typed/generics-sop", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Generic Programming using True Sums of Products", + description = + concat + [ + "A library to support the definition of generic functions.\n", + "Datatypes are viewed in a uniform, structured way:\n", + "the choice between constructors is represented using an n-ary\n", + "sum, and the arguments of each constructor are represented using\n", + "an n-ary product.\n", + "\n", + "The module \"Generics.SOP\" is the main module of this library and contains\n", + "more detailed documentation.\n", + "\n", + "Examples of using this library are provided by the following\n", + "packages:\n", + "\n", + "* @@ basic examples,\n", + "\n", + "* @@ generic pretty printing,\n", + "\n", + "* @@ generically computed lenses,\n", + "\n", + "* @@ generic JSON conversions.\n", + "\n", + "A detailed description of the ideas behind this library is provided by\n", + "the paper:\n", + "\n", + "* Edsko de Vries and Andres L\246h.\n", + ".\n", + "Workshop on Generic Programming (WGP) 2014.\n"], + category = "Generics", + customFieldsPD = [], + buildTypeRaw = Just Custom, + setupBuildInfo = Just + SetupBuildInfo { + setupDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "Cabal") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "cabal-doctest") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [1, 0, 2])) + (EarlierVersion + (mkVersion [1, 1]))) + mainLibSet], + defaultSetupDepends = False}, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [ + SymbolicPath "CHANGELOG.md"], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/hasktorch.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/hasktorch.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/hasktorch.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/hasktorch.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/hasktorch.condExecutables.expr new file mode 100644 index 00000000000..61e9ad7f94d --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/hasktorch.condExecutables.expr @@ -0,0 +1,412 @@ +[ + _×_ + (UnqualComponentName + "isdefinite-cpu") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "isdefinite-cpu", + modulePath = SymbolicPath + "Noop.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "exe"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-cpu")]))], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-cpu")]))], + condTreeComponents = []}, + _×_ + (UnqualComponentName + "isdefinite-gpu") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "isdefinite-gpu", + modulePath = SymbolicPath + "Noop.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "exe"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-gpu")]))], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-gpu")]))], + condTreeComponents = []}, + _×_ + (UnqualComponentName + "isdefinite") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "isdefinite", + modulePath = SymbolicPath + "Noop.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "exe"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + _×_ + (UnqualComponentName "memcheck") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "memcheck", + modulePath = SymbolicPath + "Memcheck.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "exe"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}] diff --git a/Cabal-tests/tests/ParserTests/regressions/hasktorch.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/hasktorch.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/hasktorch.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/hasktorch.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/hasktorch.condLibrary.expr new file mode 100644 index 00000000000..5f4b337ad30 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/hasktorch.condLibrary.expr @@ -0,0 +1,1036 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName + "Torch.Core.Exceptions", + ModuleName "Torch.Core.Random", + ModuleName "Torch.Core.LogAdd"], + reexportedModules = [ + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Types.Numeric", + moduleReexportName = ModuleName + "Torch.Types.Numeric"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Long", + moduleReexportName = ModuleName + "Torch.Long"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Long.Dynamic", + moduleReexportName = ModuleName + "Torch.Long.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Long.Storage", + moduleReexportName = ModuleName + "Torch.Long.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Double", + moduleReexportName = ModuleName + "Torch.Double"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.Dynamic", + moduleReexportName = ModuleName + "Torch.Double.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.Storage", + moduleReexportName = ModuleName + "Torch.Double.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Double.NN", + moduleReexportName = ModuleName + "Torch.Double.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Activation", + moduleReexportName = ModuleName + "Torch.Double.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Backprop", + moduleReexportName = ModuleName + "Torch.Double.NN.Backprop"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Conv1d", + moduleReexportName = ModuleName + "Torch.Double.NN.Conv1d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Conv2d", + moduleReexportName = ModuleName + "Torch.Double.NN.Conv2d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Double.NN.Criterion"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Layers", + moduleReexportName = ModuleName + "Torch.Double.NN.Layers"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Linear", + moduleReexportName = ModuleName + "Torch.Double.NN.Linear"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Math", + moduleReexportName = ModuleName + "Torch.Double.NN.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Padding", + moduleReexportName = ModuleName + "Torch.Double.NN.Padding"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Double.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Sampling", + moduleReexportName = ModuleName + "Torch.Double.NN.Sampling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.Dynamic.NN", + moduleReexportName = ModuleName + "Torch.Double.Dynamic.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.Dynamic.NN.Activation", + moduleReexportName = ModuleName + "Torch.Double.Dynamic.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.Dynamic.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Double.Dynamic.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.Dynamic.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Double.Dynamic.NN.Criterion"}], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "utils"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [ + EnableExtension LambdaCase, + EnableExtension DataKinds, + EnableExtension TypeFamilies, + EnableExtension + TypeSynonymInstances, + EnableExtension + ScopedTypeVariables, + EnableExtension + FlexibleContexts, + EnableExtension CPP], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "dimensions") + (UnionVersionRanges + (ThisVersion (mkVersion [1, 0])) + (LaterVersion + (mkVersion [1, 0]))) + mainLibSet, + Dependency + (PackageName "safe-exceptions") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 1, 0])) + (LaterVersion + (mkVersion [0, 1, 0]))) + mainLibSet, + Dependency + (PackageName "singletons") + (UnionVersionRanges + (ThisVersion (mkVersion [2, 2])) + (LaterVersion + (mkVersion [2, 2]))) + mainLibSet, + Dependency + (PackageName "text") + (UnionVersionRanges + (ThisVersion + (mkVersion [1, 2, 2])) + (LaterVersion + (mkVersion [1, 2, 2]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-cpu")])), + Dependency + (PackageName "hasktorch-ffi-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "dimensions") + (UnionVersionRanges + (ThisVersion (mkVersion [1, 0])) + (LaterVersion + (mkVersion [1, 0]))) + mainLibSet, + Dependency + (PackageName "safe-exceptions") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 1, 0])) + (LaterVersion + (mkVersion [0, 1, 0]))) + mainLibSet, + Dependency + (PackageName "singletons") + (UnionVersionRanges + (ThisVersion (mkVersion [2, 2])) + (LaterVersion + (mkVersion [2, 2]))) + mainLibSet, + Dependency + (PackageName "text") + (UnionVersionRanges + (ThisVersion + (mkVersion [1, 2, 2])) + (LaterVersion + (mkVersion [1, 2, 2]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-cpu")])), + Dependency + (PackageName "hasktorch-ffi-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `CNot (Var (PackageFlag (FlagName "lite")))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [ + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Byte", + moduleReexportName = ModuleName + "Torch.Byte"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Byte.Dynamic", + moduleReexportName = ModuleName + "Torch.Byte.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Byte.Storage", + moduleReexportName = ModuleName + "Torch.Byte.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Char", + moduleReexportName = ModuleName + "Torch.Char"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Char.Dynamic", + moduleReexportName = ModuleName + "Torch.Char.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Char.Storage", + moduleReexportName = ModuleName + "Torch.Char.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Short", + moduleReexportName = ModuleName + "Torch.Short"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Short.Dynamic", + moduleReexportName = ModuleName + "Torch.Short.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Short.Storage", + moduleReexportName = ModuleName + "Torch.Short.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Int", + moduleReexportName = ModuleName + "Torch.Int"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Int.Dynamic", + moduleReexportName = ModuleName + "Torch.Int.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Int.Storage", + moduleReexportName = ModuleName + "Torch.Int.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Float", + moduleReexportName = ModuleName + "Torch.Float"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.Dynamic", + moduleReexportName = ModuleName + "Torch.Float.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.Storage", + moduleReexportName = ModuleName + "Torch.Float.Storage"}], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "cuda"))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [ + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Cuda.Long", + moduleReexportName = ModuleName + "Torch.Cuda.Long"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Long.Dynamic", + moduleReexportName = ModuleName + "Torch.Cuda.Long.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Long.Storage", + moduleReexportName = ModuleName + "Torch.Cuda.Long.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Cuda.Double", + moduleReexportName = ModuleName + "Torch.Cuda.Double"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.Dynamic", + moduleReexportName = ModuleName + "Torch.Cuda.Double.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.Storage", + moduleReexportName = ModuleName + "Torch.Cuda.Double.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Activation", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Backprop", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Backprop"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Conv1d", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Conv1d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Conv2d", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Conv2d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Criterion"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Layers", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Layers"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Linear", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Linear"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Math", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Padding", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Padding"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Sampling", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Sampling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.Dynamic.NN", + moduleReexportName = ModuleName + "Torch.Cuda.Double.Dynamic.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.Dynamic.NN.Activation", + moduleReexportName = ModuleName + "Torch.Cuda.Double.Dynamic.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.Dynamic.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Cuda.Double.Dynamic.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.Dynamic.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Cuda.Double.Dynamic.NN.Criterion"}], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-gpu")]))], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-gpu")]))], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `CNot (Var (PackageFlag (FlagName "lite")))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [ + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Cuda.Byte", + moduleReexportName = ModuleName + "Torch.Cuda.Byte"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Byte.Dynamic", + moduleReexportName = ModuleName + "Torch.Cuda.Byte.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Byte.Storage", + moduleReexportName = ModuleName + "Torch.Cuda.Byte.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Cuda.Char", + moduleReexportName = ModuleName + "Torch.Cuda.Char"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Char.Dynamic", + moduleReexportName = ModuleName + "Torch.Cuda.Char.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Char.Storage", + moduleReexportName = ModuleName + "Torch.Cuda.Char.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Cuda.Short", + moduleReexportName = ModuleName + "Torch.Cuda.Short"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Short.Dynamic", + moduleReexportName = ModuleName + "Torch.Cuda.Short.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Short.Storage", + moduleReexportName = ModuleName + "Torch.Cuda.Short.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Cuda.Int", + moduleReexportName = ModuleName + "Torch.Cuda.Int"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Int.Dynamic", + moduleReexportName = ModuleName + "Torch.Cuda.Int.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Int.Storage", + moduleReexportName = ModuleName + "Torch.Cuda.Int.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Cuda.Float", + moduleReexportName = ModuleName + "Torch.Cuda.Float"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Float.Dynamic", + moduleReexportName = ModuleName + "Torch.Cuda.Float.Dynamic"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Float.Storage", + moduleReexportName = ModuleName + "Torch.Cuda.Float.Storage"}], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}, + condBranchIfFalse = Nothing}]} diff --git a/Cabal-tests/tests/ParserTests/regressions/hasktorch.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/hasktorch.condSubLibraries.expr new file mode 100644 index 00000000000..1df86b8ffb6 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/hasktorch.condSubLibraries.expr @@ -0,0 +1,8425 @@ +[ + _×_ + (UnqualComponentName + "hasktorch-cpu") + CondNode { + condTreeData = + Library { + libName = LSubLibName + (UnqualComponentName + "hasktorch-cpu"), + exposedModules = [ + ModuleName "Torch.Long", + ModuleName "Torch.Long.Dynamic", + ModuleName "Torch.Long.Storage", + ModuleName "Torch.Double", + ModuleName + "Torch.Double.Dynamic", + ModuleName + "Torch.Double.Storage"], + reexportedModules = [ + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Double.NN", + moduleReexportName = ModuleName + "Torch.Double.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Activation", + moduleReexportName = ModuleName + "Torch.Double.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Backprop", + moduleReexportName = ModuleName + "Torch.Double.NN.Backprop"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Conv1d", + moduleReexportName = ModuleName + "Torch.Double.NN.Conv1d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Conv2d", + moduleReexportName = ModuleName + "Torch.Double.NN.Conv2d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Double.NN.Criterion"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Layers", + moduleReexportName = ModuleName + "Torch.Double.NN.Layers"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Linear", + moduleReexportName = ModuleName + "Torch.Double.NN.Linear"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Math", + moduleReexportName = ModuleName + "Torch.Double.NN.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Padding", + moduleReexportName = ModuleName + "Torch.Double.NN.Padding"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Double.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.NN.Sampling", + moduleReexportName = ModuleName + "Torch.Double.NN.Sampling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.Dynamic.NN", + moduleReexportName = ModuleName + "Torch.Double.Dynamic.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.Dynamic.NN.Activation", + moduleReexportName = ModuleName + "Torch.Double.Dynamic.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.Dynamic.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Double.Dynamic.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Double.Dynamic.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Double.Dynamic.NN.Criterion"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Float.NN", + moduleReexportName = ModuleName + "Torch.Float.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Activation", + moduleReexportName = ModuleName + "Torch.Float.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Backprop", + moduleReexportName = ModuleName + "Torch.Float.NN.Backprop"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Conv1d", + moduleReexportName = ModuleName + "Torch.Float.NN.Conv1d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Conv2d", + moduleReexportName = ModuleName + "Torch.Float.NN.Conv2d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Float.NN.Criterion"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Layers", + moduleReexportName = ModuleName + "Torch.Float.NN.Layers"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Linear", + moduleReexportName = ModuleName + "Torch.Float.NN.Linear"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Math", + moduleReexportName = ModuleName + "Torch.Float.NN.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Padding", + moduleReexportName = ModuleName + "Torch.Float.NN.Padding"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Float.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.NN.Sampling", + moduleReexportName = ModuleName + "Torch.Float.NN.Sampling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.Dynamic.NN", + moduleReexportName = ModuleName + "Torch.Float.Dynamic.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.Dynamic.NN.Activation", + moduleReexportName = ModuleName + "Torch.Float.Dynamic.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.Dynamic.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Float.Dynamic.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Float.Dynamic.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Float.Dynamic.NN.Criterion"}], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = + BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "utils", + SymbolicPath "src"], + otherModules = [ + ModuleName + "Torch.Core.Exceptions", + ModuleName "Torch.Core.Random", + ModuleName "Torch.Core.LogAdd"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [ + EnableExtension LambdaCase, + EnableExtension DataKinds, + EnableExtension TypeFamilies, + EnableExtension + TypeSynonymInstances, + EnableExtension + ScopedTypeVariables, + EnableExtension + FlexibleContexts, + EnableExtension CPP], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "dimensions") + (UnionVersionRanges + (ThisVersion (mkVersion [1, 0])) + (LaterVersion + (mkVersion [1, 0]))) + mainLibSet, + Dependency + (PackageName "hasktorch-ffi-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "safe-exceptions") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 1, 0])) + (LaterVersion + (mkVersion [0, 1, 0]))) + mainLibSet, + Dependency + (PackageName "singletons") + (UnionVersionRanges + (ThisVersion (mkVersion [2, 2])) + (LaterVersion + (mkVersion [2, 2]))) + mainLibSet, + Dependency + (PackageName "text") + (UnionVersionRanges + (ThisVersion + (mkVersion [1, 2, 2])) + (LaterVersion + (mkVersion [1, 2, 2]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-floating")])), + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-signed")]))], + mixins = + [ + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-signed"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Long.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Long.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Long.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Long.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Long.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Long.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Long.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Long.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Long.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Long.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Long.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Long.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Long.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Long.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Long.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Long.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Long.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName "Torch.Long.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName "Torch.Long.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName "Torch.Long.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Long.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Long.Dynamic.Tensor.Math.Pointwise.Signed")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.TH.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.TH.Long.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.TH.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.TH.Byte.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.TH.Long"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.TH.Long.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.TH.Long.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.TH.Long.FreeStorage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.TH.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.TH.Long.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.TH.Long.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.TH.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.FFI.TH.Long.TensorMath")]}}, + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-floating"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Double.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Double.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Double.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Double.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Double.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Double.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Double.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Double.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Double.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Double.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Double.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Double.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Double.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Double.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName + "Torch.Double.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Blas") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Blas"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Lapack") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Lapack"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise.Floating"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Reduce.Floating"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Floating") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Blas") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Blas"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Lapack") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Lapack"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Pointwise.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Reduce.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Floating") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Random.TH") + (ModuleName + "Torch.Indef.Double.Tensor.Random.TH"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Random.TH") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Random.TH"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Random.TH") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Random.TH"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Random.TH") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Random.TH"), + _×_ + (ModuleName + "Torch.Undefined.Tensor.Random.THC") + (ModuleName + "Torch.Undefined.Double.Tensor.Random.THC"), + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Double.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Double.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Double.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Double.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Double.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Double.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Double.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Double.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Double.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Double.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Double.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Double.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Double.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Double.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName + "Torch.Double.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Double.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN") + (ModuleName + "Torch.Double.Dynamic.NN"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN.Activation") + (ModuleName + "Torch.Double.Dynamic.NN.Activation"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN.Pooling") + (ModuleName + "Torch.Double.Dynamic.NN.Pooling"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN.Criterion") + (ModuleName + "Torch.Double.Dynamic.NN.Criterion"), + _×_ + (ModuleName + "Torch.Indef.Static.NN") + (ModuleName "Torch.Double.NN"), + _×_ + (ModuleName + "Torch.Indef.Static.NN") + (ModuleName "Torch.Double.NN"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Activation") + (ModuleName + "Torch.Double.NN.Activation"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Backprop") + (ModuleName + "Torch.Double.NN.Backprop"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Conv1d") + (ModuleName + "Torch.Double.NN.Conv1d"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Conv2d") + (ModuleName + "Torch.Double.NN.Conv2d"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Criterion") + (ModuleName + "Torch.Double.NN.Criterion"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Layers") + (ModuleName + "Torch.Double.NN.Layers"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Linear") + (ModuleName + "Torch.Double.NN.Linear"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Math") + (ModuleName + "Torch.Double.NN.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Padding") + (ModuleName + "Torch.Double.NN.Padding"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Pooling") + (ModuleName + "Torch.Double.NN.Pooling"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Sampling") + (ModuleName + "Torch.Double.NN.Sampling")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.TH.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.TH.Long.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.TH.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.TH.Byte.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.TH.Double"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.TH.Double.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.TH.Double.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.TH.Double.FreeStorage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.TH.Double.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.TH.Double.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.TH.Double.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Floating") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Blas") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Lapack") + (ModuleName + "Torch.FFI.TH.Double.TensorLapack"), + _×_ + (ModuleName "Torch.Sig.NN") + (ModuleName + "Torch.FFI.TH.NN.Double"), + _×_ + (ModuleName + "Torch.Sig.Types.NN") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Random.TH") + (ModuleName + "Torch.FFI.TH.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Random.TH") + (ModuleName + "Torch.FFI.TH.Double.TensorRandom"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Random.THC") + (ModuleName + "Torch.Undefined.Double.Tensor.Random.THC")]}}]}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "dimensions") + (UnionVersionRanges + (ThisVersion (mkVersion [1, 0])) + (LaterVersion + (mkVersion [1, 0]))) + mainLibSet, + Dependency + (PackageName "hasktorch-ffi-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "safe-exceptions") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 1, 0])) + (LaterVersion + (mkVersion [0, 1, 0]))) + mainLibSet, + Dependency + (PackageName "singletons") + (UnionVersionRanges + (ThisVersion (mkVersion [2, 2])) + (LaterVersion + (mkVersion [2, 2]))) + mainLibSet, + Dependency + (PackageName "text") + (UnionVersionRanges + (ThisVersion + (mkVersion [1, 2, 2])) + (LaterVersion + (mkVersion [1, 2, 2]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-floating")])), + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-signed")]))], + condTreeComponents = + [ + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "lite"))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName + "hasktorch-cpu"), + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = + Just + CondNode { + condTreeData = + Library { + libName = LSubLibName + (UnqualComponentName + "hasktorch-cpu"), + exposedModules = [ + ModuleName "Torch.Byte", + ModuleName "Torch.Byte.Dynamic", + ModuleName "Torch.Byte.Storage", + ModuleName "Torch.Char", + ModuleName "Torch.Char.Dynamic", + ModuleName "Torch.Char.Storage", + ModuleName "Torch.Short", + ModuleName + "Torch.Short.Dynamic", + ModuleName + "Torch.Short.Storage", + ModuleName "Torch.Int", + ModuleName "Torch.Int.Dynamic", + ModuleName "Torch.Int.Storage", + ModuleName "Torch.Float", + ModuleName + "Torch.Float.Dynamic", + ModuleName + "Torch.Float.Storage"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = + BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-unsigned")]))], + mixins = + [ + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-unsigned"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Byte.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Byte.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Byte.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Byte.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Byte.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Byte.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Byte.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Byte.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Byte.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Byte.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Byte.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Byte.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Byte.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Byte.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Byte.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Byte.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Byte.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName "Torch.Byte.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName "Torch.Byte.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName "Torch.Byte.Mask")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.TH.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.TH.Long.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.TH.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.TH.Byte.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.TH.Byte"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.TH.Byte.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.TH.Byte.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.TH.Byte.FreeStorage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.TH.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.TH.Byte.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.TH.Byte.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath")]}}, + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-unsigned"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Char.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Char.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Char.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Char.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Char.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Char.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Char.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Char.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Char.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Char.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Char.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Char.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Char.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Char.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Char.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Char.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Char.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Char.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName "Torch.Char.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName "Torch.Char.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName "Torch.Char.Mask")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.TH.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.TH.Long.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.TH.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.TH.Byte.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.TH.Char"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.TH.Char.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.TH.Char.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.TH.Char.FreeStorage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.TH.Char.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.TH.Char.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.TH.Char.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.TH.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.TH.Char.TensorMath")]}}, + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-signed"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Short.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Short.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Short.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Short.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Short.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Short.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Short.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Short.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Short.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Short.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Short.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Short.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Short.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Short.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Short.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Short.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Short.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Short.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Short.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName "Torch.Short.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Short.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Short.Dynamic.Tensor.Math.Pointwise.Signed")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.TH.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.TH.Long.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.TH.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.TH.Byte.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.TH.Short"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.TH.Short.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.TH.Short.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.TH.Short.FreeStorage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.TH.Short.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.TH.Short.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.TH.Short.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.TH.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.FFI.TH.Short.TensorMath")]}}, + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-signed"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Int.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Int.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Int.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Int.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Int.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Int.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Int.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Int.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Int.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Int.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Int.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Int.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Int.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Int.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Int.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Int.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Int.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName "Torch.Int.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName "Torch.Int.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName "Torch.Int.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Int.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Int.Dynamic.Tensor.Math.Pointwise.Signed")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.TH.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.TH.Long.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.TH.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.TH.Byte.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.TH.Int"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.TH.Int.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.TH.Int.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.TH.Int.FreeStorage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.TH.Int.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.TH.Int.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.TH.Int.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.TH.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.FFI.TH.Int.TensorMath")]}}, + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-floating"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Float.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Float.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Float.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Float.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Float.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Float.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Float.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Float.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Float.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Float.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Float.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Float.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Float.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Float.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName "Torch.Float.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Blas") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Blas"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Lapack") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Lapack"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise.Floating"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Reduce.Floating"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Floating") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Blas") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Blas"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Lapack") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Lapack"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Pointwise.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Reduce.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Floating") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Random.TH") + (ModuleName + "Torch.Indef.Float.Tensor.Random.TH"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Random.TH") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Random.TH"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Random.TH") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Random.TH"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Random.TH") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Random.TH"), + _×_ + (ModuleName + "Torch.Undefined.Tensor.Random.THC") + (ModuleName + "Torch.Undefined.Float.Tensor.Random.THC"), + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Float.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Float.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Float.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Float.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Float.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Float.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Float.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Float.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Float.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Float.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Float.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Float.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Float.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Float.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName "Torch.Float.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Float.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN") + (ModuleName + "Torch.Float.Dynamic.NN"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN.Activation") + (ModuleName + "Torch.Float.Dynamic.NN.Activation"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN.Pooling") + (ModuleName + "Torch.Float.Dynamic.NN.Pooling"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN.Criterion") + (ModuleName + "Torch.Float.Dynamic.NN.Criterion"), + _×_ + (ModuleName + "Torch.Indef.Static.NN") + (ModuleName "Torch.Float.NN"), + _×_ + (ModuleName + "Torch.Indef.Static.NN") + (ModuleName "Torch.Float.NN"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Activation") + (ModuleName + "Torch.Float.NN.Activation"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Backprop") + (ModuleName + "Torch.Float.NN.Backprop"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Conv1d") + (ModuleName + "Torch.Float.NN.Conv1d"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Conv2d") + (ModuleName + "Torch.Float.NN.Conv2d"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Criterion") + (ModuleName + "Torch.Float.NN.Criterion"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Layers") + (ModuleName + "Torch.Float.NN.Layers"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Linear") + (ModuleName + "Torch.Float.NN.Linear"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Math") + (ModuleName + "Torch.Float.NN.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Padding") + (ModuleName + "Torch.Float.NN.Padding"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Pooling") + (ModuleName + "Torch.Float.NN.Pooling"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Sampling") + (ModuleName + "Torch.Float.NN.Sampling")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.TH.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.TH.Long.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.TH.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.TH.Byte.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.TH.Byte.TensorMath"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.TH.Float"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.TH.Float.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.TH.Float.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.TH.Float.FreeStorage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.TH.Float.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.TH.Float.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.TH.Float.FreeTensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Floating") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Blas") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Lapack") + (ModuleName + "Torch.FFI.TH.Float.TensorLapack"), + _×_ + (ModuleName "Torch.Sig.NN") + (ModuleName + "Torch.FFI.TH.NN.Float"), + _×_ + (ModuleName + "Torch.Sig.Types.NN") + (ModuleName "Torch.Types.TH"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Random.TH") + (ModuleName + "Torch.FFI.TH.Float.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Random.TH") + (ModuleName + "Torch.FFI.TH.Float.TensorRandom"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Random.THC") + (ModuleName + "Torch.Undefined.Float.Tensor.Random.THC")]}}]}}, + condTreeConstraints = [ + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-unsigned")]))], + condTreeComponents = []}}]}, + _×_ + (UnqualComponentName + "hasktorch-gpu") + CondNode { + condTreeData = + Library { + libName = LSubLibName + (UnqualComponentName + "hasktorch-gpu"), + exposedModules = [ + ModuleName "Torch.Cuda.Long", + ModuleName + "Torch.Cuda.Long.Dynamic", + ModuleName + "Torch.Cuda.Long.Storage", + ModuleName "Torch.Cuda.Double", + ModuleName + "Torch.Cuda.Double.Dynamic", + ModuleName + "Torch.Cuda.Double.Storage"], + reexportedModules = [ + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Activation", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Backprop", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Backprop"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Conv1d", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Conv1d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Conv2d", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Conv2d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Criterion"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Layers", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Layers"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Linear", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Linear"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Math", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Padding", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Padding"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.NN.Sampling", + moduleReexportName = ModuleName + "Torch.Cuda.Double.NN.Sampling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.Dynamic.NN", + moduleReexportName = ModuleName + "Torch.Cuda.Double.Dynamic.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.Dynamic.NN.Activation", + moduleReexportName = ModuleName + "Torch.Cuda.Double.Dynamic.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.Dynamic.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Cuda.Double.Dynamic.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Cuda.Double.Dynamic.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Cuda.Double.Dynamic.NN.Criterion"}], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = + BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [ + "-DCUDA", + "-DHASKTORCH_INTERNAL_CUDA"], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "utils", + SymbolicPath "src"], + otherModules = [ + ModuleName + "Torch.Core.Exceptions", + ModuleName "Torch.Core.Random", + ModuleName "Torch.Core.LogAdd"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [ + EnableExtension LambdaCase, + EnableExtension DataKinds, + EnableExtension TypeFamilies, + EnableExtension + TypeSynonymInstances, + EnableExtension + ScopedTypeVariables, + EnableExtension + FlexibleContexts, + EnableExtension CPP], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "dimensions") + (UnionVersionRanges + (ThisVersion (mkVersion [1, 0])) + (LaterVersion + (mkVersion [1, 0]))) + mainLibSet, + Dependency + (PackageName "hasktorch-ffi-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "safe-exceptions") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 1, 0])) + (LaterVersion + (mkVersion [0, 1, 0]))) + mainLibSet, + Dependency + (PackageName "singletons") + (UnionVersionRanges + (ThisVersion (mkVersion [2, 2])) + (LaterVersion + (mkVersion [2, 2]))) + mainLibSet, + Dependency + (PackageName "text") + (UnionVersionRanges + (ThisVersion + (mkVersion [1, 2, 2])) + (LaterVersion + (mkVersion [1, 2, 2]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-floating")])), + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-signed")])), + Dependency + (PackageName + "hasktorch-ffi-thc") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-thc") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet], + mixins = + [ + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-signed"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Cuda.Long.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Cuda.Long.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Cuda.Long.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Cuda.Long.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName + "Torch.Cuda.Long.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Cuda.Long.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Pointwise.Signed")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathReduce"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName + "Torch.FFI.THC.State"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.THC"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.THC.Long"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.THC.Long.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.THC.Long.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.THC.Long.Storage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.THC.Long.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.THC.Long.TensorIndex"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.THC.Long.TensorMasked"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.THC.Long.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.THC.Long.TensorMathCompare"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.THC.Long.TensorMathCompareT"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.THC.Long.TensorMathPairwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.THC.Long.TensorMathPointwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.THC.Long.TensorMathReduce"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.THC.Long.TensorMathScan"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.THC.Long.TensorMode"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.THC.Long.TensorScatterGather"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.THC.Long.TensorSort"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.THC.Long.TensorTopK"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.FFI.THC.Long.TensorMathPointwise")]}}, + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-floating"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Cuda.Double.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Cuda.Double.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Cuda.Double.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Cuda.Double.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName + "Torch.Cuda.Double.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Blas") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Blas"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Lapack") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Lapack"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise.Floating"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Reduce.Floating"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Floating") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Blas") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Blas"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Lapack") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Lapack"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Pointwise.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Reduce.Floating"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Floating") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Floating"), + _×_ + (ModuleName + "Torch.Undefined.Tensor.Random.TH") + (ModuleName + "Torch.Undefined.Cuda.Double.Tensor.Random.TH"), + _×_ + (ModuleName + "Torch.Undefined.Tensor.Math.Random.TH") + (ModuleName + "Torch.Undefined.Cuda.Double.Tensor.Math.Random.TH"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Random.THC") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Random.THC"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Random.THC") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Random.THC"), + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Cuda.Double.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Cuda.Double.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Cuda.Double.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Cuda.Double.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName + "Torch.Cuda.Double.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Cuda.Double.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN") + (ModuleName + "Torch.Cuda.Double.Dynamic.NN"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN.Activation") + (ModuleName + "Torch.Cuda.Double.Dynamic.NN.Activation"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN.Pooling") + (ModuleName + "Torch.Cuda.Double.Dynamic.NN.Pooling"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.NN.Criterion") + (ModuleName + "Torch.Cuda.Double.Dynamic.NN.Criterion"), + _×_ + (ModuleName + "Torch.Indef.Static.NN") + (ModuleName + "Torch.Cuda.Double.NN"), + _×_ + (ModuleName + "Torch.Indef.Static.NN") + (ModuleName + "Torch.Cuda.Double.NN"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Activation") + (ModuleName + "Torch.Cuda.Double.NN.Activation"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Backprop") + (ModuleName + "Torch.Cuda.Double.NN.Backprop"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Conv1d") + (ModuleName + "Torch.Cuda.Double.NN.Conv1d"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Conv2d") + (ModuleName + "Torch.Cuda.Double.NN.Conv2d"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Criterion") + (ModuleName + "Torch.Cuda.Double.NN.Criterion"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Layers") + (ModuleName + "Torch.Cuda.Double.NN.Layers"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Linear") + (ModuleName + "Torch.Cuda.Double.NN.Linear"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Math") + (ModuleName + "Torch.Cuda.Double.NN.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Padding") + (ModuleName + "Torch.Cuda.Double.NN.Padding"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Pooling") + (ModuleName + "Torch.Cuda.Double.NN.Pooling"), + _×_ + (ModuleName + "Torch.Indef.Static.NN.Sampling") + (ModuleName + "Torch.Cuda.Double.NN.Sampling")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathReduce"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName + "Torch.FFI.THC.State"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.THC"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.THC.Double"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.THC.Double.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.THC.Double.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.THC.Double.Storage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.THC.Double.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.THC.Double.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.THC.Double.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.THC.Double.TensorIndex"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.THC.Double.TensorMasked"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.THC.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.THC.Double.TensorMathCompare"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.THC.Double.TensorMathCompareT"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.THC.Double.TensorMathPairwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.THC.Double.TensorMathPointwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.THC.Double.TensorMathReduce"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.THC.Double.TensorMathScan"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.THC.Double.TensorMode"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.THC.Double.TensorScatterGather"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.THC.Double.TensorSort"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.THC.Double.TensorTopK"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.FFI.THC.Double.TensorMathPointwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.FFI.THC.Double.TensorMathPointwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.FFI.THC.Double.TensorMathReduce"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Floating") + (ModuleName + "Torch.FFI.THC.Double.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Blas") + (ModuleName + "Torch.FFI.THC.Double.TensorMathBlas"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Lapack") + (ModuleName + "Torch.FFI.THC.Double.TensorMathMagma"), + _×_ + (ModuleName "Torch.Sig.NN") + (ModuleName + "Torch.FFI.THC.NN.Double"), + _×_ + (ModuleName + "Torch.Sig.Types.NN") + (ModuleName "Torch.Types.THC"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Random.TH") + (ModuleName + "Torch.Undefined.Cuda.Double.Tensor.Math.Random.TH"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Random.TH") + (ModuleName + "Torch.Undefined.Cuda.Double.Tensor.Random.TH"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Random.THC") + (ModuleName + "Torch.FFI.THC.Double.TensorRandom")]}}]}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "dimensions") + (UnionVersionRanges + (ThisVersion (mkVersion [1, 0])) + (LaterVersion + (mkVersion [1, 0]))) + mainLibSet, + Dependency + (PackageName "hasktorch-ffi-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-th") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "safe-exceptions") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 1, 0])) + (LaterVersion + (mkVersion [0, 1, 0]))) + mainLibSet, + Dependency + (PackageName "singletons") + (UnionVersionRanges + (ThisVersion (mkVersion [2, 2])) + (LaterVersion + (mkVersion [2, 2]))) + mainLibSet, + Dependency + (PackageName "text") + (UnionVersionRanges + (ThisVersion + (mkVersion [1, 2, 2])) + (LaterVersion + (mkVersion [1, 2, 2]))) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-floating")])), + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-signed")])), + Dependency + (PackageName + "hasktorch-ffi-thc") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-types-thc") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet], + condTreeComponents = + [ + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "lite"))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName + "hasktorch-gpu"), + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = + Just + CondNode { + condTreeData = + Library { + libName = LSubLibName + (UnqualComponentName + "hasktorch-gpu"), + exposedModules = [ + ModuleName "Torch.Cuda.Byte", + ModuleName + "Torch.Cuda.Byte.Dynamic", + ModuleName + "Torch.Cuda.Byte.Storage", + ModuleName "Torch.Cuda.Char", + ModuleName + "Torch.Cuda.Char.Dynamic", + ModuleName + "Torch.Cuda.Char.Storage", + ModuleName "Torch.Cuda.Short", + ModuleName + "Torch.Cuda.Short.Dynamic", + ModuleName + "Torch.Cuda.Short.Storage", + ModuleName "Torch.Cuda.Int", + ModuleName + "Torch.Cuda.Int.Dynamic", + ModuleName + "Torch.Cuda.Int.Storage"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = + BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-unsigned")]))], + mixins = + [ + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-unsigned"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Cuda.Byte.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Cuda.Byte.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Byte.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Byte.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Cuda.Byte.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Cuda.Byte.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName + "Torch.Cuda.Byte.Mask")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathReduce"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName + "Torch.FFI.THC.State"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.THC"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.THC.Byte"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.THC.Byte.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.THC.Byte.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.THC.Byte.Storage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.THC.Byte.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.THC.Byte.TensorIndex"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.THC.Byte.TensorMasked"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.THC.Byte.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathCompare"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathCompareT"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathPairwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathPointwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathReduce"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathScan"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.THC.Byte.TensorMode"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.THC.Byte.TensorScatterGather"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.THC.Byte.TensorSort"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.THC.Byte.TensorTopK")]}}, + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-unsigned"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Cuda.Char.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Cuda.Char.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Char.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Char.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Cuda.Char.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Cuda.Char.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName + "Torch.Cuda.Char.Mask")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathReduce"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName + "Torch.FFI.THC.State"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.THC"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.THC.Char"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.THC.Char.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.THC.Char.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.THC.Char.Storage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.THC.Char.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.THC.Char.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.THC.Char.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.THC.Char.TensorIndex"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.THC.Char.TensorMasked"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.THC.Char.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.THC.Char.TensorMathCompare"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.THC.Char.TensorMathCompareT"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.THC.Char.TensorMathPairwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.THC.Char.TensorMathPointwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.THC.Char.TensorMathReduce"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.THC.Char.TensorMathScan"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.THC.Char.TensorMode"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.THC.Char.TensorScatterGather"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.THC.Char.TensorSort"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.THC.Char.TensorTopK")]}}, + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-signed"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Cuda.Short.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Cuda.Short.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Cuda.Short.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Cuda.Short.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName + "Torch.Cuda.Short.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Cuda.Short.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Pointwise.Signed")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathReduce"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName + "Torch.FFI.THC.State"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.THC"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.THC.Short"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.THC.Short.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.THC.Short.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.THC.Short.Storage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.THC.Short.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.THC.Short.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.THC.Short.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.THC.Short.TensorIndex"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.THC.Short.TensorMasked"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.THC.Short.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.THC.Short.TensorMathCompare"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.THC.Short.TensorMathCompareT"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.THC.Short.TensorMathPairwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.THC.Short.TensorMathPointwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.THC.Short.TensorMathReduce"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.THC.Short.TensorMathScan"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.THC.Short.TensorMode"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.THC.Short.TensorScatterGather"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.THC.Short.TensorSort"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.THC.Short.TensorTopK"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.FFI.THC.Short.TensorMathPointwise")]}}, + Mixin { + mixinPackageName = PackageName + "hasktorch", + mixinLibraryName = LSubLibName + (UnqualComponentName + "hasktorch-indef-signed"), + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Indef.Storage") + (ModuleName + "Torch.Indef.Cuda.Int.Storage"), + _×_ + (ModuleName + "Torch.Indef.Storage.Copy") + (ModuleName + "Torch.Indef.Cuda.Int.Storage.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.TopK"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Copy") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Copy"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Index") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Index"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Masked") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Masked"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Compare"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.CompareT"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Pairwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Pointwise"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Reduce"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Scan"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Mode") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Mode"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.ScatterGather"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Sort") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Sort"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.TopK") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.TopK"), + _×_ + (ModuleName "Torch.Indef.Types") + (ModuleName + "Torch.Cuda.Int.Types"), + _×_ + (ModuleName "Torch.Indef.Index") + (ModuleName + "Torch.Cuda.Int.Index"), + _×_ + (ModuleName "Torch.Indef.Mask") + (ModuleName + "Torch.Cuda.Int.Mask"), + _×_ + (ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Cuda.Int.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Pointwise.Signed")], + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName + "Torch.Sig.Index.Tensor") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Index.TensorFree") + (ModuleName + "Torch.FFI.THC.Long.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.Tensor") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.TensorFree") + (ModuleName + "Torch.FFI.THC.Byte.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Mask.MathReduce") + (ModuleName + "Torch.FFI.THC.Byte.TensorMathReduce"), + _×_ + (ModuleName "Torch.Sig.State") + (ModuleName + "Torch.FFI.THC.State"), + _×_ + (ModuleName + "Torch.Sig.Types.Global") + (ModuleName "Torch.Types.THC"), + _×_ + (ModuleName "Torch.Sig.Types") + (ModuleName + "Torch.Types.THC.Int"), + _×_ + (ModuleName "Torch.Sig.Storage") + (ModuleName + "Torch.FFI.THC.Int.Storage"), + _×_ + (ModuleName + "Torch.Sig.Storage.Copy") + (ModuleName + "Torch.FFI.THC.Int.StorageCopy"), + _×_ + (ModuleName + "Torch.Sig.Storage.Memory") + (ModuleName + "Torch.FFI.THC.Int.Storage"), + _×_ + (ModuleName "Torch.Sig.Tensor") + (ModuleName + "Torch.FFI.THC.Int.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Copy") + (ModuleName + "Torch.FFI.THC.Int.TensorCopy"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Memory") + (ModuleName + "Torch.FFI.THC.Int.Tensor"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Index") + (ModuleName + "Torch.FFI.THC.Int.TensorIndex"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Masked") + (ModuleName + "Torch.FFI.THC.Int.TensorMasked"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math") + (ModuleName + "Torch.FFI.THC.Int.TensorMath"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Compare") + (ModuleName + "Torch.FFI.THC.Int.TensorMathCompare"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.CompareT") + (ModuleName + "Torch.FFI.THC.Int.TensorMathCompareT"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pairwise") + (ModuleName + "Torch.FFI.THC.Int.TensorMathPairwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise") + (ModuleName + "Torch.FFI.THC.Int.TensorMathPointwise"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce") + (ModuleName + "Torch.FFI.THC.Int.TensorMathReduce"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Scan") + (ModuleName + "Torch.FFI.THC.Int.TensorMathScan"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Mode") + (ModuleName + "Torch.FFI.THC.Int.TensorMode"), + _×_ + (ModuleName + "Torch.Sig.Tensor.ScatterGather") + (ModuleName + "Torch.FFI.THC.Int.TensorScatterGather"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Sort") + (ModuleName + "Torch.FFI.THC.Int.TensorSort"), + _×_ + (ModuleName + "Torch.Sig.Tensor.TopK") + (ModuleName + "Torch.FFI.THC.Int.TensorTopK"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.FFI.THC.Int.TensorMathPointwise")]}}]}}, + condTreeConstraints = [ + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "hasktorch-indef-unsigned")]))], + condTreeComponents = []}}]}, + _×_ + (UnqualComponentName + "hasktorch-indef-unsigned") + CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName + "hasktorch-indef-unsigned"), + exposedModules = [], + reexportedModules = [ + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Indef.Index", + moduleReexportName = ModuleName + "Torch.Indef.Index"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Indef.Mask", + moduleReexportName = ModuleName + "Torch.Indef.Mask"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Indef.Types", + moduleReexportName = ModuleName + "Torch.Indef.Types"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Storage", + moduleReexportName = ModuleName + "Torch.Indef.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Storage.Copy", + moduleReexportName = ModuleName + "Torch.Indef.Storage.Copy"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Print", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Print"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Copy", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Copy"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Index", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Index"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Masked", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Masked"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Mode", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Mode"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Sort", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Sort"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.TopK", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.TopK"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Copy", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Copy"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Index", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Index"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Masked", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Masked"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Compare", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Compare"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Scan", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Scan"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Mode", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Mode"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.ScatterGather", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.ScatterGather"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Sort", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Sort"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.TopK", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.TopK"}], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-signatures-partial") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "hasktorch-indef") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = [ + Mixin { + mixinPackageName = PackageName + "hasktorch-indef", + mixinLibraryName = LMainLibName, + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + DefaultRenaming, + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName "Torch.Sig.NN") + (ModuleName + "Torch.Undefined.NN"), + _×_ + (ModuleName + "Torch.Sig.Types.NN") + (ModuleName + "Torch.Undefined.Types.NN"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Blas") + (ModuleName + "Torch.Undefined.Tensor.Math.Blas"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Floating") + (ModuleName + "Torch.Undefined.Tensor.Math.Floating"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Lapack") + (ModuleName + "Torch.Undefined.Tensor.Math.Lapack"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Signed") + (ModuleName + "Torch.Undefined.Tensor.Math.Pointwise.Signed"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.Undefined.Tensor.Math.Pointwise.Floating"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.Undefined.Tensor.Math.Reduce.Floating"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Random.TH") + (ModuleName + "Torch.Undefined.Tensor.Math.Random.TH"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Random.TH") + (ModuleName + "Torch.Undefined.Tensor.Random.TH"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Random.THC") + (ModuleName + "Torch.Undefined.Tensor.Random.THC")]}}]}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-signatures-partial") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "hasktorch-indef") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + _×_ + (UnqualComponentName + "hasktorch-indef-signed") + CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName + "hasktorch-indef-signed"), + exposedModules = [], + reexportedModules = [ + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Indef.Index", + moduleReexportName = ModuleName + "Torch.Indef.Index"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Indef.Mask", + moduleReexportName = ModuleName + "Torch.Indef.Mask"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Indef.Types", + moduleReexportName = ModuleName + "Torch.Indef.Types"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Storage", + moduleReexportName = ModuleName + "Torch.Indef.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Storage.Copy", + moduleReexportName = ModuleName + "Torch.Indef.Storage.Copy"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Print", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Print"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Copy", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Copy"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Index", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Index"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Masked", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Masked"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Mode", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Mode"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Sort", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Sort"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.TopK", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.TopK"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Copy", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Copy"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Index", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Index"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Masked", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Masked"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Compare", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Compare"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Scan", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Scan"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Mode", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Mode"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.ScatterGather", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.ScatterGather"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Sort", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Sort"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.TopK", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.TopK"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed"}], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-signatures-partial") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "hasktorch-indef") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = [ + Mixin { + mixinPackageName = PackageName + "hasktorch-indef", + mixinLibraryName = LMainLibName, + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + DefaultRenaming, + includeRequiresRn = + ModuleRenaming + [ + _×_ + (ModuleName "Torch.Sig.NN") + (ModuleName + "Torch.Undefined.NN"), + _×_ + (ModuleName + "Torch.Sig.Types.NN") + (ModuleName + "Torch.Undefined.Types.NN"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Blas") + (ModuleName + "Torch.Undefined.Tensor.Math.Blas"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Floating") + (ModuleName + "Torch.Undefined.Tensor.Math.Floating"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Lapack") + (ModuleName + "Torch.Undefined.Tensor.Math.Lapack"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Pointwise.Floating") + (ModuleName + "Torch.Undefined.Tensor.Math.Pointwise.Floating"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Reduce.Floating") + (ModuleName + "Torch.Undefined.Tensor.Math.Reduce.Floating"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Math.Random.TH") + (ModuleName + "Torch.Undefined.Tensor.Math.Random.TH"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Random.TH") + (ModuleName + "Torch.Undefined.Tensor.Random.TH"), + _×_ + (ModuleName + "Torch.Sig.Tensor.Random.THC") + (ModuleName + "Torch.Undefined.Tensor.Random.THC")]}}]}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName + "hasktorch-signatures-partial") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet, + Dependency + (PackageName "hasktorch-indef") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + _×_ + (UnqualComponentName + "hasktorch-indef-floating") + CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName + "hasktorch-indef-floating"), + exposedModules = [], + reexportedModules = [ + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Indef.Index", + moduleReexportName = ModuleName + "Torch.Indef.Index"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Indef.Mask", + moduleReexportName = ModuleName + "Torch.Indef.Mask"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName "Torch.Indef.Types", + moduleReexportName = ModuleName + "Torch.Indef.Types"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Storage", + moduleReexportName = ModuleName + "Torch.Indef.Storage"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Storage.Copy", + moduleReexportName = ModuleName + "Torch.Indef.Storage.Copy"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Print", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Print"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Copy", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Copy"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Index", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Index"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Masked", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Masked"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Compare"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.CompareT"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pairwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Scan"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Mode", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Mode"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.ScatterGather"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Sort", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Sort"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.TopK", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.TopK"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Copy", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Copy"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Index", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Index"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Masked", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Masked"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Compare", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Compare"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.CompareT"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Pairwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Scan", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Scan"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Mode", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Mode"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.ScatterGather", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.ScatterGather"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Sort", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Sort"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.TopK", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.TopK"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Signed"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Blas", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Blas"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Floating", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Floating"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Lapack", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Lapack"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Random.TH", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Random.TH"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Random.THC", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Random.THC"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Random.TH", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.Tensor.Math.Random.TH"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Blas", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Blas"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Floating", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Floating"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Lapack", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Lapack"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Floating", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Pointwise.Floating"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce.Floating", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Reduce.Floating"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Random.TH", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Random.TH"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Random.THC", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Random.THC"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.Tensor.Math.Random.TH", + moduleReexportName = ModuleName + "Torch.Indef.Static.Tensor.Math.Random.TH"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.NN", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.NN.Activation", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Dynamic.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Indef.Dynamic.NN.Criterion"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Activation", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Activation"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Backprop", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Backprop"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Conv1d", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Conv1d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Conv2d", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Conv2d"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Criterion", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Criterion"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Layers", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Layers"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Linear", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Linear"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Math", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Math"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Padding", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Padding"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Pooling", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Pooling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Indef.Static.NN.Sampling", + moduleReexportName = ModuleName + "Torch.Indef.Static.NN.Sampling"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Undefined.Tensor.Math.Random.TH", + moduleReexportName = ModuleName + "Torch.Undefined.Tensor.Math.Random.TH"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Undefined.Tensor.Random.TH", + moduleReexportName = ModuleName + "Torch.Undefined.Tensor.Random.TH"}, + ModuleReexport { + moduleReexportOriginalPackage = + Nothing, + moduleReexportOriginalName = + ModuleName + "Torch.Undefined.Tensor.Random.THC", + moduleReexportName = ModuleName + "Torch.Undefined.Tensor.Random.THC"}], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "hasktorch-indef") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName + "hasktorch-signatures-partial") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "hasktorch-indef") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName + "hasktorch-signatures-partial") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 0, 1])) + (LaterVersion + (mkVersion [0, 0, 1]))) + (EarlierVersion + (mkVersion [0, 0, 2]))) + mainLibSet], + condTreeComponents = []}] diff --git a/Cabal-tests/tests/ParserTests/regressions/hasktorch.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/hasktorch.condTestSuites.expr new file mode 100644 index 00000000000..25cf09833a4 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/hasktorch.condTestSuites.expr @@ -0,0 +1,300 @@ +[ + _×_ + (UnqualComponentName "spec") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "Spec.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "tests"], + otherModules = [ + ModuleName "Orphans", + ModuleName "MemorySpec", + ModuleName "RawLapackSVDSpec", + ModuleName + "GarbageCollectionSpec", + ModuleName + "Torch.Prelude.Extras", + ModuleName + "Torch.Core.LogAddSpec", + ModuleName + "Torch.Core.RandomSpec", + ModuleName + "Torch.Static.NN.AbsSpec", + ModuleName + "Torch.Static.NN.LinearSpec"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [ + EnableExtension LambdaCase, + EnableExtension DataKinds, + EnableExtension TypeFamilies, + EnableExtension + TypeSynonymInstances, + EnableExtension + ScopedTypeVariables, + EnableExtension + FlexibleContexts, + EnableExtension CPP], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "QuickCheck") + (UnionVersionRanges + (ThisVersion + (mkVersion [2, 11])) + (LaterVersion + (mkVersion [2, 11]))) + mainLibSet, + Dependency + (PackageName "backprop") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 2, 5])) + (LaterVersion + (mkVersion [0, 2, 5]))) + mainLibSet, + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "dimensions") + (UnionVersionRanges + (ThisVersion (mkVersion [1, 0])) + (LaterVersion + (mkVersion [1, 0]))) + mainLibSet, + Dependency + (PackageName + "ghc-typelits-natnormalise") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hspec") + (UnionVersionRanges + (ThisVersion + (mkVersion [2, 4, 4])) + (LaterVersion + (mkVersion [2, 4, 4]))) + mainLibSet, + Dependency + (PackageName "singletons") + (UnionVersionRanges + (ThisVersion (mkVersion [2, 2])) + (LaterVersion + (mkVersion [2, 2]))) + mainLibSet, + Dependency + (PackageName "mtl") + (UnionVersionRanges + (ThisVersion + (mkVersion [2, 2, 2])) + (LaterVersion + (mkVersion [2, 2, 2]))) + mainLibSet, + Dependency + (PackageName + "microlens-platform") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 3, 10])) + (LaterVersion + (mkVersion [0, 3, 10]))) + mainLibSet, + Dependency + (PackageName "monad-loops") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 4, 3])) + (LaterVersion + (mkVersion [0, 4, 3]))) + mainLibSet, + Dependency + (PackageName "time") + (UnionVersionRanges + (ThisVersion + (mkVersion [1, 8, 0])) + (LaterVersion + (mkVersion [1, 8, 0]))) + mainLibSet, + Dependency + (PackageName "transformers") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 5, 5])) + (LaterVersion + (mkVersion [0, 5, 5]))) + mainLibSet, + Dependency + (PackageName "generic-lens") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "QuickCheck") + (UnionVersionRanges + (ThisVersion + (mkVersion [2, 11])) + (LaterVersion + (mkVersion [2, 11]))) + mainLibSet, + Dependency + (PackageName "backprop") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 2, 5])) + (LaterVersion + (mkVersion [0, 2, 5]))) + mainLibSet, + Dependency + (PackageName "base") + (IntersectVersionRanges + (UnionVersionRanges + (ThisVersion (mkVersion [4, 7])) + (LaterVersion + (mkVersion [4, 7]))) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "dimensions") + (UnionVersionRanges + (ThisVersion (mkVersion [1, 0])) + (LaterVersion + (mkVersion [1, 0]))) + mainLibSet, + Dependency + (PackageName + "ghc-typelits-natnormalise") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hasktorch") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hspec") + (UnionVersionRanges + (ThisVersion + (mkVersion [2, 4, 4])) + (LaterVersion + (mkVersion [2, 4, 4]))) + mainLibSet, + Dependency + (PackageName "singletons") + (UnionVersionRanges + (ThisVersion (mkVersion [2, 2])) + (LaterVersion + (mkVersion [2, 2]))) + mainLibSet, + Dependency + (PackageName "mtl") + (UnionVersionRanges + (ThisVersion + (mkVersion [2, 2, 2])) + (LaterVersion + (mkVersion [2, 2, 2]))) + mainLibSet, + Dependency + (PackageName + "microlens-platform") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 3, 10])) + (LaterVersion + (mkVersion [0, 3, 10]))) + mainLibSet, + Dependency + (PackageName "monad-loops") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 4, 3])) + (LaterVersion + (mkVersion [0, 4, 3]))) + mainLibSet, + Dependency + (PackageName "time") + (UnionVersionRanges + (ThisVersion + (mkVersion [1, 8, 0])) + (LaterVersion + (mkVersion [1, 8, 0]))) + mainLibSet, + Dependency + (PackageName "transformers") + (UnionVersionRanges + (ThisVersion + (mkVersion [0, 5, 5])) + (LaterVersion + (mkVersion [0, 5, 5]))) + mainLibSet, + Dependency + (PackageName "generic-lens") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}] diff --git a/Cabal-tests/tests/ParserTests/regressions/hasktorch.expr b/Cabal-tests/tests/ParserTests/regressions/hasktorch.expr deleted file mode 100644 index 463fcf14dd4..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/hasktorch.expr +++ /dev/null @@ -1,20424 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_2, - package = PackageIdentifier { - pkgName = PackageName - "hasktorch", - pkgVersion = mkVersion - [0, 0, 1, 0]}, - licenseRaw = Left - (License - (ELicense - (ELicenseId BSD_3_Clause) - Nothing)), - licenseFiles = [], - copyright = "", - maintainer = - "Sam Stites , Austin Huang - cipher:ROT13", - author = "Hasktorch dev team", - stability = "", - testedWith = [], - homepage = - "https://github.com/hasktorch/hasktorch#readme", - pkgUrl = "", - bugReports = - "https://github.com/hasktorch/hasktorch/issues", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/hasktorch/hasktorch", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "Torch for tensors and neural networks in Haskell", - description = - "Hasktorch is a library for tensors and neural networks in Haskell. It is an independent open source community project which leverages the core C libraries shared by Torch and PyTorch. This library leverages @cabal v2-build@ and @backpack@. *Note that this project is in early development and should only be used by contributing developers. Expect substantial changes to the library API as it evolves. Contributions and PRs are welcome (see details on github).*", - category = - "Tensors, Machine Learning, AI", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [ - MkPackageFlag { - flagName = FlagName "cuda", - flagDescription = - "build with THC support", - flagDefault = False, - flagManual = False}, - MkPackageFlag { - flagName = FlagName "lite", - flagDescription = - "only build with Double and Long support", - flagDefault = False, - flagManual = False}], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName - "Torch.Core.Exceptions", - ModuleName "Torch.Core.Random", - ModuleName "Torch.Core.LogAdd"], - reexportedModules = [ - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Types.Numeric", - moduleReexportName = ModuleName - "Torch.Types.Numeric"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Long", - moduleReexportName = ModuleName - "Torch.Long"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Long.Dynamic", - moduleReexportName = ModuleName - "Torch.Long.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Long.Storage", - moduleReexportName = ModuleName - "Torch.Long.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Double", - moduleReexportName = ModuleName - "Torch.Double"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.Dynamic", - moduleReexportName = ModuleName - "Torch.Double.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.Storage", - moduleReexportName = ModuleName - "Torch.Double.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Double.NN", - moduleReexportName = ModuleName - "Torch.Double.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Activation", - moduleReexportName = ModuleName - "Torch.Double.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Backprop", - moduleReexportName = ModuleName - "Torch.Double.NN.Backprop"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Conv1d", - moduleReexportName = ModuleName - "Torch.Double.NN.Conv1d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Conv2d", - moduleReexportName = ModuleName - "Torch.Double.NN.Conv2d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Double.NN.Criterion"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Layers", - moduleReexportName = ModuleName - "Torch.Double.NN.Layers"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Linear", - moduleReexportName = ModuleName - "Torch.Double.NN.Linear"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Math", - moduleReexportName = ModuleName - "Torch.Double.NN.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Padding", - moduleReexportName = ModuleName - "Torch.Double.NN.Padding"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Double.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Sampling", - moduleReexportName = ModuleName - "Torch.Double.NN.Sampling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.Dynamic.NN", - moduleReexportName = ModuleName - "Torch.Double.Dynamic.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.Dynamic.NN.Activation", - moduleReexportName = ModuleName - "Torch.Double.Dynamic.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.Dynamic.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Double.Dynamic.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.Dynamic.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Double.Dynamic.NN.Criterion"}], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "utils"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [ - EnableExtension LambdaCase, - EnableExtension DataKinds, - EnableExtension TypeFamilies, - EnableExtension - TypeSynonymInstances, - EnableExtension - ScopedTypeVariables, - EnableExtension - FlexibleContexts, - EnableExtension CPP], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "dimensions") - (UnionVersionRanges - (ThisVersion (mkVersion [1, 0])) - (LaterVersion - (mkVersion [1, 0]))) - mainLibSet, - Dependency - (PackageName "safe-exceptions") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 1, 0])) - (LaterVersion - (mkVersion [0, 1, 0]))) - mainLibSet, - Dependency - (PackageName "singletons") - (UnionVersionRanges - (ThisVersion (mkVersion [2, 2])) - (LaterVersion - (mkVersion [2, 2]))) - mainLibSet, - Dependency - (PackageName "text") - (UnionVersionRanges - (ThisVersion - (mkVersion [1, 2, 2])) - (LaterVersion - (mkVersion [1, 2, 2]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-cpu")])), - Dependency - (PackageName "hasktorch-ffi-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "dimensions") - (UnionVersionRanges - (ThisVersion (mkVersion [1, 0])) - (LaterVersion - (mkVersion [1, 0]))) - mainLibSet, - Dependency - (PackageName "safe-exceptions") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 1, 0])) - (LaterVersion - (mkVersion [0, 1, 0]))) - mainLibSet, - Dependency - (PackageName "singletons") - (UnionVersionRanges - (ThisVersion (mkVersion [2, 2])) - (LaterVersion - (mkVersion [2, 2]))) - mainLibSet, - Dependency - (PackageName "text") - (UnionVersionRanges - (ThisVersion - (mkVersion [1, 2, 2])) - (LaterVersion - (mkVersion [1, 2, 2]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-cpu")])), - Dependency - (PackageName "hasktorch-ffi-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `CNot (Var (PackageFlag (FlagName "lite")))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [ - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Byte", - moduleReexportName = ModuleName - "Torch.Byte"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Byte.Dynamic", - moduleReexportName = ModuleName - "Torch.Byte.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Byte.Storage", - moduleReexportName = ModuleName - "Torch.Byte.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Char", - moduleReexportName = ModuleName - "Torch.Char"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Char.Dynamic", - moduleReexportName = ModuleName - "Torch.Char.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Char.Storage", - moduleReexportName = ModuleName - "Torch.Char.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Short", - moduleReexportName = ModuleName - "Torch.Short"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Short.Dynamic", - moduleReexportName = ModuleName - "Torch.Short.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Short.Storage", - moduleReexportName = ModuleName - "Torch.Short.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Int", - moduleReexportName = ModuleName - "Torch.Int"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Int.Dynamic", - moduleReexportName = ModuleName - "Torch.Int.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Int.Storage", - moduleReexportName = ModuleName - "Torch.Int.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Float", - moduleReexportName = ModuleName - "Torch.Float"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.Dynamic", - moduleReexportName = ModuleName - "Torch.Float.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.Storage", - moduleReexportName = ModuleName - "Torch.Float.Storage"}], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "cuda"))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [ - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Cuda.Long", - moduleReexportName = ModuleName - "Torch.Cuda.Long"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Long.Dynamic", - moduleReexportName = ModuleName - "Torch.Cuda.Long.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Long.Storage", - moduleReexportName = ModuleName - "Torch.Cuda.Long.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Cuda.Double", - moduleReexportName = ModuleName - "Torch.Cuda.Double"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.Dynamic", - moduleReexportName = ModuleName - "Torch.Cuda.Double.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.Storage", - moduleReexportName = ModuleName - "Torch.Cuda.Double.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Activation", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Backprop", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Backprop"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Conv1d", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Conv1d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Conv2d", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Conv2d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Criterion"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Layers", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Layers"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Linear", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Linear"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Math", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Padding", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Padding"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Sampling", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Sampling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.Dynamic.NN", - moduleReexportName = ModuleName - "Torch.Cuda.Double.Dynamic.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.Dynamic.NN.Activation", - moduleReexportName = ModuleName - "Torch.Cuda.Double.Dynamic.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.Dynamic.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Cuda.Double.Dynamic.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.Dynamic.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Cuda.Double.Dynamic.NN.Criterion"}], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-gpu")]))], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-gpu")]))], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `CNot (Var (PackageFlag (FlagName "lite")))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [ - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Cuda.Byte", - moduleReexportName = ModuleName - "Torch.Cuda.Byte"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Byte.Dynamic", - moduleReexportName = ModuleName - "Torch.Cuda.Byte.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Byte.Storage", - moduleReexportName = ModuleName - "Torch.Cuda.Byte.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Cuda.Char", - moduleReexportName = ModuleName - "Torch.Cuda.Char"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Char.Dynamic", - moduleReexportName = ModuleName - "Torch.Cuda.Char.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Char.Storage", - moduleReexportName = ModuleName - "Torch.Cuda.Char.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Cuda.Short", - moduleReexportName = ModuleName - "Torch.Cuda.Short"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Short.Dynamic", - moduleReexportName = ModuleName - "Torch.Cuda.Short.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Short.Storage", - moduleReexportName = ModuleName - "Torch.Cuda.Short.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Cuda.Int", - moduleReexportName = ModuleName - "Torch.Cuda.Int"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Int.Dynamic", - moduleReexportName = ModuleName - "Torch.Cuda.Int.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Int.Storage", - moduleReexportName = ModuleName - "Torch.Cuda.Int.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Cuda.Float", - moduleReexportName = ModuleName - "Torch.Cuda.Float"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Float.Dynamic", - moduleReexportName = ModuleName - "Torch.Cuda.Float.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Float.Storage", - moduleReexportName = ModuleName - "Torch.Cuda.Float.Storage"}], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condBranchIfFalse = Nothing}]}, - condSubLibraries = - [ - _×_ - (UnqualComponentName - "hasktorch-cpu") - CondNode { - condTreeData = - Library { - libName = LSubLibName - (UnqualComponentName - "hasktorch-cpu"), - exposedModules = [ - ModuleName "Torch.Long", - ModuleName "Torch.Long.Dynamic", - ModuleName "Torch.Long.Storage", - ModuleName "Torch.Double", - ModuleName - "Torch.Double.Dynamic", - ModuleName - "Torch.Double.Storage"], - reexportedModules = [ - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Double.NN", - moduleReexportName = ModuleName - "Torch.Double.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Activation", - moduleReexportName = ModuleName - "Torch.Double.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Backprop", - moduleReexportName = ModuleName - "Torch.Double.NN.Backprop"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Conv1d", - moduleReexportName = ModuleName - "Torch.Double.NN.Conv1d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Conv2d", - moduleReexportName = ModuleName - "Torch.Double.NN.Conv2d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Double.NN.Criterion"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Layers", - moduleReexportName = ModuleName - "Torch.Double.NN.Layers"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Linear", - moduleReexportName = ModuleName - "Torch.Double.NN.Linear"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Math", - moduleReexportName = ModuleName - "Torch.Double.NN.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Padding", - moduleReexportName = ModuleName - "Torch.Double.NN.Padding"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Double.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Sampling", - moduleReexportName = ModuleName - "Torch.Double.NN.Sampling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.Dynamic.NN", - moduleReexportName = ModuleName - "Torch.Double.Dynamic.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.Dynamic.NN.Activation", - moduleReexportName = ModuleName - "Torch.Double.Dynamic.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.Dynamic.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Double.Dynamic.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.Dynamic.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Double.Dynamic.NN.Criterion"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Float.NN", - moduleReexportName = ModuleName - "Torch.Float.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Activation", - moduleReexportName = ModuleName - "Torch.Float.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Backprop", - moduleReexportName = ModuleName - "Torch.Float.NN.Backprop"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Conv1d", - moduleReexportName = ModuleName - "Torch.Float.NN.Conv1d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Conv2d", - moduleReexportName = ModuleName - "Torch.Float.NN.Conv2d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Float.NN.Criterion"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Layers", - moduleReexportName = ModuleName - "Torch.Float.NN.Layers"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Linear", - moduleReexportName = ModuleName - "Torch.Float.NN.Linear"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Math", - moduleReexportName = ModuleName - "Torch.Float.NN.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Padding", - moduleReexportName = ModuleName - "Torch.Float.NN.Padding"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Float.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Sampling", - moduleReexportName = ModuleName - "Torch.Float.NN.Sampling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.Dynamic.NN", - moduleReexportName = ModuleName - "Torch.Float.Dynamic.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.Dynamic.NN.Activation", - moduleReexportName = ModuleName - "Torch.Float.Dynamic.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.Dynamic.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Float.Dynamic.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.Dynamic.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Float.Dynamic.NN.Criterion"}], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = - BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "utils", - SymbolicPath "src"], - otherModules = [ - ModuleName - "Torch.Core.Exceptions", - ModuleName "Torch.Core.Random", - ModuleName "Torch.Core.LogAdd"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [ - EnableExtension LambdaCase, - EnableExtension DataKinds, - EnableExtension TypeFamilies, - EnableExtension - TypeSynonymInstances, - EnableExtension - ScopedTypeVariables, - EnableExtension - FlexibleContexts, - EnableExtension CPP], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "dimensions") - (UnionVersionRanges - (ThisVersion (mkVersion [1, 0])) - (LaterVersion - (mkVersion [1, 0]))) - mainLibSet, - Dependency - (PackageName "hasktorch-ffi-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "safe-exceptions") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 1, 0])) - (LaterVersion - (mkVersion [0, 1, 0]))) - mainLibSet, - Dependency - (PackageName "singletons") - (UnionVersionRanges - (ThisVersion (mkVersion [2, 2])) - (LaterVersion - (mkVersion [2, 2]))) - mainLibSet, - Dependency - (PackageName "text") - (UnionVersionRanges - (ThisVersion - (mkVersion [1, 2, 2])) - (LaterVersion - (mkVersion [1, 2, 2]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-floating")])), - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-signed")]))], - mixins = - [ - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-signed"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Long.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Long.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Long.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Long.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Long.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Long.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Long.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Long.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Long.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Long.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Long.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Long.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Long.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Long.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Long.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Long.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Long.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName "Torch.Long.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName "Torch.Long.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName "Torch.Long.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Long.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Math.Pointwise.Signed")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.TH.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.TH.Long.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.TH.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.TH.Byte.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.TH.Long"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.TH.Long.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.TH.Long.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.TH.Long.FreeStorage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.TH.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.TH.Long.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.TH.Long.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.FFI.TH.Long.TensorMath")]}}, - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-floating"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Double.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Double.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Double.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Double.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Double.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Double.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Double.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Double.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Double.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Double.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Double.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Double.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Double.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Double.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName - "Torch.Double.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Blas") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Blas"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Lapack") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Lapack"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise.Floating"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Reduce.Floating"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Floating") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Blas") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Blas"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Lapack") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Lapack"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Pointwise.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Reduce.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Floating") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Random.TH") - (ModuleName - "Torch.Indef.Double.Tensor.Random.TH"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Random.TH") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Random.TH"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Random.TH") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Random.TH"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Random.TH") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Random.TH"), - _×_ - (ModuleName - "Torch.Undefined.Tensor.Random.THC") - (ModuleName - "Torch.Undefined.Double.Tensor.Random.THC"), - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Double.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Double.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Double.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Double.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Double.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Double.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Double.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Double.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Double.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Double.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Double.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Double.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Double.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Double.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName - "Torch.Double.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN") - (ModuleName - "Torch.Double.Dynamic.NN"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN.Activation") - (ModuleName - "Torch.Double.Dynamic.NN.Activation"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN.Pooling") - (ModuleName - "Torch.Double.Dynamic.NN.Pooling"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN.Criterion") - (ModuleName - "Torch.Double.Dynamic.NN.Criterion"), - _×_ - (ModuleName - "Torch.Indef.Static.NN") - (ModuleName "Torch.Double.NN"), - _×_ - (ModuleName - "Torch.Indef.Static.NN") - (ModuleName "Torch.Double.NN"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Activation") - (ModuleName - "Torch.Double.NN.Activation"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Backprop") - (ModuleName - "Torch.Double.NN.Backprop"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Conv1d") - (ModuleName - "Torch.Double.NN.Conv1d"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Conv2d") - (ModuleName - "Torch.Double.NN.Conv2d"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Criterion") - (ModuleName - "Torch.Double.NN.Criterion"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Layers") - (ModuleName - "Torch.Double.NN.Layers"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Linear") - (ModuleName - "Torch.Double.NN.Linear"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Math") - (ModuleName - "Torch.Double.NN.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Padding") - (ModuleName - "Torch.Double.NN.Padding"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Pooling") - (ModuleName - "Torch.Double.NN.Pooling"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Sampling") - (ModuleName - "Torch.Double.NN.Sampling")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.TH.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.TH.Long.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.TH.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.TH.Byte.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.TH.Double"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.TH.Double.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.TH.Double.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.TH.Double.FreeStorage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.TH.Double.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.TH.Double.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.TH.Double.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Floating") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Blas") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Lapack") - (ModuleName - "Torch.FFI.TH.Double.TensorLapack"), - _×_ - (ModuleName "Torch.Sig.NN") - (ModuleName - "Torch.FFI.TH.NN.Double"), - _×_ - (ModuleName - "Torch.Sig.Types.NN") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Random.TH") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Random.TH") - (ModuleName - "Torch.FFI.TH.Double.TensorRandom"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Random.THC") - (ModuleName - "Torch.Undefined.Double.Tensor.Random.THC")]}}]}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "dimensions") - (UnionVersionRanges - (ThisVersion (mkVersion [1, 0])) - (LaterVersion - (mkVersion [1, 0]))) - mainLibSet, - Dependency - (PackageName "hasktorch-ffi-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "safe-exceptions") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 1, 0])) - (LaterVersion - (mkVersion [0, 1, 0]))) - mainLibSet, - Dependency - (PackageName "singletons") - (UnionVersionRanges - (ThisVersion (mkVersion [2, 2])) - (LaterVersion - (mkVersion [2, 2]))) - mainLibSet, - Dependency - (PackageName "text") - (UnionVersionRanges - (ThisVersion - (mkVersion [1, 2, 2])) - (LaterVersion - (mkVersion [1, 2, 2]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-floating")])), - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-signed")]))], - condTreeComponents = - [ - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "lite"))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName - "hasktorch-cpu"), - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = - Just - CondNode { - condTreeData = - Library { - libName = LSubLibName - (UnqualComponentName - "hasktorch-cpu"), - exposedModules = [ - ModuleName "Torch.Byte", - ModuleName "Torch.Byte.Dynamic", - ModuleName "Torch.Byte.Storage", - ModuleName "Torch.Char", - ModuleName "Torch.Char.Dynamic", - ModuleName "Torch.Char.Storage", - ModuleName "Torch.Short", - ModuleName - "Torch.Short.Dynamic", - ModuleName - "Torch.Short.Storage", - ModuleName "Torch.Int", - ModuleName "Torch.Int.Dynamic", - ModuleName "Torch.Int.Storage", - ModuleName "Torch.Float", - ModuleName - "Torch.Float.Dynamic", - ModuleName - "Torch.Float.Storage"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = - BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-unsigned")]))], - mixins = - [ - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-unsigned"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Byte.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Byte.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Byte.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Byte.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Byte.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Byte.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Byte.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Byte.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Byte.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Byte.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Byte.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Byte.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Byte.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Byte.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Byte.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Byte.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName "Torch.Byte.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName "Torch.Byte.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName "Torch.Byte.Mask")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.TH.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.TH.Long.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.TH.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.TH.Byte.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.TH.Byte"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.TH.Byte.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.TH.Byte.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.TH.Byte.FreeStorage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.TH.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.TH.Byte.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.TH.Byte.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath")]}}, - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-unsigned"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Char.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Char.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Char.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Char.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Char.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Char.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Char.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Char.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Char.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Char.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Char.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Char.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Char.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Char.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Char.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Char.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Char.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName "Torch.Char.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName "Torch.Char.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName "Torch.Char.Mask")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.TH.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.TH.Long.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.TH.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.TH.Byte.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.TH.Char"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.TH.Char.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.TH.Char.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.TH.Char.FreeStorage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.TH.Char.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.TH.Char.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.TH.Char.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.TH.Char.TensorMath")]}}, - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-signed"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Short.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Short.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Short.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Short.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Short.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Short.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Short.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Short.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Short.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Short.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Short.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Short.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Short.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Short.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Short.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Short.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Short.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Short.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Short.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName "Torch.Short.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Short.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Math.Pointwise.Signed")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.TH.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.TH.Long.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.TH.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.TH.Byte.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.TH.Short"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.TH.Short.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.TH.Short.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.TH.Short.FreeStorage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.TH.Short.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.TH.Short.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.TH.Short.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.FFI.TH.Short.TensorMath")]}}, - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-signed"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Int.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Int.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Int.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Int.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Int.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Int.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Int.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Int.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Int.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Int.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Int.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Int.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Int.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Int.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Int.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Int.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Int.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName "Torch.Int.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName "Torch.Int.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName "Torch.Int.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Int.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Math.Pointwise.Signed")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.TH.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.TH.Long.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.TH.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.TH.Byte.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.TH.Int"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.TH.Int.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.TH.Int.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.TH.Int.FreeStorage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.TH.Int.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.TH.Int.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.TH.Int.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.FFI.TH.Int.TensorMath")]}}, - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-floating"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Float.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Float.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Float.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Float.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Float.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Float.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Float.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Float.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Float.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Float.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Float.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Float.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Float.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Float.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName "Torch.Float.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Blas") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Blas"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Lapack") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Lapack"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise.Floating"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Reduce.Floating"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Floating") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Blas") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Blas"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Lapack") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Lapack"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Pointwise.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Reduce.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Floating") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Random.TH") - (ModuleName - "Torch.Indef.Float.Tensor.Random.TH"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Random.TH") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Random.TH"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Random.TH") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Random.TH"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Random.TH") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Random.TH"), - _×_ - (ModuleName - "Torch.Undefined.Tensor.Random.THC") - (ModuleName - "Torch.Undefined.Float.Tensor.Random.THC"), - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Float.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Float.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Float.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Float.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Float.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Float.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Float.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Float.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Float.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Float.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Float.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Float.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Float.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Float.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName "Torch.Float.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN") - (ModuleName - "Torch.Float.Dynamic.NN"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN.Activation") - (ModuleName - "Torch.Float.Dynamic.NN.Activation"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN.Pooling") - (ModuleName - "Torch.Float.Dynamic.NN.Pooling"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN.Criterion") - (ModuleName - "Torch.Float.Dynamic.NN.Criterion"), - _×_ - (ModuleName - "Torch.Indef.Static.NN") - (ModuleName "Torch.Float.NN"), - _×_ - (ModuleName - "Torch.Indef.Static.NN") - (ModuleName "Torch.Float.NN"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Activation") - (ModuleName - "Torch.Float.NN.Activation"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Backprop") - (ModuleName - "Torch.Float.NN.Backprop"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Conv1d") - (ModuleName - "Torch.Float.NN.Conv1d"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Conv2d") - (ModuleName - "Torch.Float.NN.Conv2d"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Criterion") - (ModuleName - "Torch.Float.NN.Criterion"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Layers") - (ModuleName - "Torch.Float.NN.Layers"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Linear") - (ModuleName - "Torch.Float.NN.Linear"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Math") - (ModuleName - "Torch.Float.NN.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Padding") - (ModuleName - "Torch.Float.NN.Padding"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Pooling") - (ModuleName - "Torch.Float.NN.Pooling"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Sampling") - (ModuleName - "Torch.Float.NN.Sampling")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.TH.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.TH.Long.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.TH.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.TH.Byte.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.TH.Float"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.TH.Float.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.TH.Float.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.TH.Float.FreeStorage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.TH.Float.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.TH.Float.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.TH.Float.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Floating") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Blas") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Lapack") - (ModuleName - "Torch.FFI.TH.Float.TensorLapack"), - _×_ - (ModuleName "Torch.Sig.NN") - (ModuleName - "Torch.FFI.TH.NN.Float"), - _×_ - (ModuleName - "Torch.Sig.Types.NN") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Random.TH") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Random.TH") - (ModuleName - "Torch.FFI.TH.Float.TensorRandom"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Random.THC") - (ModuleName - "Torch.Undefined.Float.Tensor.Random.THC")]}}]}}, - condTreeConstraints = [ - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-unsigned")]))], - condTreeComponents = []}}]}, - _×_ - (UnqualComponentName - "hasktorch-gpu") - CondNode { - condTreeData = - Library { - libName = LSubLibName - (UnqualComponentName - "hasktorch-gpu"), - exposedModules = [ - ModuleName "Torch.Cuda.Long", - ModuleName - "Torch.Cuda.Long.Dynamic", - ModuleName - "Torch.Cuda.Long.Storage", - ModuleName "Torch.Cuda.Double", - ModuleName - "Torch.Cuda.Double.Dynamic", - ModuleName - "Torch.Cuda.Double.Storage"], - reexportedModules = [ - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Activation", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Backprop", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Backprop"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Conv1d", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Conv1d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Conv2d", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Conv2d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Criterion"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Layers", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Layers"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Linear", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Linear"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Math", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Padding", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Padding"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Sampling", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Sampling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.Dynamic.NN", - moduleReexportName = ModuleName - "Torch.Cuda.Double.Dynamic.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.Dynamic.NN.Activation", - moduleReexportName = ModuleName - "Torch.Cuda.Double.Dynamic.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.Dynamic.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Cuda.Double.Dynamic.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.Dynamic.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Cuda.Double.Dynamic.NN.Criterion"}], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = - BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [ - "-DCUDA", - "-DHASKTORCH_INTERNAL_CUDA"], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "utils", - SymbolicPath "src"], - otherModules = [ - ModuleName - "Torch.Core.Exceptions", - ModuleName "Torch.Core.Random", - ModuleName "Torch.Core.LogAdd"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [ - EnableExtension LambdaCase, - EnableExtension DataKinds, - EnableExtension TypeFamilies, - EnableExtension - TypeSynonymInstances, - EnableExtension - ScopedTypeVariables, - EnableExtension - FlexibleContexts, - EnableExtension CPP], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "dimensions") - (UnionVersionRanges - (ThisVersion (mkVersion [1, 0])) - (LaterVersion - (mkVersion [1, 0]))) - mainLibSet, - Dependency - (PackageName "hasktorch-ffi-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "safe-exceptions") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 1, 0])) - (LaterVersion - (mkVersion [0, 1, 0]))) - mainLibSet, - Dependency - (PackageName "singletons") - (UnionVersionRanges - (ThisVersion (mkVersion [2, 2])) - (LaterVersion - (mkVersion [2, 2]))) - mainLibSet, - Dependency - (PackageName "text") - (UnionVersionRanges - (ThisVersion - (mkVersion [1, 2, 2])) - (LaterVersion - (mkVersion [1, 2, 2]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-floating")])), - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-signed")])), - Dependency - (PackageName - "hasktorch-ffi-thc") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-thc") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet], - mixins = - [ - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-signed"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Cuda.Long.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Cuda.Long.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Cuda.Long.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Cuda.Long.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName - "Torch.Cuda.Long.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Pointwise.Signed")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathReduce"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName - "Torch.FFI.THC.State"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.THC"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.THC.Long"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.THC.Long.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.THC.Long.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.THC.Long.Storage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.THC.Long.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.THC.Long.TensorIndex"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.THC.Long.TensorMasked"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.THC.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.THC.Long.TensorMathCompare"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.THC.Long.TensorMathCompareT"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.THC.Long.TensorMathPairwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.THC.Long.TensorMathPointwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.THC.Long.TensorMathReduce"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.THC.Long.TensorMathScan"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.THC.Long.TensorMode"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.THC.Long.TensorScatterGather"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.THC.Long.TensorSort"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.THC.Long.TensorTopK"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.FFI.THC.Long.TensorMathPointwise")]}}, - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-floating"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Cuda.Double.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Cuda.Double.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Cuda.Double.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Cuda.Double.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName - "Torch.Cuda.Double.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Blas") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Blas"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Lapack") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Lapack"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise.Floating"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Reduce.Floating"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Floating") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Blas") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Blas"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Lapack") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Lapack"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Pointwise.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Reduce.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Floating") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Floating"), - _×_ - (ModuleName - "Torch.Undefined.Tensor.Random.TH") - (ModuleName - "Torch.Undefined.Cuda.Double.Tensor.Random.TH"), - _×_ - (ModuleName - "Torch.Undefined.Tensor.Math.Random.TH") - (ModuleName - "Torch.Undefined.Cuda.Double.Tensor.Math.Random.TH"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Random.THC") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Random.THC"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Random.THC") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Random.THC"), - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Cuda.Double.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Cuda.Double.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Cuda.Double.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Cuda.Double.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName - "Torch.Cuda.Double.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN") - (ModuleName - "Torch.Cuda.Double.Dynamic.NN"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN.Activation") - (ModuleName - "Torch.Cuda.Double.Dynamic.NN.Activation"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN.Pooling") - (ModuleName - "Torch.Cuda.Double.Dynamic.NN.Pooling"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN.Criterion") - (ModuleName - "Torch.Cuda.Double.Dynamic.NN.Criterion"), - _×_ - (ModuleName - "Torch.Indef.Static.NN") - (ModuleName - "Torch.Cuda.Double.NN"), - _×_ - (ModuleName - "Torch.Indef.Static.NN") - (ModuleName - "Torch.Cuda.Double.NN"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Activation") - (ModuleName - "Torch.Cuda.Double.NN.Activation"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Backprop") - (ModuleName - "Torch.Cuda.Double.NN.Backprop"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Conv1d") - (ModuleName - "Torch.Cuda.Double.NN.Conv1d"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Conv2d") - (ModuleName - "Torch.Cuda.Double.NN.Conv2d"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Criterion") - (ModuleName - "Torch.Cuda.Double.NN.Criterion"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Layers") - (ModuleName - "Torch.Cuda.Double.NN.Layers"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Linear") - (ModuleName - "Torch.Cuda.Double.NN.Linear"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Math") - (ModuleName - "Torch.Cuda.Double.NN.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Padding") - (ModuleName - "Torch.Cuda.Double.NN.Padding"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Pooling") - (ModuleName - "Torch.Cuda.Double.NN.Pooling"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Sampling") - (ModuleName - "Torch.Cuda.Double.NN.Sampling")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathReduce"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName - "Torch.FFI.THC.State"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.THC"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.THC.Double"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.THC.Double.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.THC.Double.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.THC.Double.Storage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.THC.Double.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.THC.Double.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.THC.Double.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.THC.Double.TensorIndex"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.THC.Double.TensorMasked"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.THC.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.THC.Double.TensorMathCompare"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.THC.Double.TensorMathCompareT"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.THC.Double.TensorMathPairwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.THC.Double.TensorMathPointwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.THC.Double.TensorMathReduce"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.THC.Double.TensorMathScan"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.THC.Double.TensorMode"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.THC.Double.TensorScatterGather"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.THC.Double.TensorSort"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.THC.Double.TensorTopK"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.FFI.THC.Double.TensorMathPointwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.FFI.THC.Double.TensorMathPointwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.FFI.THC.Double.TensorMathReduce"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Floating") - (ModuleName - "Torch.FFI.THC.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Blas") - (ModuleName - "Torch.FFI.THC.Double.TensorMathBlas"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Lapack") - (ModuleName - "Torch.FFI.THC.Double.TensorMathMagma"), - _×_ - (ModuleName "Torch.Sig.NN") - (ModuleName - "Torch.FFI.THC.NN.Double"), - _×_ - (ModuleName - "Torch.Sig.Types.NN") - (ModuleName "Torch.Types.THC"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Random.TH") - (ModuleName - "Torch.Undefined.Cuda.Double.Tensor.Math.Random.TH"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Random.TH") - (ModuleName - "Torch.Undefined.Cuda.Double.Tensor.Random.TH"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Random.THC") - (ModuleName - "Torch.FFI.THC.Double.TensorRandom")]}}]}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "dimensions") - (UnionVersionRanges - (ThisVersion (mkVersion [1, 0])) - (LaterVersion - (mkVersion [1, 0]))) - mainLibSet, - Dependency - (PackageName "hasktorch-ffi-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "safe-exceptions") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 1, 0])) - (LaterVersion - (mkVersion [0, 1, 0]))) - mainLibSet, - Dependency - (PackageName "singletons") - (UnionVersionRanges - (ThisVersion (mkVersion [2, 2])) - (LaterVersion - (mkVersion [2, 2]))) - mainLibSet, - Dependency - (PackageName "text") - (UnionVersionRanges - (ThisVersion - (mkVersion [1, 2, 2])) - (LaterVersion - (mkVersion [1, 2, 2]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-floating")])), - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-signed")])), - Dependency - (PackageName - "hasktorch-ffi-thc") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-thc") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet], - condTreeComponents = - [ - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "lite"))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName - "hasktorch-gpu"), - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = - Just - CondNode { - condTreeData = - Library { - libName = LSubLibName - (UnqualComponentName - "hasktorch-gpu"), - exposedModules = [ - ModuleName "Torch.Cuda.Byte", - ModuleName - "Torch.Cuda.Byte.Dynamic", - ModuleName - "Torch.Cuda.Byte.Storage", - ModuleName "Torch.Cuda.Char", - ModuleName - "Torch.Cuda.Char.Dynamic", - ModuleName - "Torch.Cuda.Char.Storage", - ModuleName "Torch.Cuda.Short", - ModuleName - "Torch.Cuda.Short.Dynamic", - ModuleName - "Torch.Cuda.Short.Storage", - ModuleName "Torch.Cuda.Int", - ModuleName - "Torch.Cuda.Int.Dynamic", - ModuleName - "Torch.Cuda.Int.Storage"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = - BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-unsigned")]))], - mixins = - [ - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-unsigned"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Cuda.Byte.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Cuda.Byte.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Cuda.Byte.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Cuda.Byte.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName - "Torch.Cuda.Byte.Mask")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathReduce"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName - "Torch.FFI.THC.State"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.THC"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.THC.Byte"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.THC.Byte.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.THC.Byte.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.THC.Byte.Storage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.THC.Byte.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.THC.Byte.TensorIndex"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.THC.Byte.TensorMasked"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.THC.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathCompare"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathCompareT"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathPairwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathPointwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathReduce"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathScan"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.THC.Byte.TensorMode"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.THC.Byte.TensorScatterGather"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.THC.Byte.TensorSort"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.THC.Byte.TensorTopK")]}}, - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-unsigned"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Cuda.Char.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Cuda.Char.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Cuda.Char.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Cuda.Char.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName - "Torch.Cuda.Char.Mask")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathReduce"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName - "Torch.FFI.THC.State"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.THC"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.THC.Char"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.THC.Char.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.THC.Char.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.THC.Char.Storage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.THC.Char.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.THC.Char.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.THC.Char.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.THC.Char.TensorIndex"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.THC.Char.TensorMasked"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.THC.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.THC.Char.TensorMathCompare"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.THC.Char.TensorMathCompareT"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.THC.Char.TensorMathPairwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.THC.Char.TensorMathPointwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.THC.Char.TensorMathReduce"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.THC.Char.TensorMathScan"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.THC.Char.TensorMode"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.THC.Char.TensorScatterGather"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.THC.Char.TensorSort"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.THC.Char.TensorTopK")]}}, - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-signed"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Cuda.Short.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Cuda.Short.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Cuda.Short.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Cuda.Short.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName - "Torch.Cuda.Short.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Pointwise.Signed")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathReduce"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName - "Torch.FFI.THC.State"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.THC"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.THC.Short"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.THC.Short.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.THC.Short.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.THC.Short.Storage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.THC.Short.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.THC.Short.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.THC.Short.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.THC.Short.TensorIndex"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.THC.Short.TensorMasked"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.THC.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.THC.Short.TensorMathCompare"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.THC.Short.TensorMathCompareT"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.THC.Short.TensorMathPairwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.THC.Short.TensorMathPointwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.THC.Short.TensorMathReduce"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.THC.Short.TensorMathScan"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.THC.Short.TensorMode"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.THC.Short.TensorScatterGather"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.THC.Short.TensorSort"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.THC.Short.TensorTopK"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.FFI.THC.Short.TensorMathPointwise")]}}, - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-signed"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Cuda.Int.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Cuda.Int.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Cuda.Int.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Cuda.Int.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName - "Torch.Cuda.Int.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Pointwise.Signed")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathReduce"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName - "Torch.FFI.THC.State"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.THC"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.THC.Int"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.THC.Int.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.THC.Int.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.THC.Int.Storage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.THC.Int.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.THC.Int.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.THC.Int.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.THC.Int.TensorIndex"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.THC.Int.TensorMasked"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.THC.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.THC.Int.TensorMathCompare"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.THC.Int.TensorMathCompareT"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.THC.Int.TensorMathPairwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.THC.Int.TensorMathPointwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.THC.Int.TensorMathReduce"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.THC.Int.TensorMathScan"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.THC.Int.TensorMode"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.THC.Int.TensorScatterGather"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.THC.Int.TensorSort"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.THC.Int.TensorTopK"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.FFI.THC.Int.TensorMathPointwise")]}}]}}, - condTreeConstraints = [ - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-unsigned")]))], - condTreeComponents = []}}]}, - _×_ - (UnqualComponentName - "hasktorch-indef-unsigned") - CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName - "hasktorch-indef-unsigned"), - exposedModules = [], - reexportedModules = [ - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Indef.Index", - moduleReexportName = ModuleName - "Torch.Indef.Index"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Indef.Mask", - moduleReexportName = ModuleName - "Torch.Indef.Mask"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Indef.Types", - moduleReexportName = ModuleName - "Torch.Indef.Types"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Storage", - moduleReexportName = ModuleName - "Torch.Indef.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Storage.Copy", - moduleReexportName = ModuleName - "Torch.Indef.Storage.Copy"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Print", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Print"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Copy", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Copy"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Index", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Index"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Masked", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Masked"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Mode", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Mode"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Sort", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Sort"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.TopK", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.TopK"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Copy", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Copy"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Index", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Index"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Masked", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Masked"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Compare", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Compare"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Scan", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Scan"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Mode", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Mode"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.ScatterGather", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.ScatterGather"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Sort", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Sort"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.TopK", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.TopK"}], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-signatures-partial") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "hasktorch-indef") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = [ - Mixin { - mixinPackageName = PackageName - "hasktorch-indef", - mixinLibraryName = LMainLibName, - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - DefaultRenaming, - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName "Torch.Sig.NN") - (ModuleName - "Torch.Undefined.NN"), - _×_ - (ModuleName - "Torch.Sig.Types.NN") - (ModuleName - "Torch.Undefined.Types.NN"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Blas") - (ModuleName - "Torch.Undefined.Tensor.Math.Blas"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Floating") - (ModuleName - "Torch.Undefined.Tensor.Math.Floating"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Lapack") - (ModuleName - "Torch.Undefined.Tensor.Math.Lapack"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Undefined.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.Undefined.Tensor.Math.Pointwise.Floating"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.Undefined.Tensor.Math.Reduce.Floating"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Random.TH") - (ModuleName - "Torch.Undefined.Tensor.Math.Random.TH"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Random.TH") - (ModuleName - "Torch.Undefined.Tensor.Random.TH"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Random.THC") - (ModuleName - "Torch.Undefined.Tensor.Random.THC")]}}]}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-signatures-partial") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "hasktorch-indef") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - _×_ - (UnqualComponentName - "hasktorch-indef-signed") - CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName - "hasktorch-indef-signed"), - exposedModules = [], - reexportedModules = [ - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Indef.Index", - moduleReexportName = ModuleName - "Torch.Indef.Index"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Indef.Mask", - moduleReexportName = ModuleName - "Torch.Indef.Mask"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Indef.Types", - moduleReexportName = ModuleName - "Torch.Indef.Types"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Storage", - moduleReexportName = ModuleName - "Torch.Indef.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Storage.Copy", - moduleReexportName = ModuleName - "Torch.Indef.Storage.Copy"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Print", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Print"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Copy", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Copy"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Index", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Index"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Masked", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Masked"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Mode", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Mode"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Sort", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Sort"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.TopK", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.TopK"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Copy", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Copy"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Index", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Index"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Masked", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Masked"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Compare", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Compare"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Scan", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Scan"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Mode", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Mode"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.ScatterGather", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.ScatterGather"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Sort", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Sort"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.TopK", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.TopK"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed"}], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-signatures-partial") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "hasktorch-indef") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = [ - Mixin { - mixinPackageName = PackageName - "hasktorch-indef", - mixinLibraryName = LMainLibName, - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - DefaultRenaming, - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName "Torch.Sig.NN") - (ModuleName - "Torch.Undefined.NN"), - _×_ - (ModuleName - "Torch.Sig.Types.NN") - (ModuleName - "Torch.Undefined.Types.NN"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Blas") - (ModuleName - "Torch.Undefined.Tensor.Math.Blas"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Floating") - (ModuleName - "Torch.Undefined.Tensor.Math.Floating"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Lapack") - (ModuleName - "Torch.Undefined.Tensor.Math.Lapack"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.Undefined.Tensor.Math.Pointwise.Floating"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.Undefined.Tensor.Math.Reduce.Floating"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Random.TH") - (ModuleName - "Torch.Undefined.Tensor.Math.Random.TH"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Random.TH") - (ModuleName - "Torch.Undefined.Tensor.Random.TH"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Random.THC") - (ModuleName - "Torch.Undefined.Tensor.Random.THC")]}}]}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-signatures-partial") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "hasktorch-indef") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - _×_ - (UnqualComponentName - "hasktorch-indef-floating") - CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName - "hasktorch-indef-floating"), - exposedModules = [], - reexportedModules = [ - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Indef.Index", - moduleReexportName = ModuleName - "Torch.Indef.Index"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Indef.Mask", - moduleReexportName = ModuleName - "Torch.Indef.Mask"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Indef.Types", - moduleReexportName = ModuleName - "Torch.Indef.Types"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Storage", - moduleReexportName = ModuleName - "Torch.Indef.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Storage.Copy", - moduleReexportName = ModuleName - "Torch.Indef.Storage.Copy"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Print", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Print"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Copy", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Copy"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Index", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Index"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Masked", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Masked"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Mode", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Mode"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Sort", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Sort"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.TopK", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.TopK"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Copy", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Copy"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Index", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Index"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Masked", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Masked"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Compare", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Compare"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Scan", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Scan"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Mode", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Mode"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.ScatterGather", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.ScatterGather"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Sort", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Sort"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.TopK", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.TopK"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Blas", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Blas"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Floating", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Floating"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Lapack", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Lapack"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Random.TH", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Random.TH"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Random.THC", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Random.THC"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Random.TH", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Random.TH"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Blas", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Blas"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Floating", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Floating"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Lapack", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Lapack"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Floating", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Floating"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce.Floating", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce.Floating"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Random.TH", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Random.TH"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Random.THC", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Random.THC"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Random.TH", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Random.TH"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.NN", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.NN.Activation", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.NN.Criterion"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Activation", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Backprop", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Backprop"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Conv1d", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Conv1d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Conv2d", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Conv2d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Criterion"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Layers", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Layers"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Linear", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Linear"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Math", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Padding", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Padding"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Sampling", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Sampling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Undefined.Tensor.Math.Random.TH", - moduleReexportName = ModuleName - "Torch.Undefined.Tensor.Math.Random.TH"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Undefined.Tensor.Random.TH", - moduleReexportName = ModuleName - "Torch.Undefined.Tensor.Random.TH"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Undefined.Tensor.Random.THC", - moduleReexportName = ModuleName - "Torch.Undefined.Tensor.Random.THC"}], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "hasktorch-indef") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName - "hasktorch-signatures-partial") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "hasktorch-indef") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName - "hasktorch-signatures-partial") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet], - condTreeComponents = []}], - condForeignLibs = [], - condExecutables = [ - _×_ - (UnqualComponentName - "isdefinite-cpu") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "isdefinite-cpu", - modulePath = SymbolicPath - "Noop.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "exe"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-cpu")]))], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-cpu")]))], - condTreeComponents = []}, - _×_ - (UnqualComponentName - "isdefinite-gpu") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "isdefinite-gpu", - modulePath = SymbolicPath - "Noop.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "exe"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-gpu")]))], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-gpu")]))], - condTreeComponents = []}, - _×_ - (UnqualComponentName - "isdefinite") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "isdefinite", - modulePath = SymbolicPath - "Noop.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "exe"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - _×_ - (UnqualComponentName "memcheck") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "memcheck", - modulePath = SymbolicPath - "Memcheck.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "exe"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}], - condTestSuites = [ - _×_ - (UnqualComponentName "spec") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "Spec.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "tests"], - otherModules = [ - ModuleName "Orphans", - ModuleName "MemorySpec", - ModuleName "RawLapackSVDSpec", - ModuleName - "GarbageCollectionSpec", - ModuleName - "Torch.Prelude.Extras", - ModuleName - "Torch.Core.LogAddSpec", - ModuleName - "Torch.Core.RandomSpec", - ModuleName - "Torch.Static.NN.AbsSpec", - ModuleName - "Torch.Static.NN.LinearSpec"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [ - EnableExtension LambdaCase, - EnableExtension DataKinds, - EnableExtension TypeFamilies, - EnableExtension - TypeSynonymInstances, - EnableExtension - ScopedTypeVariables, - EnableExtension - FlexibleContexts, - EnableExtension CPP], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "QuickCheck") - (UnionVersionRanges - (ThisVersion - (mkVersion [2, 11])) - (LaterVersion - (mkVersion [2, 11]))) - mainLibSet, - Dependency - (PackageName "backprop") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 2, 5])) - (LaterVersion - (mkVersion [0, 2, 5]))) - mainLibSet, - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "dimensions") - (UnionVersionRanges - (ThisVersion (mkVersion [1, 0])) - (LaterVersion - (mkVersion [1, 0]))) - mainLibSet, - Dependency - (PackageName - "ghc-typelits-natnormalise") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "hspec") - (UnionVersionRanges - (ThisVersion - (mkVersion [2, 4, 4])) - (LaterVersion - (mkVersion [2, 4, 4]))) - mainLibSet, - Dependency - (PackageName "singletons") - (UnionVersionRanges - (ThisVersion (mkVersion [2, 2])) - (LaterVersion - (mkVersion [2, 2]))) - mainLibSet, - Dependency - (PackageName "mtl") - (UnionVersionRanges - (ThisVersion - (mkVersion [2, 2, 2])) - (LaterVersion - (mkVersion [2, 2, 2]))) - mainLibSet, - Dependency - (PackageName - "microlens-platform") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 3, 10])) - (LaterVersion - (mkVersion [0, 3, 10]))) - mainLibSet, - Dependency - (PackageName "monad-loops") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 4, 3])) - (LaterVersion - (mkVersion [0, 4, 3]))) - mainLibSet, - Dependency - (PackageName "time") - (UnionVersionRanges - (ThisVersion - (mkVersion [1, 8, 0])) - (LaterVersion - (mkVersion [1, 8, 0]))) - mainLibSet, - Dependency - (PackageName "transformers") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 5, 5])) - (LaterVersion - (mkVersion [0, 5, 5]))) - mainLibSet, - Dependency - (PackageName "generic-lens") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "QuickCheck") - (UnionVersionRanges - (ThisVersion - (mkVersion [2, 11])) - (LaterVersion - (mkVersion [2, 11]))) - mainLibSet, - Dependency - (PackageName "backprop") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 2, 5])) - (LaterVersion - (mkVersion [0, 2, 5]))) - mainLibSet, - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "dimensions") - (UnionVersionRanges - (ThisVersion (mkVersion [1, 0])) - (LaterVersion - (mkVersion [1, 0]))) - mainLibSet, - Dependency - (PackageName - "ghc-typelits-natnormalise") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "hspec") - (UnionVersionRanges - (ThisVersion - (mkVersion [2, 4, 4])) - (LaterVersion - (mkVersion [2, 4, 4]))) - mainLibSet, - Dependency - (PackageName "singletons") - (UnionVersionRanges - (ThisVersion (mkVersion [2, 2])) - (LaterVersion - (mkVersion [2, 2]))) - mainLibSet, - Dependency - (PackageName "mtl") - (UnionVersionRanges - (ThisVersion - (mkVersion [2, 2, 2])) - (LaterVersion - (mkVersion [2, 2, 2]))) - mainLibSet, - Dependency - (PackageName - "microlens-platform") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 3, 10])) - (LaterVersion - (mkVersion [0, 3, 10]))) - mainLibSet, - Dependency - (PackageName "monad-loops") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 4, 3])) - (LaterVersion - (mkVersion [0, 4, 3]))) - mainLibSet, - Dependency - (PackageName "time") - (UnionVersionRanges - (ThisVersion - (mkVersion [1, 8, 0])) - (LaterVersion - (mkVersion [1, 8, 0]))) - mainLibSet, - Dependency - (PackageName "transformers") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 5, 5])) - (LaterVersion - (mkVersion [0, 5, 5]))) - mainLibSet, - Dependency - (PackageName "generic-lens") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName - "Torch.Core.Exceptions", - ModuleName "Torch.Core.Random", - ModuleName "Torch.Core.LogAdd"], - reexportedModules = [ - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Types.Numeric", - moduleReexportName = ModuleName - "Torch.Types.Numeric"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Long", - moduleReexportName = ModuleName - "Torch.Long"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Long.Dynamic", - moduleReexportName = ModuleName - "Torch.Long.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Long.Storage", - moduleReexportName = ModuleName - "Torch.Long.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Double", - moduleReexportName = ModuleName - "Torch.Double"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.Dynamic", - moduleReexportName = ModuleName - "Torch.Double.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.Storage", - moduleReexportName = ModuleName - "Torch.Double.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Double.NN", - moduleReexportName = ModuleName - "Torch.Double.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Activation", - moduleReexportName = ModuleName - "Torch.Double.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Backprop", - moduleReexportName = ModuleName - "Torch.Double.NN.Backprop"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Conv1d", - moduleReexportName = ModuleName - "Torch.Double.NN.Conv1d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Conv2d", - moduleReexportName = ModuleName - "Torch.Double.NN.Conv2d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Double.NN.Criterion"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Layers", - moduleReexportName = ModuleName - "Torch.Double.NN.Layers"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Linear", - moduleReexportName = ModuleName - "Torch.Double.NN.Linear"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Math", - moduleReexportName = ModuleName - "Torch.Double.NN.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Padding", - moduleReexportName = ModuleName - "Torch.Double.NN.Padding"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Double.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Sampling", - moduleReexportName = ModuleName - "Torch.Double.NN.Sampling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.Dynamic.NN", - moduleReexportName = ModuleName - "Torch.Double.Dynamic.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.Dynamic.NN.Activation", - moduleReexportName = ModuleName - "Torch.Double.Dynamic.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.Dynamic.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Double.Dynamic.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.Dynamic.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Double.Dynamic.NN.Criterion"}], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "utils"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [ - EnableExtension LambdaCase, - EnableExtension DataKinds, - EnableExtension TypeFamilies, - EnableExtension - TypeSynonymInstances, - EnableExtension - ScopedTypeVariables, - EnableExtension - FlexibleContexts, - EnableExtension CPP], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "dimensions") - (UnionVersionRanges - (ThisVersion (mkVersion [1, 0])) - (LaterVersion - (mkVersion [1, 0]))) - mainLibSet, - Dependency - (PackageName "safe-exceptions") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 1, 0])) - (LaterVersion - (mkVersion [0, 1, 0]))) - mainLibSet, - Dependency - (PackageName "singletons") - (UnionVersionRanges - (ThisVersion (mkVersion [2, 2])) - (LaterVersion - (mkVersion [2, 2]))) - mainLibSet, - Dependency - (PackageName "text") - (UnionVersionRanges - (ThisVersion - (mkVersion [1, 2, 2])) - (LaterVersion - (mkVersion [1, 2, 2]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-cpu")])), - Dependency - (PackageName "hasktorch-ffi-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "dimensions") - (UnionVersionRanges - (ThisVersion (mkVersion [1, 0])) - (LaterVersion - (mkVersion [1, 0]))) - mainLibSet, - Dependency - (PackageName "safe-exceptions") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 1, 0])) - (LaterVersion - (mkVersion [0, 1, 0]))) - mainLibSet, - Dependency - (PackageName "singletons") - (UnionVersionRanges - (ThisVersion (mkVersion [2, 2])) - (LaterVersion - (mkVersion [2, 2]))) - mainLibSet, - Dependency - (PackageName "text") - (UnionVersionRanges - (ThisVersion - (mkVersion [1, 2, 2])) - (LaterVersion - (mkVersion [1, 2, 2]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-cpu")])), - Dependency - (PackageName "hasktorch-ffi-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `CNot (Var (PackageFlag (FlagName "lite")))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [ - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Byte", - moduleReexportName = ModuleName - "Torch.Byte"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Byte.Dynamic", - moduleReexportName = ModuleName - "Torch.Byte.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Byte.Storage", - moduleReexportName = ModuleName - "Torch.Byte.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Char", - moduleReexportName = ModuleName - "Torch.Char"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Char.Dynamic", - moduleReexportName = ModuleName - "Torch.Char.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Char.Storage", - moduleReexportName = ModuleName - "Torch.Char.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Short", - moduleReexportName = ModuleName - "Torch.Short"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Short.Dynamic", - moduleReexportName = ModuleName - "Torch.Short.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Short.Storage", - moduleReexportName = ModuleName - "Torch.Short.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Int", - moduleReexportName = ModuleName - "Torch.Int"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Int.Dynamic", - moduleReexportName = ModuleName - "Torch.Int.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Int.Storage", - moduleReexportName = ModuleName - "Torch.Int.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Float", - moduleReexportName = ModuleName - "Torch.Float"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.Dynamic", - moduleReexportName = ModuleName - "Torch.Float.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.Storage", - moduleReexportName = ModuleName - "Torch.Float.Storage"}], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "cuda"))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [ - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Cuda.Long", - moduleReexportName = ModuleName - "Torch.Cuda.Long"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Long.Dynamic", - moduleReexportName = ModuleName - "Torch.Cuda.Long.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Long.Storage", - moduleReexportName = ModuleName - "Torch.Cuda.Long.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Cuda.Double", - moduleReexportName = ModuleName - "Torch.Cuda.Double"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.Dynamic", - moduleReexportName = ModuleName - "Torch.Cuda.Double.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.Storage", - moduleReexportName = ModuleName - "Torch.Cuda.Double.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Activation", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Backprop", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Backprop"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Conv1d", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Conv1d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Conv2d", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Conv2d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Criterion"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Layers", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Layers"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Linear", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Linear"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Math", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Padding", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Padding"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Sampling", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Sampling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.Dynamic.NN", - moduleReexportName = ModuleName - "Torch.Cuda.Double.Dynamic.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.Dynamic.NN.Activation", - moduleReexportName = ModuleName - "Torch.Cuda.Double.Dynamic.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.Dynamic.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Cuda.Double.Dynamic.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.Dynamic.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Cuda.Double.Dynamic.NN.Criterion"}], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-gpu")]))], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-gpu")]))], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `CNot (Var (PackageFlag (FlagName "lite")))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [ - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Cuda.Byte", - moduleReexportName = ModuleName - "Torch.Cuda.Byte"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Byte.Dynamic", - moduleReexportName = ModuleName - "Torch.Cuda.Byte.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Byte.Storage", - moduleReexportName = ModuleName - "Torch.Cuda.Byte.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Cuda.Char", - moduleReexportName = ModuleName - "Torch.Cuda.Char"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Char.Dynamic", - moduleReexportName = ModuleName - "Torch.Cuda.Char.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Char.Storage", - moduleReexportName = ModuleName - "Torch.Cuda.Char.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Cuda.Short", - moduleReexportName = ModuleName - "Torch.Cuda.Short"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Short.Dynamic", - moduleReexportName = ModuleName - "Torch.Cuda.Short.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Short.Storage", - moduleReexportName = ModuleName - "Torch.Cuda.Short.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Cuda.Int", - moduleReexportName = ModuleName - "Torch.Cuda.Int"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Int.Dynamic", - moduleReexportName = ModuleName - "Torch.Cuda.Int.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Int.Storage", - moduleReexportName = ModuleName - "Torch.Cuda.Int.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Cuda.Float", - moduleReexportName = ModuleName - "Torch.Cuda.Float"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Float.Dynamic", - moduleReexportName = ModuleName - "Torch.Cuda.Float.Dynamic"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Float.Storage", - moduleReexportName = ModuleName - "Torch.Cuda.Float.Storage"}], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condBranchIfFalse = Nothing}]}) - [ - _×_ - (UnqualComponentName - "hasktorch-cpu") - CondNode { - condTreeData = - Library { - libName = LSubLibName - (UnqualComponentName - "hasktorch-cpu"), - exposedModules = [ - ModuleName "Torch.Long", - ModuleName "Torch.Long.Dynamic", - ModuleName "Torch.Long.Storage", - ModuleName "Torch.Double", - ModuleName - "Torch.Double.Dynamic", - ModuleName - "Torch.Double.Storage"], - reexportedModules = [ - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Double.NN", - moduleReexportName = ModuleName - "Torch.Double.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Activation", - moduleReexportName = ModuleName - "Torch.Double.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Backprop", - moduleReexportName = ModuleName - "Torch.Double.NN.Backprop"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Conv1d", - moduleReexportName = ModuleName - "Torch.Double.NN.Conv1d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Conv2d", - moduleReexportName = ModuleName - "Torch.Double.NN.Conv2d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Double.NN.Criterion"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Layers", - moduleReexportName = ModuleName - "Torch.Double.NN.Layers"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Linear", - moduleReexportName = ModuleName - "Torch.Double.NN.Linear"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Math", - moduleReexportName = ModuleName - "Torch.Double.NN.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Padding", - moduleReexportName = ModuleName - "Torch.Double.NN.Padding"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Double.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.NN.Sampling", - moduleReexportName = ModuleName - "Torch.Double.NN.Sampling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.Dynamic.NN", - moduleReexportName = ModuleName - "Torch.Double.Dynamic.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.Dynamic.NN.Activation", - moduleReexportName = ModuleName - "Torch.Double.Dynamic.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.Dynamic.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Double.Dynamic.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Double.Dynamic.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Double.Dynamic.NN.Criterion"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Float.NN", - moduleReexportName = ModuleName - "Torch.Float.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Activation", - moduleReexportName = ModuleName - "Torch.Float.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Backprop", - moduleReexportName = ModuleName - "Torch.Float.NN.Backprop"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Conv1d", - moduleReexportName = ModuleName - "Torch.Float.NN.Conv1d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Conv2d", - moduleReexportName = ModuleName - "Torch.Float.NN.Conv2d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Float.NN.Criterion"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Layers", - moduleReexportName = ModuleName - "Torch.Float.NN.Layers"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Linear", - moduleReexportName = ModuleName - "Torch.Float.NN.Linear"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Math", - moduleReexportName = ModuleName - "Torch.Float.NN.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Padding", - moduleReexportName = ModuleName - "Torch.Float.NN.Padding"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Float.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.NN.Sampling", - moduleReexportName = ModuleName - "Torch.Float.NN.Sampling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.Dynamic.NN", - moduleReexportName = ModuleName - "Torch.Float.Dynamic.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.Dynamic.NN.Activation", - moduleReexportName = ModuleName - "Torch.Float.Dynamic.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.Dynamic.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Float.Dynamic.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Float.Dynamic.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Float.Dynamic.NN.Criterion"}], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = - BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "utils", - SymbolicPath "src"], - otherModules = [ - ModuleName - "Torch.Core.Exceptions", - ModuleName "Torch.Core.Random", - ModuleName "Torch.Core.LogAdd"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [ - EnableExtension LambdaCase, - EnableExtension DataKinds, - EnableExtension TypeFamilies, - EnableExtension - TypeSynonymInstances, - EnableExtension - ScopedTypeVariables, - EnableExtension - FlexibleContexts, - EnableExtension CPP], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "dimensions") - (UnionVersionRanges - (ThisVersion (mkVersion [1, 0])) - (LaterVersion - (mkVersion [1, 0]))) - mainLibSet, - Dependency - (PackageName "hasktorch-ffi-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "safe-exceptions") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 1, 0])) - (LaterVersion - (mkVersion [0, 1, 0]))) - mainLibSet, - Dependency - (PackageName "singletons") - (UnionVersionRanges - (ThisVersion (mkVersion [2, 2])) - (LaterVersion - (mkVersion [2, 2]))) - mainLibSet, - Dependency - (PackageName "text") - (UnionVersionRanges - (ThisVersion - (mkVersion [1, 2, 2])) - (LaterVersion - (mkVersion [1, 2, 2]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-floating")])), - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-signed")]))], - mixins = - [ - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-signed"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Long.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Long.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Long.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Long.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Long.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Long.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Long.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Long.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Long.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Long.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Long.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Long.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Long.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Long.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Long.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Long.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Long.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName "Torch.Long.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName "Torch.Long.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName "Torch.Long.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Long.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Long.Dynamic.Tensor.Math.Pointwise.Signed")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.TH.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.TH.Long.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.TH.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.TH.Byte.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.TH.Long"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.TH.Long.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.TH.Long.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.TH.Long.FreeStorage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.TH.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.TH.Long.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.TH.Long.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.TH.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.FFI.TH.Long.TensorMath")]}}, - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-floating"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Double.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Double.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Double.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Double.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Double.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Double.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Double.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Double.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Double.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Double.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Double.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Double.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Double.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Double.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName - "Torch.Double.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Blas") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Blas"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Lapack") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Lapack"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise.Floating"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Reduce.Floating"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Floating") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Blas") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Blas"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Lapack") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Lapack"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Pointwise.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Reduce.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Floating") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Random.TH") - (ModuleName - "Torch.Indef.Double.Tensor.Random.TH"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Random.TH") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Random.TH"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Random.TH") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Random.TH"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Random.TH") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Random.TH"), - _×_ - (ModuleName - "Torch.Undefined.Tensor.Random.THC") - (ModuleName - "Torch.Undefined.Double.Tensor.Random.THC"), - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Double.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Double.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Double.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Double.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Double.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Double.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Double.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Double.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Double.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Double.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Double.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Double.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Double.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Double.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName - "Torch.Double.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Double.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN") - (ModuleName - "Torch.Double.Dynamic.NN"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN.Activation") - (ModuleName - "Torch.Double.Dynamic.NN.Activation"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN.Pooling") - (ModuleName - "Torch.Double.Dynamic.NN.Pooling"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN.Criterion") - (ModuleName - "Torch.Double.Dynamic.NN.Criterion"), - _×_ - (ModuleName - "Torch.Indef.Static.NN") - (ModuleName "Torch.Double.NN"), - _×_ - (ModuleName - "Torch.Indef.Static.NN") - (ModuleName "Torch.Double.NN"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Activation") - (ModuleName - "Torch.Double.NN.Activation"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Backprop") - (ModuleName - "Torch.Double.NN.Backprop"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Conv1d") - (ModuleName - "Torch.Double.NN.Conv1d"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Conv2d") - (ModuleName - "Torch.Double.NN.Conv2d"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Criterion") - (ModuleName - "Torch.Double.NN.Criterion"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Layers") - (ModuleName - "Torch.Double.NN.Layers"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Linear") - (ModuleName - "Torch.Double.NN.Linear"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Math") - (ModuleName - "Torch.Double.NN.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Padding") - (ModuleName - "Torch.Double.NN.Padding"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Pooling") - (ModuleName - "Torch.Double.NN.Pooling"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Sampling") - (ModuleName - "Torch.Double.NN.Sampling")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.TH.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.TH.Long.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.TH.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.TH.Byte.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.TH.Double"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.TH.Double.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.TH.Double.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.TH.Double.FreeStorage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.TH.Double.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.TH.Double.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.TH.Double.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Floating") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Blas") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Lapack") - (ModuleName - "Torch.FFI.TH.Double.TensorLapack"), - _×_ - (ModuleName "Torch.Sig.NN") - (ModuleName - "Torch.FFI.TH.NN.Double"), - _×_ - (ModuleName - "Torch.Sig.Types.NN") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Random.TH") - (ModuleName - "Torch.FFI.TH.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Random.TH") - (ModuleName - "Torch.FFI.TH.Double.TensorRandom"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Random.THC") - (ModuleName - "Torch.Undefined.Double.Tensor.Random.THC")]}}]}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "dimensions") - (UnionVersionRanges - (ThisVersion (mkVersion [1, 0])) - (LaterVersion - (mkVersion [1, 0]))) - mainLibSet, - Dependency - (PackageName "hasktorch-ffi-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "safe-exceptions") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 1, 0])) - (LaterVersion - (mkVersion [0, 1, 0]))) - mainLibSet, - Dependency - (PackageName "singletons") - (UnionVersionRanges - (ThisVersion (mkVersion [2, 2])) - (LaterVersion - (mkVersion [2, 2]))) - mainLibSet, - Dependency - (PackageName "text") - (UnionVersionRanges - (ThisVersion - (mkVersion [1, 2, 2])) - (LaterVersion - (mkVersion [1, 2, 2]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-floating")])), - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-signed")]))], - condTreeComponents = - [ - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "lite"))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName - "hasktorch-cpu"), - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = - Just - CondNode { - condTreeData = - Library { - libName = LSubLibName - (UnqualComponentName - "hasktorch-cpu"), - exposedModules = [ - ModuleName "Torch.Byte", - ModuleName "Torch.Byte.Dynamic", - ModuleName "Torch.Byte.Storage", - ModuleName "Torch.Char", - ModuleName "Torch.Char.Dynamic", - ModuleName "Torch.Char.Storage", - ModuleName "Torch.Short", - ModuleName - "Torch.Short.Dynamic", - ModuleName - "Torch.Short.Storage", - ModuleName "Torch.Int", - ModuleName "Torch.Int.Dynamic", - ModuleName "Torch.Int.Storage", - ModuleName "Torch.Float", - ModuleName - "Torch.Float.Dynamic", - ModuleName - "Torch.Float.Storage"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = - BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-unsigned")]))], - mixins = - [ - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-unsigned"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Byte.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Byte.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Byte.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Byte.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Byte.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Byte.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Byte.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Byte.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Byte.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Byte.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Byte.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Byte.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Byte.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Byte.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Byte.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Byte.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Byte.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName "Torch.Byte.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName "Torch.Byte.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName "Torch.Byte.Mask")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.TH.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.TH.Long.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.TH.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.TH.Byte.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.TH.Byte"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.TH.Byte.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.TH.Byte.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.TH.Byte.FreeStorage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.TH.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.TH.Byte.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.TH.Byte.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath")]}}, - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-unsigned"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Char.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Char.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Char.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Char.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Char.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Char.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Char.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Char.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Char.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Char.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Char.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Char.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Char.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Char.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Char.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Char.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Char.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Char.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName "Torch.Char.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName "Torch.Char.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName "Torch.Char.Mask")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.TH.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.TH.Long.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.TH.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.TH.Byte.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.TH.Char"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.TH.Char.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.TH.Char.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.TH.Char.FreeStorage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.TH.Char.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.TH.Char.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.TH.Char.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.TH.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.TH.Char.TensorMath")]}}, - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-signed"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Short.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Short.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Short.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Short.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Short.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Short.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Short.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Short.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Short.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Short.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Short.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Short.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Short.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Short.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Short.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Short.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Short.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Short.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Short.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName "Torch.Short.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Short.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Short.Dynamic.Tensor.Math.Pointwise.Signed")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.TH.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.TH.Long.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.TH.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.TH.Byte.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.TH.Short"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.TH.Short.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.TH.Short.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.TH.Short.FreeStorage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.TH.Short.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.TH.Short.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.TH.Short.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.TH.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.FFI.TH.Short.TensorMath")]}}, - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-signed"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Int.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Int.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Int.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Int.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Int.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Int.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Int.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Int.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Int.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Int.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Int.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Int.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Int.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Int.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Int.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Int.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Int.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName "Torch.Int.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName "Torch.Int.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName "Torch.Int.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Int.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Int.Dynamic.Tensor.Math.Pointwise.Signed")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.TH.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.TH.Long.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.TH.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.TH.Byte.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.TH.Int"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.TH.Int.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.TH.Int.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.TH.Int.FreeStorage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.TH.Int.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.TH.Int.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.TH.Int.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.TH.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.FFI.TH.Int.TensorMath")]}}, - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-floating"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Float.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Float.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Float.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Float.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Float.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Float.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Float.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Float.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Float.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Float.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Float.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Float.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Float.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Float.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName "Torch.Float.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Blas") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Blas"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Lapack") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Lapack"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise.Floating"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Reduce.Floating"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Floating") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Blas") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Blas"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Lapack") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Lapack"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Pointwise.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Reduce.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Floating") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Random.TH") - (ModuleName - "Torch.Indef.Float.Tensor.Random.TH"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Random.TH") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Random.TH"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Random.TH") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Random.TH"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Random.TH") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Random.TH"), - _×_ - (ModuleName - "Torch.Undefined.Tensor.Random.THC") - (ModuleName - "Torch.Undefined.Float.Tensor.Random.THC"), - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Float.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Float.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Float.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Float.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Float.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Float.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Float.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Float.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Float.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Float.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Float.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Float.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Float.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Float.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName "Torch.Float.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Float.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN") - (ModuleName - "Torch.Float.Dynamic.NN"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN.Activation") - (ModuleName - "Torch.Float.Dynamic.NN.Activation"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN.Pooling") - (ModuleName - "Torch.Float.Dynamic.NN.Pooling"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN.Criterion") - (ModuleName - "Torch.Float.Dynamic.NN.Criterion"), - _×_ - (ModuleName - "Torch.Indef.Static.NN") - (ModuleName "Torch.Float.NN"), - _×_ - (ModuleName - "Torch.Indef.Static.NN") - (ModuleName "Torch.Float.NN"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Activation") - (ModuleName - "Torch.Float.NN.Activation"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Backprop") - (ModuleName - "Torch.Float.NN.Backprop"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Conv1d") - (ModuleName - "Torch.Float.NN.Conv1d"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Conv2d") - (ModuleName - "Torch.Float.NN.Conv2d"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Criterion") - (ModuleName - "Torch.Float.NN.Criterion"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Layers") - (ModuleName - "Torch.Float.NN.Layers"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Linear") - (ModuleName - "Torch.Float.NN.Linear"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Math") - (ModuleName - "Torch.Float.NN.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Padding") - (ModuleName - "Torch.Float.NN.Padding"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Pooling") - (ModuleName - "Torch.Float.NN.Pooling"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Sampling") - (ModuleName - "Torch.Float.NN.Sampling")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.TH.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.TH.Long.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.TH.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.TH.Byte.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.TH.Byte.TensorMath"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.TH.Float"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.TH.Float.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.TH.Float.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.TH.Float.FreeStorage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.TH.Float.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.TH.Float.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.TH.Float.FreeTensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Floating") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Blas") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Lapack") - (ModuleName - "Torch.FFI.TH.Float.TensorLapack"), - _×_ - (ModuleName "Torch.Sig.NN") - (ModuleName - "Torch.FFI.TH.NN.Float"), - _×_ - (ModuleName - "Torch.Sig.Types.NN") - (ModuleName "Torch.Types.TH"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Random.TH") - (ModuleName - "Torch.FFI.TH.Float.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Random.TH") - (ModuleName - "Torch.FFI.TH.Float.TensorRandom"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Random.THC") - (ModuleName - "Torch.Undefined.Float.Tensor.Random.THC")]}}]}}, - condTreeConstraints = [ - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-unsigned")]))], - condTreeComponents = []}}]}, - _×_ - (UnqualComponentName - "hasktorch-gpu") - CondNode { - condTreeData = - Library { - libName = LSubLibName - (UnqualComponentName - "hasktorch-gpu"), - exposedModules = [ - ModuleName "Torch.Cuda.Long", - ModuleName - "Torch.Cuda.Long.Dynamic", - ModuleName - "Torch.Cuda.Long.Storage", - ModuleName "Torch.Cuda.Double", - ModuleName - "Torch.Cuda.Double.Dynamic", - ModuleName - "Torch.Cuda.Double.Storage"], - reexportedModules = [ - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Activation", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Backprop", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Backprop"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Conv1d", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Conv1d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Conv2d", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Conv2d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Criterion"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Layers", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Layers"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Linear", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Linear"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Math", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Padding", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Padding"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.NN.Sampling", - moduleReexportName = ModuleName - "Torch.Cuda.Double.NN.Sampling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.Dynamic.NN", - moduleReexportName = ModuleName - "Torch.Cuda.Double.Dynamic.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.Dynamic.NN.Activation", - moduleReexportName = ModuleName - "Torch.Cuda.Double.Dynamic.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.Dynamic.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Cuda.Double.Dynamic.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Cuda.Double.Dynamic.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Cuda.Double.Dynamic.NN.Criterion"}], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = - BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [ - "-DCUDA", - "-DHASKTORCH_INTERNAL_CUDA"], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "utils", - SymbolicPath "src"], - otherModules = [ - ModuleName - "Torch.Core.Exceptions", - ModuleName "Torch.Core.Random", - ModuleName "Torch.Core.LogAdd"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [ - EnableExtension LambdaCase, - EnableExtension DataKinds, - EnableExtension TypeFamilies, - EnableExtension - TypeSynonymInstances, - EnableExtension - ScopedTypeVariables, - EnableExtension - FlexibleContexts, - EnableExtension CPP], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "dimensions") - (UnionVersionRanges - (ThisVersion (mkVersion [1, 0])) - (LaterVersion - (mkVersion [1, 0]))) - mainLibSet, - Dependency - (PackageName "hasktorch-ffi-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "safe-exceptions") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 1, 0])) - (LaterVersion - (mkVersion [0, 1, 0]))) - mainLibSet, - Dependency - (PackageName "singletons") - (UnionVersionRanges - (ThisVersion (mkVersion [2, 2])) - (LaterVersion - (mkVersion [2, 2]))) - mainLibSet, - Dependency - (PackageName "text") - (UnionVersionRanges - (ThisVersion - (mkVersion [1, 2, 2])) - (LaterVersion - (mkVersion [1, 2, 2]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-floating")])), - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-signed")])), - Dependency - (PackageName - "hasktorch-ffi-thc") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-thc") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet], - mixins = - [ - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-signed"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Cuda.Long.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Cuda.Long.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Cuda.Long.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Cuda.Long.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName - "Torch.Cuda.Long.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Cuda.Long.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Pointwise.Signed")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathReduce"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName - "Torch.FFI.THC.State"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.THC"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.THC.Long"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.THC.Long.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.THC.Long.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.THC.Long.Storage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.THC.Long.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.THC.Long.TensorIndex"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.THC.Long.TensorMasked"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.THC.Long.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.THC.Long.TensorMathCompare"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.THC.Long.TensorMathCompareT"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.THC.Long.TensorMathPairwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.THC.Long.TensorMathPointwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.THC.Long.TensorMathReduce"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.THC.Long.TensorMathScan"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.THC.Long.TensorMode"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.THC.Long.TensorScatterGather"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.THC.Long.TensorSort"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.THC.Long.TensorTopK"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.FFI.THC.Long.TensorMathPointwise")]}}, - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-floating"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Cuda.Double.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Cuda.Double.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Cuda.Double.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Cuda.Double.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName - "Torch.Cuda.Double.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Blas") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Blas"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Lapack") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Lapack"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise.Floating"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Reduce.Floating"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Floating") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Blas") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Blas"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Lapack") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Lapack"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Pointwise.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Reduce.Floating"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Floating") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Floating"), - _×_ - (ModuleName - "Torch.Undefined.Tensor.Random.TH") - (ModuleName - "Torch.Undefined.Cuda.Double.Tensor.Random.TH"), - _×_ - (ModuleName - "Torch.Undefined.Tensor.Math.Random.TH") - (ModuleName - "Torch.Undefined.Cuda.Double.Tensor.Math.Random.TH"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Random.THC") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Random.THC"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Random.THC") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Random.THC"), - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Cuda.Double.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Cuda.Double.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Cuda.Double.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Cuda.Double.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName - "Torch.Cuda.Double.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Cuda.Double.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN") - (ModuleName - "Torch.Cuda.Double.Dynamic.NN"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN.Activation") - (ModuleName - "Torch.Cuda.Double.Dynamic.NN.Activation"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN.Pooling") - (ModuleName - "Torch.Cuda.Double.Dynamic.NN.Pooling"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.NN.Criterion") - (ModuleName - "Torch.Cuda.Double.Dynamic.NN.Criterion"), - _×_ - (ModuleName - "Torch.Indef.Static.NN") - (ModuleName - "Torch.Cuda.Double.NN"), - _×_ - (ModuleName - "Torch.Indef.Static.NN") - (ModuleName - "Torch.Cuda.Double.NN"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Activation") - (ModuleName - "Torch.Cuda.Double.NN.Activation"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Backprop") - (ModuleName - "Torch.Cuda.Double.NN.Backprop"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Conv1d") - (ModuleName - "Torch.Cuda.Double.NN.Conv1d"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Conv2d") - (ModuleName - "Torch.Cuda.Double.NN.Conv2d"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Criterion") - (ModuleName - "Torch.Cuda.Double.NN.Criterion"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Layers") - (ModuleName - "Torch.Cuda.Double.NN.Layers"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Linear") - (ModuleName - "Torch.Cuda.Double.NN.Linear"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Math") - (ModuleName - "Torch.Cuda.Double.NN.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Padding") - (ModuleName - "Torch.Cuda.Double.NN.Padding"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Pooling") - (ModuleName - "Torch.Cuda.Double.NN.Pooling"), - _×_ - (ModuleName - "Torch.Indef.Static.NN.Sampling") - (ModuleName - "Torch.Cuda.Double.NN.Sampling")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathReduce"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName - "Torch.FFI.THC.State"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.THC"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.THC.Double"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.THC.Double.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.THC.Double.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.THC.Double.Storage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.THC.Double.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.THC.Double.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.THC.Double.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.THC.Double.TensorIndex"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.THC.Double.TensorMasked"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.THC.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.THC.Double.TensorMathCompare"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.THC.Double.TensorMathCompareT"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.THC.Double.TensorMathPairwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.THC.Double.TensorMathPointwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.THC.Double.TensorMathReduce"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.THC.Double.TensorMathScan"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.THC.Double.TensorMode"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.THC.Double.TensorScatterGather"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.THC.Double.TensorSort"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.THC.Double.TensorTopK"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.FFI.THC.Double.TensorMathPointwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.FFI.THC.Double.TensorMathPointwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.FFI.THC.Double.TensorMathReduce"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Floating") - (ModuleName - "Torch.FFI.THC.Double.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Blas") - (ModuleName - "Torch.FFI.THC.Double.TensorMathBlas"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Lapack") - (ModuleName - "Torch.FFI.THC.Double.TensorMathMagma"), - _×_ - (ModuleName "Torch.Sig.NN") - (ModuleName - "Torch.FFI.THC.NN.Double"), - _×_ - (ModuleName - "Torch.Sig.Types.NN") - (ModuleName "Torch.Types.THC"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Random.TH") - (ModuleName - "Torch.Undefined.Cuda.Double.Tensor.Math.Random.TH"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Random.TH") - (ModuleName - "Torch.Undefined.Cuda.Double.Tensor.Random.TH"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Random.THC") - (ModuleName - "Torch.FFI.THC.Double.TensorRandom")]}}]}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "dimensions") - (UnionVersionRanges - (ThisVersion (mkVersion [1, 0])) - (LaterVersion - (mkVersion [1, 0]))) - mainLibSet, - Dependency - (PackageName "hasktorch-ffi-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-th") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "safe-exceptions") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 1, 0])) - (LaterVersion - (mkVersion [0, 1, 0]))) - mainLibSet, - Dependency - (PackageName "singletons") - (UnionVersionRanges - (ThisVersion (mkVersion [2, 2])) - (LaterVersion - (mkVersion [2, 2]))) - mainLibSet, - Dependency - (PackageName "text") - (UnionVersionRanges - (ThisVersion - (mkVersion [1, 2, 2])) - (LaterVersion - (mkVersion [1, 2, 2]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-floating")])), - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-signed")])), - Dependency - (PackageName - "hasktorch-ffi-thc") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-types-thc") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet], - condTreeComponents = - [ - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "lite"))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName - "hasktorch-gpu"), - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = - Just - CondNode { - condTreeData = - Library { - libName = LSubLibName - (UnqualComponentName - "hasktorch-gpu"), - exposedModules = [ - ModuleName "Torch.Cuda.Byte", - ModuleName - "Torch.Cuda.Byte.Dynamic", - ModuleName - "Torch.Cuda.Byte.Storage", - ModuleName "Torch.Cuda.Char", - ModuleName - "Torch.Cuda.Char.Dynamic", - ModuleName - "Torch.Cuda.Char.Storage", - ModuleName "Torch.Cuda.Short", - ModuleName - "Torch.Cuda.Short.Dynamic", - ModuleName - "Torch.Cuda.Short.Storage", - ModuleName "Torch.Cuda.Int", - ModuleName - "Torch.Cuda.Int.Dynamic", - ModuleName - "Torch.Cuda.Int.Storage"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = - BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-unsigned")]))], - mixins = - [ - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-unsigned"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Cuda.Byte.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Cuda.Byte.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Byte.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Byte.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Cuda.Byte.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Cuda.Byte.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName - "Torch.Cuda.Byte.Mask")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathReduce"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName - "Torch.FFI.THC.State"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.THC"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.THC.Byte"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.THC.Byte.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.THC.Byte.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.THC.Byte.Storage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.THC.Byte.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.THC.Byte.TensorIndex"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.THC.Byte.TensorMasked"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.THC.Byte.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathCompare"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathCompareT"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathPairwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathPointwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathReduce"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathScan"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.THC.Byte.TensorMode"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.THC.Byte.TensorScatterGather"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.THC.Byte.TensorSort"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.THC.Byte.TensorTopK")]}}, - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-unsigned"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Cuda.Char.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Cuda.Char.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Char.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Char.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Cuda.Char.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Cuda.Char.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName - "Torch.Cuda.Char.Mask")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathReduce"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName - "Torch.FFI.THC.State"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.THC"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.THC.Char"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.THC.Char.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.THC.Char.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.THC.Char.Storage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.THC.Char.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.THC.Char.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.THC.Char.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.THC.Char.TensorIndex"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.THC.Char.TensorMasked"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.THC.Char.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.THC.Char.TensorMathCompare"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.THC.Char.TensorMathCompareT"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.THC.Char.TensorMathPairwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.THC.Char.TensorMathPointwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.THC.Char.TensorMathReduce"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.THC.Char.TensorMathScan"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.THC.Char.TensorMode"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.THC.Char.TensorScatterGather"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.THC.Char.TensorSort"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.THC.Char.TensorTopK")]}}, - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-signed"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Cuda.Short.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Cuda.Short.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Cuda.Short.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Cuda.Short.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName - "Torch.Cuda.Short.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Cuda.Short.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Pointwise.Signed")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathReduce"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName - "Torch.FFI.THC.State"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.THC"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.THC.Short"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.THC.Short.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.THC.Short.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.THC.Short.Storage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.THC.Short.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.THC.Short.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.THC.Short.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.THC.Short.TensorIndex"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.THC.Short.TensorMasked"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.THC.Short.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.THC.Short.TensorMathCompare"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.THC.Short.TensorMathCompareT"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.THC.Short.TensorMathPairwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.THC.Short.TensorMathPointwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.THC.Short.TensorMathReduce"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.THC.Short.TensorMathScan"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.THC.Short.TensorMode"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.THC.Short.TensorScatterGather"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.THC.Short.TensorSort"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.THC.Short.TensorTopK"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.FFI.THC.Short.TensorMathPointwise")]}}, - Mixin { - mixinPackageName = PackageName - "hasktorch", - mixinLibraryName = LSubLibName - (UnqualComponentName - "hasktorch-indef-signed"), - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Indef.Storage") - (ModuleName - "Torch.Indef.Cuda.Int.Storage"), - _×_ - (ModuleName - "Torch.Indef.Storage.Copy") - (ModuleName - "Torch.Indef.Cuda.Int.Storage.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.TopK"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Copy") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Copy"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Index") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Index"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Masked") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Masked"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Compare"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.CompareT"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Pairwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Pointwise"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Reduce"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Scan"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Mode") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Mode"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.ScatterGather"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Sort") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Sort"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.TopK") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.TopK"), - _×_ - (ModuleName "Torch.Indef.Types") - (ModuleName - "Torch.Cuda.Int.Types"), - _×_ - (ModuleName "Torch.Indef.Index") - (ModuleName - "Torch.Cuda.Int.Index"), - _×_ - (ModuleName "Torch.Indef.Mask") - (ModuleName - "Torch.Cuda.Int.Mask"), - _×_ - (ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Cuda.Int.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Pointwise.Signed")], - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName - "Torch.Sig.Index.Tensor") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Index.TensorFree") - (ModuleName - "Torch.FFI.THC.Long.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.Tensor") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.TensorFree") - (ModuleName - "Torch.FFI.THC.Byte.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Mask.MathReduce") - (ModuleName - "Torch.FFI.THC.Byte.TensorMathReduce"), - _×_ - (ModuleName "Torch.Sig.State") - (ModuleName - "Torch.FFI.THC.State"), - _×_ - (ModuleName - "Torch.Sig.Types.Global") - (ModuleName "Torch.Types.THC"), - _×_ - (ModuleName "Torch.Sig.Types") - (ModuleName - "Torch.Types.THC.Int"), - _×_ - (ModuleName "Torch.Sig.Storage") - (ModuleName - "Torch.FFI.THC.Int.Storage"), - _×_ - (ModuleName - "Torch.Sig.Storage.Copy") - (ModuleName - "Torch.FFI.THC.Int.StorageCopy"), - _×_ - (ModuleName - "Torch.Sig.Storage.Memory") - (ModuleName - "Torch.FFI.THC.Int.Storage"), - _×_ - (ModuleName "Torch.Sig.Tensor") - (ModuleName - "Torch.FFI.THC.Int.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Copy") - (ModuleName - "Torch.FFI.THC.Int.TensorCopy"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Memory") - (ModuleName - "Torch.FFI.THC.Int.Tensor"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Index") - (ModuleName - "Torch.FFI.THC.Int.TensorIndex"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Masked") - (ModuleName - "Torch.FFI.THC.Int.TensorMasked"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math") - (ModuleName - "Torch.FFI.THC.Int.TensorMath"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Compare") - (ModuleName - "Torch.FFI.THC.Int.TensorMathCompare"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.CompareT") - (ModuleName - "Torch.FFI.THC.Int.TensorMathCompareT"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pairwise") - (ModuleName - "Torch.FFI.THC.Int.TensorMathPairwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise") - (ModuleName - "Torch.FFI.THC.Int.TensorMathPointwise"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce") - (ModuleName - "Torch.FFI.THC.Int.TensorMathReduce"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Scan") - (ModuleName - "Torch.FFI.THC.Int.TensorMathScan"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Mode") - (ModuleName - "Torch.FFI.THC.Int.TensorMode"), - _×_ - (ModuleName - "Torch.Sig.Tensor.ScatterGather") - (ModuleName - "Torch.FFI.THC.Int.TensorScatterGather"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Sort") - (ModuleName - "Torch.FFI.THC.Int.TensorSort"), - _×_ - (ModuleName - "Torch.Sig.Tensor.TopK") - (ModuleName - "Torch.FFI.THC.Int.TensorTopK"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.FFI.THC.Int.TensorMathPointwise")]}}]}}, - condTreeConstraints = [ - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-indef-unsigned")]))], - condTreeComponents = []}}]}, - _×_ - (UnqualComponentName - "hasktorch-indef-unsigned") - CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName - "hasktorch-indef-unsigned"), - exposedModules = [], - reexportedModules = [ - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Indef.Index", - moduleReexportName = ModuleName - "Torch.Indef.Index"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Indef.Mask", - moduleReexportName = ModuleName - "Torch.Indef.Mask"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Indef.Types", - moduleReexportName = ModuleName - "Torch.Indef.Types"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Storage", - moduleReexportName = ModuleName - "Torch.Indef.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Storage.Copy", - moduleReexportName = ModuleName - "Torch.Indef.Storage.Copy"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Print", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Print"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Copy", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Copy"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Index", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Index"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Masked", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Masked"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Mode", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Mode"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Sort", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Sort"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.TopK", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.TopK"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Copy", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Copy"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Index", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Index"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Masked", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Masked"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Compare", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Compare"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Scan", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Scan"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Mode", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Mode"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.ScatterGather", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.ScatterGather"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Sort", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Sort"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.TopK", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.TopK"}], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-signatures-partial") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "hasktorch-indef") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = [ - Mixin { - mixinPackageName = PackageName - "hasktorch-indef", - mixinLibraryName = LMainLibName, - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - DefaultRenaming, - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName "Torch.Sig.NN") - (ModuleName - "Torch.Undefined.NN"), - _×_ - (ModuleName - "Torch.Sig.Types.NN") - (ModuleName - "Torch.Undefined.Types.NN"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Blas") - (ModuleName - "Torch.Undefined.Tensor.Math.Blas"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Floating") - (ModuleName - "Torch.Undefined.Tensor.Math.Floating"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Lapack") - (ModuleName - "Torch.Undefined.Tensor.Math.Lapack"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Signed") - (ModuleName - "Torch.Undefined.Tensor.Math.Pointwise.Signed"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.Undefined.Tensor.Math.Pointwise.Floating"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.Undefined.Tensor.Math.Reduce.Floating"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Random.TH") - (ModuleName - "Torch.Undefined.Tensor.Math.Random.TH"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Random.TH") - (ModuleName - "Torch.Undefined.Tensor.Random.TH"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Random.THC") - (ModuleName - "Torch.Undefined.Tensor.Random.THC")]}}]}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-signatures-partial") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "hasktorch-indef") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - _×_ - (UnqualComponentName - "hasktorch-indef-signed") - CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName - "hasktorch-indef-signed"), - exposedModules = [], - reexportedModules = [ - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Indef.Index", - moduleReexportName = ModuleName - "Torch.Indef.Index"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Indef.Mask", - moduleReexportName = ModuleName - "Torch.Indef.Mask"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Indef.Types", - moduleReexportName = ModuleName - "Torch.Indef.Types"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Storage", - moduleReexportName = ModuleName - "Torch.Indef.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Storage.Copy", - moduleReexportName = ModuleName - "Torch.Indef.Storage.Copy"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Print", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Print"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Copy", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Copy"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Index", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Index"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Masked", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Masked"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Mode", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Mode"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Sort", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Sort"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.TopK", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.TopK"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Copy", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Copy"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Index", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Index"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Masked", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Masked"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Compare", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Compare"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Scan", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Scan"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Mode", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Mode"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.ScatterGather", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.ScatterGather"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Sort", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Sort"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.TopK", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.TopK"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed"}], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-signatures-partial") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "hasktorch-indef") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = [ - Mixin { - mixinPackageName = PackageName - "hasktorch-indef", - mixinLibraryName = LMainLibName, - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - DefaultRenaming, - includeRequiresRn = - ModuleRenaming - [ - _×_ - (ModuleName "Torch.Sig.NN") - (ModuleName - "Torch.Undefined.NN"), - _×_ - (ModuleName - "Torch.Sig.Types.NN") - (ModuleName - "Torch.Undefined.Types.NN"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Blas") - (ModuleName - "Torch.Undefined.Tensor.Math.Blas"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Floating") - (ModuleName - "Torch.Undefined.Tensor.Math.Floating"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Lapack") - (ModuleName - "Torch.Undefined.Tensor.Math.Lapack"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Pointwise.Floating") - (ModuleName - "Torch.Undefined.Tensor.Math.Pointwise.Floating"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Reduce.Floating") - (ModuleName - "Torch.Undefined.Tensor.Math.Reduce.Floating"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Math.Random.TH") - (ModuleName - "Torch.Undefined.Tensor.Math.Random.TH"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Random.TH") - (ModuleName - "Torch.Undefined.Tensor.Random.TH"), - _×_ - (ModuleName - "Torch.Sig.Tensor.Random.THC") - (ModuleName - "Torch.Undefined.Tensor.Random.THC")]}}]}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName - "hasktorch-signatures-partial") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet, - Dependency - (PackageName "hasktorch-indef") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - _×_ - (UnqualComponentName - "hasktorch-indef-floating") - CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName - "hasktorch-indef-floating"), - exposedModules = [], - reexportedModules = [ - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Indef.Index", - moduleReexportName = ModuleName - "Torch.Indef.Index"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Indef.Mask", - moduleReexportName = ModuleName - "Torch.Indef.Mask"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName "Torch.Indef.Types", - moduleReexportName = ModuleName - "Torch.Indef.Types"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Storage", - moduleReexportName = ModuleName - "Torch.Indef.Storage"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Storage.Copy", - moduleReexportName = ModuleName - "Torch.Indef.Storage.Copy"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Print", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Print"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Copy", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Copy"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Index", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Index"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Masked", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Masked"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Compare"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.CompareT"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pairwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Scan"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Mode", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Mode"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.ScatterGather"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Sort", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Sort"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.TopK", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.TopK"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Copy", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Copy"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Index", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Index"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Masked", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Masked"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Compare", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Compare"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.CompareT"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Pairwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Scan", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Scan"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Mode", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Mode"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.ScatterGather", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.ScatterGather"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Sort", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Sort"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.TopK", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.TopK"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Signed"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Blas", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Blas"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Floating", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Floating"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Lapack", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Lapack"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Random.TH", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Random.TH"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Random.THC", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Random.THC"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Random.TH", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.Tensor.Math.Random.TH"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Blas", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Blas"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Floating", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Floating"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Lapack", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Lapack"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Floating", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Pointwise.Floating"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce.Floating", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Reduce.Floating"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Random.TH", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Random.TH"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Random.THC", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Random.THC"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.Tensor.Math.Random.TH", - moduleReexportName = ModuleName - "Torch.Indef.Static.Tensor.Math.Random.TH"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.NN", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.NN.Activation", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Dynamic.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Indef.Dynamic.NN.Criterion"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Activation", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Activation"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Backprop", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Backprop"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Conv1d", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Conv1d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Conv2d", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Conv2d"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Criterion", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Criterion"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Layers", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Layers"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Linear", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Linear"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Math", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Math"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Padding", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Padding"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Pooling", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Pooling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Indef.Static.NN.Sampling", - moduleReexportName = ModuleName - "Torch.Indef.Static.NN.Sampling"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Undefined.Tensor.Math.Random.TH", - moduleReexportName = ModuleName - "Torch.Undefined.Tensor.Math.Random.TH"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Undefined.Tensor.Random.TH", - moduleReexportName = ModuleName - "Torch.Undefined.Tensor.Random.TH"}, - ModuleReexport { - moduleReexportOriginalPackage = - Nothing, - moduleReexportOriginalName = - ModuleName - "Torch.Undefined.Tensor.Random.THC", - moduleReexportName = ModuleName - "Torch.Undefined.Tensor.Random.THC"}], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "hasktorch-indef") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName - "hasktorch-signatures-partial") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "hasktorch-indef") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName - "hasktorch-signatures-partial") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 0, 1])) - (LaterVersion - (mkVersion [0, 0, 1]))) - (EarlierVersion - (mkVersion [0, 0, 2]))) - mainLibSet], - condTreeComponents = []}] - [] - [ - _×_ - (UnqualComponentName - "isdefinite-cpu") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "isdefinite-cpu", - modulePath = SymbolicPath - "Noop.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "exe"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-cpu")]))], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-cpu")]))], - condTreeComponents = []}, - _×_ - (UnqualComponentName - "isdefinite-gpu") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "isdefinite-gpu", - modulePath = SymbolicPath - "Noop.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "exe"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-gpu")]))], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "hasktorch-gpu")]))], - condTreeComponents = []}, - _×_ - (UnqualComponentName - "isdefinite") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "isdefinite", - modulePath = SymbolicPath - "Noop.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "exe"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - _×_ - (UnqualComponentName "memcheck") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "memcheck", - modulePath = SymbolicPath - "Memcheck.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "exe"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}] - [ - _×_ - (UnqualComponentName "spec") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "Spec.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "tests"], - otherModules = [ - ModuleName "Orphans", - ModuleName "MemorySpec", - ModuleName "RawLapackSVDSpec", - ModuleName - "GarbageCollectionSpec", - ModuleName - "Torch.Prelude.Extras", - ModuleName - "Torch.Core.LogAddSpec", - ModuleName - "Torch.Core.RandomSpec", - ModuleName - "Torch.Static.NN.AbsSpec", - ModuleName - "Torch.Static.NN.LinearSpec"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [ - EnableExtension LambdaCase, - EnableExtension DataKinds, - EnableExtension TypeFamilies, - EnableExtension - TypeSynonymInstances, - EnableExtension - ScopedTypeVariables, - EnableExtension - FlexibleContexts, - EnableExtension CPP], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "QuickCheck") - (UnionVersionRanges - (ThisVersion - (mkVersion [2, 11])) - (LaterVersion - (mkVersion [2, 11]))) - mainLibSet, - Dependency - (PackageName "backprop") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 2, 5])) - (LaterVersion - (mkVersion [0, 2, 5]))) - mainLibSet, - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "dimensions") - (UnionVersionRanges - (ThisVersion (mkVersion [1, 0])) - (LaterVersion - (mkVersion [1, 0]))) - mainLibSet, - Dependency - (PackageName - "ghc-typelits-natnormalise") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "hspec") - (UnionVersionRanges - (ThisVersion - (mkVersion [2, 4, 4])) - (LaterVersion - (mkVersion [2, 4, 4]))) - mainLibSet, - Dependency - (PackageName "singletons") - (UnionVersionRanges - (ThisVersion (mkVersion [2, 2])) - (LaterVersion - (mkVersion [2, 2]))) - mainLibSet, - Dependency - (PackageName "mtl") - (UnionVersionRanges - (ThisVersion - (mkVersion [2, 2, 2])) - (LaterVersion - (mkVersion [2, 2, 2]))) - mainLibSet, - Dependency - (PackageName - "microlens-platform") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 3, 10])) - (LaterVersion - (mkVersion [0, 3, 10]))) - mainLibSet, - Dependency - (PackageName "monad-loops") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 4, 3])) - (LaterVersion - (mkVersion [0, 4, 3]))) - mainLibSet, - Dependency - (PackageName "time") - (UnionVersionRanges - (ThisVersion - (mkVersion [1, 8, 0])) - (LaterVersion - (mkVersion [1, 8, 0]))) - mainLibSet, - Dependency - (PackageName "transformers") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 5, 5])) - (LaterVersion - (mkVersion [0, 5, 5]))) - mainLibSet, - Dependency - (PackageName "generic-lens") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "QuickCheck") - (UnionVersionRanges - (ThisVersion - (mkVersion [2, 11])) - (LaterVersion - (mkVersion [2, 11]))) - mainLibSet, - Dependency - (PackageName "backprop") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 2, 5])) - (LaterVersion - (mkVersion [0, 2, 5]))) - mainLibSet, - Dependency - (PackageName "base") - (IntersectVersionRanges - (UnionVersionRanges - (ThisVersion (mkVersion [4, 7])) - (LaterVersion - (mkVersion [4, 7]))) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "dimensions") - (UnionVersionRanges - (ThisVersion (mkVersion [1, 0])) - (LaterVersion - (mkVersion [1, 0]))) - mainLibSet, - Dependency - (PackageName - "ghc-typelits-natnormalise") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "hasktorch") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "hspec") - (UnionVersionRanges - (ThisVersion - (mkVersion [2, 4, 4])) - (LaterVersion - (mkVersion [2, 4, 4]))) - mainLibSet, - Dependency - (PackageName "singletons") - (UnionVersionRanges - (ThisVersion (mkVersion [2, 2])) - (LaterVersion - (mkVersion [2, 2]))) - mainLibSet, - Dependency - (PackageName "mtl") - (UnionVersionRanges - (ThisVersion - (mkVersion [2, 2, 2])) - (LaterVersion - (mkVersion [2, 2, 2]))) - mainLibSet, - Dependency - (PackageName - "microlens-platform") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 3, 10])) - (LaterVersion - (mkVersion [0, 3, 10]))) - mainLibSet, - Dependency - (PackageName "monad-loops") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 4, 3])) - (LaterVersion - (mkVersion [0, 4, 3]))) - mainLibSet, - Dependency - (PackageName "time") - (UnionVersionRanges - (ThisVersion - (mkVersion [1, 8, 0])) - (LaterVersion - (mkVersion [1, 8, 0]))) - mainLibSet, - Dependency - (PackageName "transformers") - (UnionVersionRanges - (ThisVersion - (mkVersion [0, 5, 5])) - (LaterVersion - (mkVersion [0, 5, 5]))) - mainLibSet, - Dependency - (PackageName "generic-lens") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/hasktorch.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/hasktorch.genPackageFlags.expr new file mode 100644 index 00000000000..b9b52ac0345 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/hasktorch.genPackageFlags.expr @@ -0,0 +1,13 @@ +[ + MkPackageFlag { + flagName = FlagName "cuda", + flagDescription = + "build with THC support", + flagDefault = False, + flagManual = False}, + MkPackageFlag { + flagName = FlagName "lite", + flagDescription = + "only build with Double and Long support", + flagDefault = False, + flagManual = False}] diff --git a/Cabal-tests/tests/ParserTests/regressions/hasktorch.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/hasktorch.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/hasktorch.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/hasktorch.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/hasktorch.packageDescription.expr new file mode 100644 index 00000000000..aa61f8bf394 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/hasktorch.packageDescription.expr @@ -0,0 +1,56 @@ +PackageDescription { + specVersion = CabalSpecV2_2, + package = PackageIdentifier { + pkgName = PackageName + "hasktorch", + pkgVersion = mkVersion + [0, 0, 1, 0]}, + licenseRaw = Left + (License + (ELicense + (ELicenseId BSD_3_Clause) + Nothing)), + licenseFiles = [], + copyright = "", + maintainer = + "Sam Stites , Austin Huang - cipher:ROT13", + author = "Hasktorch dev team", + stability = "", + testedWith = [], + homepage = + "https://github.com/hasktorch/hasktorch#readme", + pkgUrl = "", + bugReports = + "https://github.com/hasktorch/hasktorch/issues", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/hasktorch/hasktorch", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Torch for tensors and neural networks in Haskell", + description = + "Hasktorch is a library for tensors and neural networks in Haskell. It is an independent open source community project which leverages the core C libraries shared by Torch and PyTorch. This library leverages @cabal v2-build@ and @backpack@. *Note that this project is in early development and should only be used by contributing developers. Expect substantial changes to the library API as it evolves. Contributions and PRs are welcome (see details on github).*", + category = + "Tensors, Machine Learning, AI", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condLibrary.expr new file mode 100644 index 00000000000..1b03802a873 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condLibrary.expr @@ -0,0 +1,78 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "ElseIf"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.expr b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.expr deleted file mode 100644 index 73c1a2e04b7..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.expr +++ /dev/null @@ -1,207 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName - "hidden-main-lib", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "main lib have to be visible", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "ElseIf"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "ElseIf"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.packageDescription.expr new file mode 100644 index 00000000000..9d4eb147c16 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.packageDescription.expr @@ -0,0 +1,36 @@ +PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName + "hidden-main-lib", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "main lib have to be visible", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/indentation.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/indentation.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/indentation.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/indentation.condLibrary.expr new file mode 100644 index 00000000000..acc4281010f --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation.condLibrary.expr @@ -0,0 +1,69 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/indentation.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/indentation.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation.expr b/Cabal-tests/tests/ParserTests/regressions/indentation.expr deleted file mode 100644 index dbe88d4deff..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/indentation.expr +++ /dev/null @@ -1,199 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName - "indentation", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = concat - [ - "* foo\n", - "\n", - " * foo-bar\n", - "\n", - " * foo-baz\n", - "\n", - ".\n", - ".\n", - ".\n", - "some dots"], - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/indentation.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/indentation.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/indentation.packageDescription.expr new file mode 100644 index 00000000000..ce48c84b316 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation.packageDescription.expr @@ -0,0 +1,46 @@ +PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName + "indentation", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = concat + [ + "* foo\n", + "\n", + " * foo-bar\n", + "\n", + " * foo-baz\n", + "\n", + ".\n", + ".\n", + ".\n", + "some dots"], + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation2.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/indentation2.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation2.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation2.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/indentation2.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation2.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation2.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/indentation2.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation2.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation2.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/indentation2.condLibrary.expr new file mode 100644 index 00000000000..acc4281010f --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation2.condLibrary.expr @@ -0,0 +1,69 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation2.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/indentation2.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation2.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation2.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/indentation2.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation2.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation2.expr b/Cabal-tests/tests/ParserTests/regressions/indentation2.expr deleted file mode 100644 index 063b53e419a..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/indentation2.expr +++ /dev/null @@ -1,192 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName - "indentation", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = concat - [ - "foo\n", - " indent2\n", - " indent4"], - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation2.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/indentation2.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation2.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation2.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/indentation2.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation2.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation2.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/indentation2.packageDescription.expr new file mode 100644 index 00000000000..7078d47db01 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation2.packageDescription.expr @@ -0,0 +1,39 @@ +PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName + "indentation", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = concat + [ + "foo\n", + " indent2\n", + " indent4"], + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation3.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/indentation3.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation3.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation3.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/indentation3.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation3.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation3.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/indentation3.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation3.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation3.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/indentation3.condLibrary.expr new file mode 100644 index 00000000000..acc4281010f --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation3.condLibrary.expr @@ -0,0 +1,69 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation3.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/indentation3.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation3.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation3.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/indentation3.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation3.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation3.expr b/Cabal-tests/tests/ParserTests/regressions/indentation3.expr deleted file mode 100644 index 01f7f273f95..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/indentation3.expr +++ /dev/null @@ -1,194 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName - "indentation", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = concat - [ - "indent0\n", - "\n", - " indent2\n", - "indent0\n", - " indent2"], - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation3.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/indentation3.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation3.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation3.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/indentation3.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation3.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/indentation3.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/indentation3.packageDescription.expr new file mode 100644 index 00000000000..d45c69b7b6d --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/indentation3.packageDescription.expr @@ -0,0 +1,41 @@ +PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName + "indentation", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = concat + [ + "indent0\n", + "\n", + " indent2\n", + "indent0\n", + " indent2"], + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5055.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5055.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-5055.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5055.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5055.condExecutables.expr new file mode 100644 index 00000000000..e5d3ff28be8 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-5055.condExecutables.expr @@ -0,0 +1,86 @@ +[ + _×_ + (UnqualComponentName + "flag-test-exe") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "flag-test-exe", + modulePath = SymbolicPath + "FirstMain.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 8])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 8])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet], + condTreeComponents = []}] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5055.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5055.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-5055.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5055.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5055.condLibrary.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-5055.condLibrary.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5055.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5055.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-5055.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5055.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5055.condTestSuites.expr new file mode 100644 index 00000000000..ce285aa1d22 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-5055.condTestSuites.expr @@ -0,0 +1,159 @@ +[ + _×_ + (UnqualComponentName + "flag-cabal-test") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "SecondMain.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 8])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 8])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5055.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5055.expr deleted file mode 100644 index 9bff381b097..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/issue-5055.expr +++ /dev/null @@ -1,539 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_0, - package = PackageIdentifier { - pkgName = PackageName "issue", - pkgVersion = mkVersion [5055]}, - licenseRaw = Right BSD3, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "no type in all branches", - description = - "no type in all branches.", - category = "Test", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Nothing, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [ - _×_ - (UnqualComponentName - "flag-test-exe") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "flag-test-exe", - modulePath = SymbolicPath - "FirstMain.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 8])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 8])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet], - condTreeComponents = []}], - condTestSuites = [ - _×_ - (UnqualComponentName - "flag-cabal-test") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "SecondMain.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 8])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 8])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}], - condBenchmarks = []} - Nothing - [] - [] - [ - _×_ - (UnqualComponentName - "flag-test-exe") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "flag-test-exe", - modulePath = SymbolicPath - "FirstMain.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 8])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 8])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet], - condTreeComponents = []}] - [ - _×_ - (UnqualComponentName - "flag-cabal-test") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "SecondMain.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 8])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 8])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5055.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5055.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-5055.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5055.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5055.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-5055.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5055.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5055.packageDescription.expr new file mode 100644 index 00000000000..bdd807fb337 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-5055.packageDescription.expr @@ -0,0 +1,36 @@ +PackageDescription { + specVersion = CabalSpecV2_0, + package = PackageIdentifier { + pkgName = PackageName "issue", + pkgVersion = mkVersion [5055]}, + licenseRaw = Right BSD3, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "no type in all branches", + description = + "no type in all branches.", + category = "Test", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5846.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5846.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-5846.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5846.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5846.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-5846.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5846.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5846.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-5846.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5846.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5846.condLibrary.expr new file mode 100644 index 00000000000..f8e88eb982a --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-5846.condLibrary.expr @@ -0,0 +1,141 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "lib1") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName "a"), + LSubLibName + (UnqualComponentName "b")])), + Dependency + (PackageName "lib2") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName "c")])), + Dependency + (PackageName "lib3") + (OrLaterVersion (mkVersion [1])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName "d")])), + Dependency + (PackageName "lib4") + (OrLaterVersion (mkVersion [1])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName "a"), + LSubLibName + (UnqualComponentName "b")]))], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "lib1") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName "a"), + LSubLibName + (UnqualComponentName "b")])), + Dependency + (PackageName "lib2") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName "c")])), + Dependency + (PackageName "lib3") + (OrLaterVersion (mkVersion [1])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName "d")])), + Dependency + (PackageName "lib4") + (OrLaterVersion (mkVersion [1])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName "a"), + LSubLibName + (UnqualComponentName "b")]))], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5846.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5846.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-5846.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5846.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5846.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-5846.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5846.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5846.expr deleted file mode 100644 index 969abe42e5b..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/issue-5846.expr +++ /dev/null @@ -1,331 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName "issue", - pkgVersion = mkVersion [5846]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "lib1") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName "a"), - LSubLibName - (UnqualComponentName "b")])), - Dependency - (PackageName "lib2") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName "c")])), - Dependency - (PackageName "lib3") - (OrLaterVersion (mkVersion [1])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName "d")])), - Dependency - (PackageName "lib4") - (OrLaterVersion (mkVersion [1])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName "a"), - LSubLibName - (UnqualComponentName "b")]))], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "lib1") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName "a"), - LSubLibName - (UnqualComponentName "b")])), - Dependency - (PackageName "lib2") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName "c")])), - Dependency - (PackageName "lib3") - (OrLaterVersion (mkVersion [1])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName "d")])), - Dependency - (PackageName "lib4") - (OrLaterVersion (mkVersion [1])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName "a"), - LSubLibName - (UnqualComponentName "b")]))], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "lib1") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName "a"), - LSubLibName - (UnqualComponentName "b")])), - Dependency - (PackageName "lib2") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName "c")])), - Dependency - (PackageName "lib3") - (OrLaterVersion (mkVersion [1])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName "d")])), - Dependency - (PackageName "lib4") - (OrLaterVersion (mkVersion [1])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName "a"), - LSubLibName - (UnqualComponentName "b")]))], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "lib1") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName "a"), - LSubLibName - (UnqualComponentName "b")])), - Dependency - (PackageName "lib2") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName "c")])), - Dependency - (PackageName "lib3") - (OrLaterVersion (mkVersion [1])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName "d")])), - Dependency - (PackageName "lib4") - (OrLaterVersion (mkVersion [1])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName "a"), - LSubLibName - (UnqualComponentName "b")]))], - condTreeComponents = []}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5846.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5846.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-5846.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5846.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5846.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-5846.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-5846.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/issue-5846.packageDescription.expr new file mode 100644 index 00000000000..2ece144e2cb --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-5846.packageDescription.expr @@ -0,0 +1,34 @@ +PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName "issue", + pkgVersion = mkVersion [5846]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condExecutables.expr new file mode 100644 index 00000000000..7145f97f84a --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condExecutables.expr @@ -0,0 +1,177 @@ +[ + _×_ + (UnqualComponentName "demo-a") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "demo-a", + modulePath = SymbolicPath + "Main.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "sublib") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "sublib") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + _×_ + (UnqualComponentName "demo-b") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "demo-b", + modulePath = SymbolicPath + "Main.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + condTreeComponents = []}] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condLibrary.expr new file mode 100644 index 00000000000..9352f80235b --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condLibrary.expr @@ -0,0 +1,95 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condSubLibraries.expr new file mode 100644 index 00000000000..683d108f25c --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condSubLibraries.expr @@ -0,0 +1,72 @@ +[ + _×_ + (UnqualComponentName "sublib") + CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName "sublib"), + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.expr deleted file mode 100644 index bd1873d9444..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.expr +++ /dev/null @@ -1,733 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_4, - package = PackageIdentifier { - pkgName = PackageName "issue", - pkgVersion = mkVersion [6083]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - condTreeComponents = []}, - condSubLibraries = [ - _×_ - (UnqualComponentName "sublib") - CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName "sublib"), - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}], - condForeignLibs = [], - condExecutables = [ - _×_ - (UnqualComponentName "demo-a") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "demo-a", - modulePath = SymbolicPath - "Main.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "sublib") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "sublib") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - _×_ - (UnqualComponentName "demo-b") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "demo-b", - modulePath = SymbolicPath - "Main.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - condTreeComponents = []}], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - condTreeComponents = []}) - [ - _×_ - (UnqualComponentName "sublib") - CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName "sublib"), - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}] - [] - [ - _×_ - (UnqualComponentName "demo-a") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "demo-a", - modulePath = SymbolicPath - "Main.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "sublib") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "sublib") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - _×_ - (UnqualComponentName "demo-b") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "demo-b", - modulePath = SymbolicPath - "Main.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - condTreeComponents = []}] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.packageDescription.expr new file mode 100644 index 00000000000..79deb33cd0d --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-a.packageDescription.expr @@ -0,0 +1,34 @@ +PackageDescription { + specVersion = CabalSpecV3_4, + package = PackageIdentifier { + pkgName = PackageName "issue", + pkgVersion = mkVersion [6083]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condExecutables.expr new file mode 100644 index 00000000000..bc6b77953f5 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condExecutables.expr @@ -0,0 +1,187 @@ +[ + _×_ + (UnqualComponentName "demo-a") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "demo-a", + modulePath = SymbolicPath + "Main.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + condTreeComponents = []}, + _×_ + (UnqualComponentName "demo-b") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "demo-b", + modulePath = SymbolicPath + "Main.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + condTreeComponents = []}] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condLibrary.expr new file mode 100644 index 00000000000..9352f80235b --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condLibrary.expr @@ -0,0 +1,95 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condSubLibraries.expr new file mode 100644 index 00000000000..683d108f25c --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condSubLibraries.expr @@ -0,0 +1,72 @@ +[ + _×_ + (UnqualComponentName "sublib") + CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName "sublib"), + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.expr deleted file mode 100644 index 2bbe2858491..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.expr +++ /dev/null @@ -1,753 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName "issue", - pkgVersion = mkVersion [6083]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - condTreeComponents = []}, - condSubLibraries = [ - _×_ - (UnqualComponentName "sublib") - CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName "sublib"), - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}], - condForeignLibs = [], - condExecutables = [ - _×_ - (UnqualComponentName "demo-a") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "demo-a", - modulePath = SymbolicPath - "Main.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - condTreeComponents = []}, - _×_ - (UnqualComponentName "demo-b") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "demo-b", - modulePath = SymbolicPath - "Main.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - condTreeComponents = []}], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - condTreeComponents = []}) - [ - _×_ - (UnqualComponentName "sublib") - CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName "sublib"), - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}] - [] - [ - _×_ - (UnqualComponentName "demo-a") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "demo-a", - modulePath = SymbolicPath - "Main.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - condTreeComponents = []}, - _×_ - (UnqualComponentName "demo-b") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "demo-b", - modulePath = SymbolicPath - "Main.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - condTreeComponents = []}] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.packageDescription.expr new file mode 100644 index 00000000000..49cc3c9294e --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-b.packageDescription.expr @@ -0,0 +1,34 @@ +PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName "issue", + pkgVersion = mkVersion [6083]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condLibrary.expr new file mode 100644 index 00000000000..9352f80235b --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condLibrary.expr @@ -0,0 +1,95 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "issue") + (OrLaterVersion (mkVersion [0])) + (NonEmptySet.fromNonEmpty + (NE.fromList + [ + LSubLibName + (UnqualComponentName + "sublib")]))], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condSubLibraries.expr new file mode 100644 index 00000000000..683d108f25c --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condSubLibraries.expr @@ -0,0 +1,72 @@ +[ + _×_ + (UnqualComponentName "sublib") + CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName "sublib"), + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.expr deleted file mode 100644 index 11815012edb..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.expr +++ /dev/null @@ -1,381 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_4, - package = PackageIdentifier { - pkgName = PackageName "issue", - pkgVersion = mkVersion [6083]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - condTreeComponents = []}, - condSubLibraries = [ - _×_ - (UnqualComponentName "sublib") - CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName "sublib"), - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "issue") - (OrLaterVersion (mkVersion [0])) - (NonEmptySet.fromNonEmpty - (NE.fromList - [ - LSubLibName - (UnqualComponentName - "sublib")]))], - condTreeComponents = []}) - [ - _×_ - (UnqualComponentName "sublib") - CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName "sublib"), - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.packageDescription.expr new file mode 100644 index 00000000000..b8924725b32 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-c.packageDescription.expr @@ -0,0 +1,34 @@ +PackageDescription { + specVersion = CabalSpecV2_4, + package = PackageIdentifier { + pkgName = PackageName "issue", + pkgVersion = mkVersion [6083]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condLibrary.expr new file mode 100644 index 00000000000..a7a2b77605a --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condLibrary.expr @@ -0,0 +1,85 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "freetype") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "freetype") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "freetype") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "freetype") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.expr deleted file mode 100644 index be6b67518bb..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.expr +++ /dev/null @@ -1,219 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName "issue", - pkgVersion = mkVersion [6083]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "freetype") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "freetype") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "freetype") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "freetype") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "freetype") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "freetype") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "freetype") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "freetype") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.packageDescription.expr new file mode 100644 index 00000000000..49cc3c9294e --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-6083-pkg-pkg.packageDescription.expr @@ -0,0 +1,34 @@ +PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName "issue", + pkgVersion = mkVersion [6083]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-774.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/issue-774.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-774.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-774.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/issue-774.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-774.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-774.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/issue-774.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-774.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-774.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/issue-774.condLibrary.expr new file mode 100644 index 00000000000..0f7e3c6c197 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-774.condLibrary.expr @@ -0,0 +1,74 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "Issue"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [ + "-Wall", + "-threaded", + "-with-rtsopts=-N -s -M1G -c", + "-rtsopts"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-774.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/issue-774.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-774.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-774.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/issue-774.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-774.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-774.expr b/Cabal-tests/tests/ParserTests/regressions/issue-774.expr deleted file mode 100644 index 8752e9af17b..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/issue-774.expr +++ /dev/null @@ -1,206 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_12, - package = PackageIdentifier { - pkgName = PackageName "issue", - pkgVersion = mkVersion [744]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "Package description parser interprets curly braces in the description field", - description = concat - [ - "Here is some C code:\n", - "\n", - "> for(i = 0; i < 100; i++) {\n", - "> printf(\"%d\\n\",i);\n", - "> }\n", - "\n", - "What does it look like?"], - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "Issue"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [ - "-Wall", - "-threaded", - "-with-rtsopts=-N -s -M1G -c", - "-rtsopts"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "Issue"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [ - "-Wall", - "-threaded", - "-with-rtsopts=-N -s -M1G -c", - "-rtsopts"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-774.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/issue-774.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-774.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-774.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/issue-774.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-774.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/issue-774.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/issue-774.packageDescription.expr new file mode 100644 index 00000000000..c1c38cabb20 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/issue-774.packageDescription.expr @@ -0,0 +1,43 @@ +PackageDescription { + specVersion = CabalSpecV1_12, + package = PackageIdentifier { + pkgName = PackageName "issue", + pkgVersion = mkVersion [744]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "Package description parser interprets curly braces in the description field", + description = concat + [ + "Here is some C code:\n", + "\n", + "> for(i = 0; i < 100; i++) {\n", + "> printf(\"%d\\n\",i);\n", + "> }\n", + "\n", + "What does it look like?"], + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condExecutables.expr new file mode 100644 index 00000000000..898e1a70cc5 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condExecutables.expr @@ -0,0 +1,162 @@ +[ + _×_ + (UnqualComponentName + "jaeger-flamegraph") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "jaeger-flamegraph", + modulePath = SymbolicPath + "Main.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "exe"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [ + "-Wall", + "-Werror=missing-home-modules", + "-threaded"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (UnionVersionRanges + (MajorBoundVersion + (mkVersion [4, 11, 1, 0])) + (MajorBoundVersion + (mkVersion [4, 12, 0, 0]))) + mainLibSet, + Dependency + (PackageName + "jaeger-flamegraph") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "bytestring") + (MajorBoundVersion + (mkVersion [0, 10, 8, 2])) + mainLibSet, + Dependency + (PackageName "containers") + (MajorBoundVersion + (mkVersion [0, 6, 0, 1])) + mainLibSet, + Dependency + (PackageName "extra") + (MajorBoundVersion + (mkVersion [1, 6, 13])) + mainLibSet, + Dependency + (PackageName "aeson") + (MajorBoundVersion + (mkVersion [1, 4, 1, 0])) + mainLibSet, + Dependency + (PackageName + "optparse-applicative") + (MajorBoundVersion + (mkVersion [0, 14, 3, 0])) + mainLibSet, + Dependency + (PackageName "text") + (MajorBoundVersion + (mkVersion [1, 2, 3, 1])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (UnionVersionRanges + (MajorBoundVersion + (mkVersion [4, 11, 1, 0])) + (MajorBoundVersion + (mkVersion [4, 12, 0, 0]))) + mainLibSet, + Dependency + (PackageName + "jaeger-flamegraph") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "bytestring") + (MajorBoundVersion + (mkVersion [0, 10, 8, 2])) + mainLibSet, + Dependency + (PackageName "containers") + (MajorBoundVersion + (mkVersion [0, 6, 0, 1])) + mainLibSet, + Dependency + (PackageName "extra") + (MajorBoundVersion + (mkVersion [1, 6, 13])) + mainLibSet, + Dependency + (PackageName "aeson") + (MajorBoundVersion + (mkVersion [1, 4, 1, 0])) + mainLibSet, + Dependency + (PackageName + "optparse-applicative") + (MajorBoundVersion + (mkVersion [0, 14, 3, 0])) + mainLibSet, + Dependency + (PackageName "text") + (MajorBoundVersion + (mkVersion [1, 2, 3, 1])) + mainLibSet], + condTreeComponents = []}] diff --git a/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condLibrary.expr new file mode 100644 index 00000000000..ab02aceb7eb --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condLibrary.expr @@ -0,0 +1,99 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "Interval"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "library"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [ + "-Wall", + "-Werror=missing-home-modules"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (UnionVersionRanges + (MajorBoundVersion + (mkVersion [4, 11, 1, 0])) + (MajorBoundVersion + (mkVersion [4, 12, 0, 0]))) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (MajorBoundVersion + (mkVersion [2, 12, 6, 1])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (UnionVersionRanges + (MajorBoundVersion + (mkVersion [4, 11, 1, 0])) + (MajorBoundVersion + (mkVersion [4, 12, 0, 0]))) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (MajorBoundVersion + (mkVersion [2, 12, 6, 1])) + mainLibSet], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condTestSuites.expr new file mode 100644 index 00000000000..f209c1cfd6b --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.condTestSuites.expr @@ -0,0 +1,137 @@ +[ + _×_ + (UnqualComponentName "tests") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "Driver.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [ + ExeDependency + (PackageName "tasty-discover") + (UnqualComponentName + "tasty-discover") + (MajorBoundVersion + (mkVersion [4, 2, 1]))], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "test"], + otherModules = [ + ModuleName "IntervalTest"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [ + "-Wall", + "-Werror=missing-home-modules", + "-threaded"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (UnionVersionRanges + (MajorBoundVersion + (mkVersion [4, 11, 1, 0])) + (MajorBoundVersion + (mkVersion [4, 12, 0, 0]))) + mainLibSet, + Dependency + (PackageName + "jaeger-flamegraph") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "tasty") + (MajorBoundVersion + (mkVersion [1, 1, 0, 4])) + mainLibSet, + Dependency + (PackageName "tasty-hspec") + (MajorBoundVersion + (mkVersion [1, 1, 5])) + mainLibSet, + Dependency + (PackageName "tasty-quickcheck") + (MajorBoundVersion + (mkVersion [0, 10])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (UnionVersionRanges + (MajorBoundVersion + (mkVersion [4, 11, 1, 0])) + (MajorBoundVersion + (mkVersion [4, 12, 0, 0]))) + mainLibSet, + Dependency + (PackageName + "jaeger-flamegraph") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "tasty") + (MajorBoundVersion + (mkVersion [1, 1, 0, 4])) + mainLibSet, + Dependency + (PackageName "tasty-hspec") + (MajorBoundVersion + (mkVersion [1, 1, 5])) + mainLibSet, + Dependency + (PackageName "tasty-quickcheck") + (MajorBoundVersion + (mkVersion [0, 10])) + mainLibSet], + condTreeComponents = []}] diff --git a/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.expr b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.expr deleted file mode 100644 index 04e7f2f62d9..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.expr +++ /dev/null @@ -1,882 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_2, - package = PackageIdentifier { - pkgName = PackageName - "jaeger-flamegraph", - pkgVersion = mkVersion - [1, 0, 0]}, - licenseRaw = Left - (License - (ELicense - (ELicenseId BSD_3_Clause) - Nothing)), - licenseFiles = [ - SymbolicPath "LICENSE"], - copyright = - "(c) 2018 Symbiont.io", - maintainer = "Sam Halliday", - author = "Sam Halliday", - stability = "", - testedWith = [ - _×_ - GHC - (UnionVersionRanges - (MajorBoundVersion - (mkVersion [8, 4, 4])) - (MajorBoundVersion - (mkVersion [8, 6, 2])))], - homepage = "", - pkgUrl = "", - bugReports = - "https://github.com/symbiont-io/jaeger-flamegraph/pulls", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/symbiont-io/jaeger-flamegraph", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "Generate flamegraphs from Jaeger .json dumps.", - description = - concat - [ - "This is a small tool to convert JSON dumps obtained from a Jaeger\n", - "server () into a format consumable\n", - "by [FlameGraph](https://github.com/brendangregg/FlameGraph).\n", - "\n", - "First download the traces for your SERVICE limiting to LIMIT traces\n", - "\n", - "> $ curl http://your-jaeger-installation/api/traces?service=SERVICE&limit=LIMIT > input.json\n", - "\n", - "using the [undocumented Jaeger API](https://github.com/jaegertracing/jaeger/issues/456#issuecomment-412560321)\n", - "then use @jaeger-flamegraph@ to convert the data and send to @flamegraph.pl@\n", - "\n", - "> $ jaeger-flamegraph -f input.json | flamegraph.pl > output.svg\n"], - category = "Testing", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "Interval"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "library"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [ - "-Wall", - "-Werror=missing-home-modules"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (UnionVersionRanges - (MajorBoundVersion - (mkVersion [4, 11, 1, 0])) - (MajorBoundVersion - (mkVersion [4, 12, 0, 0]))) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (MajorBoundVersion - (mkVersion [2, 12, 6, 1])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (UnionVersionRanges - (MajorBoundVersion - (mkVersion [4, 11, 1, 0])) - (MajorBoundVersion - (mkVersion [4, 12, 0, 0]))) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (MajorBoundVersion - (mkVersion [2, 12, 6, 1])) - mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [ - _×_ - (UnqualComponentName - "jaeger-flamegraph") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "jaeger-flamegraph", - modulePath = SymbolicPath - "Main.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "exe"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [ - "-Wall", - "-Werror=missing-home-modules", - "-threaded"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (UnionVersionRanges - (MajorBoundVersion - (mkVersion [4, 11, 1, 0])) - (MajorBoundVersion - (mkVersion [4, 12, 0, 0]))) - mainLibSet, - Dependency - (PackageName - "jaeger-flamegraph") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "bytestring") - (MajorBoundVersion - (mkVersion [0, 10, 8, 2])) - mainLibSet, - Dependency - (PackageName "containers") - (MajorBoundVersion - (mkVersion [0, 6, 0, 1])) - mainLibSet, - Dependency - (PackageName "extra") - (MajorBoundVersion - (mkVersion [1, 6, 13])) - mainLibSet, - Dependency - (PackageName "aeson") - (MajorBoundVersion - (mkVersion [1, 4, 1, 0])) - mainLibSet, - Dependency - (PackageName - "optparse-applicative") - (MajorBoundVersion - (mkVersion [0, 14, 3, 0])) - mainLibSet, - Dependency - (PackageName "text") - (MajorBoundVersion - (mkVersion [1, 2, 3, 1])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (UnionVersionRanges - (MajorBoundVersion - (mkVersion [4, 11, 1, 0])) - (MajorBoundVersion - (mkVersion [4, 12, 0, 0]))) - mainLibSet, - Dependency - (PackageName - "jaeger-flamegraph") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "bytestring") - (MajorBoundVersion - (mkVersion [0, 10, 8, 2])) - mainLibSet, - Dependency - (PackageName "containers") - (MajorBoundVersion - (mkVersion [0, 6, 0, 1])) - mainLibSet, - Dependency - (PackageName "extra") - (MajorBoundVersion - (mkVersion [1, 6, 13])) - mainLibSet, - Dependency - (PackageName "aeson") - (MajorBoundVersion - (mkVersion [1, 4, 1, 0])) - mainLibSet, - Dependency - (PackageName - "optparse-applicative") - (MajorBoundVersion - (mkVersion [0, 14, 3, 0])) - mainLibSet, - Dependency - (PackageName "text") - (MajorBoundVersion - (mkVersion [1, 2, 3, 1])) - mainLibSet], - condTreeComponents = []}], - condTestSuites = [ - _×_ - (UnqualComponentName "tests") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "Driver.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [ - ExeDependency - (PackageName "tasty-discover") - (UnqualComponentName - "tasty-discover") - (MajorBoundVersion - (mkVersion [4, 2, 1]))], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "test"], - otherModules = [ - ModuleName "IntervalTest"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [ - "-Wall", - "-Werror=missing-home-modules", - "-threaded"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (UnionVersionRanges - (MajorBoundVersion - (mkVersion [4, 11, 1, 0])) - (MajorBoundVersion - (mkVersion [4, 12, 0, 0]))) - mainLibSet, - Dependency - (PackageName - "jaeger-flamegraph") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "tasty") - (MajorBoundVersion - (mkVersion [1, 1, 0, 4])) - mainLibSet, - Dependency - (PackageName "tasty-hspec") - (MajorBoundVersion - (mkVersion [1, 1, 5])) - mainLibSet, - Dependency - (PackageName "tasty-quickcheck") - (MajorBoundVersion - (mkVersion [0, 10])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (UnionVersionRanges - (MajorBoundVersion - (mkVersion [4, 11, 1, 0])) - (MajorBoundVersion - (mkVersion [4, 12, 0, 0]))) - mainLibSet, - Dependency - (PackageName - "jaeger-flamegraph") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "tasty") - (MajorBoundVersion - (mkVersion [1, 1, 0, 4])) - mainLibSet, - Dependency - (PackageName "tasty-hspec") - (MajorBoundVersion - (mkVersion [1, 1, 5])) - mainLibSet, - Dependency - (PackageName "tasty-quickcheck") - (MajorBoundVersion - (mkVersion [0, 10])) - mainLibSet], - condTreeComponents = []}], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "Interval"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "library"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [ - "-Wall", - "-Werror=missing-home-modules"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (UnionVersionRanges - (MajorBoundVersion - (mkVersion [4, 11, 1, 0])) - (MajorBoundVersion - (mkVersion [4, 12, 0, 0]))) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (MajorBoundVersion - (mkVersion [2, 12, 6, 1])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (UnionVersionRanges - (MajorBoundVersion - (mkVersion [4, 11, 1, 0])) - (MajorBoundVersion - (mkVersion [4, 12, 0, 0]))) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (MajorBoundVersion - (mkVersion [2, 12, 6, 1])) - mainLibSet], - condTreeComponents = []}) - [] - [] - [ - _×_ - (UnqualComponentName - "jaeger-flamegraph") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "jaeger-flamegraph", - modulePath = SymbolicPath - "Main.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "exe"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [ - "-Wall", - "-Werror=missing-home-modules", - "-threaded"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (UnionVersionRanges - (MajorBoundVersion - (mkVersion [4, 11, 1, 0])) - (MajorBoundVersion - (mkVersion [4, 12, 0, 0]))) - mainLibSet, - Dependency - (PackageName - "jaeger-flamegraph") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "bytestring") - (MajorBoundVersion - (mkVersion [0, 10, 8, 2])) - mainLibSet, - Dependency - (PackageName "containers") - (MajorBoundVersion - (mkVersion [0, 6, 0, 1])) - mainLibSet, - Dependency - (PackageName "extra") - (MajorBoundVersion - (mkVersion [1, 6, 13])) - mainLibSet, - Dependency - (PackageName "aeson") - (MajorBoundVersion - (mkVersion [1, 4, 1, 0])) - mainLibSet, - Dependency - (PackageName - "optparse-applicative") - (MajorBoundVersion - (mkVersion [0, 14, 3, 0])) - mainLibSet, - Dependency - (PackageName "text") - (MajorBoundVersion - (mkVersion [1, 2, 3, 1])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (UnionVersionRanges - (MajorBoundVersion - (mkVersion [4, 11, 1, 0])) - (MajorBoundVersion - (mkVersion [4, 12, 0, 0]))) - mainLibSet, - Dependency - (PackageName - "jaeger-flamegraph") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "bytestring") - (MajorBoundVersion - (mkVersion [0, 10, 8, 2])) - mainLibSet, - Dependency - (PackageName "containers") - (MajorBoundVersion - (mkVersion [0, 6, 0, 1])) - mainLibSet, - Dependency - (PackageName "extra") - (MajorBoundVersion - (mkVersion [1, 6, 13])) - mainLibSet, - Dependency - (PackageName "aeson") - (MajorBoundVersion - (mkVersion [1, 4, 1, 0])) - mainLibSet, - Dependency - (PackageName - "optparse-applicative") - (MajorBoundVersion - (mkVersion [0, 14, 3, 0])) - mainLibSet, - Dependency - (PackageName "text") - (MajorBoundVersion - (mkVersion [1, 2, 3, 1])) - mainLibSet], - condTreeComponents = []}] - [ - _×_ - (UnqualComponentName "tests") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "Driver.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [ - ExeDependency - (PackageName "tasty-discover") - (UnqualComponentName - "tasty-discover") - (MajorBoundVersion - (mkVersion [4, 2, 1]))], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "test"], - otherModules = [ - ModuleName "IntervalTest"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [ - "-Wall", - "-Werror=missing-home-modules", - "-threaded"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (UnionVersionRanges - (MajorBoundVersion - (mkVersion [4, 11, 1, 0])) - (MajorBoundVersion - (mkVersion [4, 12, 0, 0]))) - mainLibSet, - Dependency - (PackageName - "jaeger-flamegraph") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "tasty") - (MajorBoundVersion - (mkVersion [1, 1, 0, 4])) - mainLibSet, - Dependency - (PackageName "tasty-hspec") - (MajorBoundVersion - (mkVersion [1, 1, 5])) - mainLibSet, - Dependency - (PackageName "tasty-quickcheck") - (MajorBoundVersion - (mkVersion [0, 10])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (UnionVersionRanges - (MajorBoundVersion - (mkVersion [4, 11, 1, 0])) - (MajorBoundVersion - (mkVersion [4, 12, 0, 0]))) - mainLibSet, - Dependency - (PackageName - "jaeger-flamegraph") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "tasty") - (MajorBoundVersion - (mkVersion [1, 1, 0, 4])) - mainLibSet, - Dependency - (PackageName "tasty-hspec") - (MajorBoundVersion - (mkVersion [1, 1, 5])) - mainLibSet, - Dependency - (PackageName "tasty-quickcheck") - (MajorBoundVersion - (mkVersion [0, 10])) - mainLibSet], - condTreeComponents = []}] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.packageDescription.expr new file mode 100644 index 00000000000..0c99139282a --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/jaeger-flamegraph.packageDescription.expr @@ -0,0 +1,75 @@ +PackageDescription { + specVersion = CabalSpecV2_2, + package = PackageIdentifier { + pkgName = PackageName + "jaeger-flamegraph", + pkgVersion = mkVersion + [1, 0, 0]}, + licenseRaw = Left + (License + (ELicense + (ELicenseId BSD_3_Clause) + Nothing)), + licenseFiles = [ + SymbolicPath "LICENSE"], + copyright = + "(c) 2018 Symbiont.io", + maintainer = "Sam Halliday", + author = "Sam Halliday", + stability = "", + testedWith = [ + _×_ + GHC + (UnionVersionRanges + (MajorBoundVersion + (mkVersion [8, 4, 4])) + (MajorBoundVersion + (mkVersion [8, 6, 2])))], + homepage = "", + pkgUrl = "", + bugReports = + "https://github.com/symbiont-io/jaeger-flamegraph/pulls", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/symbiont-io/jaeger-flamegraph", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Generate flamegraphs from Jaeger .json dumps.", + description = + concat + [ + "This is a small tool to convert JSON dumps obtained from a Jaeger\n", + "server () into a format consumable\n", + "by [FlameGraph](https://github.com/brendangregg/FlameGraph).\n", + "\n", + "First download the traces for your SERVICE limiting to LIMIT traces\n", + "\n", + "> $ curl http://your-jaeger-installation/api/traces?service=SERVICE&limit=LIMIT > input.json\n", + "\n", + "using the [undocumented Jaeger API](https://github.com/jaegertracing/jaeger/issues/456#issuecomment-412560321)\n", + "then use @jaeger-flamegraph@ to convert the data and send to @flamegraph.pl@\n", + "\n", + "> $ jaeger-flamegraph -f input.json | flamegraph.pl > output.svg\n"], + category = "Testing", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condLibrary.expr new file mode 100644 index 00000000000..e30c14b8e37 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condLibrary.expr @@ -0,0 +1,125 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "LeadingComma", + ModuleName "LeadingComma2", + ModuleName "TrailingComma", + ModuleName "TrailingComma", + ModuleName "Comma", + ModuleName "InBetween", + ModuleName "NoCommas", + ModuleName "NoCommas"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "deepseq") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "transformers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "deepseq") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "transformers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.expr deleted file mode 100644 index a9cece7336e..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.expr +++ /dev/null @@ -1,301 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName - "leading-comma", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "leading comma, trailing comma, or ordinary", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "LeadingComma", - ModuleName "LeadingComma2", - ModuleName "TrailingComma", - ModuleName "TrailingComma", - ModuleName "Comma", - ModuleName "InBetween", - ModuleName "NoCommas", - ModuleName "NoCommas"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "deepseq") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "transformers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "deepseq") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "transformers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "LeadingComma", - ModuleName "LeadingComma2", - ModuleName "TrailingComma", - ModuleName "TrailingComma", - ModuleName "Comma", - ModuleName "InBetween", - ModuleName "NoCommas", - ModuleName "NoCommas"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "deepseq") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "transformers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "deepseq") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "transformers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.packageDescription.expr new file mode 100644 index 00000000000..172607af223 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/leading-comma-2.packageDescription.expr @@ -0,0 +1,36 @@ +PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName + "leading-comma", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "leading comma, trailing comma, or ordinary", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/leading-comma.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/leading-comma.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/leading-comma.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma.condLibrary.expr new file mode 100644 index 00000000000..a77d7534266 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/leading-comma.condLibrary.expr @@ -0,0 +1,118 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "LeadingComma"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "deepseq") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "transformers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "deepseq") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "transformers") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/leading-comma.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/leading-comma.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma.expr deleted file mode 100644 index 8a5ec7124a0..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/leading-comma.expr +++ /dev/null @@ -1,287 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_2, - package = PackageIdentifier { - pkgName = PackageName - "leading-comma", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "leading comma, trailing comma, or ordinary", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "LeadingComma"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "deepseq") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "transformers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "deepseq") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "transformers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "LeadingComma"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "deepseq") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "transformers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "deepseq") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "transformers") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/leading-comma.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/leading-comma.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/leading-comma.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/leading-comma.packageDescription.expr new file mode 100644 index 00000000000..e4fa9e2e1f3 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/leading-comma.packageDescription.expr @@ -0,0 +1,36 @@ +PackageDescription { + specVersion = CabalSpecV2_2, + package = PackageIdentifier { + pkgName = PackageName + "leading-comma", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "leading comma, trailing comma, or ordinary", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq1.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/libpq1.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/libpq1.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq1.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/libpq1.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/libpq1.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq1.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/libpq1.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/libpq1.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq1.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/libpq1.condLibrary.expr new file mode 100644 index 00000000000..d8678f30f5e --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/libpq1.condLibrary.expr @@ -0,0 +1,641 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName + "Database.PostgreSQL.LibPQ", + ModuleName + "Database.PostgreSQL.LibPQ.Internal"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [ + LegacyExeDependency + "hsc2hs" + (OrLaterVersion + (mkVersion [0]))], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [ + SymbolicPath + "cbits/noticehandlers.c"], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "src"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [ + SymbolicPath "cbits"], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-Wall"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 3])) + (EarlierVersion + (mkVersion [4, 13]))) + mainLibSet, + Dependency + (PackageName "bytestring") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9, 1, 0])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 3])) + (EarlierVersion + (mkVersion [4, 13]))) + mainLibSet, + Dependency + (PackageName "bytestring") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9, 1, 0])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `CNot (Var (OS Windows))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "unix") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 4, 2, 0])) + (EarlierVersion + (mkVersion [2, 8]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "unix") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 4, 2, 0])) + (EarlierVersion + (mkVersion [2, 8]))) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 2, 0, 2])) + (EarlierVersion + (mkVersion [2, 7]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 2, 0, 2])) + (EarlierVersion + (mkVersion [2, 7]))) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "use-pkg-config"))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [ + PkgconfigDependency + (PkgconfigName "libpq") + (PcIntersectVersionRanges + (PcOrLaterVersion + (PkgconfigVersion "9")) + (PcEarlierVersion + (PkgconfigVersion "10")))], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = ["libpq"], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = ["pq"], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS OpenBSD)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = ["crypto", "ssl"], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = + Nothing}]}}]}}]} diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq1.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/libpq1.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/libpq1.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq1.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/libpq1.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/libpq1.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq1.expr b/Cabal-tests/tests/ParserTests/regressions/libpq1.expr deleted file mode 100644 index 54dfbf957be..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/libpq1.expr +++ /dev/null @@ -1,1416 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_8, - package = PackageIdentifier { - pkgName = PackageName - "postgresql-libpq", - pkgVersion = mkVersion - [0, 9, 4, 2]}, - licenseRaw = Right BSD3, - licenseFiles = [ - SymbolicPath "LICENSE"], - copyright = concat - [ - "(c) 2010 Grant Monroe\n", - "(c) 2011 Leon P Smith"], - maintainer = - "Oleg Grenrus ", - author = - "Grant Monroe, Leon P Smith, Joey Adams", - stability = "", - testedWith = [ - _×_ - GHC - (ThisVersion - (mkVersion [7, 0, 4])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 2, 2])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 4, 2])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 6, 3])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 8, 4])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 10, 3])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 0, 2])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 2, 2])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 4, 3])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 6, 1]))], - homepage = - "https://github.com/phadej/postgresql-libpq", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "low-level binding to libpq", - description = concat - [ - "This is a binding to libpq: the C application\n", - "programmer's interface to PostgreSQL. libpq is a\n", - "set of library functions that allow client\n", - "programs to pass queries to the PostgreSQL\n", - "backend server and to receive the results of\n", - "these queries."], - category = "Database", - customFieldsPD = [], - buildTypeRaw = Just Custom, - setupBuildInfo = Just - SetupBuildInfo { - setupDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 3])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "Cabal") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [1, 10])) - (EarlierVersion - (mkVersion [2, 5]))) - mainLibSet], - defaultSetupDepends = False}, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [ - SymbolicPath - "cbits/noticehandlers.h", - SymbolicPath "CHANGELOG.md"], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [ - MkPackageFlag { - flagName = FlagName - "use-pkg-config", - flagDescription = "", - flagDefault = False, - flagManual = True}], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName - "Database.PostgreSQL.LibPQ", - ModuleName - "Database.PostgreSQL.LibPQ.Internal"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [ - LegacyExeDependency - "hsc2hs" - (OrLaterVersion - (mkVersion [0]))], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [ - SymbolicPath - "cbits/noticehandlers.c"], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "src"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [ - SymbolicPath "cbits"], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-Wall"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 3])) - (EarlierVersion - (mkVersion [4, 13]))) - mainLibSet, - Dependency - (PackageName "bytestring") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9, 1, 0])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 3])) - (EarlierVersion - (mkVersion [4, 13]))) - mainLibSet, - Dependency - (PackageName "bytestring") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9, 1, 0])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `CNot (Var (OS Windows))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "unix") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 4, 2, 0])) - (EarlierVersion - (mkVersion [2, 8]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "unix") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 4, 2, 0])) - (EarlierVersion - (mkVersion [2, 8]))) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 2, 0, 2])) - (EarlierVersion - (mkVersion [2, 7]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 2, 0, 2])) - (EarlierVersion - (mkVersion [2, 7]))) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "use-pkg-config"))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [ - PkgconfigDependency - (PkgconfigName "libpq") - (PcIntersectVersionRanges - (PcOrLaterVersion - (PkgconfigVersion "9")) - (PcEarlierVersion - (PkgconfigVersion "10")))], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = ["libpq"], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = ["pq"], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS OpenBSD)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = ["crypto", "ssl"], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = - Nothing}]}}]}}]}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName - "Database.PostgreSQL.LibPQ", - ModuleName - "Database.PostgreSQL.LibPQ.Internal"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [ - LegacyExeDependency - "hsc2hs" - (OrLaterVersion - (mkVersion [0]))], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [ - SymbolicPath - "cbits/noticehandlers.c"], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "src"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [ - SymbolicPath "cbits"], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-Wall"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 3])) - (EarlierVersion - (mkVersion [4, 13]))) - mainLibSet, - Dependency - (PackageName "bytestring") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9, 1, 0])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 3])) - (EarlierVersion - (mkVersion [4, 13]))) - mainLibSet, - Dependency - (PackageName "bytestring") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9, 1, 0])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `CNot (Var (OS Windows))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "unix") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 4, 2, 0])) - (EarlierVersion - (mkVersion [2, 8]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "unix") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 4, 2, 0])) - (EarlierVersion - (mkVersion [2, 8]))) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 2, 0, 2])) - (EarlierVersion - (mkVersion [2, 7]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 2, 0, 2])) - (EarlierVersion - (mkVersion [2, 7]))) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "use-pkg-config"))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [ - PkgconfigDependency - (PkgconfigName "libpq") - (PcIntersectVersionRanges - (PcOrLaterVersion - (PkgconfigVersion "9")) - (PcEarlierVersion - (PkgconfigVersion "10")))], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = ["libpq"], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = ["pq"], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS OpenBSD)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = ["crypto", "ssl"], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = - Nothing}]}}]}}]}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq1.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/libpq1.genPackageFlags.expr new file mode 100644 index 00000000000..7d105954782 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/libpq1.genPackageFlags.expr @@ -0,0 +1,7 @@ +[ + MkPackageFlag { + flagName = FlagName + "use-pkg-config", + flagDescription = "", + flagDefault = False, + flagManual = True}] diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq1.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/libpq1.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/libpq1.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq1.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/libpq1.packageDescription.expr new file mode 100644 index 00000000000..643490a9dbf --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/libpq1.packageDescription.expr @@ -0,0 +1,113 @@ +PackageDescription { + specVersion = CabalSpecV1_8, + package = PackageIdentifier { + pkgName = PackageName + "postgresql-libpq", + pkgVersion = mkVersion + [0, 9, 4, 2]}, + licenseRaw = Right BSD3, + licenseFiles = [ + SymbolicPath "LICENSE"], + copyright = concat + [ + "(c) 2010 Grant Monroe\n", + "(c) 2011 Leon P Smith"], + maintainer = + "Oleg Grenrus ", + author = + "Grant Monroe, Leon P Smith, Joey Adams", + stability = "", + testedWith = [ + _×_ + GHC + (ThisVersion + (mkVersion [7, 0, 4])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 2, 2])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 4, 2])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 6, 3])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 8, 4])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 10, 3])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 0, 2])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 2, 2])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 4, 3])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 6, 1]))], + homepage = + "https://github.com/phadej/postgresql-libpq", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "low-level binding to libpq", + description = concat + [ + "This is a binding to libpq: the C application\n", + "programmer's interface to PostgreSQL. libpq is a\n", + "set of library functions that allow client\n", + "programs to pass queries to the PostgreSQL\n", + "backend server and to receive the results of\n", + "these queries."], + category = "Database", + customFieldsPD = [], + buildTypeRaw = Just Custom, + setupBuildInfo = Just + SetupBuildInfo { + setupDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 3])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "Cabal") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [1, 10])) + (EarlierVersion + (mkVersion [2, 5]))) + mainLibSet], + defaultSetupDepends = False}, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [ + SymbolicPath + "cbits/noticehandlers.h", + SymbolicPath "CHANGELOG.md"], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq2.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/libpq2.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/libpq2.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq2.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/libpq2.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/libpq2.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq2.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/libpq2.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/libpq2.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq2.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/libpq2.condLibrary.expr new file mode 100644 index 00000000000..e8976a455b2 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/libpq2.condLibrary.expr @@ -0,0 +1,639 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName + "Database.PostgreSQL.LibPQ", + ModuleName + "Database.PostgreSQL.LibPQ.Internal"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [ + ExeDependency + (PackageName "hsc2hs") + (UnqualComponentName "hsc2hs") + (OrLaterVersion + (mkVersion [0]))], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [ + SymbolicPath + "cbits/noticehandlers.c"], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "src"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [ + SymbolicPath "cbits"], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-Wall"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 3])) + (EarlierVersion + (mkVersion [4, 13]))) + mainLibSet, + Dependency + (PackageName "bytestring") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9, 1, 0])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 3])) + (EarlierVersion + (mkVersion [4, 13]))) + mainLibSet, + Dependency + (PackageName "bytestring") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9, 1, 0])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `CNot (Var (OS Windows))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "unix") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 4, 2, 0])) + (EarlierVersion + (mkVersion [2, 8]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "unix") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 4, 2, 0])) + (EarlierVersion + (mkVersion [2, 8]))) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 2, 0, 2])) + (EarlierVersion + (mkVersion [2, 7]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 2, 0, 2])) + (EarlierVersion + (mkVersion [2, 7]))) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "use-pkg-config"))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [ + PkgconfigDependency + (PkgconfigName "libpq") + (PcOrLaterVersion + (PkgconfigVersion "9.3h"))], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = ["libpq"], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = ["pq"], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS OpenBSD)`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = ["crypto", "ssl"], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = + Nothing}]}}]}}]} diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq2.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/libpq2.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/libpq2.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq2.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/libpq2.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/libpq2.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq2.expr b/Cabal-tests/tests/ParserTests/regressions/libpq2.expr deleted file mode 100644 index 33bb75d5ff7..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/libpq2.expr +++ /dev/null @@ -1,1416 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName - "postgresql-libpq", - pkgVersion = mkVersion - [0, 9, 4, 2]}, - licenseRaw = Left - (License - (ELicense - (ELicenseId BSD_3_Clause) - Nothing)), - licenseFiles = [ - SymbolicPath "LICENSE"], - copyright = concat - [ - "(c) 2010 Grant Monroe\n", - "(c) 2011 Leon P Smith"], - maintainer = - "Oleg Grenrus ", - author = - "Grant Monroe, Leon P Smith, Joey Adams", - stability = "", - testedWith = [ - _×_ - GHC - (ThisVersion - (mkVersion [7, 0, 4])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 2, 2])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 4, 2])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 6, 3])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 8, 4])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 10, 3])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 0, 2])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 2, 2])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 4, 3])), - _×_ - GHC - (ThisVersion - (mkVersion [8, 6, 1]))], - homepage = - "https://github.com/phadej/postgresql-libpq", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "low-level binding to libpq", - description = concat - [ - "This is a binding to libpq: the C application\n", - "programmer's interface to PostgreSQL. libpq is a\n", - "set of library functions that allow client\n", - "programs to pass queries to the PostgreSQL\n", - "backend server and to receive the results of\n", - "these queries."], - category = "Database", - customFieldsPD = [], - buildTypeRaw = Just Custom, - setupBuildInfo = Just - SetupBuildInfo { - setupDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 3])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "Cabal") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [1, 10])) - (EarlierVersion - (mkVersion [2, 5]))) - mainLibSet], - defaultSetupDepends = False}, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [ - SymbolicPath - "cbits/noticehandlers.h", - SymbolicPath "CHANGELOG.md"], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [ - MkPackageFlag { - flagName = FlagName - "use-pkg-config", - flagDescription = "", - flagDefault = False, - flagManual = True}], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName - "Database.PostgreSQL.LibPQ", - ModuleName - "Database.PostgreSQL.LibPQ.Internal"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [ - ExeDependency - (PackageName "hsc2hs") - (UnqualComponentName "hsc2hs") - (OrLaterVersion - (mkVersion [0]))], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [ - SymbolicPath - "cbits/noticehandlers.c"], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "src"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [ - SymbolicPath "cbits"], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-Wall"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 3])) - (EarlierVersion - (mkVersion [4, 13]))) - mainLibSet, - Dependency - (PackageName "bytestring") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9, 1, 0])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 3])) - (EarlierVersion - (mkVersion [4, 13]))) - mainLibSet, - Dependency - (PackageName "bytestring") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9, 1, 0])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `CNot (Var (OS Windows))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "unix") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 4, 2, 0])) - (EarlierVersion - (mkVersion [2, 8]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "unix") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 4, 2, 0])) - (EarlierVersion - (mkVersion [2, 8]))) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 2, 0, 2])) - (EarlierVersion - (mkVersion [2, 7]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 2, 0, 2])) - (EarlierVersion - (mkVersion [2, 7]))) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "use-pkg-config"))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [ - PkgconfigDependency - (PkgconfigName "libpq") - (PcOrLaterVersion - (PkgconfigVersion "9.3h"))], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = ["libpq"], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = ["pq"], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS OpenBSD)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = ["crypto", "ssl"], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = - Nothing}]}}]}}]}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName - "Database.PostgreSQL.LibPQ", - ModuleName - "Database.PostgreSQL.LibPQ.Internal"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [ - ExeDependency - (PackageName "hsc2hs") - (UnqualComponentName "hsc2hs") - (OrLaterVersion - (mkVersion [0]))], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [ - SymbolicPath - "cbits/noticehandlers.c"], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "src"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [ - SymbolicPath "cbits"], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-Wall"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 3])) - (EarlierVersion - (mkVersion [4, 13]))) - mainLibSet, - Dependency - (PackageName "bytestring") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9, 1, 0])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 3])) - (EarlierVersion - (mkVersion [4, 13]))) - mainLibSet, - Dependency - (PackageName "bytestring") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9, 1, 0])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `CNot (Var (OS Windows))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "unix") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 4, 2, 0])) - (EarlierVersion - (mkVersion [2, 8]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "unix") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 4, 2, 0])) - (EarlierVersion - (mkVersion [2, 8]))) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 2, 0, 2])) - (EarlierVersion - (mkVersion [2, 7]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 2, 0, 2])) - (EarlierVersion - (mkVersion [2, 7]))) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "use-pkg-config"))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [ - PkgconfigDependency - (PkgconfigName "libpq") - (PcOrLaterVersion - (PkgconfigVersion "9.3h"))], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = ["libpq"], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = ["pq"], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS OpenBSD)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = ["crypto", "ssl"], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = - Nothing}]}}]}}]}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq2.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/libpq2.genPackageFlags.expr new file mode 100644 index 00000000000..7d105954782 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/libpq2.genPackageFlags.expr @@ -0,0 +1,7 @@ +[ + MkPackageFlag { + flagName = FlagName + "use-pkg-config", + flagDescription = "", + flagDefault = False, + flagManual = True}] diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq2.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/libpq2.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/libpq2.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/libpq2.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/libpq2.packageDescription.expr new file mode 100644 index 00000000000..8aba27c4e4e --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/libpq2.packageDescription.expr @@ -0,0 +1,117 @@ +PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName + "postgresql-libpq", + pkgVersion = mkVersion + [0, 9, 4, 2]}, + licenseRaw = Left + (License + (ELicense + (ELicenseId BSD_3_Clause) + Nothing)), + licenseFiles = [ + SymbolicPath "LICENSE"], + copyright = concat + [ + "(c) 2010 Grant Monroe\n", + "(c) 2011 Leon P Smith"], + maintainer = + "Oleg Grenrus ", + author = + "Grant Monroe, Leon P Smith, Joey Adams", + stability = "", + testedWith = [ + _×_ + GHC + (ThisVersion + (mkVersion [7, 0, 4])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 2, 2])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 4, 2])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 6, 3])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 8, 4])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 10, 3])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 0, 2])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 2, 2])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 4, 3])), + _×_ + GHC + (ThisVersion + (mkVersion [8, 6, 1]))], + homepage = + "https://github.com/phadej/postgresql-libpq", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "low-level binding to libpq", + description = concat + [ + "This is a binding to libpq: the C application\n", + "programmer's interface to PostgreSQL. libpq is a\n", + "set of library functions that allow client\n", + "programs to pass queries to the PostgreSQL\n", + "backend server and to receive the results of\n", + "these queries."], + category = "Database", + customFieldsPD = [], + buildTypeRaw = Just Custom, + setupBuildInfo = Just + SetupBuildInfo { + setupDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 3])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "Cabal") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [1, 10])) + (EarlierVersion + (mkVersion [2, 5]))) + mainLibSet], + defaultSetupDepends = False}, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [ + SymbolicPath + "cbits/noticehandlers.h", + SymbolicPath "CHANGELOG.md"], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-1.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-1.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-1.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-1.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-1.condExecutables.expr new file mode 100644 index 00000000000..37e461be943 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-1.condExecutables.expr @@ -0,0 +1,122 @@ +[ + _×_ + (UnqualComponentName + "str-example") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "str-example", + modulePath = SymbolicPath + "Main.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "str-example"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-string") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = [ + Mixin { + mixinPackageName = PackageName + "str-string", + mixinLibraryName = LMainLibName, + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName "Str") + (ModuleName "Str.String")], + includeRequiresRn = + DefaultRenaming}}, + Mixin { + mixinPackageName = PackageName + "str-bytestring", + mixinLibraryName = LMainLibName, + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName "Str") + (ModuleName "Str.ByteString")], + includeRequiresRn = + DefaultRenaming}}]}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-string") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-1.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-1.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-1.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-1.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-1.condLibrary.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-1.condLibrary.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-1.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-1.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-1.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-1.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-1.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-1.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-1.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-1.expr deleted file mode 100644 index a6235b30211..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/mixin-1.expr +++ /dev/null @@ -1,293 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_0, - package = PackageIdentifier { - pkgName = PackageName "mixin", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Nothing, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [ - _×_ - (UnqualComponentName - "str-example") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "str-example", - modulePath = SymbolicPath - "Main.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "str-example"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-string") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = [ - Mixin { - mixinPackageName = PackageName - "str-string", - mixinLibraryName = LMainLibName, - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName "Str") - (ModuleName "Str.String")], - includeRequiresRn = - DefaultRenaming}}, - Mixin { - mixinPackageName = PackageName - "str-bytestring", - mixinLibraryName = LMainLibName, - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName "Str") - (ModuleName "Str.ByteString")], - includeRequiresRn = - DefaultRenaming}}]}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-string") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}], - condTestSuites = [], - condBenchmarks = []} - Nothing - [] - [] - [ - _×_ - (UnqualComponentName - "str-example") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "str-example", - modulePath = SymbolicPath - "Main.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "str-example"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-string") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = [ - Mixin { - mixinPackageName = PackageName - "str-string", - mixinLibraryName = LMainLibName, - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName "Str") - (ModuleName "Str.String")], - includeRequiresRn = - DefaultRenaming}}, - Mixin { - mixinPackageName = PackageName - "str-bytestring", - mixinLibraryName = LMainLibName, - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName "Str") - (ModuleName "Str.ByteString")], - includeRequiresRn = - DefaultRenaming}}]}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-string") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-1.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-1.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-1.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-1.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-1.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-1.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-1.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-1.packageDescription.expr new file mode 100644 index 00000000000..a4f28a066ef --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-1.packageDescription.expr @@ -0,0 +1,34 @@ +PackageDescription { + specVersion = CabalSpecV2_0, + package = PackageIdentifier { + pkgName = PackageName "mixin", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-2.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-2.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-2.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-2.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-2.condExecutables.expr new file mode 100644 index 00000000000..37e461be943 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-2.condExecutables.expr @@ -0,0 +1,122 @@ +[ + _×_ + (UnqualComponentName + "str-example") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "str-example", + modulePath = SymbolicPath + "Main.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "str-example"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-string") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = [ + Mixin { + mixinPackageName = PackageName + "str-string", + mixinLibraryName = LMainLibName, + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName "Str") + (ModuleName "Str.String")], + includeRequiresRn = + DefaultRenaming}}, + Mixin { + mixinPackageName = PackageName + "str-bytestring", + mixinLibraryName = LMainLibName, + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + ModuleRenaming + [ + _×_ + (ModuleName "Str") + (ModuleName "Str.ByteString")], + includeRequiresRn = + DefaultRenaming}}]}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-string") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-2.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-2.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-2.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-2.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-2.condLibrary.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-2.condLibrary.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-2.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-2.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-2.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-2.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-2.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-2.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-2.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-2.expr deleted file mode 100644 index ff20592c4d2..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/mixin-2.expr +++ /dev/null @@ -1,293 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName "mixin", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Nothing, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [ - _×_ - (UnqualComponentName - "str-example") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "str-example", - modulePath = SymbolicPath - "Main.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "str-example"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-string") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = [ - Mixin { - mixinPackageName = PackageName - "str-string", - mixinLibraryName = LMainLibName, - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName "Str") - (ModuleName "Str.String")], - includeRequiresRn = - DefaultRenaming}}, - Mixin { - mixinPackageName = PackageName - "str-bytestring", - mixinLibraryName = LMainLibName, - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName "Str") - (ModuleName "Str.ByteString")], - includeRequiresRn = - DefaultRenaming}}]}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-string") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}], - condTestSuites = [], - condBenchmarks = []} - Nothing - [] - [] - [ - _×_ - (UnqualComponentName - "str-example") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "str-example", - modulePath = SymbolicPath - "Main.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "str-example"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-string") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = [ - Mixin { - mixinPackageName = PackageName - "str-string", - mixinLibraryName = LMainLibName, - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName "Str") - (ModuleName "Str.String")], - includeRequiresRn = - DefaultRenaming}}, - Mixin { - mixinPackageName = PackageName - "str-bytestring", - mixinLibraryName = LMainLibName, - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - ModuleRenaming - [ - _×_ - (ModuleName "Str") - (ModuleName "Str.ByteString")], - includeRequiresRn = - DefaultRenaming}}]}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-string") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-2.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-2.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-2.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-2.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-2.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-2.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-2.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-2.packageDescription.expr new file mode 100644 index 00000000000..418d0c7efac --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-2.packageDescription.expr @@ -0,0 +1,34 @@ +PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName "mixin", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-3.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-3.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-3.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-3.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-3.condExecutables.expr new file mode 100644 index 00000000000..51f0f596c3c --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-3.condExecutables.expr @@ -0,0 +1,105 @@ +[ + _×_ + (UnqualComponentName + "str-example") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "str-example", + modulePath = SymbolicPath + "Main.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "str-example"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-string") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = [ + Mixin { + mixinPackageName = PackageName + "str", + mixinLibraryName = LMainLibName, + mixinIncludeRenaming = + IncludeRenaming { + includeProvidesRn = + HidingRenaming + [ModuleName "Foo"], + includeRequiresRn = + DefaultRenaming}}]}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-string") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "str-bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-3.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-3.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-3.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-3.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-3.condLibrary.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-3.condLibrary.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-3.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-3.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-3.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-3.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-3.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-3.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-3.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-3.expr deleted file mode 100644 index 786c9037e07..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/mixin-3.expr +++ /dev/null @@ -1,259 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName "mixin", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = "", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Nothing, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [ - _×_ - (UnqualComponentName - "str-example") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "str-example", - modulePath = SymbolicPath - "Main.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "str-example"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-string") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = [ - Mixin { - mixinPackageName = PackageName - "str", - mixinLibraryName = LMainLibName, - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - HidingRenaming - [ModuleName "Foo"], - includeRequiresRn = - DefaultRenaming}}]}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-string") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}], - condTestSuites = [], - condBenchmarks = []} - Nothing - [] - [] - [ - _×_ - (UnqualComponentName - "str-example") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "str-example", - modulePath = SymbolicPath - "Main.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "str-example"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-string") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = [ - Mixin { - mixinPackageName = PackageName - "str", - mixinLibraryName = LMainLibName, - mixinIncludeRenaming = - IncludeRenaming { - includeProvidesRn = - HidingRenaming - [ModuleName "Foo"], - includeRequiresRn = - DefaultRenaming}}]}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-string") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "str-bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-3.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-3.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-3.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-3.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-3.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-3.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/mixin-3.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/mixin-3.packageDescription.expr new file mode 100644 index 00000000000..418d0c7efac --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/mixin-3.packageDescription.expr @@ -0,0 +1,34 @@ +PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName "mixin", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = "", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/monad-param.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/monad-param.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/monad-param.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/monad-param.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/monad-param.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/monad-param.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/monad-param.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/monad-param.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/monad-param.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/monad-param.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/monad-param.condLibrary.expr new file mode 100644 index 00000000000..0076f3213d7 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/monad-param.condLibrary.expr @@ -0,0 +1,109 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName + "Control.Monad.Parameterized"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "src"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [ + EnableExtension + MultiParamTypeClasses, + EnableExtension + FunctionalDependencies, + EnableExtension + OverlappingInstances, + EnableExtension + UndecidableInstances, + EnableExtension EmptyDataDecls, + DisableExtension + ImplicitPrelude], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [ + "-funbox-strict-fields", + "-threaded", + "-fasm"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "mtl") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "stm") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "mtl") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "stm") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/monad-param.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/monad-param.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/monad-param.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/monad-param.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/monad-param.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/monad-param.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/monad-param.expr b/Cabal-tests/tests/ParserTests/regressions/monad-param.expr deleted file mode 100644 index b4464952082..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/monad-param.expr +++ /dev/null @@ -1,277 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_0, - package = PackageIdentifier { - pkgName = PackageName - "monad-param", - pkgVersion = mkVersion - [0, 0, 1]}, - licenseRaw = Right BSD3, - licenseFiles = [ - SymbolicPath "LICENSE"], - copyright = - "Copyright (C) 2006-2007, Edward Kmett", - maintainer = - "Edward Kmett ", - author = - "Edward Kmett ", - stability = "alpha", - testedWith = [], - homepage = - "http://comonad.com/haskell/monad-param/dist/doc/html/Control-Monad-Parameterized.html", - pkgUrl = - "http://comonad.com/haskell/monad-param", - bugReports = "", - sourceRepos = [], - synopsis = - "Parameterized monads", - description = - "Implements parameterized monads by overloading the monad sugar with more liberal types.", - category = "Control", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName - "Control.Monad.Parameterized"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "src"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [ - EnableExtension - MultiParamTypeClasses, - EnableExtension - FunctionalDependencies, - EnableExtension - OverlappingInstances, - EnableExtension - UndecidableInstances, - EnableExtension EmptyDataDecls, - DisableExtension - ImplicitPrelude], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [ - "-funbox-strict-fields", - "-threaded", - "-fasm"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "mtl") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "stm") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "mtl") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "stm") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName - "Control.Monad.Parameterized"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "src"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [ - EnableExtension - MultiParamTypeClasses, - EnableExtension - FunctionalDependencies, - EnableExtension - OverlappingInstances, - EnableExtension - UndecidableInstances, - EnableExtension EmptyDataDecls, - DisableExtension - ImplicitPrelude], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [ - "-funbox-strict-fields", - "-threaded", - "-fasm"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "mtl") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "stm") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "mtl") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "stm") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/monad-param.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/monad-param.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/monad-param.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/monad-param.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/monad-param.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/monad-param.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/monad-param.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/monad-param.packageDescription.expr new file mode 100644 index 00000000000..7d299f4371a --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/monad-param.packageDescription.expr @@ -0,0 +1,44 @@ +PackageDescription { + specVersion = CabalSpecV1_0, + package = PackageIdentifier { + pkgName = PackageName + "monad-param", + pkgVersion = mkVersion + [0, 0, 1]}, + licenseRaw = Right BSD3, + licenseFiles = [ + SymbolicPath "LICENSE"], + copyright = + "Copyright (C) 2006-2007, Edward Kmett", + maintainer = + "Edward Kmett ", + author = + "Edward Kmett ", + stability = "alpha", + testedWith = [], + homepage = + "http://comonad.com/haskell/monad-param/dist/doc/html/Control-Monad-Parameterized.html", + pkgUrl = + "http://comonad.com/haskell/monad-param", + bugReports = "", + sourceRepos = [], + synopsis = + "Parameterized monads", + description = + "Implements parameterized monads by overloading the monad sugar with more liberal types.", + category = "Control", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condLibrary.expr new file mode 100644 index 00000000000..1b03802a873 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condLibrary.expr @@ -0,0 +1,78 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "ElseIf"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condSubLibraries.expr new file mode 100644 index 00000000000..8c40bfd5408 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condSubLibraries.expr @@ -0,0 +1,81 @@ +[ + _×_ + (UnqualComponentName "public") + CondNode { + condTreeData = Library { + libName = LSubLibName + (UnqualComponentName "public"), + exposedModules = [ + ModuleName "ElseIf2"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPrivate, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}] diff --git a/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.expr b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.expr deleted file mode 100644 index be750628dd0..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.expr +++ /dev/null @@ -1,367 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_0, - package = PackageIdentifier { - pkgName = PackageName - "multiple-libs", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "visible flag only since 3.0", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "ElseIf"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condSubLibraries = [ - _×_ - (UnqualComponentName "public") - CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName "public"), - exposedModules = [ - ModuleName "ElseIf2"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "ElseIf"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}) - [ - _×_ - (UnqualComponentName "public") - CondNode { - condTreeData = Library { - libName = LSubLibName - (UnqualComponentName "public"), - exposedModules = [ - ModuleName "ElseIf2"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPrivate, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.packageDescription.expr new file mode 100644 index 00000000000..ee605e1a73b --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/multiple-libs-2.packageDescription.expr @@ -0,0 +1,36 @@ +PackageDescription { + specVersion = CabalSpecV2_0, + package = PackageIdentifier { + pkgName = PackageName + "multiple-libs", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "visible flag only since 3.0", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/noVersion.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/noVersion.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/noVersion.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/noVersion.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/noVersion.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/noVersion.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/noVersion.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/noVersion.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/noVersion.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/noVersion.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/noVersion.condLibrary.expr new file mode 100644 index 00000000000..3903f20bb88 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/noVersion.condLibrary.expr @@ -0,0 +1,78 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "ElseIf"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "bad-package") + (EarlierVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "bad-package") + (EarlierVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/noVersion.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/noVersion.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/noVersion.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/noVersion.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/noVersion.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/noVersion.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/noVersion.expr b/Cabal-tests/tests/ParserTests/regressions/noVersion.expr deleted file mode 100644 index 92ed401ed1f..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/noVersion.expr +++ /dev/null @@ -1,207 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_22, - package = PackageIdentifier { - pkgName = PackageName - "noVersion", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "-none in build-depends", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "ElseIf"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "bad-package") - (EarlierVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "bad-package") - (EarlierVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "ElseIf"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "bad-package") - (EarlierVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "bad-package") - (EarlierVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/noVersion.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/noVersion.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/noVersion.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/noVersion.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/noVersion.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/noVersion.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/noVersion.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/noVersion.packageDescription.expr new file mode 100644 index 00000000000..621adc03c80 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/noVersion.packageDescription.expr @@ -0,0 +1,36 @@ +PackageDescription { + specVersion = CabalSpecV1_22, + package = PackageIdentifier { + pkgName = PackageName + "noVersion", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "-none in build-depends", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condLibrary.expr new file mode 100644 index 00000000000..0832109a9a9 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condLibrary.expr @@ -0,0 +1,141 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "\937"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `CNot (Var (PackageFlag (FlagName "\\28961")))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = False, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]} diff --git a/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.expr b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.expr deleted file mode 100644 index b4ee335af16..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.expr +++ /dev/null @@ -1,348 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_10, - package = PackageIdentifier { - pkgName = PackageName "\28961", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/hvr/-.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "The canonical non-package \28961", - description = "", - category = "", - customFieldsPD = [ - _×_ "x-\28961" "\28961"], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [ - MkPackageFlag { - flagName = FlagName "\28961", - flagDescription = "\28961", - flagDefault = True, - flagManual = False}], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "\937"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `CNot (Var (PackageFlag (FlagName "\\28961")))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = False, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "\937"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `CNot (Var (PackageFlag (FlagName "\\28961")))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = False, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.genPackageFlags.expr new file mode 100644 index 00000000000..daae1f9b731 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.genPackageFlags.expr @@ -0,0 +1,6 @@ +[ + MkPackageFlag { + flagName = FlagName "\28961", + flagDescription = "\28961", + flagDefault = True, + flagManual = False}] diff --git a/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.packageDescription.expr new file mode 100644 index 00000000000..9b59e261e94 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/nothing-unicode.packageDescription.expr @@ -0,0 +1,46 @@ +PackageDescription { + specVersion = CabalSpecV1_10, + package = PackageIdentifier { + pkgName = PackageName "\28961", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/hvr/-.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "The canonical non-package \28961", + description = "", + category = "", + customFieldsPD = [ + _×_ "x-\28961" "\28961"], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/shake.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/shake.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/shake.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/shake.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/shake.condExecutables.expr new file mode 100644 index 00000000000..d9e22f3b1ba --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/shake.condExecutables.expr @@ -0,0 +1,759 @@ +[ + _×_ + (UnqualComponentName "shake") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "shake", + modulePath = SymbolicPath + "Run.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "src"], + otherModules = [ + ModuleName + "Development.Make.All", + ModuleName + "Development.Make.Env", + ModuleName + "Development.Make.Parse", + ModuleName + "Development.Make.Rules", + ModuleName + "Development.Make.Type", + ModuleName + "Development.Ninja.All", + ModuleName + "Development.Ninja.Env", + ModuleName + "Development.Ninja.Lexer", + ModuleName + "Development.Ninja.Parse", + ModuleName + "Development.Ninja.Type", + ModuleName "Development.Shake", + ModuleName + "Development.Shake.Args", + ModuleName + "Development.Shake.ByteString", + ModuleName + "Development.Shake.Classes", + ModuleName + "Development.Shake.CmdOption", + ModuleName + "Development.Shake.Command", + ModuleName + "Development.Shake.Core", + ModuleName + "Development.Shake.Database", + ModuleName + "Development.Shake.Demo", + ModuleName + "Development.Shake.Derived", + ModuleName + "Development.Shake.Errors", + ModuleName + "Development.Shake.FileInfo", + ModuleName + "Development.Shake.FilePath", + ModuleName + "Development.Shake.FilePattern", + ModuleName + "Development.Shake.Forward", + ModuleName + "Development.Shake.Monad", + ModuleName + "Development.Shake.Pool", + ModuleName + "Development.Shake.Profile", + ModuleName + "Development.Shake.Progress", + ModuleName + "Development.Shake.Resource", + ModuleName + "Development.Shake.Rule", + ModuleName + "Development.Shake.Rules.Directory", + ModuleName + "Development.Shake.Rules.File", + ModuleName + "Development.Shake.Rules.Files", + ModuleName + "Development.Shake.Rules.Oracle", + ModuleName + "Development.Shake.Rules.OrderOnly", + ModuleName + "Development.Shake.Rules.Rerun", + ModuleName + "Development.Shake.Shake", + ModuleName + "Development.Shake.Special", + ModuleName + "Development.Shake.Storage", + ModuleName + "Development.Shake.Types", + ModuleName + "Development.Shake.Value", + ModuleName "General.Bilist", + ModuleName "General.Binary", + ModuleName "General.Cleanup", + ModuleName "General.Concurrent", + ModuleName "General.Extra", + ModuleName "General.FileLock", + ModuleName "General.Intern", + ModuleName "General.Process", + ModuleName "General.String", + ModuleName "General.Template", + ModuleName "General.Timing", + ModuleName "Paths_shake", + ModuleName "Run"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [ + "-main-is", + "Run.main", + "-rtsopts"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion (mkVersion [4])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hashable") + (OrLaterVersion + (mkVersion [1, 1, 2, 3])) + mainLibSet, + Dependency + (PackageName "binary") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "process") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet, + Dependency + (PackageName + "unordered-containers") + (OrLaterVersion + (mkVersion [0, 2, 1])) + mainLibSet, + Dependency + (PackageName "bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "utf8-string") + (OrLaterVersion + (mkVersion [0, 3])) + mainLibSet, + Dependency + (PackageName "time") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "random") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-jquery") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-flot") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "transformers") + (OrLaterVersion + (mkVersion [0, 2])) + mainLibSet, + Dependency + (PackageName "extra") + (OrLaterVersion + (mkVersion [1, 4, 8])) + mainLibSet, + Dependency + (PackageName "deepseq") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet, + Dependency + (PackageName "primitive") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion (mkVersion [4])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hashable") + (OrLaterVersion + (mkVersion [1, 1, 2, 3])) + mainLibSet, + Dependency + (PackageName "binary") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "process") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet, + Dependency + (PackageName + "unordered-containers") + (OrLaterVersion + (mkVersion [0, 2, 1])) + mainLibSet, + Dependency + (PackageName "bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "utf8-string") + (OrLaterVersion + (mkVersion [0, 3])) + mainLibSet, + Dependency + (PackageName "time") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "random") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-jquery") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-flot") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "transformers") + (OrLaterVersion + (mkVersion [0, 2])) + mainLibSet, + Dependency + (PackageName "extra") + (OrLaterVersion + (mkVersion [1, 4, 8])) + mainLibSet, + Dependency + (PackageName "deepseq") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet, + Dependency + (PackageName "primitive") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (Impl GHC (OrLaterVersion (mkVersion [7,8])))`, + condBranchIfTrue = CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "shake", + modulePath = SymbolicPath "", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [ + "-threaded", + "-with-rtsopts=-I0 -qg -qb"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "portable"))`, + condBranchIfTrue = CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "shake", + modulePath = SymbolicPath "", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = ["-DPORTABLE"], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (Impl GHC (EarlierVersion (mkVersion [7,6])))`, + condBranchIfTrue = CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "shake", + modulePath = SymbolicPath "", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "old-time") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "old-time") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}, + condBranchIfFalse = Just + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "shake", + modulePath = SymbolicPath "", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `CNot (Var (OS Windows))`, + condBranchIfTrue = CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "shake", + modulePath = SymbolicPath "", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "unix") + (OrLaterVersion + (mkVersion [2, 5, 1])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "unix") + (OrLaterVersion + (mkVersion [2, 5, 1])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}}, + CondBranch { + condBranchCondition = + `CNot (Var (OS Windows))`, + condBranchIfTrue = CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "shake", + modulePath = SymbolicPath "", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "unix") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "unix") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}] diff --git a/Cabal-tests/tests/ParserTests/regressions/shake.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/shake.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/shake.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/shake.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/shake.condLibrary.expr new file mode 100644 index 00000000000..dfc1e72bba3 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/shake.condLibrary.expr @@ -0,0 +1,681 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "Development.Shake", + ModuleName + "Development.Shake.Classes", + ModuleName + "Development.Shake.Command", + ModuleName + "Development.Shake.Config", + ModuleName + "Development.Shake.FilePath", + ModuleName + "Development.Shake.Forward", + ModuleName + "Development.Shake.Rule", + ModuleName + "Development.Shake.Util"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath ".", + SymbolicPath "src"], + otherModules = [ + ModuleName + "Development.Ninja.Env", + ModuleName + "Development.Ninja.Lexer", + ModuleName + "Development.Ninja.Parse", + ModuleName + "Development.Ninja.Type", + ModuleName + "Development.Shake.Args", + ModuleName + "Development.Shake.ByteString", + ModuleName + "Development.Shake.Core", + ModuleName + "Development.Shake.CmdOption", + ModuleName + "Development.Shake.Database", + ModuleName + "Development.Shake.Demo", + ModuleName + "Development.Shake.Derived", + ModuleName + "Development.Shake.Errors", + ModuleName + "Development.Shake.FileInfo", + ModuleName + "Development.Shake.FilePattern", + ModuleName + "Development.Shake.Monad", + ModuleName + "Development.Shake.Pool", + ModuleName + "Development.Shake.Profile", + ModuleName + "Development.Shake.Progress", + ModuleName + "Development.Shake.Resource", + ModuleName + "Development.Shake.Rules.Directory", + ModuleName + "Development.Shake.Rules.File", + ModuleName + "Development.Shake.Rules.Files", + ModuleName + "Development.Shake.Rules.Oracle", + ModuleName + "Development.Shake.Rules.OrderOnly", + ModuleName + "Development.Shake.Rules.Rerun", + ModuleName + "Development.Shake.Shake", + ModuleName + "Development.Shake.Special", + ModuleName + "Development.Shake.Storage", + ModuleName + "Development.Shake.Types", + ModuleName + "Development.Shake.Value", + ModuleName "General.Bilist", + ModuleName "General.Binary", + ModuleName "General.Cleanup", + ModuleName "General.Concurrent", + ModuleName "General.Extra", + ModuleName "General.FileLock", + ModuleName "General.Intern", + ModuleName "General.Process", + ModuleName "General.String", + ModuleName "General.Template", + ModuleName "General.Timing", + ModuleName "Paths_shake"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion + (mkVersion [4, 5])) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hashable") + (OrLaterVersion + (mkVersion [1, 1, 2, 3])) + mainLibSet, + Dependency + (PackageName "binary") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "process") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet, + Dependency + (PackageName + "unordered-containers") + (OrLaterVersion + (mkVersion [0, 2, 1])) + mainLibSet, + Dependency + (PackageName "bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "utf8-string") + (OrLaterVersion + (mkVersion [0, 3])) + mainLibSet, + Dependency + (PackageName "time") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "random") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-jquery") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-flot") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "transformers") + (OrLaterVersion + (mkVersion [0, 2])) + mainLibSet, + Dependency + (PackageName "extra") + (OrLaterVersion + (mkVersion [1, 4, 8])) + mainLibSet, + Dependency + (PackageName "deepseq") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion + (mkVersion [4, 5])) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hashable") + (OrLaterVersion + (mkVersion [1, 1, 2, 3])) + mainLibSet, + Dependency + (PackageName "binary") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "process") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet, + Dependency + (PackageName + "unordered-containers") + (OrLaterVersion + (mkVersion [0, 2, 1])) + mainLibSet, + Dependency + (PackageName "bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "utf8-string") + (OrLaterVersion + (mkVersion [0, 3])) + mainLibSet, + Dependency + (PackageName "time") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "random") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-jquery") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-flot") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "transformers") + (OrLaterVersion + (mkVersion [0, 2])) + mainLibSet, + Dependency + (PackageName "extra") + (OrLaterVersion + (mkVersion [1, 4, 8])) + mainLibSet, + Dependency + (PackageName "deepseq") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "portable"))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = ["-DPORTABLE"], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (Impl GHC (EarlierVersion (mkVersion [7,6])))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "old-time") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "old-time") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}, + condBranchIfFalse = Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `CNot (Var (OS Windows))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "unix") + (OrLaterVersion + (mkVersion [2, 5, 1])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "unix") + (OrLaterVersion + (mkVersion [2, 5, 1])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}}, + CondBranch { + condBranchCondition = + `CNot (Var (OS Windows))`, + condBranchIfTrue = CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "unix") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "unix") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]} diff --git a/Cabal-tests/tests/ParserTests/regressions/shake.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/shake.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/shake.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/shake.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/shake.condTestSuites.expr new file mode 100644 index 00000000000..0f7471e6ce4 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/shake.condTestSuites.expr @@ -0,0 +1,900 @@ +[ + _×_ + (UnqualComponentName + "shake-test") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "Test.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "src"], + otherModules = [ + ModuleName + "Development.Make.All", + ModuleName + "Development.Make.Env", + ModuleName + "Development.Make.Parse", + ModuleName + "Development.Make.Rules", + ModuleName + "Development.Make.Type", + ModuleName + "Development.Ninja.All", + ModuleName + "Development.Ninja.Env", + ModuleName + "Development.Ninja.Lexer", + ModuleName + "Development.Ninja.Parse", + ModuleName + "Development.Ninja.Type", + ModuleName "Development.Shake", + ModuleName + "Development.Shake.Args", + ModuleName + "Development.Shake.ByteString", + ModuleName + "Development.Shake.Classes", + ModuleName + "Development.Shake.CmdOption", + ModuleName + "Development.Shake.Command", + ModuleName + "Development.Shake.Config", + ModuleName + "Development.Shake.Core", + ModuleName + "Development.Shake.Database", + ModuleName + "Development.Shake.Demo", + ModuleName + "Development.Shake.Derived", + ModuleName + "Development.Shake.Errors", + ModuleName + "Development.Shake.FileInfo", + ModuleName + "Development.Shake.FilePath", + ModuleName + "Development.Shake.FilePattern", + ModuleName + "Development.Shake.Forward", + ModuleName + "Development.Shake.Monad", + ModuleName + "Development.Shake.Pool", + ModuleName + "Development.Shake.Profile", + ModuleName + "Development.Shake.Progress", + ModuleName + "Development.Shake.Resource", + ModuleName + "Development.Shake.Rule", + ModuleName + "Development.Shake.Rules.Directory", + ModuleName + "Development.Shake.Rules.File", + ModuleName + "Development.Shake.Rules.Files", + ModuleName + "Development.Shake.Rules.Oracle", + ModuleName + "Development.Shake.Rules.OrderOnly", + ModuleName + "Development.Shake.Rules.Rerun", + ModuleName + "Development.Shake.Shake", + ModuleName + "Development.Shake.Special", + ModuleName + "Development.Shake.Storage", + ModuleName + "Development.Shake.Types", + ModuleName + "Development.Shake.Util", + ModuleName + "Development.Shake.Value", + ModuleName "General.Bilist", + ModuleName "General.Binary", + ModuleName "General.Cleanup", + ModuleName "General.Concurrent", + ModuleName "General.Extra", + ModuleName "General.FileLock", + ModuleName "General.Intern", + ModuleName "General.Process", + ModuleName "General.String", + ModuleName "General.Template", + ModuleName "General.Timing", + ModuleName "Paths_shake", + ModuleName "Run", + ModuleName "Test.Assume", + ModuleName "Test.Basic", + ModuleName "Test.Benchmark", + ModuleName "Test.C", + ModuleName "Test.Cache", + ModuleName "Test.Command", + ModuleName "Test.Config", + ModuleName "Test.Digest", + ModuleName "Test.Directory", + ModuleName "Test.Docs", + ModuleName "Test.Errors", + ModuleName "Test.FileLock", + ModuleName "Test.FilePath", + ModuleName "Test.FilePattern", + ModuleName "Test.Files", + ModuleName "Test.Forward", + ModuleName "Test.Journal", + ModuleName "Test.Lint", + ModuleName "Test.Live", + ModuleName "Test.Makefile", + ModuleName "Test.Manual", + ModuleName "Test.Match", + ModuleName "Test.Monad", + ModuleName "Test.Ninja", + ModuleName "Test.Oracle", + ModuleName "Test.OrderOnly", + ModuleName "Test.Parallel", + ModuleName "Test.Pool", + ModuleName "Test.Progress", + ModuleName "Test.Random", + ModuleName "Test.Resources", + ModuleName "Test.Self", + ModuleName "Test.Tar", + ModuleName "Test.Tup", + ModuleName "Test.Type", + ModuleName "Test.Unicode", + ModuleName "Test.Util", + ModuleName "Test.Verbosity", + ModuleName "Test.Version"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [ + "-main-is", + "Test.main", + "-rtsopts"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion (mkVersion [4])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hashable") + (OrLaterVersion + (mkVersion [1, 1, 2, 3])) + mainLibSet, + Dependency + (PackageName "binary") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "process") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet, + Dependency + (PackageName + "unordered-containers") + (OrLaterVersion + (mkVersion [0, 2, 1])) + mainLibSet, + Dependency + (PackageName "bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "utf8-string") + (OrLaterVersion + (mkVersion [0, 3])) + mainLibSet, + Dependency + (PackageName "time") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "random") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-jquery") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-flot") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "transformers") + (OrLaterVersion + (mkVersion [0, 2])) + mainLibSet, + Dependency + (PackageName "deepseq") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet, + Dependency + (PackageName "extra") + (OrLaterVersion + (mkVersion [1, 4, 8])) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (OrLaterVersion + (mkVersion [2, 0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion (mkVersion [4])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hashable") + (OrLaterVersion + (mkVersion [1, 1, 2, 3])) + mainLibSet, + Dependency + (PackageName "binary") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "process") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet, + Dependency + (PackageName + "unordered-containers") + (OrLaterVersion + (mkVersion [0, 2, 1])) + mainLibSet, + Dependency + (PackageName "bytestring") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "utf8-string") + (OrLaterVersion + (mkVersion [0, 3])) + mainLibSet, + Dependency + (PackageName "time") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "random") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-jquery") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "js-flot") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "transformers") + (OrLaterVersion + (mkVersion [0, 2])) + mainLibSet, + Dependency + (PackageName "deepseq") + (OrLaterVersion + (mkVersion [1, 1])) + mainLibSet, + Dependency + (PackageName "extra") + (OrLaterVersion + (mkVersion [1, 4, 8])) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (OrLaterVersion + (mkVersion [2, 0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (Impl GHC (OrLaterVersion (mkVersion [7,6])))`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-with-rtsopts=-K1K"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (Impl GHC (OrLaterVersion (mkVersion [7,8])))`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-threaded"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}, + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "portable"))`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = ["-DPORTABLE"], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (Impl GHC (EarlierVersion (mkVersion [7,6])))`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "old-time") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "old-time") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}, + condBranchIfFalse = Just + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `CNot (Var (OS Windows))`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "unix") + (OrLaterVersion + (mkVersion [2, 5, 1])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "unix") + (OrLaterVersion + (mkVersion [2, 5, 1])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}}, + CondBranch { + condBranchCondition = + `CNot (Var (OS Windows))`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "unix") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "unix") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}] diff --git a/Cabal-tests/tests/ParserTests/regressions/shake.expr b/Cabal-tests/tests/ParserTests/regressions/shake.expr deleted file mode 100644 index 4710e735e3f..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/shake.expr +++ /dev/null @@ -1,4848 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_18, - package = PackageIdentifier { - pkgName = PackageName "shake", - pkgVersion = mkVersion - [0, 15, 11]}, - licenseRaw = Right BSD3, - licenseFiles = [ - SymbolicPath "LICENSE"], - copyright = - "Neil Mitchell 2011-2017", - maintainer = - "Neil Mitchell ", - author = - "Neil Mitchell ", - stability = "", - testedWith = [ - _×_ - GHC - (ThisVersion - (mkVersion [8, 0, 1])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 10, 3])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 8, 4])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 6, 3])), - _×_ - GHC - (ThisVersion - (mkVersion [7, 4, 2]))], - homepage = - "http://shakebuild.com", - pkgUrl = "", - bugReports = - "https://github.com/ndmitchell/shake/issues", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/ndmitchell/shake.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "Build system library, like Make, but more accurate dependencies.", - description = - concat - [ - "Shake is a Haskell library for writing build systems - designed as a\n", - "replacement for @make@. See \"Development.Shake\" for an introduction,\n", - "including an example. Further examples are included in the Cabal tarball,\n", - "under the @Examples@ directory. The homepage contains links to a user\n", - "manual, an academic paper and further information:\n", - "\n", - "\n", - "To use Shake the user writes a Haskell program\n", - "that imports \"Development.Shake\", defines some build rules, and calls\n", - "the 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\n", - "operators, a simple Shake build system\n", - "is not too dissimilar from a simple Makefile. However, as build systems\n", - "get more complex, Shake is able to take advantage of the excellent\n", - "abstraction facilities offered by Haskell and easily support much larger\n", - "projects. The Shake library provides all the standard features available in other\n", - "build systems, including automatic parallelism and minimal rebuilds.\n", - "Shake also provides more accurate dependency tracking, including seamless\n", - "support for generated files, and dependencies on system information\n", - "(e.g. compiler version)."], - category = "Development, Shake", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [ - SymbolicPath "html/viz.js", - SymbolicPath - "html/profile.html", - SymbolicPath - "html/progress.html", - SymbolicPath "html/shake.js", - SymbolicPath - "docs/manual/build.bat", - SymbolicPath - "docs/manual/Build.hs", - SymbolicPath - "docs/manual/build.sh", - SymbolicPath - "docs/manual/constants.c", - SymbolicPath - "docs/manual/constants.h", - SymbolicPath - "docs/manual/main.c"], - dataDir = SymbolicPath ".", - extraSrcFiles = [ - SymbolicPath - "src/Test/C/constants.c", - SymbolicPath - "src/Test/C/constants.h", - SymbolicPath - "src/Test/C/main.c", - SymbolicPath - "src/Test/MakeTutor/Makefile", - SymbolicPath - "src/Test/MakeTutor/hellofunc.c", - SymbolicPath - "src/Test/MakeTutor/hellomake.c", - SymbolicPath - "src/Test/MakeTutor/hellomake.h", - SymbolicPath - "src/Test/Tar/list.txt", - SymbolicPath - "src/Test/Ninja/*.ninja", - SymbolicPath - "src/Test/Ninja/subdir/*.ninja", - SymbolicPath - "src/Test/Ninja/*.output", - SymbolicPath - "src/Test/Progress/*.prog", - SymbolicPath - "src/Test/Tup/hello.c", - SymbolicPath - "src/Test/Tup/root.cfg", - SymbolicPath - "src/Test/Tup/newmath/root.cfg", - SymbolicPath - "src/Test/Tup/newmath/square.c", - SymbolicPath - "src/Test/Tup/newmath/square.h", - SymbolicPath "src/Paths.hs", - SymbolicPath "docs/Manual.md", - SymbolicPath - "docs/shake-progress.png"], - extraTmpFiles = [], - extraDocFiles = [ - SymbolicPath "CHANGES.txt", - SymbolicPath "README.md"], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [ - MkPackageFlag { - flagName = FlagName "portable", - flagDescription = - "Obtain FileTime using portable functions", - flagDefault = False, - flagManual = True}], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "Development.Shake", - ModuleName - "Development.Shake.Classes", - ModuleName - "Development.Shake.Command", - ModuleName - "Development.Shake.Config", - ModuleName - "Development.Shake.FilePath", - ModuleName - "Development.Shake.Forward", - ModuleName - "Development.Shake.Rule", - ModuleName - "Development.Shake.Util"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath ".", - SymbolicPath "src"], - otherModules = [ - ModuleName - "Development.Ninja.Env", - ModuleName - "Development.Ninja.Lexer", - ModuleName - "Development.Ninja.Parse", - ModuleName - "Development.Ninja.Type", - ModuleName - "Development.Shake.Args", - ModuleName - "Development.Shake.ByteString", - ModuleName - "Development.Shake.Core", - ModuleName - "Development.Shake.CmdOption", - ModuleName - "Development.Shake.Database", - ModuleName - "Development.Shake.Demo", - ModuleName - "Development.Shake.Derived", - ModuleName - "Development.Shake.Errors", - ModuleName - "Development.Shake.FileInfo", - ModuleName - "Development.Shake.FilePattern", - ModuleName - "Development.Shake.Monad", - ModuleName - "Development.Shake.Pool", - ModuleName - "Development.Shake.Profile", - ModuleName - "Development.Shake.Progress", - ModuleName - "Development.Shake.Resource", - ModuleName - "Development.Shake.Rules.Directory", - ModuleName - "Development.Shake.Rules.File", - ModuleName - "Development.Shake.Rules.Files", - ModuleName - "Development.Shake.Rules.Oracle", - ModuleName - "Development.Shake.Rules.OrderOnly", - ModuleName - "Development.Shake.Rules.Rerun", - ModuleName - "Development.Shake.Shake", - ModuleName - "Development.Shake.Special", - ModuleName - "Development.Shake.Storage", - ModuleName - "Development.Shake.Types", - ModuleName - "Development.Shake.Value", - ModuleName "General.Bilist", - ModuleName "General.Binary", - ModuleName "General.Cleanup", - ModuleName "General.Concurrent", - ModuleName "General.Extra", - ModuleName "General.FileLock", - ModuleName "General.Intern", - ModuleName "General.Process", - ModuleName "General.String", - ModuleName "General.Template", - ModuleName "General.Timing", - ModuleName "Paths_shake"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion - (mkVersion [4, 5])) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "hashable") - (OrLaterVersion - (mkVersion [1, 1, 2, 3])) - mainLibSet, - Dependency - (PackageName "binary") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "process") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet, - Dependency - (PackageName - "unordered-containers") - (OrLaterVersion - (mkVersion [0, 2, 1])) - mainLibSet, - Dependency - (PackageName "bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "utf8-string") - (OrLaterVersion - (mkVersion [0, 3])) - mainLibSet, - Dependency - (PackageName "time") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "random") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-jquery") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-flot") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "transformers") - (OrLaterVersion - (mkVersion [0, 2])) - mainLibSet, - Dependency - (PackageName "extra") - (OrLaterVersion - (mkVersion [1, 4, 8])) - mainLibSet, - Dependency - (PackageName "deepseq") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion - (mkVersion [4, 5])) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "hashable") - (OrLaterVersion - (mkVersion [1, 1, 2, 3])) - mainLibSet, - Dependency - (PackageName "binary") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "process") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet, - Dependency - (PackageName - "unordered-containers") - (OrLaterVersion - (mkVersion [0, 2, 1])) - mainLibSet, - Dependency - (PackageName "bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "utf8-string") - (OrLaterVersion - (mkVersion [0, 3])) - mainLibSet, - Dependency - (PackageName "time") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "random") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-jquery") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-flot") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "transformers") - (OrLaterVersion - (mkVersion [0, 2])) - mainLibSet, - Dependency - (PackageName "extra") - (OrLaterVersion - (mkVersion [1, 4, 8])) - mainLibSet, - Dependency - (PackageName "deepseq") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "portable"))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = ["-DPORTABLE"], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (Impl GHC (EarlierVersion (mkVersion [7,6])))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "old-time") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "old-time") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condBranchIfFalse = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `CNot (Var (OS Windows))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "unix") - (OrLaterVersion - (mkVersion [2, 5, 1])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "unix") - (OrLaterVersion - (mkVersion [2, 5, 1])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}}, - CondBranch { - condBranchCondition = - `CNot (Var (OS Windows))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "unix") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "unix") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [ - _×_ - (UnqualComponentName "shake") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "shake", - modulePath = SymbolicPath - "Run.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "src"], - otherModules = [ - ModuleName - "Development.Make.All", - ModuleName - "Development.Make.Env", - ModuleName - "Development.Make.Parse", - ModuleName - "Development.Make.Rules", - ModuleName - "Development.Make.Type", - ModuleName - "Development.Ninja.All", - ModuleName - "Development.Ninja.Env", - ModuleName - "Development.Ninja.Lexer", - ModuleName - "Development.Ninja.Parse", - ModuleName - "Development.Ninja.Type", - ModuleName "Development.Shake", - ModuleName - "Development.Shake.Args", - ModuleName - "Development.Shake.ByteString", - ModuleName - "Development.Shake.Classes", - ModuleName - "Development.Shake.CmdOption", - ModuleName - "Development.Shake.Command", - ModuleName - "Development.Shake.Core", - ModuleName - "Development.Shake.Database", - ModuleName - "Development.Shake.Demo", - ModuleName - "Development.Shake.Derived", - ModuleName - "Development.Shake.Errors", - ModuleName - "Development.Shake.FileInfo", - ModuleName - "Development.Shake.FilePath", - ModuleName - "Development.Shake.FilePattern", - ModuleName - "Development.Shake.Forward", - ModuleName - "Development.Shake.Monad", - ModuleName - "Development.Shake.Pool", - ModuleName - "Development.Shake.Profile", - ModuleName - "Development.Shake.Progress", - ModuleName - "Development.Shake.Resource", - ModuleName - "Development.Shake.Rule", - ModuleName - "Development.Shake.Rules.Directory", - ModuleName - "Development.Shake.Rules.File", - ModuleName - "Development.Shake.Rules.Files", - ModuleName - "Development.Shake.Rules.Oracle", - ModuleName - "Development.Shake.Rules.OrderOnly", - ModuleName - "Development.Shake.Rules.Rerun", - ModuleName - "Development.Shake.Shake", - ModuleName - "Development.Shake.Special", - ModuleName - "Development.Shake.Storage", - ModuleName - "Development.Shake.Types", - ModuleName - "Development.Shake.Value", - ModuleName "General.Bilist", - ModuleName "General.Binary", - ModuleName "General.Cleanup", - ModuleName "General.Concurrent", - ModuleName "General.Extra", - ModuleName "General.FileLock", - ModuleName "General.Intern", - ModuleName "General.Process", - ModuleName "General.String", - ModuleName "General.Template", - ModuleName "General.Timing", - ModuleName "Paths_shake", - ModuleName "Run"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [ - "-main-is", - "Run.main", - "-rtsopts"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion (mkVersion [4])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "hashable") - (OrLaterVersion - (mkVersion [1, 1, 2, 3])) - mainLibSet, - Dependency - (PackageName "binary") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "process") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet, - Dependency - (PackageName - "unordered-containers") - (OrLaterVersion - (mkVersion [0, 2, 1])) - mainLibSet, - Dependency - (PackageName "bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "utf8-string") - (OrLaterVersion - (mkVersion [0, 3])) - mainLibSet, - Dependency - (PackageName "time") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "random") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-jquery") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-flot") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "transformers") - (OrLaterVersion - (mkVersion [0, 2])) - mainLibSet, - Dependency - (PackageName "extra") - (OrLaterVersion - (mkVersion [1, 4, 8])) - mainLibSet, - Dependency - (PackageName "deepseq") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet, - Dependency - (PackageName "primitive") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion (mkVersion [4])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "hashable") - (OrLaterVersion - (mkVersion [1, 1, 2, 3])) - mainLibSet, - Dependency - (PackageName "binary") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "process") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet, - Dependency - (PackageName - "unordered-containers") - (OrLaterVersion - (mkVersion [0, 2, 1])) - mainLibSet, - Dependency - (PackageName "bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "utf8-string") - (OrLaterVersion - (mkVersion [0, 3])) - mainLibSet, - Dependency - (PackageName "time") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "random") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-jquery") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-flot") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "transformers") - (OrLaterVersion - (mkVersion [0, 2])) - mainLibSet, - Dependency - (PackageName "extra") - (OrLaterVersion - (mkVersion [1, 4, 8])) - mainLibSet, - Dependency - (PackageName "deepseq") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet, - Dependency - (PackageName "primitive") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (Impl GHC (OrLaterVersion (mkVersion [7,8])))`, - condBranchIfTrue = CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "shake", - modulePath = SymbolicPath "", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [ - "-threaded", - "-with-rtsopts=-I0 -qg -qb"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "portable"))`, - condBranchIfTrue = CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "shake", - modulePath = SymbolicPath "", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = ["-DPORTABLE"], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (Impl GHC (EarlierVersion (mkVersion [7,6])))`, - condBranchIfTrue = CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "shake", - modulePath = SymbolicPath "", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "old-time") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "old-time") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condBranchIfFalse = Just - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "shake", - modulePath = SymbolicPath "", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `CNot (Var (OS Windows))`, - condBranchIfTrue = CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "shake", - modulePath = SymbolicPath "", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "unix") - (OrLaterVersion - (mkVersion [2, 5, 1])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "unix") - (OrLaterVersion - (mkVersion [2, 5, 1])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}}, - CondBranch { - condBranchCondition = - `CNot (Var (OS Windows))`, - condBranchIfTrue = CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "shake", - modulePath = SymbolicPath "", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "unix") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "unix") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}], - condTestSuites = [ - _×_ - (UnqualComponentName - "shake-test") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "Test.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "src"], - otherModules = [ - ModuleName - "Development.Make.All", - ModuleName - "Development.Make.Env", - ModuleName - "Development.Make.Parse", - ModuleName - "Development.Make.Rules", - ModuleName - "Development.Make.Type", - ModuleName - "Development.Ninja.All", - ModuleName - "Development.Ninja.Env", - ModuleName - "Development.Ninja.Lexer", - ModuleName - "Development.Ninja.Parse", - ModuleName - "Development.Ninja.Type", - ModuleName "Development.Shake", - ModuleName - "Development.Shake.Args", - ModuleName - "Development.Shake.ByteString", - ModuleName - "Development.Shake.Classes", - ModuleName - "Development.Shake.CmdOption", - ModuleName - "Development.Shake.Command", - ModuleName - "Development.Shake.Config", - ModuleName - "Development.Shake.Core", - ModuleName - "Development.Shake.Database", - ModuleName - "Development.Shake.Demo", - ModuleName - "Development.Shake.Derived", - ModuleName - "Development.Shake.Errors", - ModuleName - "Development.Shake.FileInfo", - ModuleName - "Development.Shake.FilePath", - ModuleName - "Development.Shake.FilePattern", - ModuleName - "Development.Shake.Forward", - ModuleName - "Development.Shake.Monad", - ModuleName - "Development.Shake.Pool", - ModuleName - "Development.Shake.Profile", - ModuleName - "Development.Shake.Progress", - ModuleName - "Development.Shake.Resource", - ModuleName - "Development.Shake.Rule", - ModuleName - "Development.Shake.Rules.Directory", - ModuleName - "Development.Shake.Rules.File", - ModuleName - "Development.Shake.Rules.Files", - ModuleName - "Development.Shake.Rules.Oracle", - ModuleName - "Development.Shake.Rules.OrderOnly", - ModuleName - "Development.Shake.Rules.Rerun", - ModuleName - "Development.Shake.Shake", - ModuleName - "Development.Shake.Special", - ModuleName - "Development.Shake.Storage", - ModuleName - "Development.Shake.Types", - ModuleName - "Development.Shake.Util", - ModuleName - "Development.Shake.Value", - ModuleName "General.Bilist", - ModuleName "General.Binary", - ModuleName "General.Cleanup", - ModuleName "General.Concurrent", - ModuleName "General.Extra", - ModuleName "General.FileLock", - ModuleName "General.Intern", - ModuleName "General.Process", - ModuleName "General.String", - ModuleName "General.Template", - ModuleName "General.Timing", - ModuleName "Paths_shake", - ModuleName "Run", - ModuleName "Test.Assume", - ModuleName "Test.Basic", - ModuleName "Test.Benchmark", - ModuleName "Test.C", - ModuleName "Test.Cache", - ModuleName "Test.Command", - ModuleName "Test.Config", - ModuleName "Test.Digest", - ModuleName "Test.Directory", - ModuleName "Test.Docs", - ModuleName "Test.Errors", - ModuleName "Test.FileLock", - ModuleName "Test.FilePath", - ModuleName "Test.FilePattern", - ModuleName "Test.Files", - ModuleName "Test.Forward", - ModuleName "Test.Journal", - ModuleName "Test.Lint", - ModuleName "Test.Live", - ModuleName "Test.Makefile", - ModuleName "Test.Manual", - ModuleName "Test.Match", - ModuleName "Test.Monad", - ModuleName "Test.Ninja", - ModuleName "Test.Oracle", - ModuleName "Test.OrderOnly", - ModuleName "Test.Parallel", - ModuleName "Test.Pool", - ModuleName "Test.Progress", - ModuleName "Test.Random", - ModuleName "Test.Resources", - ModuleName "Test.Self", - ModuleName "Test.Tar", - ModuleName "Test.Tup", - ModuleName "Test.Type", - ModuleName "Test.Unicode", - ModuleName "Test.Util", - ModuleName "Test.Verbosity", - ModuleName "Test.Version"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [ - "-main-is", - "Test.main", - "-rtsopts"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion (mkVersion [4])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "hashable") - (OrLaterVersion - (mkVersion [1, 1, 2, 3])) - mainLibSet, - Dependency - (PackageName "binary") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "process") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet, - Dependency - (PackageName - "unordered-containers") - (OrLaterVersion - (mkVersion [0, 2, 1])) - mainLibSet, - Dependency - (PackageName "bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "utf8-string") - (OrLaterVersion - (mkVersion [0, 3])) - mainLibSet, - Dependency - (PackageName "time") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "random") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-jquery") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-flot") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "transformers") - (OrLaterVersion - (mkVersion [0, 2])) - mainLibSet, - Dependency - (PackageName "deepseq") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet, - Dependency - (PackageName "extra") - (OrLaterVersion - (mkVersion [1, 4, 8])) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (OrLaterVersion - (mkVersion [2, 0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion (mkVersion [4])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "hashable") - (OrLaterVersion - (mkVersion [1, 1, 2, 3])) - mainLibSet, - Dependency - (PackageName "binary") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "process") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet, - Dependency - (PackageName - "unordered-containers") - (OrLaterVersion - (mkVersion [0, 2, 1])) - mainLibSet, - Dependency - (PackageName "bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "utf8-string") - (OrLaterVersion - (mkVersion [0, 3])) - mainLibSet, - Dependency - (PackageName "time") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "random") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-jquery") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-flot") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "transformers") - (OrLaterVersion - (mkVersion [0, 2])) - mainLibSet, - Dependency - (PackageName "deepseq") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet, - Dependency - (PackageName "extra") - (OrLaterVersion - (mkVersion [1, 4, 8])) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (OrLaterVersion - (mkVersion [2, 0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (Impl GHC (OrLaterVersion (mkVersion [7,6])))`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-with-rtsopts=-K1K"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (Impl GHC (OrLaterVersion (mkVersion [7,8])))`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-threaded"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "portable"))`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = ["-DPORTABLE"], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (Impl GHC (EarlierVersion (mkVersion [7,6])))`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "old-time") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "old-time") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condBranchIfFalse = Just - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `CNot (Var (OS Windows))`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "unix") - (OrLaterVersion - (mkVersion [2, 5, 1])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "unix") - (OrLaterVersion - (mkVersion [2, 5, 1])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}}, - CondBranch { - condBranchCondition = - `CNot (Var (OS Windows))`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "unix") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "unix") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "Development.Shake", - ModuleName - "Development.Shake.Classes", - ModuleName - "Development.Shake.Command", - ModuleName - "Development.Shake.Config", - ModuleName - "Development.Shake.FilePath", - ModuleName - "Development.Shake.Forward", - ModuleName - "Development.Shake.Rule", - ModuleName - "Development.Shake.Util"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath ".", - SymbolicPath "src"], - otherModules = [ - ModuleName - "Development.Ninja.Env", - ModuleName - "Development.Ninja.Lexer", - ModuleName - "Development.Ninja.Parse", - ModuleName - "Development.Ninja.Type", - ModuleName - "Development.Shake.Args", - ModuleName - "Development.Shake.ByteString", - ModuleName - "Development.Shake.Core", - ModuleName - "Development.Shake.CmdOption", - ModuleName - "Development.Shake.Database", - ModuleName - "Development.Shake.Demo", - ModuleName - "Development.Shake.Derived", - ModuleName - "Development.Shake.Errors", - ModuleName - "Development.Shake.FileInfo", - ModuleName - "Development.Shake.FilePattern", - ModuleName - "Development.Shake.Monad", - ModuleName - "Development.Shake.Pool", - ModuleName - "Development.Shake.Profile", - ModuleName - "Development.Shake.Progress", - ModuleName - "Development.Shake.Resource", - ModuleName - "Development.Shake.Rules.Directory", - ModuleName - "Development.Shake.Rules.File", - ModuleName - "Development.Shake.Rules.Files", - ModuleName - "Development.Shake.Rules.Oracle", - ModuleName - "Development.Shake.Rules.OrderOnly", - ModuleName - "Development.Shake.Rules.Rerun", - ModuleName - "Development.Shake.Shake", - ModuleName - "Development.Shake.Special", - ModuleName - "Development.Shake.Storage", - ModuleName - "Development.Shake.Types", - ModuleName - "Development.Shake.Value", - ModuleName "General.Bilist", - ModuleName "General.Binary", - ModuleName "General.Cleanup", - ModuleName "General.Concurrent", - ModuleName "General.Extra", - ModuleName "General.FileLock", - ModuleName "General.Intern", - ModuleName "General.Process", - ModuleName "General.String", - ModuleName "General.Template", - ModuleName "General.Timing", - ModuleName "Paths_shake"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion - (mkVersion [4, 5])) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "hashable") - (OrLaterVersion - (mkVersion [1, 1, 2, 3])) - mainLibSet, - Dependency - (PackageName "binary") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "process") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet, - Dependency - (PackageName - "unordered-containers") - (OrLaterVersion - (mkVersion [0, 2, 1])) - mainLibSet, - Dependency - (PackageName "bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "utf8-string") - (OrLaterVersion - (mkVersion [0, 3])) - mainLibSet, - Dependency - (PackageName "time") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "random") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-jquery") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-flot") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "transformers") - (OrLaterVersion - (mkVersion [0, 2])) - mainLibSet, - Dependency - (PackageName "extra") - (OrLaterVersion - (mkVersion [1, 4, 8])) - mainLibSet, - Dependency - (PackageName "deepseq") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion - (mkVersion [4, 5])) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "hashable") - (OrLaterVersion - (mkVersion [1, 1, 2, 3])) - mainLibSet, - Dependency - (PackageName "binary") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "process") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet, - Dependency - (PackageName - "unordered-containers") - (OrLaterVersion - (mkVersion [0, 2, 1])) - mainLibSet, - Dependency - (PackageName "bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "utf8-string") - (OrLaterVersion - (mkVersion [0, 3])) - mainLibSet, - Dependency - (PackageName "time") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "random") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-jquery") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-flot") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "transformers") - (OrLaterVersion - (mkVersion [0, 2])) - mainLibSet, - Dependency - (PackageName "extra") - (OrLaterVersion - (mkVersion [1, 4, 8])) - mainLibSet, - Dependency - (PackageName "deepseq") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "portable"))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = ["-DPORTABLE"], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (Impl GHC (EarlierVersion (mkVersion [7,6])))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "old-time") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "old-time") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condBranchIfFalse = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `CNot (Var (OS Windows))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "unix") - (OrLaterVersion - (mkVersion [2, 5, 1])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "unix") - (OrLaterVersion - (mkVersion [2, 5, 1])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}}, - CondBranch { - condBranchCondition = - `CNot (Var (OS Windows))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "unix") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "unix") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}) - [] - [] - [ - _×_ - (UnqualComponentName "shake") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "shake", - modulePath = SymbolicPath - "Run.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "src"], - otherModules = [ - ModuleName - "Development.Make.All", - ModuleName - "Development.Make.Env", - ModuleName - "Development.Make.Parse", - ModuleName - "Development.Make.Rules", - ModuleName - "Development.Make.Type", - ModuleName - "Development.Ninja.All", - ModuleName - "Development.Ninja.Env", - ModuleName - "Development.Ninja.Lexer", - ModuleName - "Development.Ninja.Parse", - ModuleName - "Development.Ninja.Type", - ModuleName "Development.Shake", - ModuleName - "Development.Shake.Args", - ModuleName - "Development.Shake.ByteString", - ModuleName - "Development.Shake.Classes", - ModuleName - "Development.Shake.CmdOption", - ModuleName - "Development.Shake.Command", - ModuleName - "Development.Shake.Core", - ModuleName - "Development.Shake.Database", - ModuleName - "Development.Shake.Demo", - ModuleName - "Development.Shake.Derived", - ModuleName - "Development.Shake.Errors", - ModuleName - "Development.Shake.FileInfo", - ModuleName - "Development.Shake.FilePath", - ModuleName - "Development.Shake.FilePattern", - ModuleName - "Development.Shake.Forward", - ModuleName - "Development.Shake.Monad", - ModuleName - "Development.Shake.Pool", - ModuleName - "Development.Shake.Profile", - ModuleName - "Development.Shake.Progress", - ModuleName - "Development.Shake.Resource", - ModuleName - "Development.Shake.Rule", - ModuleName - "Development.Shake.Rules.Directory", - ModuleName - "Development.Shake.Rules.File", - ModuleName - "Development.Shake.Rules.Files", - ModuleName - "Development.Shake.Rules.Oracle", - ModuleName - "Development.Shake.Rules.OrderOnly", - ModuleName - "Development.Shake.Rules.Rerun", - ModuleName - "Development.Shake.Shake", - ModuleName - "Development.Shake.Special", - ModuleName - "Development.Shake.Storage", - ModuleName - "Development.Shake.Types", - ModuleName - "Development.Shake.Value", - ModuleName "General.Bilist", - ModuleName "General.Binary", - ModuleName "General.Cleanup", - ModuleName "General.Concurrent", - ModuleName "General.Extra", - ModuleName "General.FileLock", - ModuleName "General.Intern", - ModuleName "General.Process", - ModuleName "General.String", - ModuleName "General.Template", - ModuleName "General.Timing", - ModuleName "Paths_shake", - ModuleName "Run"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [ - "-main-is", - "Run.main", - "-rtsopts"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion (mkVersion [4])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "hashable") - (OrLaterVersion - (mkVersion [1, 1, 2, 3])) - mainLibSet, - Dependency - (PackageName "binary") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "process") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet, - Dependency - (PackageName - "unordered-containers") - (OrLaterVersion - (mkVersion [0, 2, 1])) - mainLibSet, - Dependency - (PackageName "bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "utf8-string") - (OrLaterVersion - (mkVersion [0, 3])) - mainLibSet, - Dependency - (PackageName "time") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "random") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-jquery") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-flot") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "transformers") - (OrLaterVersion - (mkVersion [0, 2])) - mainLibSet, - Dependency - (PackageName "extra") - (OrLaterVersion - (mkVersion [1, 4, 8])) - mainLibSet, - Dependency - (PackageName "deepseq") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet, - Dependency - (PackageName "primitive") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion (mkVersion [4])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "hashable") - (OrLaterVersion - (mkVersion [1, 1, 2, 3])) - mainLibSet, - Dependency - (PackageName "binary") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "process") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet, - Dependency - (PackageName - "unordered-containers") - (OrLaterVersion - (mkVersion [0, 2, 1])) - mainLibSet, - Dependency - (PackageName "bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "utf8-string") - (OrLaterVersion - (mkVersion [0, 3])) - mainLibSet, - Dependency - (PackageName "time") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "random") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-jquery") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-flot") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "transformers") - (OrLaterVersion - (mkVersion [0, 2])) - mainLibSet, - Dependency - (PackageName "extra") - (OrLaterVersion - (mkVersion [1, 4, 8])) - mainLibSet, - Dependency - (PackageName "deepseq") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet, - Dependency - (PackageName "primitive") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (Impl GHC (OrLaterVersion (mkVersion [7,8])))`, - condBranchIfTrue = CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "shake", - modulePath = SymbolicPath "", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [ - "-threaded", - "-with-rtsopts=-I0 -qg -qb"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "portable"))`, - condBranchIfTrue = CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "shake", - modulePath = SymbolicPath "", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = ["-DPORTABLE"], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (Impl GHC (EarlierVersion (mkVersion [7,6])))`, - condBranchIfTrue = CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "shake", - modulePath = SymbolicPath "", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "old-time") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "old-time") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condBranchIfFalse = Just - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "shake", - modulePath = SymbolicPath "", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `CNot (Var (OS Windows))`, - condBranchIfTrue = CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "shake", - modulePath = SymbolicPath "", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "unix") - (OrLaterVersion - (mkVersion [2, 5, 1])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "unix") - (OrLaterVersion - (mkVersion [2, 5, 1])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}}, - CondBranch { - condBranchCondition = - `CNot (Var (OS Windows))`, - condBranchIfTrue = CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "shake", - modulePath = SymbolicPath "", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "unix") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "unix") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}] - [ - _×_ - (UnqualComponentName - "shake-test") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "Test.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "src"], - otherModules = [ - ModuleName - "Development.Make.All", - ModuleName - "Development.Make.Env", - ModuleName - "Development.Make.Parse", - ModuleName - "Development.Make.Rules", - ModuleName - "Development.Make.Type", - ModuleName - "Development.Ninja.All", - ModuleName - "Development.Ninja.Env", - ModuleName - "Development.Ninja.Lexer", - ModuleName - "Development.Ninja.Parse", - ModuleName - "Development.Ninja.Type", - ModuleName "Development.Shake", - ModuleName - "Development.Shake.Args", - ModuleName - "Development.Shake.ByteString", - ModuleName - "Development.Shake.Classes", - ModuleName - "Development.Shake.CmdOption", - ModuleName - "Development.Shake.Command", - ModuleName - "Development.Shake.Config", - ModuleName - "Development.Shake.Core", - ModuleName - "Development.Shake.Database", - ModuleName - "Development.Shake.Demo", - ModuleName - "Development.Shake.Derived", - ModuleName - "Development.Shake.Errors", - ModuleName - "Development.Shake.FileInfo", - ModuleName - "Development.Shake.FilePath", - ModuleName - "Development.Shake.FilePattern", - ModuleName - "Development.Shake.Forward", - ModuleName - "Development.Shake.Monad", - ModuleName - "Development.Shake.Pool", - ModuleName - "Development.Shake.Profile", - ModuleName - "Development.Shake.Progress", - ModuleName - "Development.Shake.Resource", - ModuleName - "Development.Shake.Rule", - ModuleName - "Development.Shake.Rules.Directory", - ModuleName - "Development.Shake.Rules.File", - ModuleName - "Development.Shake.Rules.Files", - ModuleName - "Development.Shake.Rules.Oracle", - ModuleName - "Development.Shake.Rules.OrderOnly", - ModuleName - "Development.Shake.Rules.Rerun", - ModuleName - "Development.Shake.Shake", - ModuleName - "Development.Shake.Special", - ModuleName - "Development.Shake.Storage", - ModuleName - "Development.Shake.Types", - ModuleName - "Development.Shake.Util", - ModuleName - "Development.Shake.Value", - ModuleName "General.Bilist", - ModuleName "General.Binary", - ModuleName "General.Cleanup", - ModuleName "General.Concurrent", - ModuleName "General.Extra", - ModuleName "General.FileLock", - ModuleName "General.Intern", - ModuleName "General.Process", - ModuleName "General.String", - ModuleName "General.Template", - ModuleName "General.Timing", - ModuleName "Paths_shake", - ModuleName "Run", - ModuleName "Test.Assume", - ModuleName "Test.Basic", - ModuleName "Test.Benchmark", - ModuleName "Test.C", - ModuleName "Test.Cache", - ModuleName "Test.Command", - ModuleName "Test.Config", - ModuleName "Test.Digest", - ModuleName "Test.Directory", - ModuleName "Test.Docs", - ModuleName "Test.Errors", - ModuleName "Test.FileLock", - ModuleName "Test.FilePath", - ModuleName "Test.FilePattern", - ModuleName "Test.Files", - ModuleName "Test.Forward", - ModuleName "Test.Journal", - ModuleName "Test.Lint", - ModuleName "Test.Live", - ModuleName "Test.Makefile", - ModuleName "Test.Manual", - ModuleName "Test.Match", - ModuleName "Test.Monad", - ModuleName "Test.Ninja", - ModuleName "Test.Oracle", - ModuleName "Test.OrderOnly", - ModuleName "Test.Parallel", - ModuleName "Test.Pool", - ModuleName "Test.Progress", - ModuleName "Test.Random", - ModuleName "Test.Resources", - ModuleName "Test.Self", - ModuleName "Test.Tar", - ModuleName "Test.Tup", - ModuleName "Test.Type", - ModuleName "Test.Unicode", - ModuleName "Test.Util", - ModuleName "Test.Verbosity", - ModuleName "Test.Version"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [ - "-main-is", - "Test.main", - "-rtsopts"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion (mkVersion [4])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "hashable") - (OrLaterVersion - (mkVersion [1, 1, 2, 3])) - mainLibSet, - Dependency - (PackageName "binary") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "process") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet, - Dependency - (PackageName - "unordered-containers") - (OrLaterVersion - (mkVersion [0, 2, 1])) - mainLibSet, - Dependency - (PackageName "bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "utf8-string") - (OrLaterVersion - (mkVersion [0, 3])) - mainLibSet, - Dependency - (PackageName "time") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "random") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-jquery") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-flot") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "transformers") - (OrLaterVersion - (mkVersion [0, 2])) - mainLibSet, - Dependency - (PackageName "deepseq") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet, - Dependency - (PackageName "extra") - (OrLaterVersion - (mkVersion [1, 4, 8])) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (OrLaterVersion - (mkVersion [2, 0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion (mkVersion [4])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "hashable") - (OrLaterVersion - (mkVersion [1, 1, 2, 3])) - mainLibSet, - Dependency - (PackageName "binary") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "process") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet, - Dependency - (PackageName - "unordered-containers") - (OrLaterVersion - (mkVersion [0, 2, 1])) - mainLibSet, - Dependency - (PackageName "bytestring") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "utf8-string") - (OrLaterVersion - (mkVersion [0, 3])) - mainLibSet, - Dependency - (PackageName "time") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "random") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-jquery") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "js-flot") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "transformers") - (OrLaterVersion - (mkVersion [0, 2])) - mainLibSet, - Dependency - (PackageName "deepseq") - (OrLaterVersion - (mkVersion [1, 1])) - mainLibSet, - Dependency - (PackageName "extra") - (OrLaterVersion - (mkVersion [1, 4, 8])) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (OrLaterVersion - (mkVersion [2, 0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (Impl GHC (OrLaterVersion (mkVersion [7,6])))`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-with-rtsopts=-K1K"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (Impl GHC (OrLaterVersion (mkVersion [7,8])))`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-threaded"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}, - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "portable"))`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = ["-DPORTABLE"], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (Impl GHC (EarlierVersion (mkVersion [7,6])))`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "old-time") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "old-time") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condBranchIfFalse = Just - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `CNot (Var (OS Windows))`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "unix") - (OrLaterVersion - (mkVersion [2, 5, 1])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "unix") - (OrLaterVersion - (mkVersion [2, 5, 1])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}}, - CondBranch { - condBranchCondition = - `CNot (Var (OS Windows))`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "unix") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "unix") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/shake.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/shake.genPackageFlags.expr new file mode 100644 index 00000000000..ad40c55f7a8 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/shake.genPackageFlags.expr @@ -0,0 +1,7 @@ +[ + MkPackageFlag { + flagName = FlagName "portable", + flagDescription = + "Obtain FileTime using portable functions", + flagDefault = False, + flagManual = True}] diff --git a/Cabal-tests/tests/ParserTests/regressions/shake.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/shake.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/shake.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/shake.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/shake.packageDescription.expr new file mode 100644 index 00000000000..9f80a3777ff --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/shake.packageDescription.expr @@ -0,0 +1,151 @@ +PackageDescription { + specVersion = CabalSpecV1_18, + package = PackageIdentifier { + pkgName = PackageName "shake", + pkgVersion = mkVersion + [0, 15, 11]}, + licenseRaw = Right BSD3, + licenseFiles = [ + SymbolicPath "LICENSE"], + copyright = + "Neil Mitchell 2011-2017", + maintainer = + "Neil Mitchell ", + author = + "Neil Mitchell ", + stability = "", + testedWith = [ + _×_ + GHC + (ThisVersion + (mkVersion [8, 0, 1])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 10, 3])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 8, 4])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 6, 3])), + _×_ + GHC + (ThisVersion + (mkVersion [7, 4, 2]))], + homepage = + "http://shakebuild.com", + pkgUrl = "", + bugReports = + "https://github.com/ndmitchell/shake/issues", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/ndmitchell/shake.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Build system library, like Make, but more accurate dependencies.", + description = + concat + [ + "Shake is a Haskell library for writing build systems - designed as a\n", + "replacement for @make@. See \"Development.Shake\" for an introduction,\n", + "including an example. Further examples are included in the Cabal tarball,\n", + "under the @Examples@ directory. The homepage contains links to a user\n", + "manual, an academic paper and further information:\n", + "\n", + "\n", + "To use Shake the user writes a Haskell program\n", + "that imports \"Development.Shake\", defines some build rules, and calls\n", + "the 'Development.Shake.shakeArgs' function. Thanks to do notation and infix\n", + "operators, a simple Shake build system\n", + "is not too dissimilar from a simple Makefile. However, as build systems\n", + "get more complex, Shake is able to take advantage of the excellent\n", + "abstraction facilities offered by Haskell and easily support much larger\n", + "projects. The Shake library provides all the standard features available in other\n", + "build systems, including automatic parallelism and minimal rebuilds.\n", + "Shake also provides more accurate dependency tracking, including seamless\n", + "support for generated files, and dependencies on system information\n", + "(e.g. compiler version)."], + category = "Development, Shake", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [ + SymbolicPath "html/viz.js", + SymbolicPath + "html/profile.html", + SymbolicPath + "html/progress.html", + SymbolicPath "html/shake.js", + SymbolicPath + "docs/manual/build.bat", + SymbolicPath + "docs/manual/Build.hs", + SymbolicPath + "docs/manual/build.sh", + SymbolicPath + "docs/manual/constants.c", + SymbolicPath + "docs/manual/constants.h", + SymbolicPath + "docs/manual/main.c"], + dataDir = SymbolicPath ".", + extraSrcFiles = [ + SymbolicPath + "src/Test/C/constants.c", + SymbolicPath + "src/Test/C/constants.h", + SymbolicPath + "src/Test/C/main.c", + SymbolicPath + "src/Test/MakeTutor/Makefile", + SymbolicPath + "src/Test/MakeTutor/hellofunc.c", + SymbolicPath + "src/Test/MakeTutor/hellomake.c", + SymbolicPath + "src/Test/MakeTutor/hellomake.h", + SymbolicPath + "src/Test/Tar/list.txt", + SymbolicPath + "src/Test/Ninja/*.ninja", + SymbolicPath + "src/Test/Ninja/subdir/*.ninja", + SymbolicPath + "src/Test/Ninja/*.output", + SymbolicPath + "src/Test/Progress/*.prog", + SymbolicPath + "src/Test/Tup/hello.c", + SymbolicPath + "src/Test/Tup/root.cfg", + SymbolicPath + "src/Test/Tup/newmath/root.cfg", + SymbolicPath + "src/Test/Tup/newmath/square.c", + SymbolicPath + "src/Test/Tup/newmath/square.h", + SymbolicPath "src/Paths.hs", + SymbolicPath "docs/Manual.md", + SymbolicPath + "docs/shake-progress.png"], + extraTmpFiles = [], + extraDocFiles = [ + SymbolicPath "CHANGES.txt", + SymbolicPath "README.md"], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-1.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-1.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-1.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-1.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-1.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-1.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-1.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-1.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-1.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-1.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-1.condLibrary.expr new file mode 100644 index 00000000000..acc4281010f --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-1.condLibrary.expr @@ -0,0 +1,69 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-1.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-1.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-1.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-1.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-1.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-1.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-1.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-1.expr deleted file mode 100644 index 05f34efcedb..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/spdx-1.expr +++ /dev/null @@ -1,188 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_0, - package = PackageIdentifier { - pkgName = PackageName "spdx", - pkgVersion = mkVersion [0]}, - licenseRaw = Right BSD3, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "testing positive parsing of spdx identifiers", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-1.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-1.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-1.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-1.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-1.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-1.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-1.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-1.packageDescription.expr new file mode 100644 index 00000000000..41d93e68b81 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-1.packageDescription.expr @@ -0,0 +1,35 @@ +PackageDescription { + specVersion = CabalSpecV2_0, + package = PackageIdentifier { + pkgName = PackageName "spdx", + pkgVersion = mkVersion [0]}, + licenseRaw = Right BSD3, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "testing positive parsing of spdx identifiers", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-2.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-2.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-2.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-2.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-2.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-2.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-2.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-2.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-2.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-2.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-2.condLibrary.expr new file mode 100644 index 00000000000..acc4281010f --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-2.condLibrary.expr @@ -0,0 +1,69 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-2.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-2.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-2.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-2.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-2.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-2.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-2.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-2.expr deleted file mode 100644 index 0d01a949610..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/spdx-2.expr +++ /dev/null @@ -1,192 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_2, - package = PackageIdentifier { - pkgName = PackageName "spdx", - pkgVersion = mkVersion [0]}, - licenseRaw = Left - (License - (ELicense - (ELicenseId AGPL_1_0) - Nothing)), - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "testing positive parsing of spdx identifiers", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-2.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-2.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-2.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-2.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-2.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-2.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-2.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-2.packageDescription.expr new file mode 100644 index 00000000000..2b817e741b5 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-2.packageDescription.expr @@ -0,0 +1,39 @@ +PackageDescription { + specVersion = CabalSpecV2_2, + package = PackageIdentifier { + pkgName = PackageName "spdx", + pkgVersion = mkVersion [0]}, + licenseRaw = Left + (License + (ELicense + (ELicenseId AGPL_1_0) + Nothing)), + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "testing positive parsing of spdx identifiers", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-3.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-3.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-3.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-3.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-3.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-3.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-3.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-3.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-3.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-3.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-3.condLibrary.expr new file mode 100644 index 00000000000..acc4281010f --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-3.condLibrary.expr @@ -0,0 +1,69 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-3.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-3.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-3.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-3.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-3.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-3.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-3.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-3.expr deleted file mode 100644 index a0c51712a51..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/spdx-3.expr +++ /dev/null @@ -1,192 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV2_4, - package = PackageIdentifier { - pkgName = PackageName "spdx", - pkgVersion = mkVersion [0]}, - licenseRaw = Left - (License - (ELicense - (ELicenseId AGPL_1_0_only) - Nothing)), - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "testing positive parsing of spdx identifiers", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}}, - condTreeConstraints = [], - condTreeComponents = []}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-3.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-3.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-3.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-3.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-3.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-3.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/spdx-3.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/spdx-3.packageDescription.expr new file mode 100644 index 00000000000..24eabcdd94d --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/spdx-3.packageDescription.expr @@ -0,0 +1,39 @@ +PackageDescription { + specVersion = CabalSpecV2_4, + package = PackageIdentifier { + pkgName = PackageName "spdx", + pkgVersion = mkVersion [0]}, + licenseRaw = Left + (License + (ELicense + (ELicenseId AGPL_1_0_only) + Nothing)), + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "testing positive parsing of spdx identifiers", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condLibrary.expr new file mode 100644 index 00000000000..9d38e7a75c1 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condLibrary.expr @@ -0,0 +1,171 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "Instances.TH.Lift"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "src"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [ + EnableExtension + TemplateHaskell], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-Wall", "-fwarn-tabs"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 4])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "template-haskell") + (EarlierVersion + (mkVersion [2, 10])) + mainLibSet, + Dependency + (PackageName "th-lift") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "containers") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 4])) + (EarlierVersion + (mkVersion [0, 6]))) + mainLibSet, + Dependency + (PackageName "vector") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet, + Dependency + (PackageName "text") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 11])) + (EarlierVersion + (mkVersion [1, 3]))) + mainLibSet, + Dependency + (PackageName "bytestring") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 4])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet, + Dependency + (PackageName "template-haskell") + (EarlierVersion + (mkVersion [2, 10])) + mainLibSet, + Dependency + (PackageName "th-lift") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "containers") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 4])) + (EarlierVersion + (mkVersion [0, 6]))) + mainLibSet, + Dependency + (PackageName "vector") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet, + Dependency + (PackageName "text") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 11])) + (EarlierVersion + (mkVersion [1, 3]))) + mainLibSet, + Dependency + (PackageName "bytestring") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condTestSuites.expr new file mode 100644 index 00000000000..62ecef18b01 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.condTestSuites.expr @@ -0,0 +1,360 @@ +[ + _×_ + (UnqualComponentName "tests") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "Main.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "tests"], + otherModules = [ + ModuleName "Data"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [ + EnableExtension + TemplateHaskell], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "template-haskell") + (EarlierVersion + (mkVersion [2, 10])) + mainLibSet, + Dependency + (PackageName "containers") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 4])) + (EarlierVersion + (mkVersion [0, 6]))) + mainLibSet, + Dependency + (PackageName "vector") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet, + Dependency + (PackageName "text") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 11])) + (EarlierVersion + (mkVersion [1, 2]))) + mainLibSet, + Dependency + (PackageName "bytestring") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet, + Dependency + (PackageName + "th-lift-instances") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 6])) + (EarlierVersion + (mkVersion [2, 8]))) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "template-haskell") + (EarlierVersion + (mkVersion [2, 10])) + mainLibSet, + Dependency + (PackageName "containers") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 4])) + (EarlierVersion + (mkVersion [0, 6]))) + mainLibSet, + Dependency + (PackageName "vector") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet, + Dependency + (PackageName "text") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 11])) + (EarlierVersion + (mkVersion [1, 2]))) + mainLibSet, + Dependency + (PackageName "bytestring") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 9])) + (EarlierVersion + (mkVersion [0, 11]))) + mainLibSet, + Dependency + (PackageName + "th-lift-instances") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "QuickCheck") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 6])) + (EarlierVersion + (mkVersion [2, 8]))) + mainLibSet], + condTreeComponents = []}, + _×_ + (UnqualComponentName "doctests") + CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = TestSuiteExeV10 + (mkVersion [1, 0]) + (SymbolicPath "doctests.hs"), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "tests"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-Wall", "-threaded"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion + (mkVersion [1, 0])) + mainLibSet, + Dependency + (PackageName "doctest") + (OrLaterVersion + (mkVersion [0, 9, 1])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "directory") + (OrLaterVersion + (mkVersion [1, 0])) + mainLibSet, + Dependency + (PackageName "doctest") + (OrLaterVersion + (mkVersion [0, 9, 1])) + mainLibSet, + Dependency + (PackageName "filepath") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (Impl GHC (EarlierVersion (mkVersion [7,6,1])))`, + condBranchIfTrue = CondNode { + condTreeData = TestSuite { + testName = UnqualComponentName + "", + testInterface = + TestSuiteUnsupported + (TestTypeUnknown + "" + (mkVersion [])), + testBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + ["-Werror"] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}, + testCodeGenerators = []}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}] diff --git a/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.expr b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.expr deleted file mode 100644 index b0e8214de15..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.expr +++ /dev/null @@ -1,1138 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_10, - package = PackageIdentifier { - pkgName = PackageName - "th-lift-instances", - pkgVersion = mkVersion - [0, 1, 4]}, - licenseRaw = Right BSD3, - licenseFiles = [ - SymbolicPath "LICENSE"], - copyright = - "Copyright (C) 2013-2014 Benno F\252nfst\252ck", - maintainer = - "Benno F\252nfst\252ck ", - author = - "Benno F\252nfst\252ck", - stability = "experimental", - testedWith = [], - homepage = - "http://github.com/bennofs/th-lift-instances/", - pkgUrl = "", - bugReports = - "http://github.com/bennofs/th-lift-instances/issues", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "https://github.com/bennofs/th-lift-instances.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "Lift instances for template-haskell for common data types.", - description = - concat - [ - "Most data types in haskell platform do not have Lift instances. This package provides orphan instances\n", - "for containers, text, bytestring and vector."], - category = "Template Haskell", - customFieldsPD = [ - _×_ "x-revision" "1"], - buildTypeRaw = Just Custom, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [ - SymbolicPath ".ghci", - SymbolicPath ".gitignore", - SymbolicPath ".travis.yml", - SymbolicPath ".vim.custom", - SymbolicPath "README.md"], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "Instances.TH.Lift"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "src"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [ - EnableExtension - TemplateHaskell], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-Wall", "-fwarn-tabs"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 4])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "template-haskell") - (EarlierVersion - (mkVersion [2, 10])) - mainLibSet, - Dependency - (PackageName "th-lift") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "containers") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 4])) - (EarlierVersion - (mkVersion [0, 6]))) - mainLibSet, - Dependency - (PackageName "vector") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet, - Dependency - (PackageName "text") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 11])) - (EarlierVersion - (mkVersion [1, 3]))) - mainLibSet, - Dependency - (PackageName "bytestring") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 4])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "template-haskell") - (EarlierVersion - (mkVersion [2, 10])) - mainLibSet, - Dependency - (PackageName "th-lift") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "containers") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 4])) - (EarlierVersion - (mkVersion [0, 6]))) - mainLibSet, - Dependency - (PackageName "vector") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet, - Dependency - (PackageName "text") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 11])) - (EarlierVersion - (mkVersion [1, 3]))) - mainLibSet, - Dependency - (PackageName "bytestring") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [ - _×_ - (UnqualComponentName "tests") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "Main.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "tests"], - otherModules = [ - ModuleName "Data"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [ - EnableExtension - TemplateHaskell], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "template-haskell") - (EarlierVersion - (mkVersion [2, 10])) - mainLibSet, - Dependency - (PackageName "containers") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 4])) - (EarlierVersion - (mkVersion [0, 6]))) - mainLibSet, - Dependency - (PackageName "vector") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet, - Dependency - (PackageName "text") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 11])) - (EarlierVersion - (mkVersion [1, 2]))) - mainLibSet, - Dependency - (PackageName "bytestring") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet, - Dependency - (PackageName - "th-lift-instances") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 6])) - (EarlierVersion - (mkVersion [2, 8]))) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "template-haskell") - (EarlierVersion - (mkVersion [2, 10])) - mainLibSet, - Dependency - (PackageName "containers") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 4])) - (EarlierVersion - (mkVersion [0, 6]))) - mainLibSet, - Dependency - (PackageName "vector") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet, - Dependency - (PackageName "text") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 11])) - (EarlierVersion - (mkVersion [1, 2]))) - mainLibSet, - Dependency - (PackageName "bytestring") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet, - Dependency - (PackageName - "th-lift-instances") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 6])) - (EarlierVersion - (mkVersion [2, 8]))) - mainLibSet], - condTreeComponents = []}, - _×_ - (UnqualComponentName "doctests") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "doctests.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "tests"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-Wall", "-threaded"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion - (mkVersion [1, 0])) - mainLibSet, - Dependency - (PackageName "doctest") - (OrLaterVersion - (mkVersion [0, 9, 1])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion - (mkVersion [1, 0])) - mainLibSet, - Dependency - (PackageName "doctest") - (OrLaterVersion - (mkVersion [0, 9, 1])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (Impl GHC (EarlierVersion (mkVersion [7,6,1])))`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-Werror"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "Instances.TH.Lift"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "src"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [ - EnableExtension - TemplateHaskell], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-Wall", "-fwarn-tabs"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 4])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "template-haskell") - (EarlierVersion - (mkVersion [2, 10])) - mainLibSet, - Dependency - (PackageName "th-lift") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "containers") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 4])) - (EarlierVersion - (mkVersion [0, 6]))) - mainLibSet, - Dependency - (PackageName "vector") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet, - Dependency - (PackageName "text") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 11])) - (EarlierVersion - (mkVersion [1, 3]))) - mainLibSet, - Dependency - (PackageName "bytestring") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 4])) - (EarlierVersion - (mkVersion [5]))) - mainLibSet, - Dependency - (PackageName "template-haskell") - (EarlierVersion - (mkVersion [2, 10])) - mainLibSet, - Dependency - (PackageName "th-lift") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "containers") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 4])) - (EarlierVersion - (mkVersion [0, 6]))) - mainLibSet, - Dependency - (PackageName "vector") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet, - Dependency - (PackageName "text") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 11])) - (EarlierVersion - (mkVersion [1, 3]))) - mainLibSet, - Dependency - (PackageName "bytestring") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet], - condTreeComponents = []}) - [] - [] - [] - [ - _×_ - (UnqualComponentName "tests") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "Main.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "tests"], - otherModules = [ - ModuleName "Data"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [ - EnableExtension - TemplateHaskell], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "template-haskell") - (EarlierVersion - (mkVersion [2, 10])) - mainLibSet, - Dependency - (PackageName "containers") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 4])) - (EarlierVersion - (mkVersion [0, 6]))) - mainLibSet, - Dependency - (PackageName "vector") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet, - Dependency - (PackageName "text") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 11])) - (EarlierVersion - (mkVersion [1, 2]))) - mainLibSet, - Dependency - (PackageName "bytestring") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet, - Dependency - (PackageName - "th-lift-instances") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 6])) - (EarlierVersion - (mkVersion [2, 8]))) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "template-haskell") - (EarlierVersion - (mkVersion [2, 10])) - mainLibSet, - Dependency - (PackageName "containers") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 4])) - (EarlierVersion - (mkVersion [0, 6]))) - mainLibSet, - Dependency - (PackageName "vector") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet, - Dependency - (PackageName "text") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 11])) - (EarlierVersion - (mkVersion [1, 2]))) - mainLibSet, - Dependency - (PackageName "bytestring") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [0, 9])) - (EarlierVersion - (mkVersion [0, 11]))) - mainLibSet, - Dependency - (PackageName - "th-lift-instances") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "QuickCheck") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [2, 6])) - (EarlierVersion - (mkVersion [2, 8]))) - mainLibSet], - condTreeComponents = []}, - _×_ - (UnqualComponentName "doctests") - CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = TestSuiteExeV10 - (mkVersion [1, 0]) - (SymbolicPath "doctests.hs"), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "tests"], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-Wall", "-threaded"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion - (mkVersion [1, 0])) - mainLibSet, - Dependency - (PackageName "doctest") - (OrLaterVersion - (mkVersion [0, 9, 1])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (OrLaterVersion (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "directory") - (OrLaterVersion - (mkVersion [1, 0])) - mainLibSet, - Dependency - (PackageName "doctest") - (OrLaterVersion - (mkVersion [0, 9, 1])) - mainLibSet, - Dependency - (PackageName "filepath") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (Impl GHC (EarlierVersion (mkVersion [7,6,1])))`, - condBranchIfTrue = CondNode { - condTreeData = TestSuite { - testName = UnqualComponentName - "", - testInterface = - TestSuiteUnsupported - (TestTypeUnknown - "" - (mkVersion [])), - testBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - ["-Werror"] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [], - mixins = []}, - testCodeGenerators = []}, - condTreeConstraints = [], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.packageDescription.expr new file mode 100644 index 00000000000..a7da3fc91ee --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.packageDescription.expr @@ -0,0 +1,63 @@ +PackageDescription { + specVersion = CabalSpecV1_10, + package = PackageIdentifier { + pkgName = PackageName + "th-lift-instances", + pkgVersion = mkVersion + [0, 1, 4]}, + licenseRaw = Right BSD3, + licenseFiles = [ + SymbolicPath "LICENSE"], + copyright = + "Copyright (C) 2013-2014 Benno F\252nfst\252ck", + maintainer = + "Benno F\252nfst\252ck ", + author = + "Benno F\252nfst\252ck", + stability = "experimental", + testedWith = [], + homepage = + "http://github.com/bennofs/th-lift-instances/", + pkgUrl = "", + bugReports = + "http://github.com/bennofs/th-lift-instances/issues", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/bennofs/th-lift-instances.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Lift instances for template-haskell for common data types.", + description = + concat + [ + "Most data types in haskell platform do not have Lift instances. This package provides orphan instances\n", + "for containers, text, bytestring and vector."], + category = "Template Haskell", + customFieldsPD = [ + _×_ "x-revision" "1"], + buildTypeRaw = Just Custom, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [ + SymbolicPath ".ghci", + SymbolicPath ".gitignore", + SymbolicPath ".travis.yml", + SymbolicPath ".vim.custom", + SymbolicPath "README.md"], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/version-sets.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/version-sets.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/version-sets.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/version-sets.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/version-sets.condExecutables.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/version-sets.condExecutables.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/version-sets.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/version-sets.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/version-sets.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/version-sets.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/version-sets.condLibrary.expr new file mode 100644 index 00000000000..df733761c24 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/version-sets.condLibrary.expr @@ -0,0 +1,197 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "network") + (MajorBoundVersion + (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "base") + (ThisVersion (mkVersion [1])) + mainLibSet, + Dependency + (PackageName "base") + (ThisVersion (mkVersion [1])) + mainLibSet, + Dependency + (PackageName "base") + (UnionVersionRanges + (ThisVersion (mkVersion [1])) + (ThisVersion (mkVersion [2]))) + mainLibSet, + Dependency + (PackageName "base") + (ThisVersion (mkVersion [1, 2])) + mainLibSet, + Dependency + (PackageName "base") + (UnionVersionRanges + (ThisVersion (mkVersion [1, 2])) + (ThisVersion + (mkVersion [3, 4]))) + mainLibSet, + Dependency + (PackageName "ghc") + (UnionVersionRanges + (ThisVersion + (mkVersion [8, 6, 3])) + (UnionVersionRanges + (ThisVersion + (mkVersion [8, 4, 4])) + (UnionVersionRanges + (ThisVersion + (mkVersion [8, 2, 2])) + (UnionVersionRanges + (ThisVersion + (mkVersion [8, 0, 2])) + (UnionVersionRanges + (ThisVersion + (mkVersion [7, 10, 3])) + (UnionVersionRanges + (ThisVersion + (mkVersion [7, 8, 4])) + (UnionVersionRanges + (ThisVersion + (mkVersion [7, 6, 3])) + (ThisVersion + (mkVersion [7, 4, 2]))))))))) + mainLibSet, + Dependency + (PackageName "Cabal") + (UnionVersionRanges + (MajorBoundVersion + (mkVersion [2, 4, 1, 1])) + (MajorBoundVersion + (mkVersion [2, 2, 0, 0]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "network") + (MajorBoundVersion + (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "base") + (ThisVersion (mkVersion [1])) + mainLibSet, + Dependency + (PackageName "base") + (ThisVersion (mkVersion [1])) + mainLibSet, + Dependency + (PackageName "base") + (UnionVersionRanges + (ThisVersion (mkVersion [1])) + (ThisVersion (mkVersion [2]))) + mainLibSet, + Dependency + (PackageName "base") + (ThisVersion (mkVersion [1, 2])) + mainLibSet, + Dependency + (PackageName "base") + (UnionVersionRanges + (ThisVersion (mkVersion [1, 2])) + (ThisVersion + (mkVersion [3, 4]))) + mainLibSet, + Dependency + (PackageName "ghc") + (UnionVersionRanges + (ThisVersion + (mkVersion [8, 6, 3])) + (UnionVersionRanges + (ThisVersion + (mkVersion [8, 4, 4])) + (UnionVersionRanges + (ThisVersion + (mkVersion [8, 2, 2])) + (UnionVersionRanges + (ThisVersion + (mkVersion [8, 0, 2])) + (UnionVersionRanges + (ThisVersion + (mkVersion [7, 10, 3])) + (UnionVersionRanges + (ThisVersion + (mkVersion [7, 8, 4])) + (UnionVersionRanges + (ThisVersion + (mkVersion [7, 6, 3])) + (ThisVersion + (mkVersion [7, 4, 2]))))))))) + mainLibSet, + Dependency + (PackageName "Cabal") + (UnionVersionRanges + (MajorBoundVersion + (mkVersion [2, 4, 1, 1])) + (MajorBoundVersion + (mkVersion [2, 2, 0, 0]))) + mainLibSet], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/version-sets.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/version-sets.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/version-sets.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/version-sets.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/version-sets.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/version-sets.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/version-sets.expr b/Cabal-tests/tests/ParserTests/regressions/version-sets.expr deleted file mode 100644 index 40bb3115a4c..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/version-sets.expr +++ /dev/null @@ -1,470 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV3_0, - package = PackageIdentifier { - pkgName = PackageName - "version-sets", - pkgVersion = mkVersion [0]}, - licenseRaw = Left NONE, - licenseFiles = [], - copyright = "", - maintainer = "", - author = "", - stability = "", - testedWith = [ - _×_ - GHC - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 6, 3])) - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 4, 4])) - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 2, 2])) - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 0, 2])) - (UnionVersionRanges - (ThisVersion - (mkVersion [7, 10, 3])) - (UnionVersionRanges - (ThisVersion - (mkVersion [7, 8, 4])) - (UnionVersionRanges - (ThisVersion - (mkVersion [7, 6, 3])) - (ThisVersion - (mkVersion [7, 4, 2])))))))))], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [], - synopsis = - "version set notation", - description = "", - category = "", - customFieldsPD = [], - buildTypeRaw = Nothing, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "network") - (MajorBoundVersion - (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "base") - (ThisVersion (mkVersion [1])) - mainLibSet, - Dependency - (PackageName "base") - (ThisVersion (mkVersion [1])) - mainLibSet, - Dependency - (PackageName "base") - (UnionVersionRanges - (ThisVersion (mkVersion [1])) - (ThisVersion (mkVersion [2]))) - mainLibSet, - Dependency - (PackageName "base") - (ThisVersion (mkVersion [1, 2])) - mainLibSet, - Dependency - (PackageName "base") - (UnionVersionRanges - (ThisVersion (mkVersion [1, 2])) - (ThisVersion - (mkVersion [3, 4]))) - mainLibSet, - Dependency - (PackageName "ghc") - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 6, 3])) - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 4, 4])) - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 2, 2])) - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 0, 2])) - (UnionVersionRanges - (ThisVersion - (mkVersion [7, 10, 3])) - (UnionVersionRanges - (ThisVersion - (mkVersion [7, 8, 4])) - (UnionVersionRanges - (ThisVersion - (mkVersion [7, 6, 3])) - (ThisVersion - (mkVersion [7, 4, 2]))))))))) - mainLibSet, - Dependency - (PackageName "Cabal") - (UnionVersionRanges - (MajorBoundVersion - (mkVersion [2, 4, 1, 1])) - (MajorBoundVersion - (mkVersion [2, 2, 0, 0]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "network") - (MajorBoundVersion - (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "base") - (ThisVersion (mkVersion [1])) - mainLibSet, - Dependency - (PackageName "base") - (ThisVersion (mkVersion [1])) - mainLibSet, - Dependency - (PackageName "base") - (UnionVersionRanges - (ThisVersion (mkVersion [1])) - (ThisVersion (mkVersion [2]))) - mainLibSet, - Dependency - (PackageName "base") - (ThisVersion (mkVersion [1, 2])) - mainLibSet, - Dependency - (PackageName "base") - (UnionVersionRanges - (ThisVersion (mkVersion [1, 2])) - (ThisVersion - (mkVersion [3, 4]))) - mainLibSet, - Dependency - (PackageName "ghc") - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 6, 3])) - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 4, 4])) - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 2, 2])) - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 0, 2])) - (UnionVersionRanges - (ThisVersion - (mkVersion [7, 10, 3])) - (UnionVersionRanges - (ThisVersion - (mkVersion [7, 8, 4])) - (UnionVersionRanges - (ThisVersion - (mkVersion [7, 6, 3])) - (ThisVersion - (mkVersion [7, 4, 2]))))))))) - mainLibSet, - Dependency - (PackageName "Cabal") - (UnionVersionRanges - (MajorBoundVersion - (mkVersion [2, 4, 1, 1])) - (MajorBoundVersion - (mkVersion [2, 2, 0, 0]))) - mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "network") - (MajorBoundVersion - (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "base") - (ThisVersion (mkVersion [1])) - mainLibSet, - Dependency - (PackageName "base") - (ThisVersion (mkVersion [1])) - mainLibSet, - Dependency - (PackageName "base") - (UnionVersionRanges - (ThisVersion (mkVersion [1])) - (ThisVersion (mkVersion [2]))) - mainLibSet, - Dependency - (PackageName "base") - (ThisVersion (mkVersion [1, 2])) - mainLibSet, - Dependency - (PackageName "base") - (UnionVersionRanges - (ThisVersion (mkVersion [1, 2])) - (ThisVersion - (mkVersion [3, 4]))) - mainLibSet, - Dependency - (PackageName "ghc") - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 6, 3])) - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 4, 4])) - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 2, 2])) - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 0, 2])) - (UnionVersionRanges - (ThisVersion - (mkVersion [7, 10, 3])) - (UnionVersionRanges - (ThisVersion - (mkVersion [7, 8, 4])) - (UnionVersionRanges - (ThisVersion - (mkVersion [7, 6, 3])) - (ThisVersion - (mkVersion [7, 4, 2]))))))))) - mainLibSet, - Dependency - (PackageName "Cabal") - (UnionVersionRanges - (MajorBoundVersion - (mkVersion [2, 4, 1, 1])) - (MajorBoundVersion - (mkVersion [2, 2, 0, 0]))) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "network") - (MajorBoundVersion - (mkVersion [0])) - mainLibSet, - Dependency - (PackageName "base") - (ThisVersion (mkVersion [1])) - mainLibSet, - Dependency - (PackageName "base") - (ThisVersion (mkVersion [1])) - mainLibSet, - Dependency - (PackageName "base") - (UnionVersionRanges - (ThisVersion (mkVersion [1])) - (ThisVersion (mkVersion [2]))) - mainLibSet, - Dependency - (PackageName "base") - (ThisVersion (mkVersion [1, 2])) - mainLibSet, - Dependency - (PackageName "base") - (UnionVersionRanges - (ThisVersion (mkVersion [1, 2])) - (ThisVersion - (mkVersion [3, 4]))) - mainLibSet, - Dependency - (PackageName "ghc") - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 6, 3])) - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 4, 4])) - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 2, 2])) - (UnionVersionRanges - (ThisVersion - (mkVersion [8, 0, 2])) - (UnionVersionRanges - (ThisVersion - (mkVersion [7, 10, 3])) - (UnionVersionRanges - (ThisVersion - (mkVersion [7, 8, 4])) - (UnionVersionRanges - (ThisVersion - (mkVersion [7, 6, 3])) - (ThisVersion - (mkVersion [7, 4, 2]))))))))) - mainLibSet, - Dependency - (PackageName "Cabal") - (UnionVersionRanges - (MajorBoundVersion - (mkVersion [2, 4, 1, 1])) - (MajorBoundVersion - (mkVersion [2, 2, 0, 0]))) - mainLibSet], - condTreeComponents = []}) - [] - [] - [] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/version-sets.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/version-sets.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/version-sets.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/version-sets.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/version-sets.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/version-sets.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/version-sets.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/version-sets.packageDescription.expr new file mode 100644 index 00000000000..1bd11195017 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/version-sets.packageDescription.expr @@ -0,0 +1,61 @@ +PackageDescription { + specVersion = CabalSpecV3_0, + package = PackageIdentifier { + pkgName = PackageName + "version-sets", + pkgVersion = mkVersion [0]}, + licenseRaw = Left NONE, + licenseFiles = [], + copyright = "", + maintainer = "", + author = "", + stability = "", + testedWith = [ + _×_ + GHC + (UnionVersionRanges + (ThisVersion + (mkVersion [8, 6, 3])) + (UnionVersionRanges + (ThisVersion + (mkVersion [8, 4, 4])) + (UnionVersionRanges + (ThisVersion + (mkVersion [8, 2, 2])) + (UnionVersionRanges + (ThisVersion + (mkVersion [8, 0, 2])) + (UnionVersionRanges + (ThisVersion + (mkVersion [7, 10, 3])) + (UnionVersionRanges + (ThisVersion + (mkVersion [7, 8, 4])) + (UnionVersionRanges + (ThisVersion + (mkVersion [7, 6, 3])) + (ThisVersion + (mkVersion [7, 4, 2])))))))))], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [], + synopsis = + "version set notation", + description = "", + category = "", + customFieldsPD = [], + buildTypeRaw = Nothing, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condBenchmarks.expr b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condBenchmarks.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condBenchmarks.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condExecutables.expr b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condExecutables.expr new file mode 100644 index 00000000000..51a66ba1496 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condExecutables.expr @@ -0,0 +1,97 @@ +[ + _×_ + (UnqualComponentName + "wl-pprint-string-example") + CondNode { + condTreeData = Executable { + exeName = UnqualComponentName + "wl-pprint-string-example", + modulePath = SymbolicPath + "Main.hs", + exeScope = ExecutablePublic, + buildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "example-string"], + otherModules = [ + ModuleName "StringImpl"], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (EarlierVersion (mkVersion [5])) + mainLibSet, + Dependency + (PackageName "str-string") + (OrLaterVersion + (mkVersion [0, 1, 0, 0])) + mainLibSet, + Dependency + (PackageName "wl-pprint-indef") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (EarlierVersion (mkVersion [5])) + mainLibSet, + Dependency + (PackageName "str-string") + (OrLaterVersion + (mkVersion [0, 1, 0, 0])) + mainLibSet, + Dependency + (PackageName "wl-pprint-indef") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}] diff --git a/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condForeignLibs.expr b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condForeignLibs.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condForeignLibs.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condLibrary.expr b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condLibrary.expr new file mode 100644 index 00000000000..b002e47ae46 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condLibrary.expr @@ -0,0 +1,88 @@ +Just + CondNode { + condTreeData = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName + "Text.PrettyPrint.Leijen"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (EarlierVersion (mkVersion [5])) + mainLibSet, + Dependency + (PackageName "str-sig") + (OrLaterVersion + (mkVersion [0, 1, 0, 0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (EarlierVersion (mkVersion [5])) + mainLibSet, + Dependency + (PackageName "str-sig") + (OrLaterVersion + (mkVersion [0, 1, 0, 0])) + mainLibSet], + condTreeComponents = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condSubLibraries.expr b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condSubLibraries.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condSubLibraries.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condTestSuites.expr b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condTestSuites.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.condTestSuites.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.expr b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.expr deleted file mode 100644 index d17a50cf38f..00000000000 --- a/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.expr +++ /dev/null @@ -1,436 +0,0 @@ -`(,,,,,,)` - GenericPackageDescription { - packageDescription = - PackageDescription { - specVersion = CabalSpecV1_6, - package = PackageIdentifier { - pkgName = PackageName - "wl-pprint-indef", - pkgVersion = mkVersion [1, 2]}, - licenseRaw = Right BSD3, - licenseFiles = [ - SymbolicPath "LICENSE"], - copyright = "", - maintainer = - "Noam Lewis ", - author = "Daan Leijen", - stability = "", - testedWith = [], - homepage = "", - pkgUrl = "", - bugReports = "", - sourceRepos = [ - SourceRepo { - repoKind = RepoHead, - repoType = Just - (KnownRepoType Git), - repoLocation = Just - "git@github.com:danidiaz/wl-pprint-indef.git", - repoModule = Nothing, - repoBranch = Nothing, - repoTag = Nothing, - repoSubdir = Nothing}], - synopsis = - "The Wadler/Leijen Pretty Printer", - description = - concat - [ - "This is a pretty printing library based on Wadler's paper \"A Prettier\n", - "Printer\". See the haddocks for full info. This version allows the\n", - "library user to declare overlapping instances of the 'Pretty' class."], - category = "Text", - customFieldsPD = [], - buildTypeRaw = Just Simple, - setupBuildInfo = Nothing, - library = Nothing, - subLibraries = [], - executables = [], - foreignLibs = [], - testSuites = [], - benchmarks = [], - dataFiles = [], - dataDir = SymbolicPath ".", - extraSrcFiles = [], - extraTmpFiles = [], - extraDocFiles = [], - extraFiles = []}, - gpdScannedVersion = Nothing, - genPackageFlags = [], - condLibrary = Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName - "Text.PrettyPrint.Leijen"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (EarlierVersion (mkVersion [5])) - mainLibSet, - Dependency - (PackageName "str-sig") - (OrLaterVersion - (mkVersion [0, 1, 0, 0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (EarlierVersion (mkVersion [5])) - mainLibSet, - Dependency - (PackageName "str-sig") - (OrLaterVersion - (mkVersion [0, 1, 0, 0])) - mainLibSet], - condTreeComponents = []}, - condSubLibraries = [], - condForeignLibs = [], - condExecutables = [ - _×_ - (UnqualComponentName - "wl-pprint-string-example") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "wl-pprint-string-example", - modulePath = SymbolicPath - "Main.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "example-string"], - otherModules = [ - ModuleName "StringImpl"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (EarlierVersion (mkVersion [5])) - mainLibSet, - Dependency - (PackageName "str-string") - (OrLaterVersion - (mkVersion [0, 1, 0, 0])) - mainLibSet, - Dependency - (PackageName "wl-pprint-indef") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (EarlierVersion (mkVersion [5])) - mainLibSet, - Dependency - (PackageName "str-string") - (OrLaterVersion - (mkVersion [0, 1, 0, 0])) - mainLibSet, - Dependency - (PackageName "wl-pprint-indef") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}], - condTestSuites = [], - condBenchmarks = []} - (Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName - "Text.PrettyPrint.Leijen"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (EarlierVersion (mkVersion [5])) - mainLibSet, - Dependency - (PackageName "str-sig") - (OrLaterVersion - (mkVersion [0, 1, 0, 0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (EarlierVersion (mkVersion [5])) - mainLibSet, - Dependency - (PackageName "str-sig") - (OrLaterVersion - (mkVersion [0, 1, 0, 0])) - mainLibSet], - condTreeComponents = []}) - [] - [] - [ - _×_ - (UnqualComponentName - "wl-pprint-string-example") - CondNode { - condTreeData = Executable { - exeName = UnqualComponentName - "wl-pprint-string-example", - modulePath = SymbolicPath - "Main.hs", - exeScope = ExecutablePublic, - buildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [ - SymbolicPath "example-string"], - otherModules = [ - ModuleName "StringImpl"], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (EarlierVersion (mkVersion [5])) - mainLibSet, - Dependency - (PackageName "str-string") - (OrLaterVersion - (mkVersion [0, 1, 0, 0])) - mainLibSet, - Dependency - (PackageName "wl-pprint-indef") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (EarlierVersion (mkVersion [5])) - mainLibSet, - Dependency - (PackageName "str-string") - (OrLaterVersion - (mkVersion [0, 1, 0, 0])) - mainLibSet, - Dependency - (PackageName "wl-pprint-indef") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}] - [] - [] diff --git a/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.genPackageFlags.expr b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.genPackageFlags.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.genPackageFlags.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.gpdScannedVersion.expr b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.gpdScannedVersion.expr new file mode 100644 index 00000000000..4a584e49892 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.gpdScannedVersion.expr @@ -0,0 +1 @@ +Nothing diff --git a/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.packageDescription.expr b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.packageDescription.expr new file mode 100644 index 00000000000..d908d39c1a8 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/wl-pprint-indef.packageDescription.expr @@ -0,0 +1,53 @@ +PackageDescription { + specVersion = CabalSpecV1_6, + package = PackageIdentifier { + pkgName = PackageName + "wl-pprint-indef", + pkgVersion = mkVersion [1, 2]}, + licenseRaw = Right BSD3, + licenseFiles = [ + SymbolicPath "LICENSE"], + copyright = "", + maintainer = + "Noam Lewis ", + author = "Daan Leijen", + stability = "", + testedWith = [], + homepage = "", + pkgUrl = "", + bugReports = "", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "git@github.com:danidiaz/wl-pprint-indef.git", + repoModule = Nothing, + repoBranch = Nothing, + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "The Wadler/Leijen Pretty Printer", + description = + concat + [ + "This is a pretty printing library based on Wadler's paper \"A Prettier\n", + "Printer\". See the haddocks for full info. This version allows the\n", + "library user to declare overlapping instances of the 'Pretty' class."], + category = "Text", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []} From 172ae45babf8254acddd1a14cbb24d70b6f7e932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 12 Nov 2025 22:57:35 +0800 Subject: [PATCH 38/60] add todo --- Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs b/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs index 134050378f7..cc0abbbd86f 100644 --- a/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs +++ b/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs @@ -92,6 +92,7 @@ unvalidateTestSuite t = TestSuiteLibV09 ver modu -> (Just $ TestTypeLib ver, Nothing, Just modu) _ -> (Nothing, Nothing, Nothing) +-- TODO(leana8959): we need to keep a cabal spec version around, and then interpret this after the merging -- | We try to guess the TestSuiteType if it's not specified patchTestSuiteType :: CabalSpecVersion -> TestSuiteStanza -> TestSuiteStanza patchTestSuiteType cabalSpecVersion stanza = From 6081a30362af128b3b17b046df4dfdcdd8753964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 12 Nov 2025 23:05:52 +0800 Subject: [PATCH 39/60] fix compiler errors for integration test --- Cabal-tests/tests/NoThunks.hs | 4 ++++ Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs | 4 ++-- Cabal-tests/tests/custom-setup/CabalDoctestSetup.hs | 4 +++- cabal-install/src/Distribution/Client/Install.hs | 3 +-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Cabal-tests/tests/NoThunks.hs b/Cabal-tests/tests/NoThunks.hs index a53d404dd1e..5f461447cfa 100644 --- a/Cabal-tests/tests/NoThunks.hs +++ b/Cabal-tests/tests/NoThunks.hs @@ -61,8 +61,11 @@ noThunksParse = do -- NoThunks instances ------------------------------------------------------------------------------- +instance NoThunks a => NoThunks (WithImports a) + instance NoThunks Arch instance NoThunks Benchmark +instance NoThunks BenchmarkStanza instance NoThunks BenchmarkInterface instance NoThunks BenchmarkType instance NoThunks BuildInfo @@ -112,6 +115,7 @@ instance NoThunks SourceRepo instance NoThunks IncludeRenaming instance NoThunks ModuleRenaming instance NoThunks TestSuite +instance NoThunks TestSuiteStanza instance NoThunks TestSuiteInterface instance NoThunks TestType instance NoThunks UnqualComponentName diff --git a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs index 129f8d0d85c..1c95c6b3017 100644 --- a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs +++ b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs @@ -29,8 +29,8 @@ md5Check proxy md5Int = structureHash proxy @?= md5FromInteger md5Int md5CheckGenericPackageDescription :: Proxy GenericPackageDescription -> Assertion md5CheckGenericPackageDescription proxy = md5Check proxy - 0xc039c6741dead5203ad2b33bd3bf4dc8 + 0x13fd82c1f4e91d1abb0036b684e7a93a md5CheckLocalBuildInfo :: Proxy LocalBuildInfo -> Assertion md5CheckLocalBuildInfo proxy = md5Check proxy - 0xed69bb9372239b67b14b3e4dd3597c56 + 0x981e9c8288d248b980c0fb0a2fbcf0a9 diff --git a/Cabal-tests/tests/custom-setup/CabalDoctestSetup.hs b/Cabal-tests/tests/custom-setup/CabalDoctestSetup.hs index fc2268bad56..7f499e3b3aa 100644 --- a/Cabal-tests/tests/custom-setup/CabalDoctestSetup.hs +++ b/Cabal-tests/tests/custom-setup/CabalDoctestSetup.hs @@ -143,7 +143,9 @@ import Distribution.Types.UnqualComponentName import Distribution.PackageDescription (CondTree (..)) import Distribution.Types.GenericPackageDescription - (GenericPackageDescription (condTestSuites)) + ( GenericPackageDescription + , condTestSuites + ) import Distribution.Version (mkVersion) diff --git a/cabal-install/src/Distribution/Client/Install.hs b/cabal-install/src/Distribution/Client/Install.hs index 3afeb18da65..fb779cc1029 100644 --- a/cabal-install/src/Distribution/Client/Install.hs +++ b/cabal-install/src/Distribution/Client/Install.hs @@ -163,8 +163,7 @@ import Distribution.Package , packageVersion ) import Distribution.PackageDescription - ( GenericPackageDescription (..) - , PackageDescription + ( PackageDescription , genPackageFlags ) import qualified Distribution.PackageDescription as PackageDescription From 527fb2a9f83380a81023237f10890325e5c50607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 12 Nov 2025 23:11:07 +0800 Subject: [PATCH 40/60] run fourmolu --- Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs b/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs index cc0abbbd86f..671677ed04f 100644 --- a/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs +++ b/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs @@ -93,6 +93,7 @@ unvalidateTestSuite t = _ -> (Nothing, Nothing, Nothing) -- TODO(leana8959): we need to keep a cabal spec version around, and then interpret this after the merging + -- | We try to guess the TestSuiteType if it's not specified patchTestSuiteType :: CabalSpecVersion -> TestSuiteStanza -> TestSuiteStanza patchTestSuiteType cabalSpecVersion stanza = From b6880480b0bd2e406eb06f63a1e0544ae185cb1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 12 Nov 2025 23:22:50 +0800 Subject: [PATCH 41/60] don't expose intemediary accessors --- .../Distribution/PackageDescription/Configuration.hs | 10 +++++----- .../Distribution/PackageDescription/PrettyPrint.hs | 12 ++++++------ .../Distribution/Types/GenericPackageDescription.hs | 8 -------- Cabal-tests/tests/ParserTests.hs | 4 ++-- Cabal/src/Distribution/PackageDescription/Check.hs | 4 ++-- .../PackageDescription/Check/Conditional.hs | 8 ++++---- .../Distribution/Solver/Modular/IndexConversion.hs | 8 ++++---- 7 files changed, 23 insertions(+), 31 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs index 79a780fb614..d23ac5cbf51 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs @@ -319,11 +319,11 @@ extractConditions -> [Condition ConfVar] extractConditions f gpkg = concat - [ extractCondition (f . libBuildInfo) <$> maybeToList (condLibrary' gpkg) - , extractCondition (f . libBuildInfo) . snd <$> condSubLibraries' gpkg - , extractCondition (f . buildInfo) . snd <$> condExecutables' gpkg - , extractCondition (f . testBuildInfo) . snd <$> condTestSuites' gpkg - , extractCondition (f . benchmarkBuildInfo) . snd <$> condBenchmarks' gpkg + [ extractCondition (f . libBuildInfo) <$> maybeToList (condLibrary gpkg) + , extractCondition (f . libBuildInfo) . snd <$> condSubLibraries gpkg + , extractCondition (f . buildInfo) . snd <$> condExecutables gpkg + , extractCondition (f . testBuildInfo) . snd <$> condTestSuites gpkg + , extractCondition (f . benchmarkBuildInfo) . snd <$> condBenchmarks gpkg ] freeVars :: CondTree ConfVar c a -> [FlagName] diff --git a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs index af2d336110c..047729aec74 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs @@ -79,12 +79,12 @@ ppGenericPackageDescription v gpd0 = [ ppPackageDescription v (packageDescription gpd) , ppSetupBInfo v (setupBuildInfo (packageDescription gpd)) , ppGenPackageFlags v (genPackageFlags gpd) - , ppCondLibrary v (condLibrary' gpd) - , ppCondSubLibraries v (condSubLibraries' gpd) - , ppCondForeignLibs v (condForeignLibs' gpd) - , ppCondExecutables v (condExecutables' gpd) - , ppCondTestSuites v (condTestSuites' gpd) - , ppCondBenchmarks v (condBenchmarks' gpd) + , ppCondLibrary v (condLibrary gpd) + , ppCondSubLibraries v (condSubLibraries gpd) + , ppCondForeignLibs v (condForeignLibs gpd) + , ppCondExecutables v (condExecutables gpd) + , ppCondTestSuites v (condTestSuites gpd) + , ppCondBenchmarks v (condBenchmarks gpd) ] where gpd = preProcessInternalDeps (specVersion (packageDescription gpd0)) gpd0 diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index 88212b58757..869d572e4cd 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -22,14 +22,6 @@ module Distribution.Types.GenericPackageDescription , condTestSuites , condBenchmarks - -- * Accessors - , condLibrary' - , condSubLibraries' - , condForeignLibs' - , condExecutables' - , condTestSuites' - , condBenchmarks' - -- * Merging helpers , mergeCondLibrary , mergeCondSubLibraries diff --git a/Cabal-tests/tests/ParserTests.hs b/Cabal-tests/tests/ParserTests.hs index 11fdb14cba4..f4ad3e42216 100644 --- a/Cabal-tests/tests/ParserTests.hs +++ b/Cabal-tests/tests/ParserTests.hs @@ -15,7 +15,7 @@ import Data.Algorithm.Diff (PolyDiff (..), getGroupedDif import Data.Maybe (isNothing) import Distribution.Fields (pwarning) import Distribution.PackageDescription (GenericPackageDescription) -import Distribution.Types.GenericPackageDescription(condLibrary') +import Distribution.Types.GenericPackageDescription(condLibrary) import Distribution.PackageDescription.Parsec (parseGenericPackageDescription) import Distribution.PackageDescription.PrettyPrint (showGenericPackageDescription) import Distribution.Parsec (PWarnType (..), PWarning (..), showPErrorWithSource, showPWarningWithSource) @@ -169,7 +169,7 @@ accessorsTests = testGroup "accessors" #ifdef MIN_VERSION_tree_diff accessorsGoldenTestCondLibrary :: [FilePath] -> TestTree -accessorsGoldenTestCondLibrary = testGroup "condLibrary" . map (accessorsGoldenTest condLibrary') +accessorsGoldenTestCondLibrary = testGroup "condLibrary" . map (accessorsGoldenTest condLibrary) accessorsGoldenTest :: ToExpr a diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs index b4e66d1aee3..5dd38e6716c 100644 --- a/Cabal/src/Distribution/PackageDescription/Check.hs +++ b/Cabal/src/Distribution/PackageDescription/Check.hs @@ -273,7 +273,7 @@ checkGenericPackageDescription -- § Feature checks. checkSpecVer CabalSpecV2_0 - (not . null $ condSubLibraries' gpd) + (not . null $ condSubLibraries_) (PackageDistInexcusable CVMultiLib) checkSpecVer CabalSpecV1_8 @@ -293,7 +293,7 @@ checkGenericPackageDescription ) let ads = maybe [] ((: []) . extractAssocDeps pName) condLibrary_ - ++ map (uncurry extractAssocDeps) (condSubLibraries' gpd) + ++ map (uncurry extractAssocDeps) condSubLibraries_ case condLibrary_ of Just cl -> diff --git a/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs b/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs index 1c4b0edfbe4..44964272065 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Conditional.hs @@ -228,10 +228,10 @@ checkCondVars cond = -- this particular check. checkDuplicateModules :: GenericPackageDescription -> [PackageCheck] checkDuplicateModules pkg = - concatMap checkLib (maybe id (:) (condLibrary' pkg) . map snd $ condSubLibraries' pkg) - ++ concatMap checkExe (map snd $ condExecutables' pkg) - ++ concatMap checkTest (map snd $ condTestSuites' pkg) - ++ concatMap checkBench (map snd $ condBenchmarks' pkg) + concatMap checkLib (maybe id (:) (condLibrary pkg) . map snd $ condSubLibraries pkg) + ++ concatMap checkExe (map snd $ condExecutables pkg) + ++ concatMap checkTest (map snd $ condTestSuites pkg) + ++ concatMap checkBench (map snd $ condBenchmarks pkg) where -- the duplicate modules check is has not been thoroughly vetted for backpack checkLib = checkDups "library" (\l -> explicitLibModules l ++ map moduleReexportName (reexportedModules l)) diff --git a/cabal-install-solver/src/Distribution/Solver/Modular/IndexConversion.hs b/cabal-install-solver/src/Distribution/Solver/Modular/IndexConversion.hs index 94e24835545..38dc41e0885 100644 --- a/cabal-install-solver/src/Distribution/Solver/Modular/IndexConversion.hs +++ b/cabal-install-solver/src/Distribution/Solver/Modular/IndexConversion.hs @@ -176,7 +176,7 @@ convGPD :: OS -> Arch -> CompilerInfo -> [LabeledPackageConstraint] -> StrongFlags -> SolveExecutables -> PN -> GenericPackageDescription -> PInfo convGPD os arch cinfo constraints strfl solveExes pn - gpd@(GenericPackageDescription pkg scannedVersion flags mlib sub_libs flibs exes tests benchs) = + (GenericPackageDescription pkg scannedVersion flags mlib sub_libs flibs exes tests benchs) = let fds = flagInfo strfl flags @@ -216,16 +216,16 @@ convGPD os arch cinfo constraints strfl solveExes pn components = M.fromList $ libComps ++ subLibComps ++ exeComps where libComps = [ (ExposedLib LMainLibName, libToComponentInfo lib) - | lib <- maybeToList (condLibrary' gpd) ] + | lib <- maybeToList mlib ] subLibComps = [ (ExposedLib (LSubLibName name), libToComponentInfo lib) - | (name, lib) <- condSubLibraries' gpd ] + | (name, lib) <- sub_libs ] exeComps = [ ( ExposedExe name , ComponentInfo { compIsVisible = IsVisible True , compIsBuildable = IsBuildable $ testCondition (buildable . buildInfo) exe /= Just False } ) - | (name, exe) <- (condExecutables' gpd) ] + | (name, exe) <- exes ] libToComponentInfo lib = ComponentInfo { From 7588010764e53bcb911303c926458e5e46eddad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 13 Nov 2025 18:52:08 +0800 Subject: [PATCH 42/60] remove early experiment "import" fields in TestSuite and Benchmark --- .../src/Distribution/PackageDescription/FieldGrammar.hs | 2 +- Cabal-syntax/src/Distribution/Types/Executable.hs | 5 ----- Cabal-syntax/src/Distribution/Types/TestSuite.hs | 4 ---- Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs | 5 ----- Cabal/src/Distribution/PackageDescription/Check/Target.hs | 2 -- Cabal/src/Distribution/Simple/Build.hs | 3 --- Cabal/src/Distribution/Simple/Haddock.hs | 2 -- 7 files changed, 1 insertion(+), 22 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index 1b2845b2a06..5c3d505e4e9 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -283,7 +283,7 @@ executableFieldGrammar => UnqualComponentName -> g Executable Executable executableFieldGrammar n = - Executable n [] + Executable n -- main-is is optional as conditional blocks don't have it <$> optionalFieldDefAla "main-is" RelativePathNT L.modulePath (modulePath mempty) <*> optionalFieldDef "scope" L.exeScope ExecutablePublic diff --git a/Cabal-syntax/src/Distribution/Types/Executable.hs b/Cabal-syntax/src/Distribution/Types/Executable.hs index 05e2cc25eb2..2017a9ba8d2 100644 --- a/Cabal-syntax/src/Distribution/Types/Executable.hs +++ b/Cabal-syntax/src/Distribution/Types/Executable.hs @@ -15,7 +15,6 @@ import Prelude () import Distribution.ModuleName import Distribution.Types.BuildInfo import Distribution.Types.ExecutableScope -import Distribution.Types.Imports import Distribution.Types.UnqualComponentName import Distribution.Utils.Path @@ -23,8 +22,6 @@ import qualified Distribution.Types.BuildInfo.Lens as L data Executable = Executable { exeName :: UnqualComponentName - , exeImports :: [ImportName] - -- ^ Retained for exact print , modulePath :: RelativePath Source File , exeScope :: ExecutableScope , buildInfo :: BuildInfo @@ -42,7 +39,6 @@ instance Monoid Executable where mempty = Executable { exeName = mempty - , exeImports = mempty , modulePath = unsafeMakeSymbolicPath "" , exeScope = mempty , buildInfo = mempty @@ -53,7 +49,6 @@ instance Semigroup Executable where a <> b = Executable { exeName = combineNames a b exeName "executable" - , exeImports = combine exeImports , modulePath = unsafeMakeSymbolicPath $ combineNames a b (getSymbolicPath . modulePath) "modulePath" , exeScope = combine exeScope , buildInfo = combine buildInfo diff --git a/Cabal-syntax/src/Distribution/Types/TestSuite.hs b/Cabal-syntax/src/Distribution/Types/TestSuite.hs index 3aae8bca5aa..129e17dabfb 100644 --- a/Cabal-syntax/src/Distribution/Types/TestSuite.hs +++ b/Cabal-syntax/src/Distribution/Types/TestSuite.hs @@ -13,7 +13,6 @@ import Distribution.Compat.Prelude import Prelude () import Distribution.Types.BuildInfo -import Distribution.Types.Imports import Distribution.Types.TestSuiteInterface import Distribution.Types.TestType import Distribution.Types.UnqualComponentName @@ -25,7 +24,6 @@ import qualified Distribution.Types.BuildInfo.Lens as L -- | A \"test-suite\" stanza in a cabal file. data TestSuite = TestSuite { testName :: UnqualComponentName - , testSuiteImports :: [ImportName] , testInterface :: TestSuiteInterface , testBuildInfo :: BuildInfo , testCodeGenerators :: [String] @@ -44,7 +42,6 @@ instance Monoid TestSuite where mempty = TestSuite { testName = mempty - , testSuiteImports = mempty , testInterface = mempty , testBuildInfo = mempty , testCodeGenerators = mempty @@ -55,7 +52,6 @@ instance Semigroup TestSuite where a <> b = TestSuite { testName = combineNames a b testName "test" - , testSuiteImports = combine testSuiteImports , testInterface = combine testInterface , testBuildInfo = combine testBuildInfo , testCodeGenerators = combine testCodeGenerators diff --git a/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs b/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs index 47c51aab110..d44862eed48 100644 --- a/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/TestSuite/Lens.hs @@ -8,17 +8,12 @@ import Distribution.Compat.Prelude import Prelude () import Distribution.Types.BuildInfo (BuildInfo) -import Distribution.Types.Imports (ImportName) import Distribution.Types.TestSuite (TestSuite) import Distribution.Types.TestSuiteInterface (TestSuiteInterface) import Distribution.Types.UnqualComponentName (UnqualComponentName) import qualified Distribution.Types.TestSuite as T -testSuiteImports :: Lens' TestSuite [ImportName] -testSuiteImports f s = fmap (\x -> s{T.testSuiteImports = x}) (f (T.testSuiteImports s)) -{-# INLINE testSuiteImports #-} - testName :: Lens' TestSuite UnqualComponentName testName f s = fmap (\x -> s{T.testName = x}) (f (T.testName s)) {-# INLINE testName #-} diff --git a/Cabal/src/Distribution/PackageDescription/Check/Target.hs b/Cabal/src/Distribution/PackageDescription/Check/Target.hs index e953a2b9453..0010d1f4116 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Target.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Target.hs @@ -138,7 +138,6 @@ checkExecutable ads exe@( Executable exeName_ - _exeImports_ symbolicModulePath_ _exeScope_ buildInfo_ @@ -195,7 +194,6 @@ checkTestSuite ads ts@( TestSuite testName_ - _testImports_ testInterface_ testBuildInfo_ _testCodeGenerators_ diff --git a/Cabal/src/Distribution/Simple/Build.hs b/Cabal/src/Distribution/Simple/Build.hs index 95592f6bc26..0d41eadb2c4 100644 --- a/Cabal/src/Distribution/Simple/Build.hs +++ b/Cabal/src/Distribution/Simple/Build.hs @@ -767,7 +767,6 @@ testSuiteExeV10AsExe :: TestSuite -> Executable testSuiteExeV10AsExe test@TestSuite{testInterface = TestSuiteExeV10 _ mainFile} = Executable { exeName = testName test - , exeImports = mempty , modulePath = mainFile , exeScope = ExecutablePublic , buildInfo = testBuildInfo test @@ -779,7 +778,6 @@ benchmarkExeV10asExe :: Benchmark -> Executable benchmarkExeV10asExe bm@Benchmark{benchmarkInterface = BenchmarkExeV10 _ mainFile} = Executable { exeName = benchmarkName bm - , exeImports = mempty , modulePath = mainFile , exeScope = ExecutablePublic , buildInfo = benchmarkBuildInfo bm @@ -862,7 +860,6 @@ testSuiteLibV09AsLibAndExe exe = Executable { exeName = mkUnqualComponentName $ stubName test - , exeImports = mempty , modulePath = makeRelativePathEx $ stubFilePath test , exeScope = ExecutablePublic , buildInfo = diff --git a/Cabal/src/Distribution/Simple/Haddock.hs b/Cabal/src/Distribution/Simple/Haddock.hs index b39d9d073fc..b24ee8da5af 100644 --- a/Cabal/src/Distribution/Simple/Haddock.hs +++ b/Cabal/src/Distribution/Simple/Haddock.hs @@ -994,7 +994,6 @@ compToExe comp = Just Executable { exeName = testName test - , exeImports = mempty , modulePath = f , exeScope = ExecutablePublic , buildInfo = testBuildInfo test @@ -1003,7 +1002,6 @@ compToExe comp = Just Executable { exeName = benchmarkName bench - , exeImports = mempty , modulePath = f , exeScope = ExecutablePublic , buildInfo = benchmarkBuildInfo bench From 95cf42c04394f4c1f87d4b39c1ddf70f24d2a13d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 13 Nov 2025 18:58:30 +0800 Subject: [PATCH 43/60] move TestSuiteStanza validation to its module --- .../PackageDescription/FieldGrammar.hs | 31 ---------------- .../src/Distribution/Types/TestSuiteStanza.hs | 35 +++++++++++++++++++ 2 files changed, 35 insertions(+), 31 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index 5c3d505e4e9..7204d45fe78 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -326,37 +326,6 @@ testSuiteFieldGrammar = <*> monoidalFieldAla "code-generators" (alaList' CommaFSep Token) testStanzaCodeGenerators ^^^ availableSince CabalSpecV3_8 [] -validateTestSuite :: Position -> TestSuiteStanza -> ParseResult src () -validateTestSuite pos stanza = case _testStanzaTestType stanza of - Nothing -> pure () - Just (TestTypeUnknown _ _) -> pure () - Just tt | tt `notElem` knownTestTypes -> pure () - Just tt@(TestTypeExe _ver) -> case _testStanzaMainIs stanza of - Nothing -> parseFailure pos (missingField "main-is" tt) - Just _file -> - when (isJust (_testStanzaTestModule stanza)) $ - parseWarning pos PWTExtraBenchmarkModule (extraField "test-module" tt) - Just tt@(TestTypeLib _ver) -> case _testStanzaTestModule stanza of - Nothing -> - parseFailure pos (missingField "test-module" tt) - Just _module -> - when (isJust (_testStanzaMainIs stanza)) $ - parseWarning pos PWTExtraMainIs (extraField "main-is" tt) - where - missingField name tt = - "The '" - ++ name - ++ "' field is required for the " - ++ prettyShow tt - ++ " test suite type." - - extraField name tt = - "The '" - ++ name - ++ "' field is not used for the '" - ++ prettyShow tt - ++ "' test suite type." - ------------------------------------------------------------------------------- -- Benchmark ------------------------------------------------------------------------------- diff --git a/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs b/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs index 671677ed04f..c7b3c731197 100644 --- a/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs +++ b/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs @@ -18,6 +18,9 @@ import Distribution.ModuleName (ModuleName) import Distribution.Types.BuildInfo import qualified Distribution.Types.BuildInfo.Lens as L import Distribution.Types.TestSuite +import Distribution.Parsec +import Distribution.Fields.ParseResult +import Distribution.Pretty (prettyShow) import Distribution.Types.TestSuiteInterface import Distribution.Types.TestType import Distribution.Utils.Path @@ -40,7 +43,39 @@ instance NFData TestSuiteStanza where rnf = genericRnf instance L.HasBuildInfo TestSuiteStanza where buildInfo = testStanzaBuildInfo +validateTestSuite :: Position -> TestSuiteStanza -> ParseResult src () +validateTestSuite pos stanza = case _testStanzaTestType stanza of + Nothing -> pure () + Just (TestTypeUnknown _ _) -> pure () + Just tt | tt `notElem` knownTestTypes -> pure () + Just tt@(TestTypeExe _ver) -> case _testStanzaMainIs stanza of + Nothing -> parseFailure pos (missingField "main-is" tt) + Just _file -> + when (isJust (_testStanzaTestModule stanza)) $ + parseWarning pos PWTExtraBenchmarkModule (extraField "test-module" tt) + Just tt@(TestTypeLib _ver) -> case _testStanzaTestModule stanza of + Nothing -> + parseFailure pos (missingField "test-module" tt) + Just _module -> + when (isJust (_testStanzaMainIs stanza)) $ + parseWarning pos PWTExtraMainIs (extraField "main-is" tt) + where + missingField name tt = + "The '" + ++ name + ++ "' field is required for the " + ++ prettyShow tt + ++ " test suite type." + + extraField name tt = + "The '" + ++ name + ++ "' field is not used for the '" + ++ prettyShow tt + ++ "' test suite type." + -- | Convert a previously validated 'TestSuiteStanza' to 'GenericPackageDescription''s 'TestSuite' type +-- We do not check the validity here convertTestSuite :: TestSuiteStanza -> TestSuite convertTestSuite stanza = case _testStanzaTestType stanza of Nothing -> basicTestSuite From 32322318c7bb8dacff3696d16c18a0dc42cb529b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 13 Nov 2025 19:06:44 +0800 Subject: [PATCH 44/60] clean up {TestSuite,Benchmark}Stanza exports from FieldGrammar --- .../PackageDescription/FieldGrammar.hs | 20 +++---------------- .../PackageDescription/PrettyPrint.hs | 7 +++---- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index 7204d45fe78..0a13ebd5820 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -22,24 +22,10 @@ module Distribution.PackageDescription.FieldGrammar , executableFieldGrammar -- * Test suite - , TestSuiteStanza (..) , testSuiteFieldGrammar - , validateTestSuite - , convertTestSuite - -- TODO(leana8959): move this to gpd - , mergeTestSuiteStanza - -- ** Lenses - , testStanzaTestType - , testStanzaMainIs - , testStanzaTestModule - , testStanzaBuildInfo - - -- * Benchmark - , BenchmarkStanza (..) + -- * Benchmark , benchmarkFieldGrammar - , validateBenchmark - , unvalidateBenchmark -- * Field grammars , formatDependencyList @@ -688,8 +674,8 @@ _syntaxFieldNames = , fieldGrammarKnownFieldList $ libraryFieldGrammar LMainLibName , fieldGrammarKnownFieldList $ executableFieldGrammar "exe" , fieldGrammarKnownFieldList $ foreignLibFieldGrammar "flib" - , fieldGrammarKnownFieldList $ testSuiteFieldGrammar - , fieldGrammarKnownFieldList $ benchmarkFieldGrammar + , fieldGrammarKnownFieldList testSuiteFieldGrammar + , fieldGrammarKnownFieldList benchmarkFieldGrammar , fieldGrammarKnownFieldList $ flagFieldGrammar (error "flagname") , fieldGrammarKnownFieldList $ sourceRepoFieldGrammar (error "repokind") , fieldGrammarKnownFieldList $ setupBInfoFieldGrammar True diff --git a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs index 047729aec74..7998a477a16 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/PrettyPrint.hs @@ -53,7 +53,6 @@ import Distribution.PackageDescription.FieldGrammar import Distribution.Pretty import Distribution.Utils.Generic (writeFileAtomic, writeUTF8File) -import qualified Distribution.PackageDescription.FieldGrammar as FG import qualified Distribution.Types.BuildInfo.Lens as L import qualified Distribution.Types.SetupBuildInfo.Lens as L @@ -150,7 +149,7 @@ ppCondLibrary v (Just condTree) = ppCondSubLibraries :: CabalSpecVersion -> [(UnqualComponentName, CondTree ConfVar [Dependency] Library)] -> [PrettyField ()] ppCondSubLibraries v libs = [ PrettySection () "library" [pretty n] $ - ppCondTree2 v (libraryFieldGrammar (LSubLibName n)) condTree + ppCondTree2 v (libraryFieldGrammar $ LSubLibName n) condTree | (n, condTree) <- libs ] @@ -178,7 +177,7 @@ ppCondTestSuites v suites = ppCondBenchmarks :: CabalSpecVersion -> [(UnqualComponentName, CondTree ConfVar [Dependency] Benchmark)] -> [PrettyField ()] ppCondBenchmarks v suites = [ PrettySection () "benchmark" [pretty n] $ - ppCondTree2 v benchmarkFieldGrammar (fmap FG.unvalidateBenchmark condTree) + ppCondTree2 v benchmarkFieldGrammar (fmap unvalidateBenchmark condTree) | (n, condTree) <- suites ] @@ -227,7 +226,7 @@ showPackageDescription = showGenericPackageDescription . pdToGpd pdToGpd :: PackageDescription -> GenericPackageDescription pdToGpd pd = - emptyGenericPackageDescription + GenericPackageDescription { packageDescription = pd , gpdScannedVersion = Nothing , genPackageFlags = [] From f8c5eafc421090dad99dc40e193ccfbe4088f2c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 13 Nov 2025 19:21:18 +0800 Subject: [PATCH 45/60] restore old behaviour in code working with PackageDescription we fixed GenericPackageDescription's constructor --- .../src/Distribution/PackageDescription/Parsec.hs | 3 +-- .../Distribution/Types/GenericPackageDescription.hs | 2 +- Cabal/src/Distribution/PackageDescription/Check.hs | 12 ++++++------ 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index 75edb7c84f9..feda61ec74c 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -667,7 +667,6 @@ processImports v commonStanzas = go [] go acc (Field (Name pos name) fls : fields) | name == "import" = do names <- getList' <$> runFieldParser pos parsec v fls validNames <- for names $ \commonName -> - -- Common Stanza sections are already parsed as 'BuildInfo's with import names inserted if Map.member commonName commonStanzas then pure (Just commonName) else do @@ -679,7 +678,7 @@ processImports v commonStanzas = go [] -- parse actual CondTree go names fields = do fields' <- catMaybes <$> traverse (warnImport v) fields - pure (fields', reverse names) + pure (fields', names) -- | Warn on "import" fields, also map to Maybe, so erroneous fields can be filtered warnImport :: CabalSpecVersion -> Field Position -> ParseResult src (Maybe (Field Position)) diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index 869d572e4cd..7dc5d8bf697 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -354,7 +354,7 @@ mergeImports commonStanzas fromBuildInfo (CondNode root c zs) = cs' = map (fromBuildInfo' <$>) bis ++ cs instance Package GenericPackageDescription where - packageId = packageId . packageDescriptionInternal + packageId = packageId . packageDescription instance Binary GenericPackageDescription instance Structured GenericPackageDescription diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs index 5dd38e6716c..27cb2aa5d55 100644 --- a/Cabal/src/Distribution/PackageDescription/Check.hs +++ b/Cabal/src/Distribution/PackageDescription/Check.hs @@ -365,12 +365,12 @@ checkGenericPackageDescription usedFlags :: Set.Set FlagName usedFlags = mconcat - [ toSetOf (traverse . traverseCondTreeV . L._PackageFlag) (condLibrary gpd) - , toSetOf (L.condSubLibrariesUnmerged . traverse . _2 . traverseCondTreeV . L._PackageFlag) gpd - , toSetOf (L.condForeignLibsUnmerged . traverse . _2 . traverseCondTreeV . L._PackageFlag) gpd - , toSetOf (L.condExecutablesUnmerged . traverse . _2 . traverseCondTreeV . L._PackageFlag) gpd - , toSetOf (L.condTestSuitesUnmerged . traverse . _2 . traverseCondTreeV . L._PackageFlag) gpd - , toSetOf (L.condBenchmarksUnmerged . traverse . _2 . traverseCondTreeV . L._PackageFlag) gpd + [ toSetOf (L.condLibrary . traverse . traverseCondTreeV . L._PackageFlag) gpd + , toSetOf (L.condSubLibraries . traverse . _2 . traverseCondTreeV . L._PackageFlag) gpd + , toSetOf (L.condForeignLibs . traverse . _2 . traverseCondTreeV . L._PackageFlag) gpd + , toSetOf (L.condExecutables . traverse . _2 . traverseCondTreeV . L._PackageFlag) gpd + , toSetOf (L.condTestSuites . traverse . _2 . traverseCondTreeV . L._PackageFlag) gpd + , toSetOf (L.condBenchmarks . traverse . _2 . traverseCondTreeV . L._PackageFlag) gpd ] checkPackageDescription :: Monad m => PackageDescription -> CheckM m () From 59d8c2b57092b2b47481473e10eac906c5441081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 13 Nov 2025 19:48:08 +0800 Subject: [PATCH 46/60] patch {TestSuite,Benchmark}Stanza type when using accessor --- .../Distribution/PackageDescription/Parsec.hs | 23 ++++++++----------- .../Types/GenericPackageDescription.hs | 11 +++++++-- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index feda61ec74c..476208f0599 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -337,15 +337,13 @@ goSections specVer fieldPositions = do | name == "test-suite" = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args + testStanza <- lift $ parseCondTree' testSuiteFieldGrammar commonStanzas fields - testStanza <- - (fmap . mapTreeData . fmap) (patchTestSuiteType specVer) $ - lift $ - parseCondTree' testSuiteFieldGrammar commonStanzas fields - - -- Merge and then validate + -- Patching depends on merging, validation depends on patching let testStanza' :: CondTree ConfVar [Dependency] TestSuiteStanza - testStanza' = mergeTestSuiteStanza commonStanzas testStanza + testStanza' = + mergeTestSuiteStanza commonStanzas testStanza + & fmap (patchTestSuiteType specVer) _ok <- lift $ traverse (validateTestSuite pos) testStanza' let validated = mapTreeData convertTestSuite testStanza' @@ -375,14 +373,13 @@ goSections specVer fieldPositions = do | name == "benchmark" = do commonStanzas <- use stateCommonStanzas name' <- parseUnqualComponentName pos args + benchStanza <- lift $ parseCondTree' benchmarkFieldGrammar commonStanzas fields - benchStanza <- - (fmap . mapTreeData . fmap) (patchBenchmarkType specVer) $ - lift $ - parseCondTree' benchmarkFieldGrammar commonStanzas fields - + -- Patching depends on merging, validation depends on patching let benchStanza' :: CondTree ConfVar [Dependency] BenchmarkStanza - benchStanza' = mergeBenchmarkStanza commonStanzas benchStanza + benchStanza' = + mergeBenchmarkStanza commonStanzas benchStanza + & fmap (patchBenchmarkType specVer) _ok <- lift $ traverse (validateBenchmark pos . unImportNames) benchStanza let validated = mapTreeData convertBenchmark benchStanza' diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index 7dc5d8bf697..937d8160952 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -43,6 +43,7 @@ import qualified Distribution.Types.Imports.Lens as L () import Distribution.Types.PackageDescription +import Distribution.CabalSpecVersion import Distribution.Package import Distribution.Types.Benchmark import Distribution.Types.BenchmarkStanza @@ -265,7 +266,10 @@ condTestSuites' -> [(UnqualComponentName, DependencyTree TestSuite)] condTestSuites' gpd = mergeTestSuiteStanza' (gpdCommonStanzas gpd) (condTestSuitesUnmerged gpd) - & (map . fmap . mapTreeData) convertTestSuite + & (map . fmap . mapTreeData) (convertTestSuite . patchTestSuiteType specVer) + where + specVer :: CabalSpecVersion + specVer = specVersion . packageDescriptionInternal $ gpd mergeTestSuiteStanza' :: Map ImportName (DependencyTree (WithImports BuildInfo)) @@ -281,7 +285,10 @@ condBenchmarks' -> [(UnqualComponentName, DependencyTree Benchmark)] condBenchmarks' gpd = mergeBenchmarkStanza' (gpdCommonStanzas gpd) (condBenchmarksUnmerged gpd) - & (map . fmap . mapTreeData) convertBenchmark + & (map . fmap . mapTreeData) (convertBenchmark . patchBenchmarkType specVer) + where + specVer :: CabalSpecVersion + specVer = specVersion . packageDescriptionInternal $ gpd mergeBenchmarkStanza' :: Map ImportName (DependencyTree (WithImports BuildInfo)) From f06fcd072dab6295a1b85f0e07f139c492c1c929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 13 Nov 2025 21:08:41 +0800 Subject: [PATCH 47/60] remove accessors tests --- .../accessors/library-merging.cabal | 30 --- .../accessors/library-merging.expr | 252 ------------------ 2 files changed, 282 deletions(-) delete mode 100644 Cabal-tests/tests/ParserTests/accessors/library-merging.cabal delete mode 100644 Cabal-tests/tests/ParserTests/accessors/library-merging.expr diff --git a/Cabal-tests/tests/ParserTests/accessors/library-merging.cabal b/Cabal-tests/tests/ParserTests/accessors/library-merging.cabal deleted file mode 100644 index 6f8ed6ad6c0..00000000000 --- a/Cabal-tests/tests/ParserTests/accessors/library-merging.cabal +++ /dev/null @@ -1,30 +0,0 @@ -cabal-version: 3.0 -name: Library-merging -version: 0 -synopsis: Tests the correctness of deferred merging in imports -build-type: Simple - -flag foo - manual: True - default: True - -common windows - if os(windows) - build-depends: Win32 - -common deps - import: windows - buildable: True - build-depends: - base >=4.10 && <4.11, - containers - -library - if flag(foo) - import: deps - - default-language: Haskell2010 - exposed-modules: ElseIf - - build-depends: - ghc-prim diff --git a/Cabal-tests/tests/ParserTests/accessors/library-merging.expr b/Cabal-tests/tests/ParserTests/accessors/library-merging.expr deleted file mode 100644 index 0e3d49ae740..00000000000 --- a/Cabal-tests/tests/ParserTests/accessors/library-merging.expr +++ /dev/null @@ -1,252 +0,0 @@ -Just - CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [ - ModuleName "ElseIf"], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Just - Haskell2010, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "ghc-prim") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (PackageFlag (FlagName "foo"))`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "base") - (IntersectVersionRanges - (OrLaterVersion - (mkVersion [4, 10])) - (EarlierVersion - (mkVersion [4, 11]))) - mainLibSet, - Dependency - (PackageName "containers") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = [ - CondBranch { - condBranchCondition = - `Var (OS Windows)`, - condBranchIfTrue = CondNode { - condTreeData = Library { - libName = LMainLibName, - exposedModules = [], - reexportedModules = [], - signatures = [], - libExposed = True, - libVisibility = - LibraryVisibilityPublic, - libBuildInfo = BuildInfo { - buildable = True, - buildTools = [], - buildToolDepends = [], - cppOptions = [], - asmOptions = [], - cmmOptions = [], - ccOptions = [], - cxxOptions = [], - jsppOptions = [], - ldOptions = [], - hsc2hsOptions = [], - pkgconfigDepends = [], - frameworks = [], - extraFrameworkDirs = [], - asmSources = [], - cmmSources = [], - cSources = [], - cxxSources = [], - jsSources = [], - hsSourceDirs = [], - otherModules = [], - virtualModules = [], - autogenModules = [], - defaultLanguage = Nothing, - otherLanguages = [], - defaultExtensions = [], - otherExtensions = [], - oldExtensions = [], - extraLibs = [], - extraLibsStatic = [], - extraGHCiLibs = [], - extraBundledLibs = [], - extraLibFlavours = [], - extraDynLibFlavours = [], - extraLibDirs = [], - extraLibDirsStatic = [], - includeDirs = [], - includes = [], - autogenIncludes = [], - installIncludes = [], - options = PerCompilerFlavor - [] - [], - profOptions = PerCompilerFlavor - [] - [], - sharedOptions = - PerCompilerFlavor [] [], - profSharedOptions = - PerCompilerFlavor [] [], - staticOptions = - PerCompilerFlavor [] [], - customFieldsBI = [], - targetBuildDepends = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - mixins = []}}, - condTreeConstraints = [ - Dependency - (PackageName "Win32") - (OrLaterVersion (mkVersion [0])) - mainLibSet], - condTreeComponents = []}, - condBranchIfFalse = Nothing}]}, - condBranchIfFalse = Nothing}]} From 21e1326cfef70099174828c014c9df479c3ba950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 13 Nov 2025 21:10:35 +0800 Subject: [PATCH 48/60] tests: add test for failed case --- Cabal-tests/tests/ParserTests.hs | 3 +- .../regressions/supervisors-0.1.cabal | 68 +++++++++++++++++++ 2 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 Cabal-tests/tests/ParserTests/regressions/supervisors-0.1.cabal diff --git a/Cabal-tests/tests/ParserTests.hs b/Cabal-tests/tests/ParserTests.hs index f4ad3e42216..159575d0ec9 100644 --- a/Cabal-tests/tests/ParserTests.hs +++ b/Cabal-tests/tests/ParserTests.hs @@ -193,7 +193,8 @@ accessorsGoldenTest f fp = ediffGolden goldenTest fp exprFile $ do regressionTests :: TestTree regressionTests = testGroup "regressions" - [ regressionTest "encoding-0.8.cabal" + [ regressionTest "supervisors-0.1.cabal" + , regressionTest "encoding-0.8.cabal" , regressionTest "Octree-0.5.cabal" , regressionTest "nothing-unicode.cabal" , regressionTest "multiple-libs-2.cabal" diff --git a/Cabal-tests/tests/ParserTests/regressions/supervisors-0.1.cabal b/Cabal-tests/tests/ParserTests/regressions/supervisors-0.1.cabal new file mode 100644 index 00000000000..7383cc88244 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/supervisors-0.1.cabal @@ -0,0 +1,68 @@ +cabal-version: 2.2 +name: supervisors +version: 0.2.1.0 +stability: Experimental +synopsis: Monitor groups of threads with non-hierarchical lifetimes. +description: + The @supervisors@ package provides a useful abstraction for managing the + groups of Haskell threads, which may not have a strictly hierarchical + structure to their lifetimes. + . + Concretely, the library provides a `Supervisor` construct, which can be + used to safely spawn threads while guaranteeing that: + . + * When the supervisor is killed, all of the threads it supervises will be + killed. + * Child threads can terminate in any order, and memory usage will always + be proportional to the number of *live* supervised threads. + . + One way to think of it is that @supervisors@ is to @async@ as + @resourcet@ is to @bracket@. + . + Note that this package is EXPERIMENTAL; it needs more careful testing before + I can earnestly recommend relying on it. + . + See the README and module documentation for more information. +homepage: https://github.com/zenhack/haskell-supervisors +bug-reports: https://github.com/zenhack/haskell-supervisors/issues +license: MIT +license-file: LICENSE +author: Ian Denhardt +maintainer: ian@zenhack.net +copyright: 2018 Ian Denhardt +category: Concurrency +build-type: Simple +extra-source-files: + CHANGELOG.md + , README.md + , .gitignore + +common shared-opts + build-depends: + base >=4.11 && <5 + +library + import: shared-opts + exposed-modules: Supervisors + hs-source-dirs: src/ + build-depends: + stm ^>=2.5 + , containers >=0.5.9 && <0.7 + , safe-exceptions ^>= 0.1.7 + , async ^>=2.2.1 + default-language: Haskell2010 + +test-suite tests + import: shared-opts + type: exitcode-stdio-1.0 + main-is: Main.hs + hs-source-dirs: tests/ + build-depends: + supervisors + , hspec >=2.6.0 && <2.8 + default-language: Haskell2010 + +source-repository head + type: git + branch: master + location: https://github.com/zenhack/haskell-supervisors.git From 17a6bc6cb783085c6d546921e3f08aa1129a4784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Thu, 13 Nov 2025 21:28:53 +0800 Subject: [PATCH 49/60] fix accessor dropping common stanza map when non it is not required --- .../Types/GenericPackageDescription/Lens.hs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs index 2c0ba4d144f..9a9593790e8 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription/Lens.hs @@ -44,16 +44,24 @@ import Distribution.Version (Version, VersionRange) type DependencyTree a = CondTree ConfVar [Dependency] a +-- Merging drops commonStanzas! +-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- +-- When using an the bidirectional PatternSynonym 'GenericPackageDescription' and its accessors, +-- commonStanzas is filled with mempty. +-- +-- When there's no specific reason to use merging pattern accessors, use the internal one! + packageDescription :: Lens' GenericPackageDescription PackageDescription -packageDescription f s = fmap (\x -> s{T.packageDescription = x}) (f (T.packageDescription s)) +packageDescription f s = fmap (\x -> s{T.packageDescriptionInternal = x}) (f (T.packageDescriptionInternal s)) {-# INLINE packageDescription #-} gpdScannedVersion :: Lens' GenericPackageDescription (Maybe Version) -gpdScannedVersion f s = fmap (\x -> s{T.gpdScannedVersion = x}) (f (T.gpdScannedVersion s)) +gpdScannedVersion f s = fmap (\x -> s{T.gpdScannedVersionInternal = x}) (f (T.gpdScannedVersionInternal s)) {-# INLINE gpdScannedVersion #-} genPackageFlags :: Lens' GenericPackageDescription [PackageFlag] -genPackageFlags f s = fmap (\x -> s{T.genPackageFlags = x}) (f (T.genPackageFlags s)) +genPackageFlags f s = fmap (\x -> s{T.genPackageFlagsInternal = x}) (f (T.genPackageFlagsInternal s)) {-# INLINE genPackageFlags #-} gpdCommonStanzas :: Lens' GenericPackageDescription (Map ImportName (DependencyTree (T.WithImports BuildInfo))) From 928c836ca7c3ad33644507cba78d2e276c8b82fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 14 Nov 2025 08:52:04 +0800 Subject: [PATCH 50/60] test: update expected --- .../regressions/supervisors-0.1.expr | 390 ++++++++++++++++++ .../regressions/supervisors-0.1.format | 65 +++ 2 files changed, 455 insertions(+) create mode 100644 Cabal-tests/tests/ParserTests/regressions/supervisors-0.1.expr create mode 100644 Cabal-tests/tests/ParserTests/regressions/supervisors-0.1.format diff --git a/Cabal-tests/tests/ParserTests/regressions/supervisors-0.1.expr b/Cabal-tests/tests/ParserTests/regressions/supervisors-0.1.expr new file mode 100644 index 00000000000..e51065a71da --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/supervisors-0.1.expr @@ -0,0 +1,390 @@ +GenericPackageDescription' { + packageDescriptionInternal = + PackageDescription { + specVersion = CabalSpecV2_2, + package = PackageIdentifier { + pkgName = PackageName + "supervisors", + pkgVersion = mkVersion + [0, 2, 1, 0]}, + licenseRaw = Left + (License + (ELicense + (ELicenseId MIT) + Nothing)), + licenseFiles = [ + SymbolicPath "LICENSE"], + copyright = "2018 Ian Denhardt", + maintainer = "ian@zenhack.net", + author = "Ian Denhardt", + stability = "Experimental", + testedWith = [], + homepage = + "https://github.com/zenhack/haskell-supervisors", + pkgUrl = "", + bugReports = + "https://github.com/zenhack/haskell-supervisors/issues", + sourceRepos = [ + SourceRepo { + repoKind = RepoHead, + repoType = Just + (KnownRepoType Git), + repoLocation = Just + "https://github.com/zenhack/haskell-supervisors.git", + repoModule = Nothing, + repoBranch = Just "master", + repoTag = Nothing, + repoSubdir = Nothing}], + synopsis = + "Monitor groups of threads with non-hierarchical lifetimes.", + description = + concat + [ + "The @supervisors@ package provides a useful abstraction for managing the\n", + "groups of Haskell threads, which may not have a strictly hierarchical\n", + "structure to their lifetimes.\n", + "\n", + "Concretely, the library provides a `Supervisor` construct, which can be\n", + "used to safely spawn threads while guaranteeing that:\n", + "\n", + "* When the supervisor is killed, all of the threads it supervises will be\n", + "killed.\n", + "* Child threads can terminate in any order, and memory usage will always\n", + "be proportional to the number of *live* supervised threads.\n", + "\n", + "One way to think of it is that @supervisors@ is to @async@ as\n", + "@resourcet@ is to @bracket@.\n", + "\n", + "Note that this package is EXPERIMENTAL; it needs more careful testing before\n", + "I can earnestly recommend relying on it.\n", + "\n", + "See the README and module documentation for more information."], + category = "Concurrency", + customFieldsPD = [], + buildTypeRaw = Just Simple, + setupBuildInfo = Nothing, + library = Nothing, + subLibraries = [], + executables = [], + foreignLibs = [], + testSuites = [], + benchmarks = [], + dataFiles = [], + dataDir = SymbolicPath ".", + extraSrcFiles = [ + SymbolicPath "CHANGELOG.md", + SymbolicPath "README.md", + SymbolicPath ".gitignore"], + extraTmpFiles = [], + extraDocFiles = [], + extraFiles = []}, + gpdScannedVersionInternal = + Nothing, + genPackageFlagsInternal = [], + gpdCommonStanzas = Map.fromList + [ + _×_ + "shared-opts" + CondNode { + condTreeData = WithImports { + getImportNames = [], + unImportNames = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 11])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 11])) + (EarlierVersion + (mkVersion [5]))) + mainLibSet], + condTreeComponents = []}], + condLibraryUnmerged = Just + CondNode { + condTreeData = WithImports { + getImportNames = [ + "shared-opts"], + unImportNames = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "Supervisors"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "src/"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "stm") + (MajorBoundVersion + (mkVersion [2, 5])) + mainLibSet, + Dependency + (PackageName "containers") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 5, 9])) + (EarlierVersion + (mkVersion [0, 7]))) + mainLibSet, + Dependency + (PackageName "safe-exceptions") + (MajorBoundVersion + (mkVersion [0, 1, 7])) + mainLibSet, + Dependency + (PackageName "async") + (MajorBoundVersion + (mkVersion [2, 2, 1])) + mainLibSet], + mixins = []}}}, + condTreeConstraints = [ + Dependency + (PackageName "stm") + (MajorBoundVersion + (mkVersion [2, 5])) + mainLibSet, + Dependency + (PackageName "containers") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [0, 5, 9])) + (EarlierVersion + (mkVersion [0, 7]))) + mainLibSet, + Dependency + (PackageName "safe-exceptions") + (MajorBoundVersion + (mkVersion [0, 1, 7])) + mainLibSet, + Dependency + (PackageName "async") + (MajorBoundVersion + (mkVersion [2, 2, 1])) + mainLibSet], + condTreeComponents = []}, + condSubLibrariesUnmerged = [], + condForeignLibsUnmerged = [], + condExecutablesUnmerged = [], + condTestSuitesUnmerged = [ + _×_ + (UnqualComponentName "tests") + CondNode { + condTreeData = WithImports { + getImportNames = [ + "shared-opts"], + unImportNames = + TestSuiteStanza { + _testStanzaTestType = Just + (TestTypeExe + (mkVersion [1, 0])), + _testStanzaMainIs = Just + (SymbolicPath "Main.hs"), + _testStanzaTestModule = Nothing, + _testStanzaBuildInfo = + BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [ + SymbolicPath "tests/"], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "supervisors") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hspec") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 6, 0])) + (EarlierVersion + (mkVersion [2, 8]))) + mainLibSet], + mixins = []}, + _testStanzaCodeGenerators = [ + ]}}, + condTreeConstraints = [ + Dependency + (PackageName "supervisors") + (OrLaterVersion (mkVersion [0])) + mainLibSet, + Dependency + (PackageName "hspec") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [2, 6, 0])) + (EarlierVersion + (mkVersion [2, 8]))) + mainLibSet], + condTreeComponents = []}], + condBenchmarksUnmerged = []} diff --git a/Cabal-tests/tests/ParserTests/regressions/supervisors-0.1.format b/Cabal-tests/tests/ParserTests/regressions/supervisors-0.1.format new file mode 100644 index 00000000000..036bc904e3f --- /dev/null +++ b/Cabal-tests/tests/ParserTests/regressions/supervisors-0.1.format @@ -0,0 +1,65 @@ +cabal-version: 2.2 +name: supervisors +version: 0.2.1.0 +license: MIT +license-file: LICENSE +copyright: 2018 Ian Denhardt +maintainer: ian@zenhack.net +author: Ian Denhardt +stability: Experimental +homepage: https://github.com/zenhack/haskell-supervisors +bug-reports: https://github.com/zenhack/haskell-supervisors/issues +synopsis: Monitor groups of threads with non-hierarchical lifetimes. +description: + The @supervisors@ package provides a useful abstraction for managing the + groups of Haskell threads, which may not have a strictly hierarchical + structure to their lifetimes. + . + Concretely, the library provides a `Supervisor` construct, which can be + used to safely spawn threads while guaranteeing that: + . + * When the supervisor is killed, all of the threads it supervises will be + killed. + * Child threads can terminate in any order, and memory usage will always + be proportional to the number of *live* supervised threads. + . + One way to think of it is that @supervisors@ is to @async@ as + @resourcet@ is to @bracket@. + . + Note that this package is EXPERIMENTAL; it needs more careful testing before + I can earnestly recommend relying on it. + . + See the README and module documentation for more information. + +category: Concurrency +build-type: Simple +extra-source-files: + CHANGELOG.md + README.md + .gitignore + +source-repository head + type: git + location: https://github.com/zenhack/haskell-supervisors.git + branch: master + +library + exposed-modules: Supervisors + hs-source-dirs: src/ + default-language: Haskell2010 + build-depends: + base >=4.11 && <5, + stm ^>=2.5, + containers >=0.5.9 && <0.7, + safe-exceptions ^>=0.1.7, + async ^>=2.2.1 + +test-suite tests + type: exitcode-stdio-1.0 + main-is: Main.hs + hs-source-dirs: tests/ + default-language: Haskell2010 + build-depends: + base >=4.11 && <5, + supervisors, + hspec >=2.6.0 && <2.8 From 6f81ea847757b591cad45675853dc0e0810bf7fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 14 Nov 2025 08:53:27 +0800 Subject: [PATCH 51/60] tests: improve import list --- Cabal-tests/tests/ParserTests.hs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Cabal-tests/tests/ParserTests.hs b/Cabal-tests/tests/ParserTests.hs index 43174271c4f..2934444e9a7 100644 --- a/Cabal-tests/tests/ParserTests.hs +++ b/Cabal-tests/tests/ParserTests.hs @@ -16,16 +16,15 @@ import Data.Maybe (isNothing) import Distribution.Fields (pwarning) import Distribution.PackageDescription ( GenericPackageDescription - ( packageDescription - , gpdScannedVersion - , genPackageFlags - , condLibrary - , condSubLibraries - , condForeignLibs - , condExecutables - , condTestSuites - , condBenchmarks - ) + , packageDescription + , gpdScannedVersion + , genPackageFlags + , condLibrary + , condSubLibraries + , condForeignLibs + , condExecutables + , condTestSuites + , condBenchmarks ) import Distribution.PackageDescription.Parsec (parseGenericPackageDescription) import Distribution.PackageDescription.PrettyPrint (showGenericPackageDescription) From 1da8c792b5963c923bd956eb7b78c3448da5819f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 14 Nov 2025 08:54:42 +0800 Subject: [PATCH 52/60] tests: remove unused tuple instance --- Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs b/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs index 39ec8ab9f05..f7e7ca5b7b6 100644 --- a/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs +++ b/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs @@ -56,10 +56,6 @@ instance ToExpr (SymbolicPathX allowAbs from to) instance ToExpr a => ToExpr (InstallDirs a) --- For gpd and its accessors --- Upstream only supports up to quintuples -instance (ToExpr a, ToExpr b, ToExpr c, ToExpr d, ToExpr e, ToExpr f, ToExpr g) => ToExpr (a, b, c, d, e, f, g) - instance ToExpr AbiDependency instance ToExpr AbiHash instance ToExpr Arch From 54af5f717e3e2305e293c8786364c4d82f211cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 14 Nov 2025 10:43:00 +0800 Subject: [PATCH 53/60] tests: refactor accessor test This guarantees that unmerged internal representation is correct --- Cabal-tests/tests/ParserTests.hs | 68 +++++- .../accessors/library-merging.cabal | 30 +++ ...ibrary-merging.condBenchmarksUnmerged.expr | 1 + ...brary-merging.condExecutablesUnmerged.expr | 1 + ...brary-merging.condForeignLibsUnmerged.expr | 1 + .../library-merging.condLibraryUnmerged.expr | 153 ++++++++++++ ...rary-merging.condSubLibrariesUnmerged.expr | 1 + ...ibrary-merging.condTestSuitesUnmerged.expr | 1 + .../library-merging.gpdCommonStanzas.expr | 225 ++++++++++++++++++ 9 files changed, 469 insertions(+), 12 deletions(-) create mode 100644 Cabal-tests/tests/ParserTests/accessors/library-merging.cabal create mode 100644 Cabal-tests/tests/ParserTests/accessors/library-merging.condBenchmarksUnmerged.expr create mode 100644 Cabal-tests/tests/ParserTests/accessors/library-merging.condExecutablesUnmerged.expr create mode 100644 Cabal-tests/tests/ParserTests/accessors/library-merging.condForeignLibsUnmerged.expr create mode 100644 Cabal-tests/tests/ParserTests/accessors/library-merging.condLibraryUnmerged.expr create mode 100644 Cabal-tests/tests/ParserTests/accessors/library-merging.condSubLibrariesUnmerged.expr create mode 100644 Cabal-tests/tests/ParserTests/accessors/library-merging.condTestSuitesUnmerged.expr create mode 100644 Cabal-tests/tests/ParserTests/accessors/library-merging.gpdCommonStanzas.expr diff --git a/Cabal-tests/tests/ParserTests.hs b/Cabal-tests/tests/ParserTests.hs index 660b303d288..162d4b6348c 100644 --- a/Cabal-tests/tests/ParserTests.hs +++ b/Cabal-tests/tests/ParserTests.hs @@ -19,12 +19,19 @@ import Distribution.PackageDescription , packageDescription , gpdScannedVersion , genPackageFlags + , gpdCommonStanzas , condLibrary , condSubLibraries , condForeignLibs , condExecutables , condTestSuites , condBenchmarks + , condLibraryUnmerged + , condSubLibrariesUnmerged + , condForeignLibsUnmerged + , condExecutablesUnmerged + , condTestSuitesUnmerged + , condBenchmarksUnmerged ) import Distribution.PackageDescription.Parsec (parseGenericPackageDescription) import Distribution.PackageDescription.PrettyPrint (showGenericPackageDescription) @@ -52,6 +59,7 @@ import Data.TreeDiff.Instances.Cabal () tests :: TestTree tests = testGroup "parsec tests" [ regressionTests + , accessorsTests , warningTests , errorTests , ipiTests @@ -161,6 +169,42 @@ errorTest fp = cabalGoldenTest fp correct $ do input = "tests" "ParserTests" "errors" fp correct = replaceExtension input "errors" +------------------------------------------------------------------------------- +-- Merging accessors tests +------------------------------------------------------------------------------- + +accessorsTests :: TestTree +accessorsTests = testGroup "accessors" + [ +#ifdef MIN_VERSION_tree_diff + accessorsGoldenTest "library-merging.cabal" +#endif + ] + +#ifdef MIN_VERSION_tree_diff +accessorsGoldenTest :: FilePath -> TestTree +accessorsGoldenTest fp = + let go label f = ediffGolden goldenTest label exprFile $ do + contents <- BS.readFile input + let res = withSource (PCabalFile (fp, contents)) $ parseGenericPackageDescription contents + let (_, x) = runParseResult res + case x of + Right gpd -> pure (toExpr $ f gpd) + Left (_, errs) -> fail $ unlines $ "ERROR" : map (showPErrorWithSource . fmap renderCabalFileSource) (NE.toList errs) + where + input = "tests" "ParserTests" "accessors" fp + exprFile = replaceExtension input (label <> ".expr") + in testGroup "accessors" + [ go "gpdCommonStanzas" gpdCommonStanzas + , go "condLibraryUnmerged" condLibraryUnmerged + , go "condSubLibrariesUnmerged" condSubLibrariesUnmerged + , go "condForeignLibsUnmerged" condForeignLibsUnmerged + , go "condExecutablesUnmerged" condExecutablesUnmerged + , go "condTestSuitesUnmerged" condTestSuitesUnmerged + , go "condBenchmarksUnmerged" condBenchmarksUnmerged + ] +#endif + ------------------------------------------------------------------------------- -- Regressions ------------------------------------------------------------------------------- @@ -255,18 +299,18 @@ treeDiffGoldenTest fp = where input = "tests" "ParserTests" "regressions" fp exprFile = replaceExtension input (label <> ".expr") - in testGroup "expr" - [ go "packageDescription" packageDescription - , go "gpdScannedVersion" gpdScannedVersion - , go "genPackageFlags" genPackageFlags - -- Test accessors because they encapsulate the merging behaviour - , go "condLibrary" condLibrary - , go "condSubLibraries" condSubLibraries - , go "condForeignLibs" condForeignLibs - , go "condExecutables" condExecutables - , go "condTestSuites" condTestSuites - , go "condBenchmarks" condBenchmarks - ] + in testGroup "expr" + [ go "packageDescription" packageDescription + , go "gpdScannedVersion" gpdScannedVersion + , go "genPackageFlags" genPackageFlags + -- Test accessors because they encapsulate the merging behaviour + , go "condLibrary" condLibrary + , go "condSubLibraries" condSubLibraries + , go "condForeignLibs" condForeignLibs + , go "condExecutables" condExecutables + , go "condTestSuites" condTestSuites + , go "condBenchmarks" condBenchmarks + ] #endif formatRoundTripTest :: FilePath -> TestTree diff --git a/Cabal-tests/tests/ParserTests/accessors/library-merging.cabal b/Cabal-tests/tests/ParserTests/accessors/library-merging.cabal new file mode 100644 index 00000000000..6f8ed6ad6c0 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/accessors/library-merging.cabal @@ -0,0 +1,30 @@ +cabal-version: 3.0 +name: Library-merging +version: 0 +synopsis: Tests the correctness of deferred merging in imports +build-type: Simple + +flag foo + manual: True + default: True + +common windows + if os(windows) + build-depends: Win32 + +common deps + import: windows + buildable: True + build-depends: + base >=4.10 && <4.11, + containers + +library + if flag(foo) + import: deps + + default-language: Haskell2010 + exposed-modules: ElseIf + + build-depends: + ghc-prim diff --git a/Cabal-tests/tests/ParserTests/accessors/library-merging.condBenchmarksUnmerged.expr b/Cabal-tests/tests/ParserTests/accessors/library-merging.condBenchmarksUnmerged.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/accessors/library-merging.condBenchmarksUnmerged.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/accessors/library-merging.condExecutablesUnmerged.expr b/Cabal-tests/tests/ParserTests/accessors/library-merging.condExecutablesUnmerged.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/accessors/library-merging.condExecutablesUnmerged.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/accessors/library-merging.condForeignLibsUnmerged.expr b/Cabal-tests/tests/ParserTests/accessors/library-merging.condForeignLibsUnmerged.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/accessors/library-merging.condForeignLibsUnmerged.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/accessors/library-merging.condLibraryUnmerged.expr b/Cabal-tests/tests/ParserTests/accessors/library-merging.condLibraryUnmerged.expr new file mode 100644 index 00000000000..52e6ffc5359 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/accessors/library-merging.condLibraryUnmerged.expr @@ -0,0 +1,153 @@ +Just + CondNode { + condTreeData = WithImports { + getImportNames = [], + unImportNames = Library { + libName = LMainLibName, + exposedModules = [ + ModuleName "ElseIf"], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Just + Haskell2010, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}}, + condTreeConstraints = [ + Dependency + (PackageName "ghc-prim") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (PackageFlag (FlagName "foo"))`, + condBranchIfTrue = CondNode { + condTreeData = WithImports { + getImportNames = ["deps"], + unImportNames = Library { + libName = LMainLibName, + exposedModules = [], + reexportedModules = [], + signatures = [], + libExposed = True, + libVisibility = + LibraryVisibilityPublic, + libBuildInfo = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}}, + condTreeConstraints = [], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]} diff --git a/Cabal-tests/tests/ParserTests/accessors/library-merging.condSubLibrariesUnmerged.expr b/Cabal-tests/tests/ParserTests/accessors/library-merging.condSubLibrariesUnmerged.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/accessors/library-merging.condSubLibrariesUnmerged.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/accessors/library-merging.condTestSuitesUnmerged.expr b/Cabal-tests/tests/ParserTests/accessors/library-merging.condTestSuitesUnmerged.expr new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/Cabal-tests/tests/ParserTests/accessors/library-merging.condTestSuitesUnmerged.expr @@ -0,0 +1 @@ +[] diff --git a/Cabal-tests/tests/ParserTests/accessors/library-merging.gpdCommonStanzas.expr b/Cabal-tests/tests/ParserTests/accessors/library-merging.gpdCommonStanzas.expr new file mode 100644 index 00000000000..2ba0b4c17fa --- /dev/null +++ b/Cabal-tests/tests/ParserTests/accessors/library-merging.gpdCommonStanzas.expr @@ -0,0 +1,225 @@ +Map.fromList + [ + _×_ + "deps" + CondNode { + condTreeData = WithImports { + getImportNames = ["windows"], + unImportNames = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "base") + (IntersectVersionRanges + (OrLaterVersion + (mkVersion [4, 10])) + (EarlierVersion + (mkVersion [4, 11]))) + mainLibSet, + Dependency + (PackageName "containers") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + _×_ + "windows" + CondNode { + condTreeData = WithImports { + getImportNames = [], + unImportNames = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [], + mixins = []}}, + condTreeConstraints = [], + condTreeComponents = [ + CondBranch { + condBranchCondition = + `Var (OS Windows)`, + condBranchIfTrue = CondNode { + condTreeData = WithImports { + getImportNames = [], + unImportNames = BuildInfo { + buildable = True, + buildTools = [], + buildToolDepends = [], + cppOptions = [], + asmOptions = [], + cmmOptions = [], + ccOptions = [], + cxxOptions = [], + jsppOptions = [], + ldOptions = [], + hsc2hsOptions = [], + pkgconfigDepends = [], + frameworks = [], + extraFrameworkDirs = [], + asmSources = [], + cmmSources = [], + cSources = [], + cxxSources = [], + jsSources = [], + hsSourceDirs = [], + otherModules = [], + virtualModules = [], + autogenModules = [], + defaultLanguage = Nothing, + otherLanguages = [], + defaultExtensions = [], + otherExtensions = [], + oldExtensions = [], + extraLibs = [], + extraLibsStatic = [], + extraGHCiLibs = [], + extraBundledLibs = [], + extraLibFlavours = [], + extraDynLibFlavours = [], + extraLibDirs = [], + extraLibDirsStatic = [], + includeDirs = [], + includes = [], + autogenIncludes = [], + installIncludes = [], + options = PerCompilerFlavor + [] + [], + profOptions = PerCompilerFlavor + [] + [], + sharedOptions = + PerCompilerFlavor [] [], + profSharedOptions = + PerCompilerFlavor [] [], + staticOptions = + PerCompilerFlavor [] [], + customFieldsBI = [], + targetBuildDepends = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + mixins = []}}, + condTreeConstraints = [ + Dependency + (PackageName "Win32") + (OrLaterVersion (mkVersion [0])) + mainLibSet], + condTreeComponents = []}, + condBranchIfFalse = Nothing}]}] From f9eaae184c26505f0fb5806cd28256fec43fab85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 14 Nov 2025 12:44:50 +0800 Subject: [PATCH 54/60] tests(UnitTests): update expected --- .../Types/GenericPackageDescription.hs | 18 ++++++++++-------- .../UnitTests/Distribution/Utils/Structured.hs | 4 ++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Cabal-tests/tests/UnitTests/Distribution/Types/GenericPackageDescription.hs b/Cabal-tests/tests/UnitTests/Distribution/Types/GenericPackageDescription.hs index b8653abd38f..4554df8028e 100644 --- a/Cabal-tests/tests/UnitTests/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-tests/tests/UnitTests/Distribution/Types/GenericPackageDescription.hs @@ -17,14 +17,16 @@ tests = gpdFields :: [(String, GenericPackageDescription -> GenericPackageDescription)] gpdFields = - [ ("packageDescription", \gpd -> gpd { packageDescription = undefined }) - , ("genPackageFlags", \gpd -> gpd { genPackageFlags = undefined }) - , ("condLibrary", \gpd -> gpd { condLibrary = undefined }) - , ("condSubLibraries", \gpd -> gpd { condSubLibraries = undefined }) - , ("condForeignLibs", \gpd -> gpd { condForeignLibs = undefined }) - , ("condExecutables", \gpd -> gpd { condExecutables = undefined }) - , ("condTestSuites", \gpd -> gpd { condTestSuites = undefined }) - , ("condBenchmarks", \gpd -> gpd { condBenchmarks = undefined }) + [ ("packageDescriptionInternal", \gpd -> gpd { packageDescriptionInternal = undefined }) + , ("gpdScannedVersionInternal", \gpd -> gpd { gpdScannedVersionInternal = undefined }) + , ("genPackageFlagsInternal", \gpd -> gpd { genPackageFlagsInternal = undefined }) + , ("gpdCommonStanzas", \gpd -> gpd { gpdCommonStanzas = undefined }) + , ("condLibraryUnmerged", \gpd -> gpd { condLibraryUnmerged = undefined }) + , ("condSubLibrariesUnmerged", \gpd -> gpd { condSubLibrariesUnmerged = undefined }) + , ("condForeignLibsUnmerged", \gpd -> gpd { condForeignLibsUnmerged = undefined }) + , ("condExecutablesUnmerged", \gpd -> gpd { condExecutablesUnmerged = undefined }) + , ("condTestSuitesUnmerged", \gpd -> gpd { condTestSuitesUnmerged = undefined }) + , ("condBenchmarksUnmerged", \gpd -> gpd { condBenchmarksUnmerged = undefined }) ] gpdDeepseq :: Assertion diff --git a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs index 1c95c6b3017..6be8ff30239 100644 --- a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs +++ b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs @@ -29,8 +29,8 @@ md5Check proxy md5Int = structureHash proxy @?= md5FromInteger md5Int md5CheckGenericPackageDescription :: Proxy GenericPackageDescription -> Assertion md5CheckGenericPackageDescription proxy = md5Check proxy - 0x13fd82c1f4e91d1abb0036b684e7a93a + 0xf530c0714e09f028a58ab1527d235e0f md5CheckLocalBuildInfo :: Proxy LocalBuildInfo -> Assertion md5CheckLocalBuildInfo proxy = md5Check proxy - 0x981e9c8288d248b980c0fb0a2fbcf0a9 + 0xed69bb9372239b67b14b3e4dd3597c56 From 4fadd83e35bc6d29a5086604bcc02e7d752c5d98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 14 Nov 2025 12:56:28 +0800 Subject: [PATCH 55/60] run fourmolu --- .../src/Distribution/PackageDescription/FieldGrammar.hs | 2 +- .../src/Distribution/PackageDescription/Parsec.hs | 8 ++++---- .../src/Distribution/Types/GenericPackageDescription.hs | 2 +- Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index 0a13ebd5820..f6f9add3551 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -24,7 +24,7 @@ module Distribution.PackageDescription.FieldGrammar -- * Test suite , testSuiteFieldGrammar - -- * Benchmark + -- * Benchmark , benchmarkFieldGrammar -- * Field grammars diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs index 476208f0599..4b605c93268 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs @@ -342,8 +342,8 @@ goSections specVer fieldPositions = do -- Patching depends on merging, validation depends on patching let testStanza' :: CondTree ConfVar [Dependency] TestSuiteStanza testStanza' = - mergeTestSuiteStanza commonStanzas testStanza - & fmap (patchTestSuiteType specVer) + mergeTestSuiteStanza commonStanzas testStanza + & fmap (patchTestSuiteType specVer) _ok <- lift $ traverse (validateTestSuite pos) testStanza' let validated = mapTreeData convertTestSuite testStanza' @@ -378,8 +378,8 @@ goSections specVer fieldPositions = do -- Patching depends on merging, validation depends on patching let benchStanza' :: CondTree ConfVar [Dependency] BenchmarkStanza benchStanza' = - mergeBenchmarkStanza commonStanzas benchStanza - & fmap (patchBenchmarkType specVer) + mergeBenchmarkStanza commonStanzas benchStanza + & fmap (patchBenchmarkType specVer) _ok <- lift $ traverse (validateBenchmark pos . unImportNames) benchStanza let validated = mapTreeData convertBenchmark benchStanza' diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index 937d8160952..8990510f8f1 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -266,7 +266,7 @@ condTestSuites' -> [(UnqualComponentName, DependencyTree TestSuite)] condTestSuites' gpd = mergeTestSuiteStanza' (gpdCommonStanzas gpd) (condTestSuitesUnmerged gpd) - & (map . fmap . mapTreeData) (convertTestSuite . patchTestSuiteType specVer) + & (map . fmap . mapTreeData) (convertTestSuite . patchTestSuiteType specVer) where specVer :: CabalSpecVersion specVer = specVersion . packageDescriptionInternal $ gpd diff --git a/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs b/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs index c7b3c731197..9e47a409b03 100644 --- a/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs +++ b/Cabal-syntax/src/Distribution/Types/TestSuiteStanza.hs @@ -14,13 +14,13 @@ import Distribution.Compat.Prelude import Prelude () import Distribution.CabalSpecVersion +import Distribution.Fields.ParseResult import Distribution.ModuleName (ModuleName) +import Distribution.Parsec +import Distribution.Pretty (prettyShow) import Distribution.Types.BuildInfo import qualified Distribution.Types.BuildInfo.Lens as L import Distribution.Types.TestSuite -import Distribution.Parsec -import Distribution.Fields.ParseResult -import Distribution.Pretty (prettyShow) import Distribution.Types.TestSuiteInterface import Distribution.Types.TestType import Distribution.Utils.Path From 824495d53204d8d621f3897ca9f96329b447b2e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 14 Nov 2025 12:56:38 +0800 Subject: [PATCH 56/60] remove FieldGrammar export {TestSuite,Benchmark}Stanza --- .../src/Distribution/PackageDescription/FieldGrammar.hs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs index f6f9add3551..f08db2bc58f 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs @@ -36,12 +36,6 @@ module Distribution.PackageDescription.FieldGrammar , formatOtherExtensions , formatOtherModules - -- ** Lenses - , benchmarkStanzaBenchmarkType - , benchmarkStanzaMainIs - , benchmarkStanzaBenchmarkModule - , benchmarkStanzaBuildInfo - -- * Flag , flagFieldGrammar From a8944c3fea1bb2ed2a803cac262fffe9b779de88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 14 Nov 2025 13:00:29 +0800 Subject: [PATCH 57/60] tests: use @? operator --- Cabal-tests/tests/ParserTests.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cabal-tests/tests/ParserTests.hs b/Cabal-tests/tests/ParserTests.hs index 2934444e9a7..ab036fe93f8 100644 --- a/Cabal-tests/tests/ParserTests.hs +++ b/Cabal-tests/tests/ParserTests.hs @@ -10,7 +10,7 @@ import Test.Tasty import Test.Tasty.Golden.Advanced (goldenTest) import Test.Tasty.HUnit -import Control.Monad (unless, void) +import Control.Monad (void) import Data.Algorithm.Diff (PolyDiff (..), getGroupedDiff) import Data.Maybe (isNothing) import Distribution.Fields (pwarning) @@ -276,15 +276,15 @@ formatRoundTripTest fp = testCase "roundtrip" $ do y <- parse (toUTF8BS contents') let checkField field = - unless (field x == field y) $ + field x == field y @? {- FOURMOLU_DISABLE -} #ifdef MIN_VERSION_tree_diff - assertFailure $ unlines + unlines [ "re-parsed doesn't match" , show $ ansiWlEditExpr $ ediff x y ] #else - assertFailure $ unlines + unlines [ "re-parsed doesn't match" , "expected" , show x From aa8178c5bdd329ffc6c5201e4ba81bb31109ba81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 15 Nov 2025 12:06:19 +0800 Subject: [PATCH 58/60] test(HackageTests): make assertion on merging accessor fields --- Cabal-tests/tests/HackageTests.hs | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/Cabal-tests/tests/HackageTests.hs b/Cabal-tests/tests/HackageTests.hs index 1265c6cb13e..ddc35545014 100644 --- a/Cabal-tests/tests/HackageTests.hs +++ b/Cabal-tests/tests/HackageTests.hs @@ -23,6 +23,17 @@ import Data.Monoid (Sum (..)) import Distribution.PackageDescription.Check (PackageCheck (..), checkPackage) import Distribution.PackageDescription.PrettyPrint (showGenericPackageDescription) import Distribution.PackageDescription.Quirks (patchQuirks) +import Distribution.PackageDescription + ( packageDescription + , gpdScannedVersion + , genPackageFlags + , condLibrary + , condSubLibraries + , condForeignLibs + , condExecutables + , condTestSuites + , condBenchmarks + ) import Distribution.Simple.Utils (fromUTF8BS, toUTF8BS) import Distribution.Fields.ParseResult import Distribution.Parsec.Source @@ -257,7 +268,20 @@ roundtripTest testFieldsTransform fpath bs = do let y = y0 & L.packageDescription . L.description .~ mempty let x = x0 & L.packageDescription . L.description .~ mempty - assertEqual' bs' x y + -- Due to the imports being merged, the structural comparison will fail + -- Instead, we check the equality after merging + let checkField field = assertEqual' bs' (field x) (field y) + sequence_ + [ checkField packageDescription + , checkField gpdScannedVersion + , checkField genPackageFlags + , checkField condLibrary + , checkField condSubLibraries + , checkField condForeignLibs + , checkField condExecutables + , checkField condTestSuites + , checkField condBenchmarks + ] -- fromParsecField, "shallow" parser/pretty roundtrip when testFieldsTransform $ From 13502a7410f0f8919500c1b63540542c0306028c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 15 Nov 2025 12:57:00 +0800 Subject: [PATCH 59/60] fix(GenericPackageDescription): "pattern" keyword deprecated after 914 --- .../src/Distribution/Types/GenericPackageDescription.hs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs index 8990510f8f1..910e127078b 100644 --- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs @@ -1,13 +1,21 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ViewPatterns #-} +#if __GLASGOW_HASKELL__ >= 914 +{-# LANGUAGE ExplicitNamespaces #-} +#endif module Distribution.Types.GenericPackageDescription ( GenericPackageDescription (..) +#if __GLASGOW_HASKELL__ >= 914 + , data GenericPackageDescription +#else , pattern GenericPackageDescription +#endif , emptyGenericPackageDescription , mergeImports From f371b42dab0bb22db88478cf01402e1177ddeab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 15 Nov 2025 15:40:49 +0800 Subject: [PATCH 60/60] test(ParserTests): correct comment of the nature of the test --- Cabal-tests/tests/ParserTests.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cabal-tests/tests/ParserTests.hs b/Cabal-tests/tests/ParserTests.hs index c21626705cb..00b11872a3b 100644 --- a/Cabal-tests/tests/ParserTests.hs +++ b/Cabal-tests/tests/ParserTests.hs @@ -170,7 +170,7 @@ errorTest fp = cabalGoldenTest fp correct $ do correct = replaceExtension input "errors" ------------------------------------------------------------------------------- --- Merging accessors tests +-- Internal accessors tests ------------------------------------------------------------------------------- accessorsTests :: TestTree