Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Cabal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
fa74c1b8
Unverified
Commit
fa74c1b8
authored
May 12, 2020
by
Oleg Grenrus
Committed by
GitHub
May 12, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6789 from phadej/Cabal-tree-diff
Create Cabal-tree-diff package
parents
22405ee1
6748dce7
Changes
58
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
58 changed files
with
2933 additions
and
1695 deletions
+2933
-1695
Cabal/Cabal-QuickCheck/Cabal-QuickCheck.cabal
Cabal/Cabal-QuickCheck/Cabal-QuickCheck.cabal
+4
-2
Cabal/Cabal-QuickCheck/src/Test/QuickCheck/GenericArbitrary.hs
.../Cabal-QuickCheck/src/Test/QuickCheck/GenericArbitrary.hs
+49
-0
Cabal/Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs
...l/Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs
+2
-39
Cabal/Cabal-tree-diff/Cabal-tree-diff.cabal
Cabal/Cabal-tree-diff/Cabal-tree-diff.cabal
+21
-0
Cabal/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs
Cabal/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs
+136
-0
Cabal/Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalLanguage.hs
...al-tree-diff/src/Data/TreeDiff/Instances/CabalLanguage.hs
+2
-2
Cabal/Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalSPDX.hs
.../Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalSPDX.hs
+2
-2
Cabal/Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalVersion.hs
...bal-tree-diff/src/Data/TreeDiff/Instances/CabalVersion.hs
+3
-3
Cabal/Cabal.cabal
Cabal/Cabal.cabal
+12
-14
Cabal/tests/HackageTests.hs
Cabal/tests/HackageTests.hs
+3
-3
Cabal/tests/ParserTests.hs
Cabal/tests/ParserTests.hs
+3
-3
Cabal/tests/ParserTests/ipi/Includes2.expr
Cabal/tests/ParserTests/ipi/Includes2.expr
+20
-14
Cabal/tests/ParserTests/ipi/internal-preprocessor-test.expr
Cabal/tests/ParserTests/ipi/internal-preprocessor-test.expr
+9
-8
Cabal/tests/ParserTests/ipi/issue-2276-ghc-9885.expr
Cabal/tests/ParserTests/ipi/issue-2276-ghc-9885.expr
+75
-29
Cabal/tests/ParserTests/ipi/transformers.expr
Cabal/tests/ParserTests/ipi/transformers.expr
+75
-29
Cabal/tests/ParserTests/regressions/Octree-0.5.expr
Cabal/tests/ParserTests/regressions/Octree-0.5.expr
+96
-60
Cabal/tests/ParserTests/regressions/anynone.expr
Cabal/tests/ParserTests/regressions/anynone.expr
+9
-7
Cabal/tests/ParserTests/regressions/big-version.expr
Cabal/tests/ParserTests/regressions/big-version.expr
+2
-2
Cabal/tests/ParserTests/regressions/common-conditional.expr
Cabal/tests/ParserTests/regressions/common-conditional.expr
+107
-55
Cabal/tests/ParserTests/regressions/common.expr
Cabal/tests/ParserTests/regressions/common.expr
+17
-14
Cabal/tests/ParserTests/regressions/common2.expr
Cabal/tests/ParserTests/regressions/common2.expr
+122
-74
Cabal/tests/ParserTests/regressions/common3.expr
Cabal/tests/ParserTests/regressions/common3.expr
+34
-24
Cabal/tests/ParserTests/regressions/elif.expr
Cabal/tests/ParserTests/regressions/elif.expr
+10
-7
Cabal/tests/ParserTests/regressions/elif2.expr
Cabal/tests/ParserTests/regressions/elif2.expr
+18
-11
Cabal/tests/ParserTests/regressions/encoding-0.8.expr
Cabal/tests/ParserTests/regressions/encoding-0.8.expr
+16
-13
Cabal/tests/ParserTests/regressions/generics-sop.expr
Cabal/tests/ParserTests/regressions/generics-sop.expr
+156
-99
Cabal/tests/ParserTests/regressions/hidden-main-lib.expr
Cabal/tests/ParserTests/regressions/hidden-main-lib.expr
+9
-7
Cabal/tests/ParserTests/regressions/indentation.expr
Cabal/tests/ParserTests/regressions/indentation.expr
+2
-2
Cabal/tests/ParserTests/regressions/indentation2.expr
Cabal/tests/ParserTests/regressions/indentation2.expr
+2
-2
Cabal/tests/ParserTests/regressions/indentation3.expr
Cabal/tests/ParserTests/regressions/indentation3.expr
+2
-2
Cabal/tests/ParserTests/regressions/issue-5055.expr
Cabal/tests/ParserTests/regressions/issue-5055.expr
+31
-21
Cabal/tests/ParserTests/regressions/issue-5846.expr
Cabal/tests/ParserTests/regressions/issue-5846.expr
+44
-30
Cabal/tests/ParserTests/regressions/issue-6083-pkg-pkg.expr
Cabal/tests/ParserTests/regressions/issue-6083-pkg-pkg.expr
+14
-10
Cabal/tests/ParserTests/regressions/issue-774.expr
Cabal/tests/ParserTests/regressions/issue-774.expr
+3
-3
Cabal/tests/ParserTests/regressions/jaeger-flamegraph.expr
Cabal/tests/ParserTests/regressions/jaeger-flamegraph.expr
+166
-78
Cabal/tests/ParserTests/regressions/leading-comma-2.expr
Cabal/tests/ParserTests/regressions/leading-comma-2.expr
+46
-34
Cabal/tests/ParserTests/regressions/leading-comma.expr
Cabal/tests/ParserTests/regressions/leading-comma.expr
+39
-27
Cabal/tests/ParserTests/regressions/libpq1.expr
Cabal/tests/ParserTests/regressions/libpq1.expr
+99
-47
Cabal/tests/ParserTests/regressions/libpq2.expr
Cabal/tests/ParserTests/regressions/libpq2.expr
+99
-47
Cabal/tests/ParserTests/regressions/mixin-1.expr
Cabal/tests/ParserTests/regressions/mixin-1.expr
+43
-18
Cabal/tests/ParserTests/regressions/mixin-2.expr
Cabal/tests/ParserTests/regressions/mixin-2.expr
+43
-18
Cabal/tests/ParserTests/regressions/mixin-3.expr
Cabal/tests/ParserTests/regressions/mixin-3.expr
+29
-17
Cabal/tests/ParserTests/regressions/monad-param.expr
Cabal/tests/ParserTests/regressions/monad-param.expr
+21
-15
Cabal/tests/ParserTests/regressions/multiple-libs-2.expr
Cabal/tests/ParserTests/regressions/multiple-libs-2.expr
+18
-14
Cabal/tests/ParserTests/regressions/noVersion.expr
Cabal/tests/ParserTests/regressions/noVersion.expr
+9
-7
Cabal/tests/ParserTests/regressions/nothing-unicode.expr
Cabal/tests/ParserTests/regressions/nothing-unicode.expr
+3
-4
Cabal/tests/ParserTests/regressions/shake.expr
Cabal/tests/ParserTests/regressions/shake.expr
+855
-474
Cabal/tests/ParserTests/regressions/spdx-1.expr
Cabal/tests/ParserTests/regressions/spdx-1.expr
+1
-2
Cabal/tests/ParserTests/regressions/spdx-2.expr
Cabal/tests/ParserTests/regressions/spdx-2.expr
+1
-2
Cabal/tests/ParserTests/regressions/spdx-3.expr
Cabal/tests/ParserTests/regressions/spdx-3.expr
+1
-2
Cabal/tests/ParserTests/regressions/th-lift-instances.expr
Cabal/tests/ParserTests/regressions/th-lift-instances.expr
+174
-108
Cabal/tests/ParserTests/regressions/version-sets.expr
Cabal/tests/ParserTests/regressions/version-sets.expr
+110
-62
Cabal/tests/ParserTests/regressions/wl-pprint-indef.expr
Cabal/tests/ParserTests/regressions/wl-pprint-indef.expr
+44
-26
cabal-install/cabal-install.cabal.pp
cabal-install/cabal-install.cabal.pp
+2
-1
cabal-install/tests/UnitTests/Distribution/Client/ArbitraryInstances.hs
...tests/UnitTests/Distribution/Client/ArbitraryInstances.hs
+12
-49
cabal-install/tests/UnitTests/Distribution/Client/TreeDiffInstances.hs
.../tests/UnitTests/Distribution/Client/TreeDiffInstances.hs
+4
-50
cabal.project
cabal.project
+2
-1
cabal.project.validate
cabal.project.validate
+2
-1
No files found.
Cabal/Cabal-
quickcheck/Cabal-quickc
heck.cabal
→
Cabal/Cabal-
QuickCheck/Cabal-QuickC
heck.cabal
View file @
fa74c1b8
cabal-version: 2.2
name: Cabal-
quickc
heck
name: Cabal-
QuickC
heck
version: 3.3.0.0
synopsis: QuickCheck instances for types in Cabal
category: Testing
...
...
@@ -15,4 +15,6 @@ library
, Cabal ^>=3.3.0.0
, QuickCheck ^>=2.13.2
exposed-modules: Test.QuickCheck.Instances.Cabal
exposed-modules:
Test.QuickCheck.GenericArbitrary
Test.QuickCheck.Instances.Cabal
Cabal/Cabal-QuickCheck/src/Test/QuickCheck/GenericArbitrary.hs
0 → 100644
View file @
fa74c1b8
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeOperators #-}
module
Test.QuickCheck.GenericArbitrary
(
genericArbitrary
,
GArbitrary
,
)
where
import
GHC.Generics
import
Test.QuickCheck
#
if
!
MIN_VERSION_base
(
4
,
8
,
0
)
import
Control.Applicative
(
pure
,
(
<$>
),
(
<*>
))
#
endif
-- Generic arbitary for non-recursive types
genericArbitrary
::
(
Generic
a
,
GArbitrary
(
Rep
a
))
=>
Gen
a
genericArbitrary
=
fmap
to
garbitrary
class
GArbitrary
f
where
garbitrary
::
Gen
(
f
()
)
class
GArbitrarySum
f
where
garbitrarySum
::
[
Gen
(
f
()
)]
class
GArbitraryProd
f
where
garbitraryProd
::
Gen
(
f
()
)
instance
(
GArbitrarySum
f
,
i
~
D
)
=>
GArbitrary
(
M1
i
c
f
)
where
garbitrary
=
fmap
M1
(
oneof
garbitrarySum
)
instance
(
GArbitraryProd
f
,
i
~
C
)
=>
GArbitrarySum
(
M1
i
c
f
)
where
garbitrarySum
=
[
fmap
M1
garbitraryProd
]
instance
(
GArbitrarySum
f
,
GArbitrarySum
g
)
=>
GArbitrarySum
(
f
:+:
g
)
where
garbitrarySum
=
map
(
fmap
L1
)
garbitrarySum
++
map
(
fmap
R1
)
garbitrarySum
instance
(
GArbitraryProd
f
,
i
~
S
)
=>
GArbitraryProd
(
M1
i
c
f
)
where
garbitraryProd
=
fmap
M1
garbitraryProd
instance
GArbitraryProd
U1
where
garbitraryProd
=
pure
U1
instance
(
GArbitraryProd
f
,
GArbitraryProd
g
)
=>
GArbitraryProd
(
f
:*:
g
)
where
garbitraryProd
=
(
:*:
)
<$>
garbitraryProd
<*>
garbitraryProd
instance
(
Arbitrary
a
)
=>
GArbitraryProd
(
K1
i
a
)
where
garbitraryProd
=
fmap
K1
arbitrary
Cabal/Cabal-
quickc
heck/src/Test/QuickCheck/Instances/Cabal.hs
→
Cabal/Cabal-
QuickC
heck/src/Test/QuickCheck/Instances/Cabal.hs
View file @
fa74c1b8
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module
Test.QuickCheck.Instances.Cabal
()
where
...
...
@@ -11,8 +9,6 @@ import Data.List (intercalate)
import
Distribution.Utils.Generic
(
lowercase
)
import
Test.QuickCheck
import
GHC.Generics
import
Distribution.CabalSpecVersion
import
Distribution.Compiler
import
Distribution.ModuleName
...
...
@@ -32,6 +28,8 @@ import Distribution.Types.VersionRange.Internal
import
Distribution.Verbosity
import
Distribution.Version
import
Test.QuickCheck.GenericArbitrary
#
if
!
MIN_VERSION_base
(
4
,
8
,
0
)
import
Control.Applicative
(
pure
,
(
<$>
),
(
<*>
))
#
endif
...
...
@@ -342,38 +340,3 @@ shortListOf1 :: Int -> Gen a -> Gen [a]
shortListOf1
bound
gen
=
sized
$
\
n
->
do
k
<-
choose
(
1
,
1
`
max
`
((
n
`
div
`
2
)
`
min
`
bound
))
vectorOf
k
gen
-------------------------------------------------------------------------------
-- Generic Arbitrary
-------------------------------------------------------------------------------
-- Generic arbitary for non-recursive types
genericArbitrary
::
(
Generic
a
,
GArbitrary
(
Rep
a
))
=>
Gen
a
genericArbitrary
=
fmap
to
garbitrary
class
GArbitrary
f
where
garbitrary
::
Gen
(
f
()
)
class
GArbitrarySum
f
where
garbitrarySum
::
[
Gen
(
f
()
)]
class
GArbitraryProd
f
where
garbitraryProd
::
Gen
(
f
()
)
instance
(
GArbitrarySum
f
,
i
~
D
)
=>
GArbitrary
(
M1
i
c
f
)
where
garbitrary
=
fmap
M1
(
oneof
garbitrarySum
)
instance
(
GArbitraryProd
f
,
i
~
C
)
=>
GArbitrarySum
(
M1
i
c
f
)
where
garbitrarySum
=
[
fmap
M1
garbitraryProd
]
instance
(
GArbitrarySum
f
,
GArbitrarySum
g
)
=>
GArbitrarySum
(
f
:+:
g
)
where
garbitrarySum
=
map
(
fmap
L1
)
garbitrarySum
++
map
(
fmap
R1
)
garbitrarySum
instance
(
GArbitraryProd
f
,
i
~
S
)
=>
GArbitraryProd
(
M1
i
c
f
)
where
garbitraryProd
=
fmap
M1
garbitraryProd
instance
(
GArbitraryProd
f
,
GArbitraryProd
g
)
=>
GArbitraryProd
(
f
:*:
g
)
where
garbitraryProd
=
liftA2
(
:*:
)
garbitraryProd
garbitraryProd
instance
(
Arbitrary
a
)
=>
GArbitraryProd
(
K1
i
a
)
where
garbitraryProd
=
fmap
K1
arbitrary
Cabal/Cabal-tree-diff/Cabal-tree-diff.cabal
0 → 100644
View file @
fa74c1b8
cabal-version: 2.2
name: Cabal-tree-diff
version: 3.3.0.0
synopsis: QuickCheck instances for types in Cabal
category: Testing
description: Provides tree-diff ToExpr instances for some types in Cabal
library
default-language: Haskell2010
hs-source-dirs: src
ghc-options: -Wall
build-depends:
, base
, Cabal ^>=3.3.0.0
, tree-diff ^>=0.1
exposed-modules: Data.TreeDiff.Instances.Cabal
other-modules:
Data.TreeDiff.Instances.CabalLanguage
Data.TreeDiff.Instances.CabalSPDX
Data.TreeDiff.Instances.CabalVersion
Cabal/
tests/Instances/TreeDiff
.hs
→
Cabal/
Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal
.hs
View file @
fa74c1b8
...
...
@@ -5,39 +5,52 @@
{-# OPTIONS_GHC -fcontext-stack=151 #-}
#
endif
{-# OPTIONS_GHC -fno-warn-orphans #-}
module
Instances.TreeDiff
where
module
Data.TreeDiff.Instances.Cabal
()
where
import
Data.TreeDiff
import
Instances.TreeDiff.
Language
()
import
Instances.TreeDiff.
SPDX
()
import
Instances.TreeDiff.
Version
()
import
Data.TreeDiff.Instances.Cabal
Language
()
import
Data.TreeDiff.Instances.Cabal
SPDX
()
import
Data.TreeDiff.Instances.Cabal
Version
()
-------------------------------------------------------------------------------
import
Distribution.Backpack
(
OpenModule
,
OpenUnitId
)
import
Distribution.CabalSpecVersion
(
CabalSpecVersion
)
import
Distribution.Compiler
(
CompilerFlavor
,
PerCompilerFlavor
)
import
Distribution.InstalledPackageInfo
(
AbiDependency
,
ExposedModule
,
InstalledPackageInfo
)
import
Distribution.ModuleName
(
ModuleName
)
import
Distribution.Package
(
Dependency
,
PackageIdentifier
,
PackageName
)
import
Distribution.Backpack
(
OpenModule
,
OpenUnitId
)
import
Distribution.CabalSpecVersion
(
CabalSpecVersion
)
import
Distribution.Compiler
(
CompilerFlavor
,
CompilerId
,
PerCompilerFlavor
)
import
Distribution.InstalledPackageInfo
(
AbiDependency
,
ExposedModule
,
InstalledPackageInfo
)
import
Distribution.ModuleName
(
ModuleName
)
import
Distribution.Package
(
Dependency
,
PackageIdentifier
,
PackageName
)
import
Distribution.PackageDescription
import
Distribution.Types.AbiHash
(
AbiHash
)
import
Distribution.Types.ComponentId
(
ComponentId
)
import
Distribution.Simple.Compiler
(
DebugInfoLevel
,
OptimisationLevel
,
ProfDetailLevel
)
import
Distribution.Simple.Flag
(
Flag
)
import
Distribution.Simple.InstallDirs
import
Distribution.Simple.InstallDirs.Internal
import
Distribution.Simple.Setup
(
HaddockTarget
,
TestShowDetails
)
import
Distribution.System
import
Distribution.Types.AbiHash
(
AbiHash
)
import
Distribution.Types.ComponentId
(
ComponentId
)
import
Distribution.Types.CondTree
import
Distribution.Types.ExecutableScope
import
Distribution.Types.ExeDependency
import
Distribution.Types.ForeignLib
import
Distribution.Types.ForeignLibOption
import
Distribution.Types.ForeignLibType
import
Distribution.Types.IncludeRenaming
(
IncludeRenaming
)
import
Distribution.Types.IncludeRenaming
(
IncludeRenaming
)
import
Distribution.Types.LegacyExeDependency
import
Distribution.Types.LibraryVisibility
(
LibraryVisibility
)
import
Distribution.Types.LibraryVisibility
(
LibraryVisibility
)
import
Distribution.Types.Mixin
import
Distribution.Types.PkgconfigDependency
import
Distribution.Types.UnitId
(
DefUnitId
,
UnitId
)
import
Distribution.Types.PackageVersionConstraint
import
Distribution.Types.PkgconfigDependency
(
PkgconfigDependency
)
import
Distribution.Types.PkgconfigName
(
PkgconfigName
)
import
Distribution.Types.PkgconfigVersion
(
PkgconfigVersion
)
import
Distribution.Types.PkgconfigVersionRange
(
PkgconfigVersionRange
)
import
Distribution.Types.UnitId
(
DefUnitId
,
UnitId
)
import
Distribution.Types.UnqualComponentName
import
Distribution.Utils.ShortText
(
ShortText
,
fromShortText
)
import
Distribution.Utils.NubList
(
NubList
)
import
Distribution.Utils.ShortText
(
ShortText
,
fromShortText
)
import
Distribution.Verbosity
import
Distribution.Verbosity.Internal
-------------------------------------------------------------------------------
-- instances
...
...
@@ -46,11 +59,14 @@ import Distribution.Utils.ShortText (ShortText, fromShortText)
instance
(
Eq
a
,
Show
a
)
=>
ToExpr
(
Condition
a
)
where
toExpr
=
defaultExprViaShow
instance
(
Show
a
,
ToExpr
b
,
ToExpr
c
,
Show
b
,
Show
c
,
Eq
a
,
Eq
c
,
Eq
b
)
=>
ToExpr
(
CondTree
a
b
c
)
instance
(
Show
a
,
ToExpr
b
,
ToExpr
c
,
Show
b
,
Show
c
,
Eq
a
,
Eq
c
,
Eq
b
)
=>
ToExpr
(
CondBranch
a
b
c
)
instance
(
ToExpr
a
)
=>
ToExpr
(
NubList
a
)
instance
(
ToExpr
a
)
=>
ToExpr
(
Flag
a
)
instance
ToExpr
a
=>
ToExpr
(
PerCompilerFlavor
a
)
instance
ToExpr
AbiDependency
where
toExpr
=
defaultExprViaShow
instance
ToExpr
AbiHash
where
toExpr
=
defaultExprViaShow
instance
ToExpr
AbiDependency
instance
ToExpr
AbiHash
instance
ToExpr
Arch
instance
ToExpr
Benchmark
instance
ToExpr
BenchmarkInterface
instance
ToExpr
BenchmarkType
...
...
@@ -58,45 +74,63 @@ instance ToExpr BuildInfo
instance
ToExpr
BuildType
instance
ToExpr
CabalSpecVersion
instance
ToExpr
CompilerFlavor
instance
ToExpr
ComponentId
where
toExpr
=
defaultExprViaShow
instance
ToExpr
CompilerId
instance
ToExpr
ComponentId
instance
ToExpr
DebugInfoLevel
instance
ToExpr
DefUnitId
instance
ToExpr
Dependency
instance
ToExpr
ExeDependency
where
toExpr
=
defaultExprViaShow
instance
ToExpr
ExeDependency
instance
ToExpr
Executable
instance
ToExpr
ExecutableScope
where
toExpr
=
defaultExprViaShow
instance
ToExpr
ExposedModule
where
toExpr
=
defaultExprViaShow
instance
ToExpr
FlagName
where
toExpr
=
defaultExprViaShow
instance
ToExpr
ExecutableScope
instance
ToExpr
ExposedModule
instance
ToExpr
FlagAssignment
instance
ToExpr
FlagName
instance
ToExpr
ForeignLib
instance
ToExpr
ForeignLibOption
instance
ToExpr
ForeignLibType
instance
ToExpr
GenericPackageDescription
instance
ToExpr
HaddockTarget
instance
ToExpr
IncludeRenaming
instance
ToExpr
InstalledPackageInfo
instance
ToExpr
LegacyExeDependency
where
toExpr
=
defaultExprViaShow
instance
ToExpr
LibVersionInfo
where
toExpr
=
defaultExprViaShow
instance
ToExpr
KnownRepoType
instance
ToExpr
LegacyExeDependency
instance
ToExpr
LibVersionInfo
instance
ToExpr
Library
instance
ToExpr
LibraryVisibility
instance
ToExpr
LibraryName
instance
ToExpr
Mixin
where
toExpr
=
defaultExprViaShow
instance
ToExpr
ModuleName
where
toExpr
=
defaultExprViaShow
instance
ToExpr
LibraryVisibility
instance
ToExpr
Mixin
instance
ToExpr
ModuleName
instance
ToExpr
ModuleReexport
instance
ToExpr
ModuleRenaming
instance
ToExpr
OS
instance
ToExpr
OpenModule
instance
ToExpr
OpenUnitId
instance
ToExpr
OptimisationLevel
instance
ToExpr
PackageDescription
instance
ToExpr
PackageFlag
instance
ToExpr
PackageIdentifier
instance
ToExpr
PackageName
where
toExpr
=
defaultExprViaShow
instance
ToExpr
PkgconfigDependency
where
toExpr
=
defaultExprViaShow
instance
ToExpr
PackageName
instance
ToExpr
PackageVersionConstraint
instance
ToExpr
PathComponent
instance
ToExpr
PathTemplate
instance
ToExpr
PathTemplateVariable
instance
ToExpr
PkgconfigDependency
instance
ToExpr
PkgconfigName
instance
ToExpr
PkgconfigVersion
instance
ToExpr
PkgconfigVersionRange
instance
ToExpr
ProfDetailLevel
instance
ToExpr
RepoKind
instance
ToExpr
KnownRepoType
instance
ToExpr
RepoType
instance
ToExpr
SetupBuildInfo
instance
ToExpr
SourceRepo
instance
ToExpr
TestShowDetails
instance
ToExpr
TestSuite
instance
ToExpr
TestSuiteInterface
instance
ToExpr
TestType
instance
ToExpr
UnitId
where
toExpr
=
defaultExprViaShow
instance
ToExpr
UnqualComponentName
where
toExpr
=
defaultExprViaShow
instance
ToExpr
UnitId
instance
ToExpr
UnqualComponentName
instance
ToExpr
Verbosity
instance
ToExpr
VerbosityFlag
instance
ToExpr
VerbosityLevel
instance
ToExpr
ShortText
where
toExpr
=
toExpr
.
fromShortText
Cabal/
tests/Instances/TreeDiff/
Language.hs
→
Cabal/
Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal
Language.hs
View file @
fa74c1b8
...
...
@@ -5,12 +5,12 @@
{-# OPTIONS_GHC -fcontext-stack=151 #-}
#
endif
{-# OPTIONS_GHC -fno-warn-orphans #-}
module
Instances.TreeDiff.Language
where
module
Data.TreeDiff.Instances.CabalLanguage
()
where
import
Data.TreeDiff
import
Language.Haskell.Extension
(
Extension
,
KnownExtension
,
Language
)
-- Th
is
are big enums, so they are in separate file.
-- Th
ese
are big enums, so they are in separate file.
--
instance
ToExpr
Extension
instance
ToExpr
KnownExtension
...
...
Cabal/
tests/Instances/TreeDiff/
SPDX.hs
→
Cabal/
Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal
SPDX.hs
View file @
fa74c1b8
...
...
@@ -5,12 +5,12 @@
{-# OPTIONS_GHC -fcontext-stack=151 #-}
#
endif
{-# OPTIONS_GHC -fno-warn-orphans #-}
module
Instances.TreeDiff.SPDX
where
module
Data.TreeDiff.Instances.CabalSPDX
()
where
import
Data.TreeDiff
import
Distribution.License
(
License
)
import
Instances.TreeDiff.
Version
()
import
Data.TreeDiff.Instances.Cabal
Version
()
import
qualified
Distribution.SPDX
as
SPDX
...
...
Cabal/
tests/Instances/TreeDiff/
Version.hs
→
Cabal/
Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal
Version.hs
View file @
fa74c1b8
...
...
@@ -5,10 +5,10 @@
{-# OPTIONS_GHC -fcontext-stack=151 #-}
#
endif
{-# OPTIONS_GHC -fno-warn-orphans #-}
module
Instances.TreeDiff.
Version
where
module
Data.TreeDiff.Instances.Cabal
Version
where
import
Data.TreeDiff
import
Distribution.Version
(
Version
,
VersionRange
)
import
Distribution.Version
(
Version
,
VersionRange
,
versionNumbers
)
instance
ToExpr
Version
where
toExpr
=
defaultExprViaShow
instance
ToExpr
Version
where
toExpr
v
=
App
"mkVersion"
[
toExpr
$
versionNumbers
v
]
instance
ToExpr
VersionRange
Cabal/Cabal.cabal
View file @
fa74c1b8
...
...
@@ -656,8 +656,9 @@ test-suite unit-tests
UnitTests.Orphans
-- Cabal-quickcheck
hs-source-dirs: Cabal-
quickc
heck/src
hs-source-dirs: Cabal-
QuickC
heck/src
other-modules:
Test.QuickCheck.GenericArbitrary
Test.QuickCheck.Instances.Cabal
main-is: UnitTests.hs
...
...
@@ -687,11 +688,6 @@ test-suite unit-tests
if !impl(ghc >= 7.10)
build-depends: void
-- Cabal-quickcheck
hs-source-dirs: Cabal-quickcheck/src
other-modules:
Test.QuickCheck.Instances.Cabal
test-suite parser-tests
type: exitcode-stdio-1.0
hs-source-dirs: tests
...
...
@@ -717,11 +713,12 @@ test-suite parser-tests
if impl(ghc >= 7.8)
build-depends:
tree-diff >= 0.1 && <0.2
hs-source-dirs: Cabal-tree-diff/src
other-modules:
Instances.TreeDiff
Instances.TreeDiff.
Language
Instances.TreeDiff.
SPDX
Instances.TreeDiff.
Version
Data.TreeDiff.Instances.Cabal
Data.TreeDiff.Instances.Cabal
Language
Data.TreeDiff.Instances.Cabal
SPDX
Data.TreeDiff.Instances.Cabal
Version
test-suite check-tests
type: exitcode-stdio-1.0
...
...
@@ -786,11 +783,12 @@ test-suite hackage-tests
if impl(ghc >= 7.8)
build-depends:
tree-diff >= 0.1 && <0.2
hs-source-dirs: Cabal-tree-diff/src
other-modules:
Instances.TreeDiff
Instances.TreeDiff.
Language
Instances.TreeDiff.
SPDX
Instances.TreeDiff.
Version
Data.TreeDiff.Instances.Cabal
Data.TreeDiff.Instances.Cabal
Language
Data.TreeDiff.Instances.Cabal
SPDX
Data.TreeDiff.Instances.Cabal
Version
ghc-options: -Wall -rtsopts -threaded
default-extensions: CPP
...
...
Cabal/tests/HackageTests.hs
View file @
fa74c1b8
...
...
@@ -51,9 +51,9 @@ import qualified Distribution.Types.PackageDescription.Lens as L
-- import qualified Distribution.Types.BuildInfo.Lens as L
#
ifdef
MIN_VERSION_tree_diff
import
Data.TreeDiff
(
ediff
)
import
Data.TreeDiff.
Pretty
(
ansiWlEditExprCompact
)
import
Instances.TreeDiff
(
)
import
Data.TreeDiff
(
ediff
)
import
Data.TreeDiff.
Instances.Cabal
(
)
import
Data.TreeDiff.Pretty
(
ansiWlEditExprCompact
)
#
endif
-------------------------------------------------------------------------------
...
...
Cabal/tests/ParserTests.hs
View file @
fa74c1b8
...
...
@@ -31,9 +31,9 @@ import qualified Data.List.NonEmpty as NE
import
qualified
Distribution.InstalledPackageInfo
as
IPI
#
ifdef
MIN_VERSION_tree_diff
import
Data.TreeDiff
(
ansiWlEditExpr
,
ediff
,
toExpr
)
import
Data.TreeDiff.Golden
(
ediffGolden
)
import
Instances.TreeDiff
()
import
Data.TreeDiff
(
ansiWlEditExpr
,
ediff
,
toExpr
)
import
Data.TreeDiff.Golden
(
ediffGolden
)
import
Data.TreeDiff.Instances.Cabal
()
#
endif
tests
::
TestTree
...
...
Cabal/tests/ParserTests/ipi/Includes2.expr
View file @
fa74c1b8
InstalledPackageInfo
{abiDepends = [`AbiDependency {depUnitId = UnitId "base-4.10.1.0", depAbiHash = AbiHash "35a7f6be752ee4f7385cb5bf28677879"}`,
`AbiDependency {depUnitId = UnitId "Includes2-0.1.0.0-inplace-mysql", depAbiHash = AbiHash "inplace"}`],
abiHash = `AbiHash "inplace"`,
{abiDepends = [AbiDependency
{depAbiHash = AbiHash "35a7f6be752ee4f7385cb5bf28677879",
depUnitId = UnitId "base-4.10.1.0"},
AbiDependency
{depAbiHash = AbiHash "inplace",
depUnitId = UnitId "Includes2-0.1.0.0-inplace-mysql"}],
abiHash = AbiHash "inplace",
author = "Edward Z. Yang",
category = "",
ccOptions = [],
...
...
@@ -9,11 +13,12 @@ InstalledPackageInfo
copyright = "",
cxxOptions = [],
dataDir = "/home/travis/build/haskell/cabal/cabal-testsuite/PackageTests/Backpack/Includes2",
depends = [
`UnitId "base-4.10.1.0"`
,
`UnitId "Includes2-0.1.0.0-inplace-mysql"`
],
depends = [
UnitId "base-4.10.1.0"
,
UnitId "Includes2-0.1.0.0-inplace-mysql"
],
description = "",
exposed = False,
exposedModules = [`ExposedModule {exposedName = ModuleName "Mine", exposedReexport = Nothing}`],
exposedModules = [ExposedModule
{exposedName = ModuleName "Mine", exposedReexport = Nothing}],
extraGHCiLibraries = [],
extraLibraries = [],
frameworkDirs = [],
...
...
@@ -27,14 +32,15 @@ InstalledPackageInfo
includeDirs = [],
includes = [],
indefinite = False,
installedComponentId_ = `ComponentId ""`,
installedUnitId = `UnitId "Includes2-0.1.0.0-inplace-mylib+3gY9SyjX86dBypHcOaev1n"`,
installedComponentId_ = ComponentId "",
installedUnitId = UnitId
"Includes2-0.1.0.0-inplace-mylib+3gY9SyjX86dBypHcOaev1n",
instantiatedWith = [_×_
`ModuleName "Database"`
(ModuleName "Database")
(OpenModule
(DefiniteUnitId
(DefUnitId
`UnitId "Includes2-0.1.0.0-inplace-mysql"`
))
`ModuleName "Database.MySQL"`
)],
(DefUnitId
(UnitId "Includes2-0.1.0.0-inplace-mysql")
))
(ModuleName "Database.MySQL")
)],
ldOptions = [],
libVisibility = LibraryVisibilityPrivate,
libraryDirs = ["/home/travis/build/haskell/cabal/cabal-testsuite/PackageTests/Backpack/Includes2/cabal-internal.dist/work/./dist/build/x86_64-linux/ghc-8.2.2/Includes2-0.1.0.0/l/mylib/Includes2-0.1.0.0-inplace-mylib+3gY9SyjX86dBypHcOaev1n/build/Includes2-0.1.0.0-inplace-mylib+3gY9SyjX86dBypHcOaev1n"],
...
...
@@ -43,10 +49,10 @@ InstalledPackageInfo
maintainer = "ezyang@cs.stanford.edu",
pkgRoot = Nothing,
pkgUrl = "",
sourceLibName = LSubLibName
`UnqualComponentName "mylib"`
,
sourceLibName = LSubLibName
(UnqualComponentName "mylib")
,
sourcePackageId = PackageIdentifier
{pkgName =
`PackageName "Includes2"`
,
pkgVersion =
`mkVersion [0,1,0,0]`
},
{pkgName =
PackageName "Includes2"
,
pkgVersion =
mkVersion [0, 1, 0, 0]
},
stability = "",
synopsis = "",
trusted = False}
Cabal/tests/ParserTests/ipi/internal-preprocessor-test.expr
View file @
fa74c1b8
InstalledPackageInfo
{abiDepends = [],
abiHash =
`AbiHash ""`
,
abiHash =
AbiHash ""
,
author = "Mikhail Glushenkov",
category = "Testing",
ccOptions = [],
...
...
@@ -8,10 +8,11 @@ InstalledPackageInfo
copyright = "",
cxxOptions = [],
dataDir = "/home/ogre/Documents/other-haskell/cabal/cabal-testsuite/PackageTests/CustomPreProcess",
depends = [
`UnitId "base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d"`
],
depends = [
UnitId "base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d"
],
description = "See https://github.com/haskell/cabal/issues/1541#issuecomment-30155513",
exposed = True,
exposedModules = [`ExposedModule {exposedName = ModuleName "A", exposedReexport = Nothing}`],
exposedModules = [ExposedModule
{exposedName = ModuleName "A", exposedReexport = Nothing}],
extraGHCiLibraries = [],
extraLibraries = [],
frameworkDirs = [],
...
...
@@ -25,23 +26,23 @@ InstalledPackageInfo
includeDirs = [],
includes = [],
indefinite = False,
installedComponentId_ =
`ComponentId ""`
,
installedUnitId =
`UnitId "internal-preprocessor-test-0.1.0.0"`
,
installedComponentId_ =
ComponentId ""
,
installedUnitId =
UnitId "internal-preprocessor-test-0.1.0.0"
,
instantiatedWith = [],
ldOptions = [],
libVisibility = LibraryVisibilityPublic,
libraryDirs = ["/home/ogre/Documents/other-haskell/cabal/cabal-testsuite/PackageTests/CustomPreProcess/setup.dist/work/dist/build",
"/home/ogre/Documents/other-haskell/cabal/cabal-testsuite/PackageTests/CustomPreProcess/setup.dist/work/dist/build"],
libraryDynDirs = [],
license = Right (GPL (Just
`mkVersion [3]`
)),
license = Right (GPL (Just
(mkVersion [3])
)),
maintainer = "mikhail.glushenkov@gmail.com",
pkgRoot = Just
"/home/ogre/Documents/other-haskell/cabal/cabal-testsuite/PackageTests/CustomPreProcess/setup.dist/work/dist",
pkgUrl = "",
sourceLibName = LMainLibName,
sourcePackageId = PackageIdentifier
{pkgName =
`PackageName "internal-preprocessor-test"`
,
pkgVersion =
`mkVersion [0,1,0,0]`
},
{pkgName =
PackageName "internal-preprocessor-test"
,
pkgVersion =
mkVersion [0, 1, 0, 0]
},
stability = "",
synopsis = "Internal custom preprocessor example.",
trusted = False}
Cabal/tests/ParserTests/ipi/issue-2276-ghc-9885.expr
View file @
fa74c1b8
InstalledPackageInfo
{abiDepends = [`AbiDependency {depUnitId = UnitId "base-4.10.1.0", depAbiHash = AbiHash "35a7f6be752ee4f7385cb5bf28677879"}`],
abiHash = `AbiHash "e04579c0363c9229351d1a0b394bf2d5"`,
{abiDepends = [AbiDependency
{depAbiHash = AbiHash "35a7f6be752ee4f7385cb5bf28677879",
depUnitId = UnitId "base-4.10.1.0"}],
abiHash = AbiHash "e04579c0363c9229351d1a0b394bf2d5",
author = "Andy Gill, Ross Paterson",
category = "Control",
ccOptions = [],
...
...
@@ -8,7 +10,7 @@ InstalledPackageInfo
copyright = "",
cxxOptions = [],
dataDir = "/opt/ghc/8.2.2/share/x86_64-linux-ghc-8.2.2/transformers-0.5.2.0",
depends = [
`UnitId "base-4.10.1.0"`
],
depends = [
UnitId "base-4.10.1.0"
],
description = concat
["A portable library of functor and monad transformers, inspired by\n",
"the paper \\\"Functional Programming with Overloading and Higher-Order\n",
...
...
@@ -32,28 +34,72 @@ InstalledPackageInfo
"the @mtl@ or @monads-tf@ packages, which automatically lift operations\n",
"introduced by monad transformers through other transformers."],
exposed = True,
exposedModules = [`ExposedModule {exposedName = ModuleName "Control.Applicative.Backwards", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Applicative.Lift", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Signatures", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Class", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Cont", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Error", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Except", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Identity", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.List", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Maybe", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.RWS", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.RWS.Lazy", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.RWS.Strict", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Reader", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.State", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.State.Lazy", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.State.Strict", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Writer", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Writer.Lazy", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Writer.Strict", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Data.Functor.Constant", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Data.Functor.Reverse", exposedReexport = Nothing}`],
exposedModules = [ExposedModule
{exposedName = ModuleName "Control.Applicative.Backwards",
exposedReexport = Nothing},
ExposedModule
{exposedName = ModuleName "Control.Applicative.Lift",
exposedReexport = Nothing},
ExposedModule
{exposedName = ModuleName "Control.Monad.Signatures",
exposedReexport = Nothing},
ExposedModule