Commit 45d75e1f authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Tests for Cabal's Backpack support.


Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent 6db73c7c
......@@ -40,6 +40,15 @@ extra-source-files:
tests/PackageTests/AllowOlder/benchmarks/Bench.hs
tests/PackageTests/AllowOlder/src/Foo.hs
tests/PackageTests/AllowOlder/tests/Test.hs
tests/PackageTests/Ambiguity/p/Dupe.hs
tests/PackageTests/Ambiguity/p/p.cabal
tests/PackageTests/Ambiguity/package-import/A.hs
tests/PackageTests/Ambiguity/package-import/package-import.cabal
tests/PackageTests/Ambiguity/q/Dupe.hs
tests/PackageTests/Ambiguity/q/q.cabal
tests/PackageTests/Ambiguity/reexport-test/Main.hs
tests/PackageTests/Ambiguity/reexport-test/reexport-test.cabal
tests/PackageTests/Ambiguity/reexport/reexport.cabal
tests/PackageTests/AutogenModules/Package/Dummy.hs
tests/PackageTests/AutogenModules/Package/MyBenchModule.hs
tests/PackageTests/AutogenModules/Package/MyExeModule.hs
......@@ -54,6 +63,44 @@ extra-source-files:
tests/PackageTests/AutogenModules/SrcDist/MyLibrary.hs
tests/PackageTests/AutogenModules/SrcDist/MyTestModule.hs
tests/PackageTests/AutogenModules/SrcDist/my.cabal
tests/PackageTests/Backpack/Includes1/A.hs
tests/PackageTests/Backpack/Includes1/B.hs
tests/PackageTests/Backpack/Includes1/Includes1.cabal
tests/PackageTests/Backpack/Includes2/Includes2.cabal
tests/PackageTests/Backpack/Includes2/exe/Main.hs
tests/PackageTests/Backpack/Includes2/exe/exe.cabal
tests/PackageTests/Backpack/Includes2/fail.cabal
tests/PackageTests/Backpack/Includes2/mylib/Mine.hs
tests/PackageTests/Backpack/Includes2/mylib/mylib.cabal
tests/PackageTests/Backpack/Includes2/mysql/Database/MySQL.hs
tests/PackageTests/Backpack/Includes2/mysql/mysql.cabal
tests/PackageTests/Backpack/Includes2/postgresql/Database/PostgreSQL.hs
tests/PackageTests/Backpack/Includes2/postgresql/postgresql.cabal
tests/PackageTests/Backpack/Includes2/src/App.hs
tests/PackageTests/Backpack/Includes2/src/src.cabal
tests/PackageTests/Backpack/Includes3/Includes3.cabal
tests/PackageTests/Backpack/Includes3/exe/Main.hs
tests/PackageTests/Backpack/Includes3/exe/exe.cabal
tests/PackageTests/Backpack/Includes3/indef/Foo.hs
tests/PackageTests/Backpack/Includes3/indef/indef.cabal
tests/PackageTests/Backpack/Includes3/sigs/sigs.cabal
tests/PackageTests/Backpack/Includes4/Includes4.cabal
tests/PackageTests/Backpack/Includes4/Main.hs
tests/PackageTests/Backpack/Includes4/impl/A.hs
tests/PackageTests/Backpack/Includes4/impl/B.hs
tests/PackageTests/Backpack/Includes4/impl/Rec.hs
tests/PackageTests/Backpack/Includes4/indef/C.hs
tests/PackageTests/Backpack/Includes5/A.hs
tests/PackageTests/Backpack/Includes5/B.hs
tests/PackageTests/Backpack/Includes5/Includes5.cabal
tests/PackageTests/Backpack/Includes5/impl/Foobar.hs
tests/PackageTests/Backpack/Includes5/impl/Quxbaz.hs
tests/PackageTests/Backpack/Indef1/Indef1.cabal
tests/PackageTests/Backpack/Indef1/Provide.hs
tests/PackageTests/Backpack/Reexport1/p/P.hs
tests/PackageTests/Backpack/Reexport1/p/p.cabal
tests/PackageTests/Backpack/Reexport1/q/Q.hs
tests/PackageTests/Backpack/Reexport1/q/q.cabal
tests/PackageTests/BenchmarkExeV10/Foo.hs
tests/PackageTests/BenchmarkExeV10/benchmarks/bench-Foo.hs
tests/PackageTests/BenchmarkExeV10/my.cabal
......
name: p
version: 0.1.0.0
license: BSD3
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
build-type: Simple
cabal-version: >=1.10
library
exposed-modules: Dupe
build-depends: base
default-language: Haskell2010
{-# LANGUAGE PackageImports #-}
import qualified "p" Dupe as PDupe
import qualified "q" Dupe as QDupe
main = putStrLn (PDupe.pkg ++ " " ++ QDupe.pkg)
name: package-import
version: 0.1.0.0
license: BSD3
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
build-type: Simple
cabal-version: >=1.10
executable package-import
main-is: A.hs
other-extensions: PackageImports
build-depends: base, p, q
default-language: Haskell2010
name: q
version: 0.1.0.0
license: BSD3
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
build-type: Simple
cabal-version: >=1.10
library
exposed-modules: Dupe
build-depends: base
default-language: Haskell2010
module Main where
import qualified PDupe
import qualified QDupe
main = putStrLn (PDupe.pkg ++ " " ++ QDupe.pkg)
name: reexport-test
version: 0.1.0.0
license: BSD3
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
build-type: Simple
cabal-version: >=1.10
executable reexport-test
main-is: Main.hs
build-depends: base, reexport
default-language: Haskell2010
name: reexport
version: 0.1.0.0
license: BSD3
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
build-type: Simple
cabal-version: >=1.21
library
reexported-modules: p:Dupe as PDupe, q:Dupe as QDupe
build-depends: base, p, q
default-language: Haskell2010
module B where
import A
import Data.Set
name: Includes1
version: 0.1.0.0
license: BSD3
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
build-type: Simple
cabal-version: >=1.25
library
build-depends: base, containers
exposed-modules: A B
backpack-includes: containers (Data.Map)
default-language: Haskell2010
name: Includes2
version: 0.1.0.0
license: BSD3
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
build-type: Simple
cabal-version: >=1.25
library mylib
build-depends: base
signatures: Database
exposed-modules: Mine
hs-source-dirs: mylib
default-language: Haskell2010
library mysql
build-depends: base
exposed-modules: Database.MySQL
hs-source-dirs: mysql
default-language: Haskell2010
library postgresql
build-depends: base
exposed-modules: Database.PostgreSQL
hs-source-dirs: postgresql
default-language: Haskell2010
library
build-depends: base, mysql, postgresql, mylib
backpack-includes:
mylib (Mine as Mine.MySQL) requires (Database as Database.MySQL),
mylib (Mine as Mine.PostgreSQL) requires (Database as Database.PostgreSQL)
exposed-modules: App
hs-source-dirs: src
default-language: Haskell2010
executable exe
build-depends: base, Includes2
main-is: Main.hs
hs-source-dirs: exe
default-language: Haskell2010
name: exe
version: 0.1.0.0
license: BSD3
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
build-type: Simple
cabal-version: >=1.25
executable exe
build-depends: base, src
main-is: Main.hs
default-language: Haskell2010
name: fail
version: 0.1.0.0
license: BSD3
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
build-type: Simple
cabal-version: >=1.25
library mylib
build-depends: base
signatures: Database
exposed-modules: Mine
hs-source-dirs: mylib
default-language: Haskell2010
library mysql
build-depends: base
exposed-modules: Database.MySQL
hs-source-dirs: mysql
default-language: Haskell2010
library postgresql
build-depends: base
exposed-modules: Database.PostgreSQL
hs-source-dirs: postgresql
default-language: Haskell2010
library
build-depends: base, mysql, postgresql, mylib
backpack-includes:
mysql (Database.MySQL as Database),
postgresql (Database.PostgreSQL as Database)
exposed-modules: App
hs-source-dirs: src
default-language: Haskell2010
signature Database where
data Database
databaseName :: String
module Mine where
import Database
data Mine = Mine Database
mine = "mine" ++ databaseName
name: mylib
version: 0.1.0.0
license: BSD3
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
build-type: Simple
cabal-version: >=1.25
library
build-depends: base
signatures: Database
exposed-modules: Mine
default-language: Haskell2010
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment