├── .gitignore ├── LICENSE ├── README.md ├── align-ghcjs-with-stack.sh ├── boot-ng.cabal ├── boot.yaml ├── fetch-packages.sh ├── ghcjs-base.cabal1 ├── ghcjs.cabal1 ├── lib.sh ├── patches ├── base-4.8.0.0.patch ├── base.patch ├── ghc-prim-0.4.0.0.patch └── integer-gmp-0.5.1.0.patch ├── special ├── Win32 │ ├── Graphics │ │ ├── Win32.hs │ │ └── Win32 │ │ │ ├── Control.hsc │ │ │ ├── Dialogue.hsc │ │ │ ├── GDI.hs │ │ │ ├── GDI │ │ │ ├── Bitmap.hsc │ │ │ ├── Brush.hsc │ │ │ ├── Clip.hsc │ │ │ ├── Font.hsc │ │ │ ├── Graphics2D.hs │ │ │ ├── HDC.hs │ │ │ ├── Palette.hsc │ │ │ ├── Path.hs │ │ │ ├── Pen.hsc │ │ │ ├── Region.hs │ │ │ └── Types.hsc │ │ │ ├── Icon.hs │ │ │ ├── Key.hsc │ │ │ ├── Menu.hsc │ │ │ ├── Message.hsc │ │ │ ├── Misc.hsc │ │ │ ├── Resource.hsc │ │ │ └── Window.hsc │ ├── LICENSE │ ├── Setup.hs │ ├── System │ │ ├── Win32.hs │ │ └── Win32 │ │ │ ├── Console.hsc │ │ │ ├── DLL.hsc │ │ │ ├── DebugApi.hsc │ │ │ ├── File.hsc │ │ │ ├── FileMapping.hsc │ │ │ ├── Info.hsc │ │ │ ├── Mem.hsc │ │ │ ├── NLS.hsc │ │ │ ├── Process.hsc │ │ │ ├── Registry.hsc │ │ │ ├── Security.hsc │ │ │ ├── Shell.hsc │ │ │ ├── SimpleMAPI.hsc │ │ │ ├── Time.hsc │ │ │ └── Types.hs │ ├── Win32.cabal │ ├── cbits │ │ ├── HsGDI.c │ │ ├── HsWin32.c │ │ ├── WndProc.c │ │ ├── diatemp.c │ │ ├── dumpBMP.c │ │ ├── ellipse.c │ │ └── errors.c │ ├── doc │ │ ├── HSWin32.xml │ │ └── Makefile │ ├── examples │ │ ├── Makefile │ │ └── hello.lhs │ ├── include │ │ ├── HsGDI.h │ │ ├── HsWin32.h │ │ ├── Win32Aux.h │ │ ├── WndProc.h │ │ ├── diatemp.h │ │ ├── dumpBMP.h │ │ ├── ellipse.h │ │ ├── errors.h │ │ ├── win32debug.h │ │ └── windows_cconv.h │ ├── prologue.txt │ └── tests │ │ ├── Makefile │ │ ├── T4452.hs │ │ ├── all.T │ │ ├── helloworld.hs │ │ ├── lasterror.hs │ │ ├── registry001.hs │ │ └── registry001.stdout ├── boot.yaml ├── boot.yaml-new ├── cabal-next │ ├── .arcconfig │ ├── .travis.yml │ ├── Cabal │ │ ├── Cabal.cabal │ │ ├── Distribution │ │ │ ├── Compat │ │ │ │ ├── Binary.hs │ │ │ │ ├── Binary │ │ │ │ │ ├── Class.hs │ │ │ │ │ └── Generic.hs │ │ │ │ ├── CopyFile.hs │ │ │ │ ├── CreatePipe.hs │ │ │ │ ├── Environment.hs │ │ │ │ ├── Exception.hs │ │ │ │ ├── GetShortPathName.hs │ │ │ │ ├── Internal │ │ │ │ │ └── TempFile.hs │ │ │ │ ├── MonadFail.hs │ │ │ │ ├── ReadP.hs │ │ │ │ └── Semigroup.hs │ │ │ ├── Compiler.hs │ │ │ ├── GetOpt.hs │ │ │ ├── InstalledPackageInfo.hs │ │ │ ├── Lex.hs │ │ │ ├── License.hs │ │ │ ├── Make.hs │ │ │ ├── ModuleName.hs │ │ │ ├── Package.hs │ │ │ ├── PackageDescription.hs │ │ │ ├── PackageDescription │ │ │ │ ├── Check.hs │ │ │ │ ├── Configuration.hs │ │ │ │ ├── Parse.hs │ │ │ │ ├── PrettyPrint.hs │ │ │ │ └── Utils.hs │ │ │ ├── ParseUtils.hs │ │ │ ├── ReadE.hs │ │ │ ├── Simple.hs │ │ │ ├── Simple │ │ │ │ ├── Bench.hs │ │ │ │ ├── Build.hs │ │ │ │ ├── Build │ │ │ │ │ ├── Macros.hs │ │ │ │ │ └── PathsModule.hs │ │ │ │ ├── BuildPaths.hs │ │ │ │ ├── BuildTarget.hs │ │ │ │ ├── CCompiler.hs │ │ │ │ ├── Command.hs │ │ │ │ ├── Compiler.hs │ │ │ │ ├── Configure.hs │ │ │ │ ├── GHC.hs │ │ │ │ ├── GHC │ │ │ │ │ ├── IPI642.hs │ │ │ │ │ ├── IPIConvert.hs │ │ │ │ │ ├── ImplInfo.hs │ │ │ │ │ └── Internal.hs │ │ │ │ ├── GHCJS.hs │ │ │ │ ├── Haddock.hs │ │ │ │ ├── HaskellSuite.hs │ │ │ │ ├── Hpc.hs │ │ │ │ ├── Install.hs │ │ │ │ ├── InstallDirs.hs │ │ │ │ ├── JHC.hs │ │ │ │ ├── LHC.hs │ │ │ │ ├── LocalBuildInfo.hs │ │ │ │ ├── PackageIndex.hs │ │ │ │ ├── PreProcess.hs │ │ │ │ ├── PreProcess │ │ │ │ │ └── Unlit.hs │ │ │ │ ├── Program.hs │ │ │ │ ├── Program │ │ │ │ │ ├── Ar.hs │ │ │ │ │ ├── Builtin.hs │ │ │ │ │ ├── Db.hs │ │ │ │ │ ├── Find.hs │ │ │ │ │ ├── GHC.hs │ │ │ │ │ ├── HcPkg.hs │ │ │ │ │ ├── Hpc.hs │ │ │ │ │ ├── Internal.hs │ │ │ │ │ ├── Ld.hs │ │ │ │ │ ├── Run.hs │ │ │ │ │ ├── Script.hs │ │ │ │ │ ├── Strip.hs │ │ │ │ │ └── Types.hs │ │ │ │ ├── Register.hs │ │ │ │ ├── Setup.hs │ │ │ │ ├── SrcDist.hs │ │ │ │ ├── Test.hs │ │ │ │ ├── Test │ │ │ │ │ ├── ExeV10.hs │ │ │ │ │ ├── LibV09.hs │ │ │ │ │ └── Log.hs │ │ │ │ ├── UHC.hs │ │ │ │ ├── UserHooks.hs │ │ │ │ └── Utils.hs │ │ │ ├── System.hs │ │ │ ├── TestSuite.hs │ │ │ ├── Text.hs │ │ │ ├── Utils │ │ │ │ └── NubList.hs │ │ │ ├── Verbosity.hs │ │ │ └── Version.hs │ │ ├── LICENSE │ │ ├── Language │ │ │ └── Haskell │ │ │ │ └── Extension.hs │ │ ├── Makefile │ │ ├── README.md │ │ ├── Setup.hs │ │ ├── changelog │ │ ├── doc │ │ │ ├── Cabal.css │ │ │ ├── developing-packages.markdown │ │ │ ├── index.markdown │ │ │ ├── installing-packages.markdown │ │ │ └── misc.markdown │ │ ├── misc │ │ │ ├── gen-extra-source-files.sh │ │ │ └── travis-diff-files.sh │ │ ├── prologue.txt │ │ └── tests │ │ │ ├── PackageTests.hs │ │ │ ├── PackageTests │ │ │ ├── AllowNewer │ │ │ │ ├── AllowNewer.cabal │ │ │ │ ├── benchmarks │ │ │ │ │ └── Bench.hs │ │ │ │ ├── src │ │ │ │ │ └── Foo.hs │ │ │ │ └── tests │ │ │ │ │ └── Test.hs │ │ │ ├── BenchmarkExeV10 │ │ │ │ ├── Foo.hs │ │ │ │ ├── benchmarks │ │ │ │ │ └── bench-Foo.hs │ │ │ │ └── my.cabal │ │ │ ├── BenchmarkOptions │ │ │ │ ├── BenchmarkOptions.cabal │ │ │ │ └── test-BenchmarkOptions.hs │ │ │ ├── BenchmarkStanza │ │ │ │ ├── Check.hs │ │ │ │ └── my.cabal │ │ │ ├── BuildDeps │ │ │ │ ├── GlobalBuildDepsNotAdditive1 │ │ │ │ │ ├── Check.hs │ │ │ │ │ ├── GlobalBuildDepsNotAdditive1.cabal │ │ │ │ │ └── MyLibrary.hs │ │ │ │ ├── GlobalBuildDepsNotAdditive2 │ │ │ │ │ ├── Check.hs │ │ │ │ │ ├── GlobalBuildDepsNotAdditive2.cabal │ │ │ │ │ └── lemon.hs │ │ │ │ ├── InternalLibrary0 │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── my.cabal │ │ │ │ │ └── programs │ │ │ │ │ │ └── lemon.hs │ │ │ │ ├── InternalLibrary1 │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── my.cabal │ │ │ │ │ └── programs │ │ │ │ │ │ └── lemon.hs │ │ │ │ ├── InternalLibrary2 │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── my.cabal │ │ │ │ │ ├── programs │ │ │ │ │ │ └── lemon.hs │ │ │ │ │ └── to-install │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ ├── InternalLibrary3 │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── my.cabal │ │ │ │ │ ├── programs │ │ │ │ │ │ └── lemon.hs │ │ │ │ │ └── to-install │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ ├── InternalLibrary4 │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── my.cabal │ │ │ │ │ ├── programs │ │ │ │ │ │ └── lemon.hs │ │ │ │ │ └── to-install │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ ├── SameDepsAllRound │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── SameDepsAllRound.cabal │ │ │ │ │ ├── lemon.hs │ │ │ │ │ └── pineapple.hs │ │ │ │ ├── TargetSpecificDeps1 │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── lemon.hs │ │ │ │ │ └── my.cabal │ │ │ │ ├── TargetSpecificDeps2 │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── lemon.hs │ │ │ │ │ └── my.cabal │ │ │ │ └── TargetSpecificDeps3 │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── lemon.hs │ │ │ │ │ └── my.cabal │ │ │ ├── BuildTestSuiteDetailedV09 │ │ │ │ └── Dummy2.hs │ │ │ ├── BuildableField │ │ │ │ ├── BuildableField.cabal │ │ │ │ └── Main.hs │ │ │ ├── CMain │ │ │ │ ├── Bar.hs │ │ │ │ ├── foo.c │ │ │ │ └── my.cabal │ │ │ ├── DeterministicAr │ │ │ │ ├── Check.hs │ │ │ │ ├── Lib.hs │ │ │ │ └── my.cabal │ │ │ ├── DuplicateModuleName │ │ │ │ ├── DuplicateModuleName.cabal │ │ │ │ ├── src │ │ │ │ │ └── Foo.hs │ │ │ │ ├── tests │ │ │ │ │ └── Foo.hs │ │ │ │ └── tests2 │ │ │ │ │ └── Foo.hs │ │ │ ├── EmptyLib │ │ │ │ └── empty │ │ │ │ │ └── empty.cabal │ │ │ ├── GhcPkgGuess │ │ │ │ ├── SameDirectory │ │ │ │ │ ├── SameDirectory.cabal │ │ │ │ │ ├── ghc │ │ │ │ │ └── ghc-pkg │ │ │ │ ├── SameDirectoryGhcVersion │ │ │ │ │ ├── SameDirectory.cabal │ │ │ │ │ ├── ghc-7.10 │ │ │ │ │ └── ghc-pkg-ghc-7.10 │ │ │ │ ├── SameDirectoryVersion │ │ │ │ │ ├── SameDirectory.cabal │ │ │ │ │ ├── ghc-7.10 │ │ │ │ │ └── ghc-pkg-7.10 │ │ │ │ ├── Symlink │ │ │ │ │ ├── SameDirectory.cabal │ │ │ │ │ └── bin │ │ │ │ │ │ ├── ghc │ │ │ │ │ │ └── ghc-pkg │ │ │ │ ├── SymlinkGhcVersion │ │ │ │ │ ├── SameDirectory.cabal │ │ │ │ │ └── bin │ │ │ │ │ │ ├── ghc-7.10 │ │ │ │ │ │ └── ghc-pkg-7.10 │ │ │ │ └── SymlinkVersion │ │ │ │ │ ├── SameDirectory.cabal │ │ │ │ │ └── bin │ │ │ │ │ ├── ghc-7.10 │ │ │ │ │ └── ghc-pkg-ghc-7.10 │ │ │ ├── Haddock │ │ │ │ ├── CPP.hs │ │ │ │ ├── Literate.lhs │ │ │ │ ├── NoCPP.hs │ │ │ │ ├── Simple.hs │ │ │ │ └── my.cabal │ │ │ ├── HaddockNewline │ │ │ │ ├── A.hs │ │ │ │ ├── ChangeLog.md │ │ │ │ ├── HaddockNewline.cabal │ │ │ │ ├── LICENSE │ │ │ │ └── Setup.hs │ │ │ ├── Options.hs │ │ │ ├── OrderFlags │ │ │ │ ├── Foo.hs │ │ │ │ └── my.cabal │ │ │ ├── PackageTester.hs │ │ │ ├── PathsModule │ │ │ │ ├── Executable │ │ │ │ │ ├── Main.hs │ │ │ │ │ └── my.cabal │ │ │ │ └── Library │ │ │ │ │ └── my.cabal │ │ │ ├── PreProcess │ │ │ │ ├── Foo.hsc │ │ │ │ ├── Main.hs │ │ │ │ └── my.cabal │ │ │ ├── PreProcessExtraSources │ │ │ │ ├── Foo.hsc │ │ │ │ ├── Main.hs │ │ │ │ └── my.cabal │ │ │ ├── ReexportedModules │ │ │ │ ├── LICENSE │ │ │ │ └── ReexportedModules.cabal │ │ │ ├── TemplateHaskell │ │ │ │ ├── dynamic │ │ │ │ │ ├── Exe.hs │ │ │ │ │ ├── Lib.hs │ │ │ │ │ ├── TH.hs │ │ │ │ │ └── my.cabal │ │ │ │ ├── profiling │ │ │ │ │ ├── Exe.hs │ │ │ │ │ ├── Lib.hs │ │ │ │ │ ├── TH.hs │ │ │ │ │ └── my.cabal │ │ │ │ └── vanilla │ │ │ │ │ ├── Exe.hs │ │ │ │ │ ├── Lib.hs │ │ │ │ │ ├── TH.hs │ │ │ │ │ └── my.cabal │ │ │ ├── TestNameCollision │ │ │ │ ├── child │ │ │ │ │ ├── Child.hs │ │ │ │ │ ├── child.cabal │ │ │ │ │ └── tests │ │ │ │ │ │ └── Test.hs │ │ │ │ └── parent │ │ │ │ │ ├── Parent.hs │ │ │ │ │ └── parent.cabal │ │ │ ├── TestOptions │ │ │ │ ├── TestOptions.cabal │ │ │ │ └── test-TestOptions.hs │ │ │ ├── TestStanza │ │ │ │ ├── Check.hs │ │ │ │ └── my.cabal │ │ │ ├── TestSuiteTests │ │ │ │ ├── ExeV10 │ │ │ │ │ ├── Check.hs │ │ │ │ │ ├── Foo.hs │ │ │ │ │ ├── my.cabal │ │ │ │ │ └── tests │ │ │ │ │ │ ├── test-Foo.hs │ │ │ │ │ │ └── test-Short.hs │ │ │ │ └── LibV09 │ │ │ │ │ ├── Lib.hs │ │ │ │ │ ├── LibV09.cabal │ │ │ │ │ └── tests │ │ │ │ │ └── Deadlock.hs │ │ │ ├── Tests.hs │ │ │ ├── UniqueIPID │ │ │ │ ├── P1 │ │ │ │ │ ├── M.hs │ │ │ │ │ └── my.cabal │ │ │ │ └── P2 │ │ │ │ │ ├── M.hs │ │ │ │ │ └── my.cabal │ │ │ └── multInst │ │ │ │ └── my.cabal │ │ │ ├── README.md │ │ │ ├── Setup.hs │ │ │ ├── Test │ │ │ ├── Laws.hs │ │ │ └── QuickCheck │ │ │ │ └── Utils.hs │ │ │ ├── UnitTests.hs │ │ │ ├── UnitTests │ │ │ └── Distribution │ │ │ │ ├── Compat │ │ │ │ ├── CreatePipe.hs │ │ │ │ └── ReadP.hs │ │ │ │ ├── Simple │ │ │ │ ├── Program │ │ │ │ │ └── Internal.hs │ │ │ │ └── Utils.hs │ │ │ │ ├── System.hs │ │ │ │ ├── Utils │ │ │ │ └── NubList.hs │ │ │ │ └── Version.hs │ │ │ ├── hackage │ │ │ ├── check.sh │ │ │ ├── download.sh │ │ │ └── unpack.sh │ │ │ └── misc │ │ │ └── ghc-supported-languages.hs │ ├── HACKING.md │ ├── LICENSE │ ├── README.md │ ├── appveyor.yml │ ├── cabal-install │ │ ├── .ghci │ │ ├── Distribution │ │ │ └── Client │ │ │ │ ├── BuildReports │ │ │ │ ├── Anonymous.hs │ │ │ │ ├── Storage.hs │ │ │ │ ├── Types.hs │ │ │ │ └── Upload.hs │ │ │ │ ├── BuildTarget.hs │ │ │ │ ├── Check.hs │ │ │ │ ├── CmdBuild.hs │ │ │ │ ├── CmdConfigure.hs │ │ │ │ ├── CmdRepl.hs │ │ │ │ ├── Compat │ │ │ │ ├── ExecutablePath.hs │ │ │ │ ├── FilePerms.hs │ │ │ │ ├── Process.hs │ │ │ │ ├── Semaphore.hs │ │ │ │ └── Time.hs │ │ │ │ ├── ComponentDeps.hs │ │ │ │ ├── Config.hs │ │ │ │ ├── Configure.hs │ │ │ │ ├── Dependency.hs │ │ │ │ ├── Dependency │ │ │ │ ├── Modular.hs │ │ │ │ ├── Modular │ │ │ │ │ ├── Assignment.hs │ │ │ │ │ ├── Builder.hs │ │ │ │ │ ├── Configured.hs │ │ │ │ │ ├── ConfiguredConversion.hs │ │ │ │ │ ├── ConflictSet.hs │ │ │ │ │ ├── Cycles.hs │ │ │ │ │ ├── Dependency.hs │ │ │ │ │ ├── Explore.hs │ │ │ │ │ ├── Flag.hs │ │ │ │ │ ├── Index.hs │ │ │ │ │ ├── IndexConversion.hs │ │ │ │ │ ├── Linking.hs │ │ │ │ │ ├── Log.hs │ │ │ │ │ ├── Message.hs │ │ │ │ │ ├── PSQ.hs │ │ │ │ │ ├── Package.hs │ │ │ │ │ ├── Preference.hs │ │ │ │ │ ├── Solver.hs │ │ │ │ │ ├── Tree.hs │ │ │ │ │ ├── Validate.hs │ │ │ │ │ ├── Var.hs │ │ │ │ │ └── Version.hs │ │ │ │ ├── TopDown.hs │ │ │ │ ├── TopDown │ │ │ │ │ ├── Constraints.hs │ │ │ │ │ └── Types.hs │ │ │ │ └── Types.hs │ │ │ │ ├── DistDirLayout.hs │ │ │ │ ├── Exec.hs │ │ │ │ ├── Fetch.hs │ │ │ │ ├── FetchUtils.hs │ │ │ │ ├── FileMonitor.hs │ │ │ │ ├── Freeze.hs │ │ │ │ ├── GZipUtils.hs │ │ │ │ ├── GenBounds.hs │ │ │ │ ├── Get.hs │ │ │ │ ├── Glob.hs │ │ │ │ ├── GlobalFlags.hs │ │ │ │ ├── Haddock.hs │ │ │ │ ├── HttpUtils.hs │ │ │ │ ├── IndexUtils.hs │ │ │ │ ├── Init.hs │ │ │ │ ├── Init │ │ │ │ ├── Heuristics.hs │ │ │ │ ├── Licenses.hs │ │ │ │ └── Types.hs │ │ │ │ ├── Install.hs │ │ │ │ ├── InstallPlan.hs │ │ │ │ ├── InstallSymlink.hs │ │ │ │ ├── JobControl.hs │ │ │ │ ├── List.hs │ │ │ │ ├── Manpage.hs │ │ │ │ ├── PackageHash.hs │ │ │ │ ├── PackageIndex.hs │ │ │ │ ├── PackageUtils.hs │ │ │ │ ├── ParseUtils.hs │ │ │ │ ├── PkgConfigDb.hs │ │ │ │ ├── PlanIndex.hs │ │ │ │ ├── ProjectBuilding.hs │ │ │ │ ├── ProjectConfig.hs │ │ │ │ ├── ProjectConfig │ │ │ │ ├── Legacy.hs │ │ │ │ └── Types.hs │ │ │ │ ├── ProjectOrchestration.hs │ │ │ │ ├── ProjectPlanOutput.hs │ │ │ │ ├── ProjectPlanning.hs │ │ │ │ ├── ProjectPlanning │ │ │ │ └── Types.hs │ │ │ │ ├── RebuildMonad.hs │ │ │ │ ├── Run.hs │ │ │ │ ├── Sandbox.hs │ │ │ │ ├── Sandbox │ │ │ │ ├── Index.hs │ │ │ │ ├── PackageEnvironment.hs │ │ │ │ ├── Timestamp.hs │ │ │ │ └── Types.hs │ │ │ │ ├── Security │ │ │ │ └── HTTP.hs │ │ │ │ ├── Setup.hs │ │ │ │ ├── SetupWrapper.hs │ │ │ │ ├── SrcDist.hs │ │ │ │ ├── Tar.hs │ │ │ │ ├── Targets.hs │ │ │ │ ├── Types.hs │ │ │ │ ├── Update.hs │ │ │ │ ├── Upload.hs │ │ │ │ ├── Utils.hs │ │ │ │ ├── Utils │ │ │ │ ├── Json.hs │ │ │ │ └── LabeledGraph.hs │ │ │ │ ├── Win32SelfUpgrade.hs │ │ │ │ └── World.hs │ │ ├── LICENSE │ │ ├── Main.hs │ │ ├── README.md │ │ ├── Setup.hs │ │ ├── bash-completion │ │ │ └── cabal │ │ ├── bootstrap.sh │ │ ├── cabal-install.cabal │ │ ├── cbits │ │ │ └── getnumcores.c │ │ ├── changelog │ │ └── tests │ │ │ ├── IntegrationTests.hs │ │ │ ├── IntegrationTests │ │ │ ├── custom │ │ │ │ ├── common.sh │ │ │ │ └── should_run │ │ │ │ │ ├── plain.err │ │ │ │ │ ├── plain.sh │ │ │ │ │ └── plain │ │ │ │ │ ├── A.hs │ │ │ │ │ ├── Setup.hs │ │ │ │ │ └── plain.cabal │ │ │ ├── exec │ │ │ │ ├── common.sh │ │ │ │ ├── should_fail │ │ │ │ │ ├── exit_with_failure_without_args.err │ │ │ │ │ └── exit_with_failure_without_args.sh │ │ │ │ └── should_run │ │ │ │ │ ├── Foo.hs │ │ │ │ │ ├── My.hs │ │ │ │ │ ├── adds_sandbox_bin_directory_to_path.out │ │ │ │ │ ├── adds_sandbox_bin_directory_to_path.sh │ │ │ │ │ ├── auto_configures_on_exec.out │ │ │ │ │ ├── auto_configures_on_exec.sh │ │ │ │ │ ├── can_run_executables_installed_in_sandbox.out │ │ │ │ │ ├── can_run_executables_installed_in_sandbox.sh │ │ │ │ │ ├── configures_cabal_to_use_sandbox.sh │ │ │ │ │ ├── configures_ghc_to_use_sandbox.sh │ │ │ │ │ ├── my.cabal │ │ │ │ │ ├── runs_given_command.out │ │ │ │ │ ├── runs_given_command.sh │ │ │ │ │ └── subdir │ │ │ │ │ └── .gitkeep │ │ │ ├── freeze │ │ │ │ ├── common.sh │ │ │ │ └── should_run │ │ │ │ │ ├── disable_benchmarks_freezes_bench_deps.sh │ │ │ │ │ ├── disable_tests_freezes_test_deps.sh │ │ │ │ │ ├── does_not_freeze_nondeps.sh │ │ │ │ │ ├── does_not_freeze_self.sh │ │ │ │ │ ├── dry_run_does_not_create_config.sh │ │ │ │ │ ├── enable_benchmarks_freezes_bench_deps.sh │ │ │ │ │ ├── enable_tests_freezes_test_deps.sh │ │ │ │ │ ├── freezes_direct_dependencies.sh │ │ │ │ │ ├── freezes_transitive_dependencies.sh │ │ │ │ │ ├── my.cabal │ │ │ │ │ └── runs_without_error.sh │ │ │ ├── manpage │ │ │ │ ├── common.sh │ │ │ │ └── should_run │ │ │ │ │ └── outputs_manpage.sh │ │ │ ├── multiple-source │ │ │ │ ├── common.sh │ │ │ │ └── should_run │ │ │ │ │ ├── finds_second_source_of_multiple_source.sh │ │ │ │ │ ├── p │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── Setup.hs │ │ │ │ │ └── p.cabal │ │ │ │ │ └── q │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── Setup.hs │ │ │ │ │ └── q.cabal │ │ │ ├── new-build │ │ │ │ ├── monitor_cabal_files.sh │ │ │ │ └── monitor_cabal_files │ │ │ │ │ ├── cabal.project │ │ │ │ │ ├── p │ │ │ │ │ ├── P.hs │ │ │ │ │ ├── Setup.hs │ │ │ │ │ └── p.cabal │ │ │ │ │ └── q │ │ │ │ │ ├── Main.hs │ │ │ │ │ ├── Setup.hs │ │ │ │ │ ├── q-broken.cabal.in │ │ │ │ │ └── q-fixed.cabal.in │ │ │ ├── regression │ │ │ │ ├── common.sh │ │ │ │ ├── t3199.sh │ │ │ │ └── t3199 │ │ │ │ │ ├── Main.hs │ │ │ │ │ ├── Setup.hs │ │ │ │ │ └── test-3199.cabal │ │ │ ├── sandbox-sources │ │ │ │ ├── common.sh │ │ │ │ ├── should_fail │ │ │ │ │ ├── fail_removing_source_thats_not_registered.err │ │ │ │ │ ├── fail_removing_source_thats_not_registered.sh │ │ │ │ │ ├── p │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── Setup.hs │ │ │ │ │ │ └── p.cabal │ │ │ │ │ └── q │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── Setup.hs │ │ │ │ │ │ └── q.cabal │ │ │ │ └── should_run │ │ │ │ │ ├── p │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── Setup.hs │ │ │ │ │ └── p.cabal │ │ │ │ │ ├── q │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── Setup.hs │ │ │ │ │ └── q.cabal │ │ │ │ │ ├── remove_nonexistent_source.sh │ │ │ │ │ ├── report_success_removing_source.out │ │ │ │ │ └── report_success_removing_source.sh │ │ │ └── user-config │ │ │ │ ├── common.sh │ │ │ │ ├── should_fail │ │ │ │ ├── doesnt_overwrite_without_f.err │ │ │ │ └── doesnt_overwrite_without_f.sh │ │ │ │ └── should_run │ │ │ │ ├── cabal-config │ │ │ │ ├── overwrites_with_f.out │ │ │ │ ├── overwrites_with_f.sh │ │ │ │ ├── runs_without_error.out │ │ │ │ ├── runs_without_error.sh │ │ │ │ ├── uses_CABAL_CONFIG.out │ │ │ │ └── uses_CABAL_CONFIG.sh │ │ │ ├── README.md │ │ │ ├── UnitTests.hs │ │ │ ├── UnitTests │ │ │ ├── Distribution │ │ │ │ └── Client │ │ │ │ │ ├── ArbitraryInstances.hs │ │ │ │ │ ├── Compat │ │ │ │ │ └── Time.hs │ │ │ │ │ ├── Dependency │ │ │ │ │ └── Modular │ │ │ │ │ │ ├── DSL.hs │ │ │ │ │ │ ├── PSQ.hs │ │ │ │ │ │ └── Solver.hs │ │ │ │ │ ├── FileMonitor.hs │ │ │ │ │ ├── GZipUtils.hs │ │ │ │ │ ├── Glob.hs │ │ │ │ │ ├── ProjectConfig.hs │ │ │ │ │ ├── Sandbox.hs │ │ │ │ │ ├── Sandbox │ │ │ │ │ └── Timestamp.hs │ │ │ │ │ ├── Tar.hs │ │ │ │ │ ├── Targets.hs │ │ │ │ │ └── UserConfig.hs │ │ │ └── Options.hs │ │ │ ├── test-cabal-install │ │ │ └── test-cabal-install-user │ ├── cabal.project │ ├── ghc-packages │ ├── setup-dev.sh │ └── stack.yaml ├── cabal │ ├── .arcconfig │ ├── .travis.yml │ ├── Cabal │ │ ├── Cabal.cabal │ │ ├── Distribution │ │ │ ├── Compat │ │ │ │ ├── Binary.hs │ │ │ │ ├── Binary │ │ │ │ │ ├── Class.hs │ │ │ │ │ └── Generic.hs │ │ │ │ ├── CopyFile.hs │ │ │ │ ├── CreatePipe.hs │ │ │ │ ├── Environment.hs │ │ │ │ ├── Exception.hs │ │ │ │ ├── GetShortPathName.hs │ │ │ │ ├── Internal │ │ │ │ │ └── TempFile.hs │ │ │ │ ├── MonadFail.hs │ │ │ │ ├── ReadP.hs │ │ │ │ └── Semigroup.hs │ │ │ ├── Compiler.hs │ │ │ ├── GetOpt.hs │ │ │ ├── InstalledPackageInfo.hs │ │ │ ├── Lex.hs │ │ │ ├── License.hs │ │ │ ├── Make.hs │ │ │ ├── ModuleName.hs │ │ │ ├── Package.hs │ │ │ ├── PackageDescription.hs │ │ │ ├── PackageDescription │ │ │ │ ├── Check.hs │ │ │ │ ├── Configuration.hs │ │ │ │ ├── Parse.hs │ │ │ │ ├── PrettyPrint.hs │ │ │ │ └── Utils.hs │ │ │ ├── ParseUtils.hs │ │ │ ├── ReadE.hs │ │ │ ├── Simple.hs │ │ │ ├── Simple │ │ │ │ ├── Bench.hs │ │ │ │ ├── Build.hs │ │ │ │ ├── Build │ │ │ │ │ ├── Macros.hs │ │ │ │ │ └── PathsModule.hs │ │ │ │ ├── BuildPaths.hs │ │ │ │ ├── BuildTarget.hs │ │ │ │ ├── CCompiler.hs │ │ │ │ ├── Command.hs │ │ │ │ ├── Compiler.hs │ │ │ │ ├── Configure.hs │ │ │ │ ├── GHC.hs │ │ │ │ ├── GHC │ │ │ │ │ ├── IPI642.hs │ │ │ │ │ ├── IPIConvert.hs │ │ │ │ │ ├── ImplInfo.hs │ │ │ │ │ └── Internal.hs │ │ │ │ ├── GHCJS.hs │ │ │ │ ├── Haddock.hs │ │ │ │ ├── HaskellSuite.hs │ │ │ │ ├── Hpc.hs │ │ │ │ ├── Install.hs │ │ │ │ ├── InstallDirs.hs │ │ │ │ ├── JHC.hs │ │ │ │ ├── LHC.hs │ │ │ │ ├── LocalBuildInfo.hs │ │ │ │ ├── PackageIndex.hs │ │ │ │ ├── PreProcess.hs │ │ │ │ ├── PreProcess │ │ │ │ │ └── Unlit.hs │ │ │ │ ├── Program.hs │ │ │ │ ├── Program │ │ │ │ │ ├── Ar.hs │ │ │ │ │ ├── Builtin.hs │ │ │ │ │ ├── Db.hs │ │ │ │ │ ├── Find.hs │ │ │ │ │ ├── GHC.hs │ │ │ │ │ ├── HcPkg.hs │ │ │ │ │ ├── Hpc.hs │ │ │ │ │ ├── Internal.hs │ │ │ │ │ ├── Ld.hs │ │ │ │ │ ├── Run.hs │ │ │ │ │ ├── Script.hs │ │ │ │ │ ├── Strip.hs │ │ │ │ │ └── Types.hs │ │ │ │ ├── Register.hs │ │ │ │ ├── Setup.hs │ │ │ │ ├── SrcDist.hs │ │ │ │ ├── Test.hs │ │ │ │ ├── Test │ │ │ │ │ ├── ExeV10.hs │ │ │ │ │ ├── LibV09.hs │ │ │ │ │ └── Log.hs │ │ │ │ ├── UHC.hs │ │ │ │ ├── UserHooks.hs │ │ │ │ └── Utils.hs │ │ │ ├── System.hs │ │ │ ├── TestSuite.hs │ │ │ ├── Text.hs │ │ │ ├── Utils │ │ │ │ └── NubList.hs │ │ │ ├── Verbosity.hs │ │ │ └── Version.hs │ │ ├── LICENSE │ │ ├── Language │ │ │ └── Haskell │ │ │ │ └── Extension.hs │ │ ├── Makefile │ │ ├── README.md │ │ ├── Setup.hs │ │ ├── changelog │ │ ├── doc │ │ │ ├── Cabal.css │ │ │ ├── developing-packages.markdown │ │ │ ├── index.markdown │ │ │ ├── installing-packages.markdown │ │ │ └── misc.markdown │ │ ├── misc │ │ │ ├── gen-extra-source-files.sh │ │ │ └── travis-diff-files.sh │ │ ├── prologue.txt │ │ └── tests │ │ │ ├── PackageTests.hs │ │ │ ├── PackageTests │ │ │ ├── AllowNewer │ │ │ │ ├── AllowNewer.cabal │ │ │ │ ├── benchmarks │ │ │ │ │ └── Bench.hs │ │ │ │ ├── src │ │ │ │ │ └── Foo.hs │ │ │ │ └── tests │ │ │ │ │ └── Test.hs │ │ │ ├── BenchmarkExeV10 │ │ │ │ ├── Foo.hs │ │ │ │ ├── benchmarks │ │ │ │ │ └── bench-Foo.hs │ │ │ │ └── my.cabal │ │ │ ├── BenchmarkOptions │ │ │ │ ├── BenchmarkOptions.cabal │ │ │ │ └── test-BenchmarkOptions.hs │ │ │ ├── BenchmarkStanza │ │ │ │ ├── Check.hs │ │ │ │ └── my.cabal │ │ │ ├── BuildDeps │ │ │ │ ├── GlobalBuildDepsNotAdditive1 │ │ │ │ │ ├── Check.hs │ │ │ │ │ ├── GlobalBuildDepsNotAdditive1.cabal │ │ │ │ │ └── MyLibrary.hs │ │ │ │ ├── GlobalBuildDepsNotAdditive2 │ │ │ │ │ ├── Check.hs │ │ │ │ │ ├── GlobalBuildDepsNotAdditive2.cabal │ │ │ │ │ └── lemon.hs │ │ │ │ ├── InternalLibrary0 │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── my.cabal │ │ │ │ │ └── programs │ │ │ │ │ │ └── lemon.hs │ │ │ │ ├── InternalLibrary1 │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── my.cabal │ │ │ │ │ └── programs │ │ │ │ │ │ └── lemon.hs │ │ │ │ ├── InternalLibrary2 │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── my.cabal │ │ │ │ │ ├── programs │ │ │ │ │ │ └── lemon.hs │ │ │ │ │ └── to-install │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ ├── InternalLibrary3 │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── my.cabal │ │ │ │ │ ├── programs │ │ │ │ │ │ └── lemon.hs │ │ │ │ │ └── to-install │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ ├── InternalLibrary4 │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── my.cabal │ │ │ │ │ ├── programs │ │ │ │ │ │ └── lemon.hs │ │ │ │ │ └── to-install │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ ├── SameDepsAllRound │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── SameDepsAllRound.cabal │ │ │ │ │ ├── lemon.hs │ │ │ │ │ └── pineapple.hs │ │ │ │ ├── TargetSpecificDeps1 │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── lemon.hs │ │ │ │ │ └── my.cabal │ │ │ │ ├── TargetSpecificDeps2 │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── lemon.hs │ │ │ │ │ └── my.cabal │ │ │ │ └── TargetSpecificDeps3 │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── lemon.hs │ │ │ │ │ └── my.cabal │ │ │ ├── BuildTestSuiteDetailedV09 │ │ │ │ └── Dummy2.hs │ │ │ ├── BuildableField │ │ │ │ ├── BuildableField.cabal │ │ │ │ └── Main.hs │ │ │ ├── CMain │ │ │ │ ├── Bar.hs │ │ │ │ ├── foo.c │ │ │ │ └── my.cabal │ │ │ ├── DeterministicAr │ │ │ │ ├── Check.hs │ │ │ │ ├── Lib.hs │ │ │ │ └── my.cabal │ │ │ ├── DuplicateModuleName │ │ │ │ ├── DuplicateModuleName.cabal │ │ │ │ ├── src │ │ │ │ │ └── Foo.hs │ │ │ │ ├── tests │ │ │ │ │ └── Foo.hs │ │ │ │ └── tests2 │ │ │ │ │ └── Foo.hs │ │ │ ├── EmptyLib │ │ │ │ └── empty │ │ │ │ │ └── empty.cabal │ │ │ ├── GhcPkgGuess │ │ │ │ ├── SameDirectory │ │ │ │ │ ├── SameDirectory.cabal │ │ │ │ │ ├── ghc │ │ │ │ │ └── ghc-pkg │ │ │ │ ├── SameDirectoryGhcVersion │ │ │ │ │ ├── SameDirectory.cabal │ │ │ │ │ ├── ghc-7.10 │ │ │ │ │ └── ghc-pkg-ghc-7.10 │ │ │ │ ├── SameDirectoryVersion │ │ │ │ │ ├── SameDirectory.cabal │ │ │ │ │ ├── ghc-7.10 │ │ │ │ │ └── ghc-pkg-7.10 │ │ │ │ ├── Symlink │ │ │ │ │ ├── SameDirectory.cabal │ │ │ │ │ └── bin │ │ │ │ │ │ ├── ghc │ │ │ │ │ │ └── ghc-pkg │ │ │ │ ├── SymlinkGhcVersion │ │ │ │ │ ├── SameDirectory.cabal │ │ │ │ │ └── bin │ │ │ │ │ │ ├── ghc-7.10 │ │ │ │ │ │ └── ghc-pkg-7.10 │ │ │ │ └── SymlinkVersion │ │ │ │ │ ├── SameDirectory.cabal │ │ │ │ │ └── bin │ │ │ │ │ ├── ghc-7.10 │ │ │ │ │ └── ghc-pkg-ghc-7.10 │ │ │ ├── Haddock │ │ │ │ ├── CPP.hs │ │ │ │ ├── Literate.lhs │ │ │ │ ├── NoCPP.hs │ │ │ │ ├── Simple.hs │ │ │ │ └── my.cabal │ │ │ ├── HaddockNewline │ │ │ │ ├── A.hs │ │ │ │ ├── ChangeLog.md │ │ │ │ ├── HaddockNewline.cabal │ │ │ │ ├── LICENSE │ │ │ │ └── Setup.hs │ │ │ ├── Options.hs │ │ │ ├── OrderFlags │ │ │ │ ├── Foo.hs │ │ │ │ └── my.cabal │ │ │ ├── PackageTester.hs │ │ │ ├── PathsModule │ │ │ │ ├── Executable │ │ │ │ │ ├── Main.hs │ │ │ │ │ └── my.cabal │ │ │ │ └── Library │ │ │ │ │ └── my.cabal │ │ │ ├── PreProcess │ │ │ │ ├── Foo.hsc │ │ │ │ ├── Main.hs │ │ │ │ └── my.cabal │ │ │ ├── PreProcessExtraSources │ │ │ │ ├── Foo.hsc │ │ │ │ ├── Main.hs │ │ │ │ └── my.cabal │ │ │ ├── ReexportedModules │ │ │ │ ├── LICENSE │ │ │ │ └── ReexportedModules.cabal │ │ │ ├── TemplateHaskell │ │ │ │ ├── dynamic │ │ │ │ │ ├── Exe.hs │ │ │ │ │ ├── Lib.hs │ │ │ │ │ ├── TH.hs │ │ │ │ │ └── my.cabal │ │ │ │ ├── profiling │ │ │ │ │ ├── Exe.hs │ │ │ │ │ ├── Lib.hs │ │ │ │ │ ├── TH.hs │ │ │ │ │ └── my.cabal │ │ │ │ └── vanilla │ │ │ │ │ ├── Exe.hs │ │ │ │ │ ├── Lib.hs │ │ │ │ │ ├── TH.hs │ │ │ │ │ └── my.cabal │ │ │ ├── TestNameCollision │ │ │ │ ├── child │ │ │ │ │ ├── Child.hs │ │ │ │ │ ├── child.cabal │ │ │ │ │ └── tests │ │ │ │ │ │ └── Test.hs │ │ │ │ └── parent │ │ │ │ │ ├── Parent.hs │ │ │ │ │ └── parent.cabal │ │ │ ├── TestOptions │ │ │ │ ├── TestOptions.cabal │ │ │ │ └── test-TestOptions.hs │ │ │ ├── TestStanza │ │ │ │ ├── Check.hs │ │ │ │ └── my.cabal │ │ │ ├── TestSuiteTests │ │ │ │ ├── ExeV10 │ │ │ │ │ ├── Check.hs │ │ │ │ │ ├── Foo.hs │ │ │ │ │ ├── my.cabal │ │ │ │ │ └── tests │ │ │ │ │ │ ├── test-Foo.hs │ │ │ │ │ │ └── test-Short.hs │ │ │ │ └── LibV09 │ │ │ │ │ ├── Lib.hs │ │ │ │ │ ├── LibV09.cabal │ │ │ │ │ └── tests │ │ │ │ │ └── Deadlock.hs │ │ │ ├── Tests.hs │ │ │ ├── UniqueIPID │ │ │ │ ├── P1 │ │ │ │ │ ├── M.hs │ │ │ │ │ └── my.cabal │ │ │ │ └── P2 │ │ │ │ │ ├── M.hs │ │ │ │ │ └── my.cabal │ │ │ └── multInst │ │ │ │ └── my.cabal │ │ │ ├── README.md │ │ │ ├── Setup.hs │ │ │ ├── Test │ │ │ ├── Laws.hs │ │ │ └── QuickCheck │ │ │ │ └── Utils.hs │ │ │ ├── UnitTests.hs │ │ │ ├── UnitTests │ │ │ └── Distribution │ │ │ │ ├── Compat │ │ │ │ ├── CreatePipe.hs │ │ │ │ └── ReadP.hs │ │ │ │ ├── Simple │ │ │ │ ├── Program │ │ │ │ │ └── Internal.hs │ │ │ │ └── Utils.hs │ │ │ │ ├── System.hs │ │ │ │ ├── Utils │ │ │ │ └── NubList.hs │ │ │ │ └── Version.hs │ │ │ ├── hackage │ │ │ ├── check.sh │ │ │ ├── download.sh │ │ │ └── unpack.sh │ │ │ └── misc │ │ │ └── ghc-supported-languages.hs │ ├── HACKING.md │ ├── LICENSE │ ├── README.md │ ├── appveyor.yml │ ├── cabal-install │ │ ├── .ghci │ │ ├── Distribution │ │ │ └── Client │ │ │ │ ├── BuildReports │ │ │ │ ├── Anonymous.hs │ │ │ │ ├── Storage.hs │ │ │ │ ├── Types.hs │ │ │ │ └── Upload.hs │ │ │ │ ├── BuildTarget.hs │ │ │ │ ├── Check.hs │ │ │ │ ├── CmdBuild.hs │ │ │ │ ├── CmdConfigure.hs │ │ │ │ ├── CmdRepl.hs │ │ │ │ ├── Compat │ │ │ │ ├── ExecutablePath.hs │ │ │ │ ├── FilePerms.hs │ │ │ │ ├── Process.hs │ │ │ │ ├── Semaphore.hs │ │ │ │ └── Time.hs │ │ │ │ ├── ComponentDeps.hs │ │ │ │ ├── Config.hs │ │ │ │ ├── Configure.hs │ │ │ │ ├── Dependency.hs │ │ │ │ ├── Dependency │ │ │ │ ├── Modular.hs │ │ │ │ ├── Modular │ │ │ │ │ ├── Assignment.hs │ │ │ │ │ ├── Builder.hs │ │ │ │ │ ├── Configured.hs │ │ │ │ │ ├── ConfiguredConversion.hs │ │ │ │ │ ├── ConflictSet.hs │ │ │ │ │ ├── Cycles.hs │ │ │ │ │ ├── Dependency.hs │ │ │ │ │ ├── Explore.hs │ │ │ │ │ ├── Flag.hs │ │ │ │ │ ├── Index.hs │ │ │ │ │ ├── IndexConversion.hs │ │ │ │ │ ├── Linking.hs │ │ │ │ │ ├── Log.hs │ │ │ │ │ ├── Message.hs │ │ │ │ │ ├── PSQ.hs │ │ │ │ │ ├── Package.hs │ │ │ │ │ ├── Preference.hs │ │ │ │ │ ├── Solver.hs │ │ │ │ │ ├── Tree.hs │ │ │ │ │ ├── Validate.hs │ │ │ │ │ ├── Var.hs │ │ │ │ │ └── Version.hs │ │ │ │ ├── TopDown.hs │ │ │ │ ├── TopDown │ │ │ │ │ ├── Constraints.hs │ │ │ │ │ └── Types.hs │ │ │ │ └── Types.hs │ │ │ │ ├── DistDirLayout.hs │ │ │ │ ├── Exec.hs │ │ │ │ ├── Fetch.hs │ │ │ │ ├── FetchUtils.hs │ │ │ │ ├── FileMonitor.hs │ │ │ │ ├── Freeze.hs │ │ │ │ ├── GZipUtils.hs │ │ │ │ ├── GenBounds.hs │ │ │ │ ├── Get.hs │ │ │ │ ├── Glob.hs │ │ │ │ ├── GlobalFlags.hs │ │ │ │ ├── Haddock.hs │ │ │ │ ├── HttpUtils.hs │ │ │ │ ├── IndexUtils.hs │ │ │ │ ├── Init.hs │ │ │ │ ├── Init │ │ │ │ ├── Heuristics.hs │ │ │ │ ├── Licenses.hs │ │ │ │ └── Types.hs │ │ │ │ ├── Install.hs │ │ │ │ ├── InstallPlan.hs │ │ │ │ ├── InstallSymlink.hs │ │ │ │ ├── JobControl.hs │ │ │ │ ├── List.hs │ │ │ │ ├── Manpage.hs │ │ │ │ ├── PackageHash.hs │ │ │ │ ├── PackageIndex.hs │ │ │ │ ├── PackageUtils.hs │ │ │ │ ├── ParseUtils.hs │ │ │ │ ├── PkgConfigDb.hs │ │ │ │ ├── PlanIndex.hs │ │ │ │ ├── ProjectBuilding.hs │ │ │ │ ├── ProjectConfig.hs │ │ │ │ ├── ProjectConfig │ │ │ │ ├── Legacy.hs │ │ │ │ └── Types.hs │ │ │ │ ├── ProjectOrchestration.hs │ │ │ │ ├── ProjectPlanOutput.hs │ │ │ │ ├── ProjectPlanning.hs │ │ │ │ ├── ProjectPlanning │ │ │ │ └── Types.hs │ │ │ │ ├── RebuildMonad.hs │ │ │ │ ├── Run.hs │ │ │ │ ├── Sandbox.hs │ │ │ │ ├── Sandbox │ │ │ │ ├── Index.hs │ │ │ │ ├── PackageEnvironment.hs │ │ │ │ ├── Timestamp.hs │ │ │ │ └── Types.hs │ │ │ │ ├── Security │ │ │ │ └── HTTP.hs │ │ │ │ ├── Setup.hs │ │ │ │ ├── SetupWrapper.hs │ │ │ │ ├── SrcDist.hs │ │ │ │ ├── Tar.hs │ │ │ │ ├── Targets.hs │ │ │ │ ├── Types.hs │ │ │ │ ├── Update.hs │ │ │ │ ├── Upload.hs │ │ │ │ ├── Utils.hs │ │ │ │ ├── Utils │ │ │ │ ├── Json.hs │ │ │ │ └── LabeledGraph.hs │ │ │ │ ├── Win32SelfUpgrade.hs │ │ │ │ └── World.hs │ │ ├── LICENSE │ │ ├── Main.hs │ │ ├── README.md │ │ ├── Setup.hs │ │ ├── bash-completion │ │ │ └── cabal │ │ ├── bootstrap.sh │ │ ├── cabal-install.cabal │ │ ├── cbits │ │ │ └── getnumcores.c │ │ ├── changelog │ │ └── tests │ │ │ ├── IntegrationTests.hs │ │ │ ├── IntegrationTests │ │ │ ├── custom │ │ │ │ ├── common.sh │ │ │ │ └── should_run │ │ │ │ │ ├── plain.err │ │ │ │ │ ├── plain.sh │ │ │ │ │ └── plain │ │ │ │ │ ├── A.hs │ │ │ │ │ ├── Setup.hs │ │ │ │ │ └── plain.cabal │ │ │ ├── exec │ │ │ │ ├── common.sh │ │ │ │ ├── should_fail │ │ │ │ │ ├── exit_with_failure_without_args.err │ │ │ │ │ └── exit_with_failure_without_args.sh │ │ │ │ └── should_run │ │ │ │ │ ├── Foo.hs │ │ │ │ │ ├── My.hs │ │ │ │ │ ├── adds_sandbox_bin_directory_to_path.out │ │ │ │ │ ├── adds_sandbox_bin_directory_to_path.sh │ │ │ │ │ ├── auto_configures_on_exec.out │ │ │ │ │ ├── auto_configures_on_exec.sh │ │ │ │ │ ├── can_run_executables_installed_in_sandbox.out │ │ │ │ │ ├── can_run_executables_installed_in_sandbox.sh │ │ │ │ │ ├── configures_cabal_to_use_sandbox.sh │ │ │ │ │ ├── configures_ghc_to_use_sandbox.sh │ │ │ │ │ ├── my.cabal │ │ │ │ │ ├── runs_given_command.out │ │ │ │ │ ├── runs_given_command.sh │ │ │ │ │ └── subdir │ │ │ │ │ └── .gitkeep │ │ │ ├── freeze │ │ │ │ ├── common.sh │ │ │ │ └── should_run │ │ │ │ │ ├── disable_benchmarks_freezes_bench_deps.sh │ │ │ │ │ ├── disable_tests_freezes_test_deps.sh │ │ │ │ │ ├── does_not_freeze_nondeps.sh │ │ │ │ │ ├── does_not_freeze_self.sh │ │ │ │ │ ├── dry_run_does_not_create_config.sh │ │ │ │ │ ├── enable_benchmarks_freezes_bench_deps.sh │ │ │ │ │ ├── enable_tests_freezes_test_deps.sh │ │ │ │ │ ├── freezes_direct_dependencies.sh │ │ │ │ │ ├── freezes_transitive_dependencies.sh │ │ │ │ │ ├── my.cabal │ │ │ │ │ └── runs_without_error.sh │ │ │ ├── manpage │ │ │ │ ├── common.sh │ │ │ │ └── should_run │ │ │ │ │ └── outputs_manpage.sh │ │ │ ├── multiple-source │ │ │ │ ├── common.sh │ │ │ │ └── should_run │ │ │ │ │ ├── finds_second_source_of_multiple_source.sh │ │ │ │ │ ├── p │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── Setup.hs │ │ │ │ │ └── p.cabal │ │ │ │ │ └── q │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── Setup.hs │ │ │ │ │ └── q.cabal │ │ │ ├── new-build │ │ │ │ ├── monitor_cabal_files.sh │ │ │ │ └── monitor_cabal_files │ │ │ │ │ ├── cabal.project │ │ │ │ │ ├── p │ │ │ │ │ ├── P.hs │ │ │ │ │ ├── Setup.hs │ │ │ │ │ └── p.cabal │ │ │ │ │ └── q │ │ │ │ │ ├── Main.hs │ │ │ │ │ ├── Setup.hs │ │ │ │ │ ├── q-broken.cabal.in │ │ │ │ │ └── q-fixed.cabal.in │ │ │ ├── regression │ │ │ │ ├── common.sh │ │ │ │ ├── t3199.sh │ │ │ │ └── t3199 │ │ │ │ │ ├── Main.hs │ │ │ │ │ ├── Setup.hs │ │ │ │ │ └── test-3199.cabal │ │ │ ├── sandbox-sources │ │ │ │ ├── common.sh │ │ │ │ ├── should_fail │ │ │ │ │ ├── fail_removing_source_thats_not_registered.err │ │ │ │ │ ├── fail_removing_source_thats_not_registered.sh │ │ │ │ │ ├── p │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── Setup.hs │ │ │ │ │ │ └── p.cabal │ │ │ │ │ └── q │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── Setup.hs │ │ │ │ │ │ └── q.cabal │ │ │ │ └── should_run │ │ │ │ │ ├── p │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── Setup.hs │ │ │ │ │ └── p.cabal │ │ │ │ │ ├── q │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── Setup.hs │ │ │ │ │ └── q.cabal │ │ │ │ │ ├── remove_nonexistent_source.sh │ │ │ │ │ ├── report_success_removing_source.out │ │ │ │ │ └── report_success_removing_source.sh │ │ │ └── user-config │ │ │ │ ├── common.sh │ │ │ │ ├── should_fail │ │ │ │ ├── doesnt_overwrite_without_f.err │ │ │ │ └── doesnt_overwrite_without_f.sh │ │ │ │ └── should_run │ │ │ │ ├── cabal-config │ │ │ │ ├── overwrites_with_f.out │ │ │ │ ├── overwrites_with_f.sh │ │ │ │ ├── runs_without_error.out │ │ │ │ ├── runs_without_error.sh │ │ │ │ ├── uses_CABAL_CONFIG.out │ │ │ │ └── uses_CABAL_CONFIG.sh │ │ │ ├── README.md │ │ │ ├── UnitTests.hs │ │ │ ├── UnitTests │ │ │ ├── Distribution │ │ │ │ └── Client │ │ │ │ │ ├── ArbitraryInstances.hs │ │ │ │ │ ├── Compat │ │ │ │ │ └── Time.hs │ │ │ │ │ ├── Dependency │ │ │ │ │ └── Modular │ │ │ │ │ │ ├── DSL.hs │ │ │ │ │ │ ├── PSQ.hs │ │ │ │ │ │ └── Solver.hs │ │ │ │ │ ├── FileMonitor.hs │ │ │ │ │ ├── GZipUtils.hs │ │ │ │ │ ├── Glob.hs │ │ │ │ │ ├── ProjectConfig.hs │ │ │ │ │ ├── Sandbox.hs │ │ │ │ │ ├── Sandbox │ │ │ │ │ └── Timestamp.hs │ │ │ │ │ ├── Tar.hs │ │ │ │ │ ├── Targets.hs │ │ │ │ │ └── UserConfig.hs │ │ │ └── Options.hs │ │ │ ├── test-cabal-install │ │ │ └── test-cabal-install-user │ ├── cabal.project │ ├── ghc-packages │ ├── setup-dev.sh │ └── stack.yaml ├── err ├── integer-gmp-next │ ├── LICENSE │ ├── Setup.hs │ ├── aclocal.m4 │ ├── cbits │ │ └── wrappers.c │ ├── changelog.md │ ├── config.guess │ ├── config.sub │ ├── configure │ ├── configure.ac │ ├── gmp │ │ └── config.mk.in │ ├── include │ │ └── HsIntegerGmp.h.in │ ├── install-sh │ ├── integer-gmp.buildinfo.in │ ├── integer-gmp.cabal │ ├── jsbits │ │ └── ghcjsbn.js │ └── src │ │ └── GHC │ │ ├── Integer.hs │ │ └── Integer │ │ ├── GMP │ │ └── Internals.hs │ │ ├── Logarithms.hs │ │ ├── Logarithms │ │ └── Internals.hs │ │ └── Type.hs └── integer-gmp │ ├── GHC │ ├── Integer.lhs │ └── Integer │ │ ├── GMP │ │ ├── Internals.hs │ │ └── Prim.hs │ │ ├── Logarithms.hs │ │ ├── Logarithms │ │ └── Internals.hs │ │ └── Type.lhs │ ├── LICENSE │ ├── Setup.hs │ ├── aclocal.m4 │ ├── autom4te.cache │ ├── output.0 │ ├── requests │ └── traces.0 │ ├── cbits │ ├── alloc.c │ ├── cbits.c │ ├── float.c │ ├── gmp-wrappers.cmm │ └── longlong.c │ ├── changelog.md │ ├── config.guess │ ├── config.sub │ ├── configure │ ├── configure.ac │ ├── gmp │ ├── config.mk.in │ ├── ghc.mk │ ├── ln │ └── tarball │ │ ├── README │ │ ├── gmp-5.0.3-nodoc-patched.tar.bz2 │ │ ├── gmp-5.0.4.patch │ │ └── patch │ ├── include │ └── HsIntegerGmp.h.in │ ├── install-sh │ ├── integer-gmp.buildinfo.in │ ├── integer-gmp.cabal │ └── mkGmpDerivedConstants │ ├── Makefile │ ├── ghc.mk │ └── mkGmpDerivedConstants.c └── stack.yaml /.gitignore: -------------------------------------------------------------------------------- 1 | dist* 2 | .idea/ 3 | *.hi 4 | *.o 5 | *.sqlite3 6 | *.keter 7 | .hsenv* 8 | cabal-dev/ 9 | yesod-devel/ 10 | .cabal-sandbox 11 | cabal.sandbox.config 12 | .DS_Store 13 | *.swp 14 | run.sh 15 | extra-bower 16 | bower_components 17 | why.md 18 | case.md 19 | .idea 20 | .idea/* 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ghcjs-stack 2 | align ghcjs with stack (lts6 branch) 3 | 4 | #depricated in favour of https://github.com/tolysz/prepare-ghcjs 5 | 6 | 7 | Allow to create ghcjs installation archive which has the same versions as the `stack --resolver` 8 | 9 | exceptions: 10 | `integer-gmp` - this needs some love to makie it 11 | `cabal` 12 | `ghc-prim` 13 | 14 | downside is we need to maintain patches for all versions we have... 15 | 16 | Ocasionally I run the script myself and upload results to: 17 | 18 | http://tolysz.org/ghcjs 19 | 20 | But this is a proof of concept; and we need to find a way to make it more streamline. 21 | 22 | Or even easier: 23 | https://github.com/tolysz/reflex-todomvc @ stack-experimental branch 24 | -------------------------------------------------------------------------------- /fetch-packages.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | . lib.sh 4 | 5 | export KEEP=ghcjs-boot/boot 6 | export DEST=new-boot 7 | export SPECIAL=special 8 | 9 | rm -r $DEST 10 | mkdir $DEST 11 | 12 | 13 | stack list-dependencies --resolver $RESOLVER | \ 14 | while read i j; do 15 | 16 | getPackage $i $j 17 | mv $i $DEST 18 | 19 | done 20 | 21 | cp -r $KEEP/integer-gmp $DEST 22 | #cp -r $SPECIAL/integer-gmp $DEST 23 | cp -r $SPECIAL/cabal $DEST 24 | cp -r $KEEP/Win32 $DEST 25 | -------------------------------------------------------------------------------- /special/Win32/Setup.hs: -------------------------------------------------------------------------------- 1 | module Main (main) where 2 | 3 | import Distribution.Simple 4 | 5 | main :: IO () 6 | main = defaultMainWithHooks autoconfUserHooks 7 | -------------------------------------------------------------------------------- /special/Win32/cbits/HsGDI.c: -------------------------------------------------------------------------------- 1 | // Out-of-line versions of all the inline functions from HsGDI.h 2 | #define INLINE /* nothing */ 3 | #include "HsGDI.h" 4 | -------------------------------------------------------------------------------- /special/Win32/cbits/HsWin32.c: -------------------------------------------------------------------------------- 1 | // Out-of-line versions of all the inline functions from HsWin32.h 2 | #define INLINE /* nothing */ 3 | #include "HsWin32.h" 4 | 5 | void UnmapViewOfFileFinaliser(void * p) { 6 | UnmapViewOfFile(p); 7 | } 8 | 9 | void CloseHandleFinaliser(HANDLE h) { 10 | CloseHandle(h); 11 | } 12 | 13 | void FreeLibraryFinaliser(HMODULE m) { 14 | FreeLibrary(m); 15 | } 16 | 17 | void DeleteObjectFinaliser(HGDIOBJ h) { 18 | DeleteObject(h); 19 | } 20 | -------------------------------------------------------------------------------- /special/Win32/doc/Makefile: -------------------------------------------------------------------------------- 1 | TOP = ../.. 2 | include $(TOP)/mk/boilerplate.mk 3 | 4 | XML_DOC = HSWin32 5 | 6 | include $(TOP)/mk/target.mk 7 | -------------------------------------------------------------------------------- /special/Win32/include/Win32Aux.h: -------------------------------------------------------------------------------- 1 | /* We define OEMRESOURCE so that we can get the OBM_ constants */ 2 | 3 | #define OEMRESOURCE 4 | -------------------------------------------------------------------------------- /special/Win32/include/WndProc.h: -------------------------------------------------------------------------------- 1 | #ifndef __WNDPROC_H 2 | #define __WNDPROC_H 3 | 4 | #define UNICODE 5 | #include 6 | 7 | extern LRESULT CALLBACK genericWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); 8 | 9 | #endif /* __WNDPROC_H */ 10 | -------------------------------------------------------------------------------- /special/Win32/include/dumpBMP.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /* There's currently no #define that indicate whether we're 4 | compiling a .hc file. */ 5 | 6 | extern void CreateBMPFile(LPCTSTR pszFileName, HBITMAP hBmp, HDC hDC); 7 | -------------------------------------------------------------------------------- /special/Win32/include/ellipse.h: -------------------------------------------------------------------------------- 1 | #ifndef __ELLIPSE_H 2 | #define __ELLIPSE_H 3 | 4 | #include 5 | 6 | extern int transformedEllipse(HDC, LONG, LONG, LONG, LONG, LONG, LONG); 7 | 8 | #endif /* __ELLIPSE_H */ 9 | -------------------------------------------------------------------------------- /special/Win32/include/errors.h: -------------------------------------------------------------------------------- 1 | #ifndef _MY_ERRORS_H 2 | #define _MY_ERRORS_H 3 | 4 | #include 5 | 6 | /* There's two ways we can generate error messages - with different tradeoffs: 7 | * If we do a function call, we have to use a static buffer. 8 | * If we use a macro and ANSI C's string splicing, we have to use constant 9 | * strings - and accept a certain amount of overhead from inserting the 10 | * boilerplate text. 11 | */ 12 | 13 | /* result should be freed using LocalFree */ 14 | extern LPTSTR getErrorMessage(DWORD err); 15 | 16 | #endif /* _MY_ERRORS_H */ 17 | -------------------------------------------------------------------------------- /special/Win32/include/win32debug.h: -------------------------------------------------------------------------------- 1 | #ifndef __WIN32_LIB_DEBUG_H 2 | /* prefix WIN32_LIB to give it a better chance of being unique */ 3 | #define __WIN32_LIB_DEBUG_H 4 | 5 | #if defined(TARGET_GHC) && defined(WIN32_LIB_DEBUG) 6 | extern char* __current_fun__; 7 | #endif 8 | 9 | #endif /* __WIN32_LIB_DEBUG_H */ 10 | -------------------------------------------------------------------------------- /special/Win32/include/windows_cconv.h: -------------------------------------------------------------------------------- 1 | #ifndef __WINDOWS_CCONV_H 2 | #define __WINDOWS_CCONV_H 3 | 4 | #if defined(i386_HOST_ARCH) 5 | # define WINDOWS_CCONV stdcall 6 | #elif defined(x86_64_HOST_ARCH) 7 | # define WINDOWS_CCONV ccall 8 | #else 9 | # error Unknown mingw32 arch 10 | #endif 11 | 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /special/Win32/prologue.txt: -------------------------------------------------------------------------------- 1 | A Haskell binding to the Win32 API. 2 | -------------------------------------------------------------------------------- /special/Win32/tests/Makefile: -------------------------------------------------------------------------------- 1 | # This Makefile runs the tests using GHC's testsuite framework. It 2 | # assumes the package is part of a GHC build tree with the testsuite 3 | # installed in ../../../testsuite. 4 | 5 | TOP=../../../testsuite 6 | include $(TOP)/mk/boilerplate.mk 7 | include $(TOP)/mk/test.mk 8 | -------------------------------------------------------------------------------- /special/Win32/tests/T4452.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import Control.Monad 4 | import Foreign.Ptr 5 | import Graphics.Win32.GDI.Clip 6 | 7 | main = do 8 | openClipboard nullPtr 9 | go 0 10 | where 11 | go n = do 12 | n' <- enumClipboardFormats n 13 | unless (n == 0) (go n') 14 | -------------------------------------------------------------------------------- /special/Win32/tests/all.T: -------------------------------------------------------------------------------- 1 | test('registry001', normal, compile_and_run, ['']) 2 | 3 | # This isn't a very good test to run automatically at the moment, since 4 | # it doesn't terminate 5 | test('helloworld', skip, compile_and_run, ['-package lang -package win32']) 6 | 7 | test('lasterror', normal, compile_and_run, ['-package Win32']) 8 | test('T4452', normal, compile_and_run, ['-package Win32']) 9 | -------------------------------------------------------------------------------- /special/Win32/tests/lasterror.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ForeignFunctionInterface #-} 2 | -- Test that the Win32 error code from getLastError is thread-local. 3 | 4 | import System.Win32 5 | import Control.Monad 6 | import Control.Concurrent 7 | 8 | main = do 9 | setLastError 42 10 | r <- getLastError 11 | when (r /= 42) $ fail ("wrong: " ++ show r) 12 | m <- newEmptyMVar 13 | forkIO $ do setLastError 43; putMVar m () 14 | takeMVar m 15 | r <- getLastError 16 | when (r /= 42) $ fail ("wrong: " ++ show r) 17 | 18 | foreign import stdcall unsafe "windows.h SetLastError" 19 | setLastError :: ErrCode -> IO () 20 | -------------------------------------------------------------------------------- /special/Win32/tests/registry001.hs: -------------------------------------------------------------------------------- 1 | import System.Win32 2 | import Control.Exception 3 | import Control.Monad 4 | 5 | x = "bumble" 6 | name = "test_registry001" 7 | 8 | -- Create, read, and delete a value (test for bug #3241) 9 | main = do 10 | k1 <- regCreateKey hKEY_CURRENT_USER "Software" 11 | k2 <- regCreateKey k1 "Haskell" 12 | k3 <- regCreateKey k2 "GHC" 13 | flip finally (regDeleteValue k3 name) $ do 14 | regSetStringValue k3 name x 15 | r <- regQueryValue k3 (Just name) 16 | print r 17 | -------------------------------------------------------------------------------- /special/Win32/tests/registry001.stdout: -------------------------------------------------------------------------------- 1 | "bumble" 2 | -------------------------------------------------------------------------------- /special/cabal-next/.arcconfig: -------------------------------------------------------------------------------- 1 | { 2 | "repository.callsign" : "CABAL", 3 | "phabricator.uri" : "https://phabricator.haskell.org" 4 | } 5 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/Distribution/Compat/Exception.hs: -------------------------------------------------------------------------------- 1 | module Distribution.Compat.Exception ( 2 | catchIO, 3 | catchExit, 4 | tryIO, 5 | ) where 6 | 7 | import System.Exit 8 | import qualified Control.Exception as Exception 9 | 10 | tryIO :: IO a -> IO (Either Exception.IOException a) 11 | tryIO = Exception.try 12 | 13 | catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a 14 | catchIO = Exception.catch 15 | 16 | catchExit :: IO a -> (ExitCode -> IO a) -> IO a 17 | catchExit = Exception.catch 18 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main :: IO () 3 | main = defaultMain 4 | 5 | -- Although this looks like the Simple build type, it is in fact vital that 6 | -- we use this Setup.hs because it'll get compiled against the local copy 7 | -- of the Cabal lib, thus enabling Cabal to bootstrap itself without relying 8 | -- on any previous installation. This also means we can use any new features 9 | -- immediately because we never have to worry about building Cabal with an 10 | -- older version of itself. 11 | -- 12 | -- NOTE 25/01/2015: Bootstrapping is disabled for now, see 13 | -- https://github.com/haskell/cabal/issues/3003. 14 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/misc/travis-diff-files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | git status > /dev/null # See https://github.com/haskell/cabal/pull/3088#commitcomment-15818452 3 | git diff-files -p --exit-code 4 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/prologue.txt: -------------------------------------------------------------------------------- 1 | The Haskell Cabal is the Common Architecture for Building Applications 2 | and Libraries. It is a framework which defines a common interface for 3 | authors to more easily build their applications in a portable way. The 4 | Haskell Cabal is meant to be a part of a larger infrastructure for 5 | distributing, organizing, and cataloging Haskell Libraries and 6 | Tools. For more information, please see: 7 | . 8 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/AllowNewer/benchmarks/Bench.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | main :: IO () 4 | main = return () 5 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/AllowNewer/src/Foo.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | main :: IO () 4 | main = return () 5 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/AllowNewer/tests/Test.hs: -------------------------------------------------------------------------------- 1 | !module Main where 2 | 3 | main :: IO () 4 | main = return () 5 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BenchmarkExeV10/Foo.hs: -------------------------------------------------------------------------------- 1 | module Foo where 2 | 3 | fooTest :: [String] -> Bool 4 | fooTest _ = True 5 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BenchmarkExeV10/benchmarks/bench-Foo.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import Foo 4 | import System.Exit 5 | 6 | main :: IO () 7 | main | fooTest [] = exitSuccess 8 | | otherwise = exitFailure 9 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BenchmarkExeV10/my.cabal: -------------------------------------------------------------------------------- 1 | name: my 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.9.2 5 | build-type: Simple 6 | 7 | library 8 | exposed-modules: Foo 9 | build-depends: base 10 | 11 | benchmark bench-Foo 12 | type: exitcode-stdio-1.0 13 | hs-source-dirs: benchmarks 14 | main-is: bench-Foo.hs 15 | build-depends: base, my 16 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BenchmarkOptions/BenchmarkOptions.cabal: -------------------------------------------------------------------------------- 1 | name: BenchmarkOptions 2 | version: 0.1 3 | license: BSD3 4 | author: Johan Tibell 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | cabal-version: >= 1.9.2 9 | 10 | description: 11 | Check that Cabal passes the correct test options to test suites. 12 | 13 | executable dummy 14 | main-is: test-BenchmarkOptions.hs 15 | build-depends: base 16 | 17 | benchmark test-BenchmarkOptions 18 | main-is: test-BenchmarkOptions.hs 19 | type: exitcode-stdio-1.0 20 | build-depends: base 21 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BenchmarkOptions/test-BenchmarkOptions.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import System.Environment ( getArgs ) 4 | import System.Exit ( exitFailure, exitSuccess ) 5 | 6 | main :: IO () 7 | main = do 8 | args <- getArgs 9 | if args == ["1", "2", "3"] 10 | then exitSuccess 11 | else putStrLn ("Got: " ++ show args) >> exitFailure 12 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BenchmarkStanza/my.cabal: -------------------------------------------------------------------------------- 1 | name: BenchmarkStanza 2 | version: 0.1 3 | license: BSD3 4 | author: Johan Tibell 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | 9 | description: 10 | Check that Cabal recognizes the benchmark stanza defined below. 11 | 12 | Library 13 | exposed-modules: MyLibrary 14 | build-depends: base 15 | 16 | benchmark dummy 17 | main-is: dummy.hs 18 | type: exitcode-stdio-1.0 19 | build-depends: base -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/GlobalBuildDepsNotAdditive1/GlobalBuildDepsNotAdditive1.cabal: -------------------------------------------------------------------------------- 1 | name: GlobalBuildDepsNotAdditive1 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.6 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | If you specify 'base' in the global build dependencies, then define 12 | a library without base, it fails to find 'base' for the library. 13 | 14 | --------------------------------------- 15 | 16 | build-depends: base 17 | 18 | Library 19 | exposed-modules: MyLibrary 20 | build-depends: bytestring, pretty 21 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/GlobalBuildDepsNotAdditive1/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/GlobalBuildDepsNotAdditive2/GlobalBuildDepsNotAdditive2.cabal: -------------------------------------------------------------------------------- 1 | name: GlobalBuildDepsNotAdditive1 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.6 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | If you specify 'base' in the global build dependencies, then define 12 | an executable without base, it fails to find 'base' for the executable 13 | 14 | --------------------------------------- 15 | 16 | build-depends: base 17 | 18 | Executable lemon 19 | main-is: lemon.hs 20 | build-depends: bytestring, pretty 21 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/GlobalBuildDepsNotAdditive2/lemon.hs: -------------------------------------------------------------------------------- 1 | import qualified Data.ByteString.Char8 as C 2 | import Text.PrettyPrint 3 | 4 | main = do 5 | putStrLn (render (text "foo")) 6 | let text = "lemon" 7 | C.putStrLn $ C.pack text 8 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary0/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary0/my.cabal: -------------------------------------------------------------------------------- 1 | name: InternalLibrary0 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.6 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | Check that with 'cabal-version:' containing versions less than 1.7, we do *not* 12 | have the new behaviour to allow executables to refer to the library defined 13 | in the same module. 14 | 15 | --------------------------------------- 16 | 17 | Library 18 | exposed-modules: MyLibrary 19 | build-depends: base, bytestring, pretty 20 | 21 | Executable lemon 22 | main-is: lemon.hs 23 | hs-source-dirs: programs 24 | build-depends: base, bytestring, pretty, InternalLibrary0 25 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary0/programs/lemon.hs: -------------------------------------------------------------------------------- 1 | import Text.PrettyPrint 2 | import MyLibrary 3 | 4 | main = do 5 | putStrLn (render (text "foo")) 6 | myLibFunc 7 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary1/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary1/my.cabal: -------------------------------------------------------------------------------- 1 | name: InternalLibrary1 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.7.1 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | Check for the new (in >= 1.7.1) ability to allow executables to refer to 12 | the library defined in the same module. 13 | 14 | --------------------------------------- 15 | 16 | Library 17 | exposed-modules: MyLibrary 18 | build-depends: base, bytestring, pretty 19 | 20 | Executable lemon 21 | main-is: lemon.hs 22 | hs-source-dirs: programs 23 | build-depends: base, bytestring, pretty, InternalLibrary1 24 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary1/programs/lemon.hs: -------------------------------------------------------------------------------- 1 | import Text.PrettyPrint 2 | import MyLibrary 3 | 4 | main = do 5 | putStrLn (render (text "foo")) 6 | myLibFunc 7 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary2/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc internal" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary2/my.cabal: -------------------------------------------------------------------------------- 1 | name: InternalLibrary2 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.7.1 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | This test is to make sure that the internal library is preferred by ghc to 12 | an installed one of the same name and version. 13 | 14 | --------------------------------------- 15 | 16 | Library 17 | exposed-modules: MyLibrary 18 | build-depends: base, bytestring, pretty 19 | 20 | Executable lemon 21 | main-is: lemon.hs 22 | hs-source-dirs: programs 23 | build-depends: base, bytestring, pretty, InternalLibrary2 24 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary2/programs/lemon.hs: -------------------------------------------------------------------------------- 1 | import Text.PrettyPrint 2 | import MyLibrary 3 | 4 | main = do 5 | putStrLn (render (text "foo")) 6 | myLibFunc 7 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary2/to-install/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc installed" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary2/to-install/my.cabal: -------------------------------------------------------------------------------- 1 | name: InternalLibrary2 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.6 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | This test is to make sure that the internal library is preferred by ghc to 12 | an installed one of the same name and version. 13 | 14 | --------------------------------------- 15 | 16 | Library 17 | exposed-modules: MyLibrary 18 | build-depends: base, bytestring, pretty 19 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary3/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc internal" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary3/my.cabal: -------------------------------------------------------------------------------- 1 | name: InternalLibrary3 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.7.1 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | This test is to make sure that the internal library is preferred by ghc to 12 | an installed one of the same name, but a *newer* version. 13 | 14 | --------------------------------------- 15 | 16 | Library 17 | exposed-modules: MyLibrary 18 | build-depends: base, bytestring, pretty 19 | 20 | Executable lemon 21 | main-is: lemon.hs 22 | hs-source-dirs: programs 23 | build-depends: base, bytestring, pretty, InternalLibrary3 24 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary3/programs/lemon.hs: -------------------------------------------------------------------------------- 1 | import Text.PrettyPrint 2 | import MyLibrary 3 | 4 | main = do 5 | putStrLn (render (text "foo")) 6 | myLibFunc 7 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary3/to-install/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc installed" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary3/to-install/my.cabal: -------------------------------------------------------------------------------- 1 | name: InternalLibrary3 2 | version: 0.2 3 | license: BSD3 4 | cabal-version: >= 1.6 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | This test is to make sure that the internal library is preferred by ghc to 12 | an installed one of the same name but a *newer* version. 13 | 14 | --------------------------------------- 15 | 16 | Library 17 | exposed-modules: MyLibrary 18 | build-depends: base, bytestring, pretty 19 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary4/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc internal" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary4/my.cabal: -------------------------------------------------------------------------------- 1 | name: InternalLibrary4 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.7.1 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | This test is to make sure that we can explicitly say we want InternalLibrary4-0.2 12 | and it will give us the *installed* version 0.2 instead of the internal 0.1. 13 | 14 | --------------------------------------- 15 | 16 | Library 17 | exposed-modules: MyLibrary 18 | build-depends: base, bytestring, pretty 19 | 20 | Executable lemon 21 | main-is: lemon.hs 22 | hs-source-dirs: programs 23 | build-depends: base, bytestring, pretty, InternalLibrary4 >= 0.2 24 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary4/programs/lemon.hs: -------------------------------------------------------------------------------- 1 | import Text.PrettyPrint 2 | import MyLibrary 3 | 4 | main = do 5 | putStrLn (render (text "foo")) 6 | myLibFunc 7 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary4/to-install/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc installed" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/InternalLibrary4/to-install/my.cabal: -------------------------------------------------------------------------------- 1 | name: InternalLibrary4 2 | version: 0.2 3 | license: BSD3 4 | cabal-version: >= 1.6 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | This test is to make sure that the internal library is preferred by ghc to 12 | an installed one of the same name but a *newer* version. 13 | 14 | --------------------------------------- 15 | 16 | Library 17 | exposed-modules: MyLibrary 18 | build-depends: base, bytestring, pretty 19 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/SameDepsAllRound/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/SameDepsAllRound/lemon.hs: -------------------------------------------------------------------------------- 1 | import qualified Data.ByteString.Char8 as C 2 | import Text.PrettyPrint 3 | 4 | main = do 5 | putStrLn (render (text "foo")) 6 | let text = "lemon" 7 | C.putStrLn $ C.pack text 8 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/SameDepsAllRound/pineapple.hs: -------------------------------------------------------------------------------- 1 | import qualified Data.ByteString.Char8 as C 2 | import Text.PrettyPrint 3 | 4 | main = do 5 | putStrLn (render (text "foo")) 6 | let text = "pineapple" 7 | C.putStrLn $ C.pack text 8 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps1/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps1/lemon.hs: -------------------------------------------------------------------------------- 1 | import qualified Data.ByteString.Char8 as C 2 | import Text.PrettyPrint 3 | 4 | main = do 5 | putStrLn (render (text "foo")) 6 | let text = "lemon" 7 | C.putStrLn $ C.pack text 8 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps1/my.cabal: -------------------------------------------------------------------------------- 1 | name: TargetSpecificDeps1 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.7.1 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | Check for the new build-dep behaviour, where build-depends are 12 | handled specifically for each target 13 | 14 | --------------------------------------- 15 | 16 | Library 17 | exposed-modules: MyLibrary 18 | build-depends: base, bytestring 19 | 20 | Executable lemon 21 | main-is: lemon.hs 22 | build-depends: base, bytestring, pretty 23 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps2/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps2/lemon.hs: -------------------------------------------------------------------------------- 1 | import qualified Data.ByteString.Char8 as C 2 | 3 | main = do 4 | let text = "lemon" 5 | C.putStrLn $ C.pack text 6 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps2/my.cabal: -------------------------------------------------------------------------------- 1 | name: TargetSpecificDeps1 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.7.1 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | Check for the new build-dep behaviour, where build-depends are 12 | handled specifically for each target 13 | This one is a control against TargetSpecificDeps1 - it is correct and should 14 | succeed. 15 | 16 | --------------------------------------- 17 | 18 | Library 19 | exposed-modules: MyLibrary 20 | build-depends: base, bytestring, pretty 21 | 22 | Executable lemon 23 | main-is: lemon.hs 24 | build-depends: base, bytestring 25 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps3/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps3/lemon.hs: -------------------------------------------------------------------------------- 1 | import qualified Data.ByteString.Char8 as C 2 | import Text.PrettyPrint 3 | 4 | main = do 5 | putStrLn (render (text "foo")) 6 | let text = "lemon" 7 | C.putStrLn $ C.pack text 8 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps3/my.cabal: -------------------------------------------------------------------------------- 1 | name: test 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.7.1 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | Check for the new build-dep behaviour, where build-depends are 12 | handled specifically for each target 13 | 14 | --------------------------------------- 15 | 16 | Library 17 | exposed-modules: MyLibrary 18 | build-depends: base, bytestring, pretty 19 | 20 | Executable lemon 21 | main-is: lemon.hs 22 | build-depends: base, bytestring 23 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildTestSuiteDetailedV09/Dummy2.hs: -------------------------------------------------------------------------------- 1 | module Dummy2 where 2 | 3 | import Distribution.TestSuite (Test) 4 | 5 | tests :: IO [Test] 6 | tests = return [] 7 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildableField/BuildableField.cabal: -------------------------------------------------------------------------------- 1 | name: BuildableField 2 | version: 0.1.0.0 3 | cabal-version: >=1.2 4 | build-type: Simple 5 | license: BSD3 6 | 7 | flag build-exe 8 | default: True 9 | 10 | library 11 | 12 | executable my-executable 13 | build-depends: base, unavailable-package 14 | main-is: Main.hs 15 | if !flag(build-exe) 16 | buildable: False 17 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/BuildableField/Main.hs: -------------------------------------------------------------------------------- 1 | import UnavailableModule 2 | 3 | main :: IO () 4 | main = putStrLn "Hello" 5 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/CMain/Bar.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ForeignFunctionInterface #-} 2 | module Bar where 3 | 4 | bar :: IO () 5 | bar = return () 6 | 7 | foreign export ccall bar :: IO () 8 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/CMain/foo.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "HsFFI.h" 3 | 4 | #ifdef __GLASGOW_HASKELL__ 5 | #include "Bar_stub.h" 6 | #endif 7 | 8 | int main(int argc, char **argv) { 9 | hs_init(&argc, &argv); 10 | bar(); 11 | printf("Hello world!"); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/CMain/my.cabal: -------------------------------------------------------------------------------- 1 | name: my 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.9.2 5 | build-type: Simple 6 | 7 | executable foo 8 | main-is: foo.c 9 | other-modules: Bar 10 | build-depends: base 11 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/DeterministicAr/Lib.hs: -------------------------------------------------------------------------------- 1 | module Lib where 2 | 3 | dummy :: IO () 4 | dummy = return () 5 | 6 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/DeterministicAr/my.cabal: -------------------------------------------------------------------------------- 1 | name: DeterministicAr 2 | version: 0 3 | license: BSD3 4 | cabal-version: >= 1.9.1 5 | author: Liyang HU 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | Ensure our GNU ar -D emulation (#1537) works as advertised: check that 12 | all metadata in the resulting .a archive match the default. 13 | 14 | Library 15 | exposed-modules: Lib 16 | build-depends: base 17 | 18 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/DuplicateModuleName/src/Foo.hs: -------------------------------------------------------------------------------- 1 | module Foo where 2 | 3 | import Distribution.TestSuite 4 | 5 | tests :: IO [Test] 6 | tests = return [Test $ TestInstance 7 | { run = return (Finished (Fail "A")) 8 | , name = "test A" 9 | , tags = [] 10 | , options = [] 11 | , setOption = \_ _-> Left "No Options" 12 | }] 13 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/DuplicateModuleName/tests/Foo.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PackageImports #-} 2 | module Foo where 3 | 4 | import Distribution.TestSuite 5 | import qualified "DuplicateModuleName" Foo as T 6 | 7 | tests :: IO [Test] 8 | tests = do 9 | r <- T.tests 10 | return $ [Test $ TestInstance 11 | { run = return (Finished (Fail "B")) 12 | , name = "test B" 13 | , tags = [] 14 | , options = [] 15 | , setOption = \_ _-> Left "No Options" 16 | }] ++ r 17 | 18 | this_is_test = True 19 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/DuplicateModuleName/tests2/Foo.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PackageImports #-} 2 | module Foo where 3 | 4 | import Distribution.TestSuite 5 | import qualified "DuplicateModuleName" Foo as T 6 | 7 | tests :: IO [Test] 8 | tests = do 9 | r <- T.tests 10 | return $ [Test $ TestInstance 11 | { run = return (Finished (Fail "C")) 12 | , name = "test C" 13 | , tags = [] 14 | , options = [] 15 | , setOption = \_ _-> Left "No Options" 16 | }] ++ r 17 | 18 | this_is_test2 = True 19 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/EmptyLib/empty/empty.cabal: -------------------------------------------------------------------------------- 1 | name: emptyLib 2 | Cabal-version: >= 1.2 3 | version: 1.0 4 | build-type: Simple 5 | 6 | Library 7 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectory/SameDirectory.cabal: -------------------------------------------------------------------------------- 1 | name: SameDirectory 2 | version: 0.1.0.0 3 | license: BSD3 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectory/ghc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ -z "$WITH_GHC" ]; then 3 | echo "Need to set WITH_GHC" 4 | exit 1 5 | fi 6 | exec "$WITH_GHC" "$@" 7 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectory/ghc-pkg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "GHC package manager version 9999999" 3 | exit 0 4 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectoryGhcVersion/SameDirectory.cabal: -------------------------------------------------------------------------------- 1 | name: SameDirectory 2 | version: 0.1.0.0 3 | license: BSD3 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectoryGhcVersion/ghc-7.10: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ -z "$WITH_GHC" ]; then 3 | echo "Need to set WITH_GHC" 4 | exit 1 5 | fi 6 | exec "$WITH_GHC" "$@" 7 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectoryGhcVersion/ghc-pkg-ghc-7.10: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "GHC package manager version 9999999" 3 | exit 0 4 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectoryVersion/SameDirectory.cabal: -------------------------------------------------------------------------------- 1 | name: SameDirectory 2 | version: 0.1.0.0 3 | license: BSD3 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectoryVersion/ghc-7.10: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ -z "$WITH_GHC" ]; then 3 | echo "Need to set WITH_GHC" 4 | exit 1 5 | fi 6 | exec "$WITH_GHC" "$@" 7 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectoryVersion/ghc-pkg-7.10: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "GHC package manager version 9999999" 3 | exit 0 4 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/GhcPkgGuess/Symlink/SameDirectory.cabal: -------------------------------------------------------------------------------- 1 | name: SameDirectory 2 | version: 0.1.0.0 3 | license: BSD3 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/GhcPkgGuess/Symlink/bin/ghc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ -z "$WITH_GHC" ]; then 3 | echo "Need to set WITH_GHC" 4 | exit 1 5 | fi 6 | exec "$WITH_GHC" "$@" 7 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/GhcPkgGuess/Symlink/bin/ghc-pkg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "GHC package manager version 9999999" 3 | exit 0 4 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/GhcPkgGuess/SymlinkGhcVersion/SameDirectory.cabal: -------------------------------------------------------------------------------- 1 | name: SameDirectory 2 | version: 0.1.0.0 3 | license: BSD3 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/GhcPkgGuess/SymlinkGhcVersion/bin/ghc-7.10: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ -z "$WITH_GHC" ]; then 3 | echo "Need to set WITH_GHC" 4 | exit 1 5 | fi 6 | exec "$WITH_GHC" "$@" 7 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/GhcPkgGuess/SymlinkGhcVersion/bin/ghc-pkg-7.10: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "GHC package manager version 9999999" 3 | exit 0 4 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/GhcPkgGuess/SymlinkVersion/SameDirectory.cabal: -------------------------------------------------------------------------------- 1 | name: SameDirectory 2 | version: 0.1.0.0 3 | license: BSD3 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/GhcPkgGuess/SymlinkVersion/bin/ghc-7.10: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ -z "$WITH_GHC" ]; then 3 | echo "Need to set WITH_GHC" 4 | exit 1 5 | fi 6 | exec "$WITH_GHC" "$@" 7 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/GhcPkgGuess/SymlinkVersion/bin/ghc-pkg-ghc-7.10: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "GHC package manager version 9999999" 3 | exit 0 4 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/Haddock/CPP.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE CPP #-} 2 | 3 | module CPP where 4 | 5 | #define HIDING hiding 6 | #define NEEDLES needles 7 | 8 | -- | For HIDING NEEDLES. 9 | data Haystack = Haystack 10 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/Haddock/Literate.lhs: -------------------------------------------------------------------------------- 1 | > module Literate where 2 | 3 | > -- | For hiding needles. 4 | > data Haystack = Haystack 5 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/Haddock/NoCPP.hs: -------------------------------------------------------------------------------- 1 | module NoCPP (Haystack) where 2 | 3 | -- | For hiding needles. 4 | data Haystack = Haystack 5 | 6 | -- | Causes a build failure if the CPP language extension is enabled. 7 | stringGap = "Foo\ 8 | \Bar" 9 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/Haddock/Simple.hs: -------------------------------------------------------------------------------- 1 | module Simple where 2 | 3 | -- | For hiding needles. 4 | data Haystack = Haystack 5 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/Haddock/my.cabal: -------------------------------------------------------------------------------- 1 | name: Haddock 2 | version: 0.1 3 | license: BSD3 4 | author: Iain Nicol 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | Cabal-version: >= 1.2 9 | 10 | description: 11 | Check that Cabal successfully invokes Haddock. 12 | 13 | Library 14 | exposed-modules: CPP, Literate, NoCPP, Simple 15 | other-extensions: CPP 16 | build-depends: base 17 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/HaddockNewline/A.hs: -------------------------------------------------------------------------------- 1 | module A where 2 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/HaddockNewline/ChangeLog.md: -------------------------------------------------------------------------------- 1 | # Revision history for HaddockNewline 2 | 3 | ## 0.1.0.0 -- YYYY-mm-dd 4 | 5 | * First version. Released on an unsuspecting world. 6 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/HaddockNewline/HaddockNewline.cabal: -------------------------------------------------------------------------------- 1 | name: HaddockNewline 2 | version: 0.1.0.0 3 | synopsis: This has a 4 | newline yo. 5 | -- description: 6 | license: BSD3 7 | license-file: LICENSE 8 | author: Edward Z. Yang 9 | maintainer: ezyang@cs.stanford.edu 10 | build-type: Simple 11 | extra-source-files: ChangeLog.md 12 | cabal-version: >=1.10 13 | 14 | library 15 | exposed-modules: A 16 | -- other-modules: 17 | -- other-extensions: 18 | build-depends: base 19 | -- hs-source-dirs: 20 | default-language: Haskell2010 21 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/HaddockNewline/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/Options.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DeriveDataTypeable #-} 2 | 3 | module PackageTests.Options 4 | ( OptionEnableAllTests(..) 5 | ) where 6 | 7 | import Data.Typeable (Typeable) 8 | 9 | import Test.Tasty.Options (IsOption(..), flagCLParser, safeRead) 10 | 11 | newtype OptionEnableAllTests = OptionEnableAllTests Bool 12 | deriving Typeable 13 | 14 | instance IsOption OptionEnableAllTests where 15 | defaultValue = OptionEnableAllTests False 16 | parseValue = fmap OptionEnableAllTests . safeRead 17 | optionName = return "enable-all-tests" 18 | optionHelp = return "Enable all tests" 19 | optionCLParser = flagCLParser Nothing (OptionEnableAllTests True) 20 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/OrderFlags/Foo.hs: -------------------------------------------------------------------------------- 1 | module Foo where 2 | 3 | x :: IO Int 4 | x = return 5 5 | 6 | f :: IO Int 7 | f = do x 8 | return 3 9 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/OrderFlags/my.cabal: -------------------------------------------------------------------------------- 1 | name: OrderFlags 2 | version: 0.1 3 | license: BSD3 4 | author: Oleksandr Manzyuk 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | cabal-version: >=1.9.2 9 | 10 | description: 11 | Check that Cabal correctly orders flags that are passed to GHC. 12 | 13 | library 14 | exposed-modules: Foo 15 | build-depends: base 16 | 17 | ghc-options: -Wall -Werror 18 | 19 | if impl(ghc >= 6.12.1) 20 | ghc-options: -fno-warn-unused-do-bind 21 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/PathsModule/Executable/Main.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import Paths_PathsModule (getBinDir) 4 | 5 | main :: IO () 6 | main = do 7 | _ <- getBinDir 8 | return () 9 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/PathsModule/Executable/my.cabal: -------------------------------------------------------------------------------- 1 | name: PathsModule 2 | version: 0.1 3 | license: BSD3 4 | author: Johan Tibell 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | Cabal-version: >= 1.2 9 | 10 | description: 11 | Check that the generated paths module compiles. 12 | 13 | Executable TestPathsModule 14 | main-is: Main.hs 15 | other-modules: Paths_PathsModule 16 | build-depends: base 17 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/PathsModule/Library/my.cabal: -------------------------------------------------------------------------------- 1 | name: PathsModule 2 | version: 0.1 3 | license: BSD3 4 | author: Johan Tibell 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | Cabal-version: >= 1.2 9 | 10 | description: 11 | Check that the generated paths module compiles. 12 | 13 | Library 14 | exposed-modules: Paths_PathsModule 15 | build-depends: base 16 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/PreProcess/Foo.hsc: -------------------------------------------------------------------------------- 1 | module Foo where 2 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/PreProcess/Main.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import Foo 4 | 5 | main :: IO () 6 | main = return () 7 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/PreProcessExtraSources/Foo.hsc: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ForeignFunctionInterface #-} 2 | module Foo where 3 | 4 | import Foreign.C.Types 5 | 6 | #def int incr(int x) { return x + 1; } 7 | 8 | foreign import ccall unsafe "Foo_hsc.h incr" 9 | incr :: CInt -> CInt 10 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/PreProcessExtraSources/Main.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import Foo 4 | 5 | main :: IO () 6 | main = do 7 | let x = incr 4 8 | return () 9 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/ReexportedModules/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/Cabal/tests/PackageTests/ReexportedModules/LICENSE -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/ReexportedModules/ReexportedModules.cabal: -------------------------------------------------------------------------------- 1 | name: ReexportedModules 2 | version: 0.1.0.0 3 | license-file: LICENSE 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.21 8 | 9 | library 10 | build-depends: base, containers 11 | reexported-modules: containers:Data.Map as DataMap 12 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TemplateHaskell/dynamic/Exe.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module Main where 3 | 4 | import TH 5 | 6 | main = print $(splice) 7 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TemplateHaskell/dynamic/Lib.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module Lib where 3 | 4 | import TH 5 | 6 | val = $(splice) 7 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TemplateHaskell/dynamic/TH.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module TH where 3 | 4 | splice = [| () |] 5 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TemplateHaskell/dynamic/my.cabal: -------------------------------------------------------------------------------- 1 | Name: templateHaskell 2 | Version: 0.1 3 | Build-Type: Simple 4 | Cabal-Version: >= 1.2 5 | 6 | Library 7 | Exposed-Modules: Lib 8 | Other-Modules: TH 9 | Build-Depends: base, template-haskell 10 | Extensions: TemplateHaskell 11 | 12 | Executable main 13 | Main-is: Exe.hs 14 | Build-Depends: base, template-haskell 15 | Extensions: TemplateHaskell 16 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TemplateHaskell/profiling/Exe.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module Main where 3 | 4 | import TH 5 | 6 | main = print $(splice) 7 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TemplateHaskell/profiling/Lib.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module Lib where 3 | 4 | import TH 5 | 6 | val = $(splice) 7 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TemplateHaskell/profiling/TH.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module TH where 3 | 4 | splice = [| () |] 5 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TemplateHaskell/profiling/my.cabal: -------------------------------------------------------------------------------- 1 | Name: templateHaskell 2 | Version: 0.1 3 | Build-Type: Simple 4 | Cabal-Version: >= 1.2 5 | 6 | Library 7 | Exposed-Modules: Lib 8 | Other-Modules: TH 9 | Build-Depends: base, template-haskell 10 | Extensions: TemplateHaskell 11 | 12 | Executable main 13 | Main-is: Exe.hs 14 | Build-Depends: base, template-haskell 15 | Extensions: TemplateHaskell 16 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TemplateHaskell/vanilla/Exe.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module Main where 3 | 4 | import TH 5 | 6 | main = print $(splice) 7 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TemplateHaskell/vanilla/Lib.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module Lib where 3 | 4 | import TH 5 | 6 | val = $(splice) 7 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TemplateHaskell/vanilla/TH.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module TH where 3 | 4 | splice = [| () |] 5 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TemplateHaskell/vanilla/my.cabal: -------------------------------------------------------------------------------- 1 | Name: templateHaskell 2 | Version: 0.1 3 | Build-Type: Simple 4 | Cabal-Version: >= 1.2 5 | 6 | Library 7 | Exposed-Modules: Lib 8 | Other-Modules: TH 9 | Build-Depends: base, template-haskell 10 | Extensions: TemplateHaskell 11 | 12 | Executable main 13 | Main-is: Exe.hs 14 | Build-Depends: base, template-haskell 15 | Extensions: TemplateHaskell 16 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TestNameCollision/child/Child.hs: -------------------------------------------------------------------------------- 1 | module Child where 2 | import Parent 3 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TestNameCollision/child/child.cabal: -------------------------------------------------------------------------------- 1 | name: child 2 | version: 0.1 3 | description: This defines the colliding detailed-0.9 test suite 4 | license: BSD3 5 | author: Edward Z. Yang 6 | maintainer: ezyang@cs.stanford.edu 7 | build-type: Simple 8 | cabal-version: >=1.10 9 | 10 | library 11 | exposed-modules: Child 12 | build-depends: base, parent 13 | default-language: Haskell2010 14 | 15 | test-suite parent 16 | type: detailed-0.9 17 | test-module: Test 18 | hs-source-dirs: tests 19 | build-depends: base, Cabal, child 20 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TestNameCollision/child/tests/Test.hs: -------------------------------------------------------------------------------- 1 | module Test where 2 | 3 | import Distribution.TestSuite 4 | import Child 5 | 6 | tests :: IO [Test] 7 | tests = return $ [Test $ TestInstance 8 | { run = return (Finished Pass) 9 | , name = "test" 10 | , tags = [] 11 | , options = [] 12 | , setOption = \_ _-> Left "No Options" 13 | }] 14 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TestNameCollision/parent/Parent.hs: -------------------------------------------------------------------------------- 1 | module Parent where 2 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TestNameCollision/parent/parent.cabal: -------------------------------------------------------------------------------- 1 | name: parent 2 | version: 0.1 3 | description: This package is what the test suite is going to collide with 4 | license: BSD3 5 | author: Edward Z. Yang 6 | maintainer: ezyang@cs.stanford.edu 7 | build-type: Simple 8 | cabal-version: >=1.10 9 | 10 | library 11 | exposed-modules: Parent 12 | build-depends: base 13 | default-language: Haskell2010 14 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TestOptions/TestOptions.cabal: -------------------------------------------------------------------------------- 1 | name: TestOptions 2 | version: 0.1 3 | license: BSD3 4 | author: Thomas Tuegel 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | cabal-version: >= 1.9.2 9 | 10 | description: 11 | Check that Cabal passes the correct test options to test suites. 12 | 13 | executable dummy 14 | main-is: test-TestOptions.hs 15 | build-depends: base 16 | 17 | test-suite test-TestOptions 18 | main-is: test-TestOptions.hs 19 | type: exitcode-stdio-1.0 20 | build-depends: base 21 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TestOptions/test-TestOptions.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import System.Environment ( getArgs ) 4 | import System.Exit ( exitFailure, exitSuccess ) 5 | 6 | main :: IO () 7 | main = do 8 | args <- getArgs 9 | if args == ["1", "2", "3"] 10 | then exitSuccess 11 | else putStrLn ("Got: " ++ show args) >> exitFailure 12 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TestStanza/my.cabal: -------------------------------------------------------------------------------- 1 | name: TestStanza 2 | version: 0.1 3 | license: BSD3 4 | author: Thomas Tuegel 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | 9 | description: 10 | Check that Cabal recognizes the Test stanza defined below. 11 | 12 | Library 13 | exposed-modules: MyLibrary 14 | build-depends: base 15 | 16 | test-suite dummy 17 | main-is: dummy.hs 18 | type: exitcode-stdio-1.0 19 | build-depends: base -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TestSuiteTests/ExeV10/Foo.hs: -------------------------------------------------------------------------------- 1 | module Foo where 2 | 3 | fooTest :: [String] -> Bool 4 | fooTest _ = True 5 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TestSuiteTests/ExeV10/my.cabal: -------------------------------------------------------------------------------- 1 | name: my 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.9.2 5 | build-type: Simple 6 | 7 | library 8 | exposed-modules: Foo 9 | build-depends: base 10 | 11 | test-suite test-Foo 12 | type: exitcode-stdio-1.0 13 | hs-source-dirs: tests 14 | main-is: test-Foo.hs 15 | build-depends: base, my 16 | 17 | test-suite test-Short 18 | type: exitcode-stdio-1.0 19 | hs-source-dirs: tests 20 | main-is: test-Short.hs 21 | build-depends: base, my 22 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TestSuiteTests/ExeV10/tests/test-Foo.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import Foo 4 | import System.Exit 5 | import Control.Monad 6 | 7 | main :: IO () 8 | main | fooTest [] = do 9 | -- Make sure that the output buffer is drained 10 | replicateM 10000 $ putStrLn "The quick brown fox jumps over the lazy dog" 11 | exitSuccess 12 | | otherwise = exitFailure 13 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TestSuiteTests/ExeV10/tests/test-Short.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import Foo 4 | import System.Exit 5 | import Control.Monad 6 | 7 | main :: IO () 8 | main | fooTest [] = do 9 | replicateM 5 $ putStrLn "The quick brown fox jumps over the lazy dog" 10 | exitSuccess 11 | | otherwise = exitFailure 12 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TestSuiteTests/LibV09/Lib.hs: -------------------------------------------------------------------------------- 1 | module Lib where 2 | 3 | import Distribution.TestSuite 4 | 5 | nullt x = Test $ TestInstance 6 | { run = return $ Finished (Fail "no reason") 7 | , name = "test " ++ show x 8 | , tags = [] 9 | , options = [] 10 | , setOption = \_ _-> Left "No Options" 11 | } 12 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TestSuiteTests/LibV09/LibV09.cabal: -------------------------------------------------------------------------------- 1 | name: LibV09 2 | version: 0.1 3 | cabal-version: >= 1.2 4 | license: BSD3 5 | author: Thomas Tuegel 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | cabal-version: >= 1.9.2 10 | 11 | description: Check type detailed-0.9 test suites. 12 | 13 | library 14 | exposed-modules: Lib 15 | build-depends: base, Cabal 16 | 17 | test-suite LibV09-Deadlock 18 | type: detailed-0.9 19 | hs-source-dirs: tests 20 | test-module: Deadlock 21 | build-depends: base, Cabal, LibV09 22 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/TestSuiteTests/LibV09/tests/Deadlock.hs: -------------------------------------------------------------------------------- 1 | module Deadlock where 2 | 3 | import Distribution.TestSuite 4 | 5 | import Lib 6 | 7 | tests :: IO [Test] 8 | tests = return [nullt x | x <- [1 .. 1000]] 9 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/UniqueIPID/P1/M.hs: -------------------------------------------------------------------------------- 1 | module M(m) where 2 | 3 | m = print "1" 4 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/UniqueIPID/P1/my.cabal: -------------------------------------------------------------------------------- 1 | name: UniqueIPID 2 | version: 0.1 3 | license: BSD3 4 | author: Vishal Agrawal 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | Cabal-version: >= 1.2 9 | 10 | description: 11 | Check that Cabal generates unique IPID based on source. 12 | 13 | Library 14 | exposed-modules: M 15 | build-depends: base 16 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/UniqueIPID/P2/M.hs: -------------------------------------------------------------------------------- 1 | module M(m) where 2 | 3 | m = print "2" 4 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/UniqueIPID/P2/my.cabal: -------------------------------------------------------------------------------- 1 | name: UniqueIPID 2 | version: 0.1 3 | license: BSD3 4 | author: Vishal Agrawal 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | Cabal-version: >= 1.2 9 | 10 | description: 11 | Check that Cabal generates unique IPID based on source. 12 | 13 | Library 14 | exposed-modules: M 15 | build-depends: base, containers 16 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/PackageTests/multInst/my.cabal: -------------------------------------------------------------------------------- 1 | name: Haddock 2 | version: 0.1 3 | license: BSD3 4 | author: Iain Nicol 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | Cabal-version: >= 1.2 9 | 10 | description: 11 | Check that Cabal successfully invokes Haddock. 12 | 13 | Library 14 | exposed-modules: CPP, Literate, NoCPP, Simple 15 | other-extensions: CPP 16 | build-depends: base 17 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | 4 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/UnitTests/Distribution/Compat/CreatePipe.hs: -------------------------------------------------------------------------------- 1 | module UnitTests.Distribution.Compat.CreatePipe (tests) where 2 | 3 | import Distribution.Compat.CreatePipe 4 | import System.IO (hClose, hGetContents, hPutStr, hSetEncoding, localeEncoding) 5 | import Test.Tasty 6 | import Test.Tasty.HUnit 7 | 8 | tests :: [TestTree] 9 | tests = [testCase "Locale Encoding" case_Locale_Encoding] 10 | 11 | case_Locale_Encoding :: Assertion 12 | case_Locale_Encoding = assert $ do 13 | let str = "\0252" 14 | (r, w) <- createPipe 15 | hSetEncoding w localeEncoding 16 | out <- hGetContents r 17 | hPutStr w str 18 | hClose w 19 | return $! out == str 20 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/hackage/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | base_version=1.4.0.2 4 | test_version=1.5.6 5 | 6 | for setup in archive/*/*/Setup.hs archive/*/*/Setup.lhs; do 7 | 8 | pkgname=$(basename ${setup}) 9 | 10 | if test $(wc -w < ${setup}) -gt 21; then 11 | if ghc -package Cabal-${base_version} -S ${setup} -o /dev/null 2> /dev/null; then 12 | 13 | if ghc -package Cabal-${test_version} -S ${setup} -o /dev/null 2> /dev/null; then 14 | echo "OK ${setup}" 15 | else 16 | echo "FAIL ${setup} does not compile with Cabal-${test_version}" 17 | fi 18 | else 19 | echo "OK ${setup} (does not compile with Cabal-${base_version})" 20 | fi 21 | else 22 | echo "trivial ${setup}" 23 | fi 24 | 25 | done 26 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/hackage/download.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if test ! -f archive/archive.tar; then 4 | 5 | wget http://hackage.haskell.org/cgi-bin/hackage-scripts/archive.tar 6 | mkdir -p archive 7 | mv archive.tar archive/ 8 | tar -C archive -xf archive/archive.tar 9 | 10 | fi 11 | 12 | if test ! -f archive/00-index.tar.gz; then 13 | 14 | wget http://hackage.haskell.org/packages/archive/00-index.tar.gz 15 | mkdir -p archive 16 | mv 00-index.tar.gz archive/ 17 | tar -C archive -xzf archive/00-index.tar.gz 18 | 19 | fi 20 | -------------------------------------------------------------------------------- /special/cabal-next/Cabal/tests/hackage/unpack.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | for tarball in archive/*/*/*.tar.gz; do 4 | 5 | pkgdir=$(dirname ${tarball}) 6 | pkgname=$(basename ${tarball} .tar.gz) 7 | 8 | if tar -tzf ${tarball} ${pkgname}/Setup.hs 2> /dev/null; then 9 | tar -xzf ${tarball} ${pkgname}/Setup.hs -O > ${pkgdir}/Setup.hs 10 | elif tar -tzf ${tarball} ${pkgname}/Setup.lhs 2> /dev/null; then 11 | tar -xzf ${tarball} ${pkgname}/Setup.lhs -O > ${pkgdir}/Setup.lhs 12 | else 13 | echo "${pkgname} has no Setup.hs or .lhs at all!!?!" 14 | fi 15 | 16 | done 17 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/.ghci: -------------------------------------------------------------------------------- 1 | :set -idist/build/autogen -optP-include -optPdist/build/autogen/cabal_macros.h 2 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/Distribution/Client/Dependency/Modular/Configured.hs: -------------------------------------------------------------------------------- 1 | module Distribution.Client.Dependency.Modular.Configured 2 | ( CP(..) 3 | ) where 4 | 5 | import Distribution.PackageDescription (FlagAssignment) -- from Cabal 6 | import Distribution.Client.Types (OptionalStanza) 7 | import Distribution.Client.ComponentDeps (ComponentDeps) 8 | 9 | import Distribution.Client.Dependency.Modular.Package 10 | 11 | -- | A configured package is a package instance together with 12 | -- a flag assignment and complete dependencies. 13 | data CP qpn = CP (PI qpn) FlagAssignment [OptionalStanza] (ComponentDeps [PI qpn]) 14 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/custom/common.sh: -------------------------------------------------------------------------------- 1 | # Helper to run Cabal 2 | cabal() { 3 | "$CABAL" $CABAL_ARGS "$@" 4 | } 5 | 6 | die() { 7 | echo "die: $@" 8 | exit 1 9 | } 10 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/custom/should_run/plain.err: -------------------------------------------------------------------------------- 1 | Custom 2 | Custom 3 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/custom/should_run/plain.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cd plain 3 | cabal configure 4 | cabal build 5 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/custom/should_run/plain/A.hs: -------------------------------------------------------------------------------- 1 | module A where 2 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/custom/should_run/plain/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | import System.IO 3 | main = hPutStrLn stderr "Custom" >> defaultMain 4 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/custom/should_run/plain/plain.cabal: -------------------------------------------------------------------------------- 1 | name: plain 2 | version: 0.1.0.0 3 | license: BSD3 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Custom 7 | cabal-version: >=1.10 8 | 9 | library 10 | exposed-modules: A 11 | build-depends: base 12 | default-language: Haskell2010 13 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/exec/common.sh: -------------------------------------------------------------------------------- 1 | # Helper to run Cabal 2 | cabal() { 3 | "$CABAL" $CABAL_ARGS "$@" 4 | } 5 | 6 | die() { 7 | echo "die: $@" 8 | exit 1 9 | } 10 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/exec/should_fail/exit_with_failure_without_args.err: -------------------------------------------------------------------------------- 1 | RE:^cabal(\.exe)?: Please specify an executable to run$ 2 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/exec/should_fail/exit_with_failure_without_args.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | cabal exec 4 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/exec/should_run/Foo.hs: -------------------------------------------------------------------------------- 1 | module Foo where 2 | 3 | foo :: String 4 | foo = "foo" 5 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/exec/should_run/My.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | main :: IO () 4 | main = do 5 | putStrLn "This is my-executable" 6 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/exec/should_run/adds_sandbox_bin_directory_to_path.out: -------------------------------------------------------------------------------- 1 | This is my-executable 2 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/exec/should_run/adds_sandbox_bin_directory_to_path.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | cabal sandbox delete > /dev/null 4 | cabal exec my-executable && die "Unexpectedly found executable" 5 | 6 | cabal sandbox init > /dev/null 7 | cabal install > /dev/null 8 | 9 | # Execute indirectly via bash to ensure that we go through $PATH 10 | cabal exec sh -- -c my-executable || die "Did not find executable" 11 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/exec/should_run/auto_configures_on_exec.out: -------------------------------------------------------------------------------- 1 | Config file path source is commandline option. 2 | Config file config-file not found. 3 | Writing default configuration to config-file 4 | find_me_in_output 5 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/exec/should_run/auto_configures_on_exec.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cabal exec echo find_me_in_output 3 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/exec/should_run/can_run_executables_installed_in_sandbox.out: -------------------------------------------------------------------------------- 1 | This is my-executable 2 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/exec/should_run/can_run_executables_installed_in_sandbox.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | cabal sandbox delete > /dev/null 4 | cabal exec my-executable && die "Unexpectedly found executable" 5 | 6 | cabal sandbox init > /dev/null 7 | cabal install > /dev/null 8 | 9 | cabal exec my-executable || die "Did not find executable" 10 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/exec/should_run/configures_cabal_to_use_sandbox.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | cabal sandbox delete > /dev/null 4 | cabal exec my-executable && die "Unexpectedly found executable" 5 | 6 | cabal sandbox init > /dev/null 7 | cabal install > /dev/null 8 | 9 | # The library should not be available outside the sandbox 10 | "$GHC_PKG" list | grep -v "my-0.1" 11 | 12 | # When run inside 'cabal-exec' the 'sandbox hc-pkg list' sub-command 13 | # should find the library. 14 | cabal exec sh -- -c 'cd subdir && "$CABAL" sandbox hc-pkg list' | grep "my-0.1" 15 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/exec/should_run/configures_ghc_to_use_sandbox.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | cabal sandbox delete > /dev/null 4 | cabal exec my-executable && die "Unexpectedly found executable" 5 | 6 | cabal sandbox init > /dev/null 7 | cabal install > /dev/null 8 | 9 | # The library should not be available outside the sandbox 10 | "$GHC_PKG" list | grep -v "my-0.1" 11 | 12 | # Execute ghc-pkg inside the sandbox; it should find my-0.1 13 | cabal exec ghc-pkg list | grep "my-0.1" 14 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/exec/should_run/my.cabal: -------------------------------------------------------------------------------- 1 | name: my 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.2 5 | build-type: Simple 6 | 7 | library 8 | exposed-modules: Foo 9 | build-depends: base 10 | 11 | 12 | executable my-executable 13 | main-is: My.hs 14 | build-depends: base 15 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/exec/should_run/runs_given_command.out: -------------------------------------------------------------------------------- 1 | this string 2 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/exec/should_run/runs_given_command.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cabal configure > /dev/null 3 | cabal exec echo this string 4 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/exec/should_run/subdir/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/cabal-install/tests/IntegrationTests/exec/should_run/subdir/.gitkeep -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/freeze/common.sh: -------------------------------------------------------------------------------- 1 | # Helper to run Cabal 2 | cabal() { 3 | "$CABAL" $CABAL_ARGS "$@" 4 | } 5 | 6 | die() { 7 | echo "die: $@" 8 | exit 1 9 | } 10 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/freeze/should_run/disable_benchmarks_freezes_bench_deps.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cabal freeze --disable-benchmarks 3 | grep -v " criterion ==" cabal.config || die "should NOT have frozen criterion" 4 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/freeze/should_run/disable_tests_freezes_test_deps.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cabal freeze --disable-tests 3 | grep -v " test-framework ==" cabal.config || die "should NOT have frozen test-framework" 4 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/freeze/should_run/does_not_freeze_nondeps.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | # TODO: Test this against a package installed in the sandbox but not 3 | # depended upon. 4 | cabal freeze 5 | grep -v "exceptions ==" cabal.config || die "should not have frozen exceptions" 6 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/freeze/should_run/does_not_freeze_self.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cabal freeze 3 | grep -v " my ==" cabal.config || die "should not have frozen self" 4 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/freeze/should_run/dry_run_does_not_create_config.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cabal freeze --dry-run 3 | [ ! -e cabal.config ] || die "cabal.config file should not have been created" 4 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/freeze/should_run/enable_benchmarks_freezes_bench_deps.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | # TODO: solver should find solution without extra flags too 3 | cabal freeze --enable-benchmarks --reorder-goals --max-backjumps=-1 4 | grep " criterion ==" cabal.config || die "should have frozen criterion" 5 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/freeze/should_run/enable_tests_freezes_test_deps.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cabal freeze --enable-tests 3 | grep " test-framework ==" cabal.config || die "should have frozen test-framework" 4 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/freeze/should_run/freezes_direct_dependencies.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cabal freeze 3 | grep " base ==" cabal.config || die "'base' should have been frozen" 4 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/freeze/should_run/freezes_transitive_dependencies.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cabal freeze 3 | grep " ghc-prim ==" cabal.config || die "'ghc-prim' should have been frozen" 4 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/freeze/should_run/my.cabal: -------------------------------------------------------------------------------- 1 | name: my 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.20.0 5 | build-type: Simple 6 | 7 | library 8 | exposed-modules: Foo 9 | build-depends: base 10 | 11 | test-suite test-Foo 12 | type: exitcode-stdio-1.0 13 | hs-source-dirs: tests 14 | main-is: test-Foo.hs 15 | build-depends: base, my, test-framework 16 | 17 | benchmark bench-Foo 18 | type: exitcode-stdio-1.0 19 | hs-source-dirs: benchmarks 20 | main-is: benchmark-Foo.hs 21 | build-depends: base, my, criterion 22 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/freeze/should_run/runs_without_error.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cabal freeze 3 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/manpage/common.sh: -------------------------------------------------------------------------------- 1 | # Helper to run Cabal 2 | cabal() { 3 | "$CABAL" $CABAL_ARGS "$@" 4 | } 5 | 6 | die() { 7 | echo "die: $@" 8 | exit 1 9 | } 10 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/manpage/should_run/outputs_manpage.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | OUTPUT=`cabal manpage` 4 | 5 | # contains visible command descriptions 6 | echo $OUTPUT | grep -q '\.B cabal install' || die "visible command description line not found in:\n----$OUTPUT\n----" 7 | 8 | # does not contain hidden command descriptions 9 | echo $OUTPUT | grep -q '\.B cabal manpage' && die "hidden command description line found in:\n----$OUTPUT\n----" 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/multiple-source/common.sh: -------------------------------------------------------------------------------- 1 | cabal() { 2 | "$CABAL" $CABAL_ARGS "$@" 3 | } 4 | 5 | die() { 6 | echo "die: $@" 7 | exit 1 8 | } 9 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/multiple-source/should_run/finds_second_source_of_multiple_source.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | # Create the sandbox 4 | cabal sandbox init 5 | 6 | # Add the sources 7 | cabal sandbox add-source p 8 | cabal sandbox add-source q 9 | 10 | # Install the second package 11 | cabal install q 12 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/multiple-source/should_run/p/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/cabal-install/tests/IntegrationTests/multiple-source/should_run/p/LICENSE -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/multiple-source/should_run/p/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/multiple-source/should_run/p/p.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 0.1.0.0 3 | license-file: LICENSE 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/multiple-source/should_run/q/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/cabal-install/tests/IntegrationTests/multiple-source/should_run/q/LICENSE -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/multiple-source/should_run/q/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/multiple-source/should_run/q/q.cabal: -------------------------------------------------------------------------------- 1 | name: q 2 | version: 0.1.0.0 3 | license-file: LICENSE 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/new-build/monitor_cabal_files.sh: -------------------------------------------------------------------------------- 1 | . ./common.sh 2 | cd monitor_cabal_files 3 | cp q/q-broken.cabal.in q/q.cabal 4 | echo "Run 1" | awk '{print;print > "/dev/stderr"}' 5 | ! cabal new-build q 6 | cp q/q-fixed.cabal.in q/q.cabal 7 | echo "Run 2" | awk '{print;print > "/dev/stderr"}' 8 | cabal new-build q 9 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/new-build/monitor_cabal_files/cabal.project: -------------------------------------------------------------------------------- 1 | packages: p/p.cabal q/ 2 | 3 | -- use both matching a .cabal file, and a dir 4 | -- since these are slightly different code paths 5 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/new-build/monitor_cabal_files/p/P.hs: -------------------------------------------------------------------------------- 1 | module P where 2 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/new-build/monitor_cabal_files/p/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/new-build/monitor_cabal_files/p/p.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 1.0 3 | license: BSD3 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | exposed-modules: P 11 | build-depends: base 12 | default-language: Haskell2010 13 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/new-build/monitor_cabal_files/q/Main.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | import P 3 | main :: IO () 4 | main = return () 5 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/new-build/monitor_cabal_files/q/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/new-build/monitor_cabal_files/q/q-broken.cabal.in: -------------------------------------------------------------------------------- 1 | name: q 2 | version: 0.1.0.0 3 | license: BSD3 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | executable q 10 | main-is: Main.hs 11 | build-depends: base 12 | default-language: Haskell2010 13 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/new-build/monitor_cabal_files/q/q-fixed.cabal.in: -------------------------------------------------------------------------------- 1 | name: q 2 | version: 0.1.0.0 3 | license: BSD3 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | executable q 10 | main-is: Main.hs 11 | build-depends: base, p 12 | default-language: Haskell2010 13 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/regression/common.sh: -------------------------------------------------------------------------------- 1 | # Helper to run Cabal 2 | cabal() { 3 | "$CABAL" $CABAL_ARGS "$@" 4 | } 5 | 6 | die() { 7 | echo "die: $@" 8 | exit 1 9 | } 10 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/regression/t3199.sh: -------------------------------------------------------------------------------- 1 | . ./common.sh 2 | 3 | if [[ `ghc --numeric-version` =~ "7\\." ]]; then 4 | cd t3199 5 | tmpfile=$(mktemp /tmp/cabal-t3199.XXXXXX) 6 | cabal sandbox init 7 | cabal sandbox add-source ../../../../../Cabal 8 | cabal install --package-db=clear --package-db=global --only-dep --dry-run > $tmpfile 9 | grep -q "the following would be installed" $tmpfile || die "Should've installed Cabal" 10 | grep -q Cabal $tmpfile || die "Should've installed Cabal" 11 | rm $tmpfile 12 | fi 13 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/regression/t3199/Main.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | main :: IO () 4 | main = putStrLn "Hello, Haskell!" 5 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/regression/t3199/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/common.sh: -------------------------------------------------------------------------------- 1 | cabal() { 2 | "$CABAL" $CABAL_ARGS "$@" 3 | } 4 | 5 | die() { 6 | echo "die: $@" 7 | exit 1 8 | } 9 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/should_fail/fail_removing_source_thats_not_registered.err: -------------------------------------------------------------------------------- 1 | Warning: Sources not registered: "q" 2 | 3 | RE:^cabal(\.exe)?: The sources with the above errors were skipped\. \("q"\)$ 4 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/should_fail/fail_removing_source_thats_not_registered.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | # Create the sandbox 4 | cabal sandbox init > /dev/null 5 | 6 | # Add one source 7 | cabal sandbox add-source p > /dev/null 8 | 9 | # Remove a source that exists on disk, but is not registered 10 | cabal sandbox delete-source q 11 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/should_fail/p/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/should_fail/p/LICENSE -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/should_fail/p/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/should_fail/p/p.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 0.1.0.0 3 | license-file: LICENSE 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/should_fail/q/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/should_fail/q/LICENSE -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/should_fail/q/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/should_fail/q/q.cabal: -------------------------------------------------------------------------------- 1 | name: q 2 | version: 0.1.0.0 3 | license-file: LICENSE 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/should_run/p/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/should_run/p/LICENSE -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/should_run/p/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/should_run/p/p.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 0.1.0.0 3 | license-file: LICENSE 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/should_run/q/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/should_run/q/LICENSE -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/should_run/q/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/should_run/q/q.cabal: -------------------------------------------------------------------------------- 1 | name: q 2 | version: 0.1.0.0 3 | license-file: LICENSE 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/should_run/report_success_removing_source.out: -------------------------------------------------------------------------------- 1 | Success deleting sources: "p" "q" 2 | 3 | Note: 'sandbox delete-source' only unregisters the source dependency, but does 4 | not remove the package from the sandbox package DB. 5 | 6 | Use 'sandbox hc-pkg -- unregister' to do that. 7 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/sandbox-sources/should_run/report_success_removing_source.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | # Create the sandbox 4 | cabal sandbox init > /dev/null 5 | 6 | # Add the sources 7 | cabal sandbox add-source p > /dev/null 8 | cabal sandbox add-source q > /dev/null 9 | 10 | # Remove one of the sources 11 | cabal sandbox delete-source p q 12 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/user-config/common.sh: -------------------------------------------------------------------------------- 1 | # Helper to run Cabal 2 | cabal() { 3 | "$CABAL" $CABAL_ARGS_NO_CONFIG_FILE "$@" 4 | } 5 | 6 | die() { 7 | echo "die: $@" 8 | exit 1 9 | } 10 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/user-config/should_fail/doesnt_overwrite_without_f.err: -------------------------------------------------------------------------------- 1 | RE:^cabal(\.exe)?: \./cabal-config already exists\.$ 2 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/user-config/should_fail/doesnt_overwrite_without_f.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | rm -f ./cabal-config 4 | cabal --config-file=./cabal-config user-config init > /dev/null 5 | cabal --config-file=./cabal-config user-config init 6 | rm -f ./cabal-config 7 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/user-config/should_run/overwrites_with_f.out: -------------------------------------------------------------------------------- 1 | Writing default configuration to ./cabal-config 2 | Writing default configuration to ./cabal-config 3 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/user-config/should_run/overwrites_with_f.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | rm -f ./cabal-config 4 | cabal --config-file=./cabal-config user-config init \ 5 | || die "Couldn't create config file" 6 | cabal --config-file=./cabal-config user-config -f init \ 7 | || die "Couldn't create config file" 8 | test -e ./cabal-config || die "Config file doesn't exist" 9 | rm -f ./cabal-config 10 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/user-config/should_run/runs_without_error.out: -------------------------------------------------------------------------------- 1 | Writing default configuration to ./cabal-config 2 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/user-config/should_run/runs_without_error.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | rm -f ./cabal-config 4 | cabal --config-file=./cabal-config user-config init \ 5 | || die "Couldn't create config file" 6 | test -e ./cabal-config || die "Config file doesn't exist" 7 | rm -f ./cabal-config 8 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/user-config/should_run/uses_CABAL_CONFIG.out: -------------------------------------------------------------------------------- 1 | Writing default configuration to ./my-config 2 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/IntegrationTests/user-config/should_run/uses_CABAL_CONFIG.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | export CABAL_CONFIG=./my-config 4 | cabal user-config init || die "Couldn't create config file" 5 | test -e ./my-config || die "Config file doesn't exist" 6 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/UnitTests/Distribution/Client/Dependency/Modular/PSQ.hs: -------------------------------------------------------------------------------- 1 | module UnitTests.Distribution.Client.Dependency.Modular.PSQ ( 2 | tests 3 | ) where 4 | 5 | import Distribution.Client.Dependency.Modular.PSQ 6 | 7 | import Test.Tasty 8 | import Test.Tasty.QuickCheck 9 | 10 | tests :: [TestTree] 11 | tests = [ testProperty "splitsAltImplementation" splitsTest 12 | ] 13 | 14 | -- | Original splits implementation 15 | splits' :: PSQ k a -> PSQ k (a, PSQ k a) 16 | splits' xs = 17 | casePSQ xs 18 | (PSQ []) 19 | (\ k v ys -> cons k (v, ys) (fmap (\ (w, zs) -> (w, cons k v zs)) (splits' ys))) 20 | 21 | splitsTest :: [(Int, Int)] -> Bool 22 | splitsTest psq = splits' (PSQ psq) == splits (PSQ psq) 23 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/test-cabal-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | darcs get --partial http://darcs.haskell.org/packages/Cabal/ && \ 4 | cd Cabal/cabal-install && \ 5 | make && \ 6 | sudo make install && \ 7 | sudo cabal-install update && \ 8 | cabal-install install --prefix=/tmp --user hnop && \ 9 | ls -l /tmp/bin/hnop 10 | -------------------------------------------------------------------------------- /special/cabal-next/cabal-install/tests/test-cabal-install-user: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | darcs get --partial http://darcs.haskell.org/packages/Cabal/ && \ 4 | cd Cabal/cabal-install && \ 5 | make install-user && \ 6 | cabal-install update && \ 7 | cabal-install install --prefix=/tmp --user hnop && \ 8 | ls -l /tmp/bin/hnop 9 | -------------------------------------------------------------------------------- /special/cabal-next/cabal.project: -------------------------------------------------------------------------------- 1 | packages: Cabal/ cabal-install/ 2 | 3 | -- Uncomment to allow picking up extra local unpacked deps: 4 | --optional-packages: */ 5 | -------------------------------------------------------------------------------- /special/cabal-next/ghc-packages: -------------------------------------------------------------------------------- 1 | Cabal 2 | 3 | -------------------------------------------------------------------------------- /special/cabal/.arcconfig: -------------------------------------------------------------------------------- 1 | { 2 | "repository.callsign" : "CABAL", 3 | "phabricator.uri" : "https://phabricator.haskell.org" 4 | } 5 | -------------------------------------------------------------------------------- /special/cabal/Cabal/Distribution/Compat/Exception.hs: -------------------------------------------------------------------------------- 1 | module Distribution.Compat.Exception ( 2 | catchIO, 3 | catchExit, 4 | tryIO, 5 | ) where 6 | 7 | import System.Exit 8 | import qualified Control.Exception as Exception 9 | 10 | tryIO :: IO a -> IO (Either Exception.IOException a) 11 | tryIO = Exception.try 12 | 13 | catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a 14 | catchIO = Exception.catch 15 | 16 | catchExit :: IO a -> (ExitCode -> IO a) -> IO a 17 | catchExit = Exception.catch 18 | -------------------------------------------------------------------------------- /special/cabal/Cabal/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main :: IO () 3 | main = defaultMain 4 | 5 | -- Although this looks like the Simple build type, it is in fact vital that 6 | -- we use this Setup.hs because it'll get compiled against the local copy 7 | -- of the Cabal lib, thus enabling Cabal to bootstrap itself without relying 8 | -- on any previous installation. This also means we can use any new features 9 | -- immediately because we never have to worry about building Cabal with an 10 | -- older version of itself. 11 | -- 12 | -- NOTE 25/01/2015: Bootstrapping is disabled for now, see 13 | -- https://github.com/haskell/cabal/issues/3003. 14 | -------------------------------------------------------------------------------- /special/cabal/Cabal/misc/travis-diff-files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | git status > /dev/null # See https://github.com/haskell/cabal/pull/3088#commitcomment-15818452 3 | git diff-files -p --exit-code 4 | -------------------------------------------------------------------------------- /special/cabal/Cabal/prologue.txt: -------------------------------------------------------------------------------- 1 | The Haskell Cabal is the Common Architecture for Building Applications 2 | and Libraries. It is a framework which defines a common interface for 3 | authors to more easily build their applications in a portable way. The 4 | Haskell Cabal is meant to be a part of a larger infrastructure for 5 | distributing, organizing, and cataloging Haskell Libraries and 6 | Tools. For more information, please see: 7 | . 8 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/AllowNewer/benchmarks/Bench.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | main :: IO () 4 | main = return () 5 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/AllowNewer/src/Foo.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | main :: IO () 4 | main = return () 5 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/AllowNewer/tests/Test.hs: -------------------------------------------------------------------------------- 1 | !module Main where 2 | 3 | main :: IO () 4 | main = return () 5 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BenchmarkExeV10/Foo.hs: -------------------------------------------------------------------------------- 1 | module Foo where 2 | 3 | fooTest :: [String] -> Bool 4 | fooTest _ = True 5 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BenchmarkExeV10/benchmarks/bench-Foo.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import Foo 4 | import System.Exit 5 | 6 | main :: IO () 7 | main | fooTest [] = exitSuccess 8 | | otherwise = exitFailure 9 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BenchmarkExeV10/my.cabal: -------------------------------------------------------------------------------- 1 | name: my 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.9.2 5 | build-type: Simple 6 | 7 | library 8 | exposed-modules: Foo 9 | build-depends: base 10 | 11 | benchmark bench-Foo 12 | type: exitcode-stdio-1.0 13 | hs-source-dirs: benchmarks 14 | main-is: bench-Foo.hs 15 | build-depends: base, my 16 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BenchmarkOptions/BenchmarkOptions.cabal: -------------------------------------------------------------------------------- 1 | name: BenchmarkOptions 2 | version: 0.1 3 | license: BSD3 4 | author: Johan Tibell 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | cabal-version: >= 1.9.2 9 | 10 | description: 11 | Check that Cabal passes the correct test options to test suites. 12 | 13 | executable dummy 14 | main-is: test-BenchmarkOptions.hs 15 | build-depends: base 16 | 17 | benchmark test-BenchmarkOptions 18 | main-is: test-BenchmarkOptions.hs 19 | type: exitcode-stdio-1.0 20 | build-depends: base 21 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BenchmarkOptions/test-BenchmarkOptions.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import System.Environment ( getArgs ) 4 | import System.Exit ( exitFailure, exitSuccess ) 5 | 6 | main :: IO () 7 | main = do 8 | args <- getArgs 9 | if args == ["1", "2", "3"] 10 | then exitSuccess 11 | else putStrLn ("Got: " ++ show args) >> exitFailure 12 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BenchmarkStanza/my.cabal: -------------------------------------------------------------------------------- 1 | name: BenchmarkStanza 2 | version: 0.1 3 | license: BSD3 4 | author: Johan Tibell 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | 9 | description: 10 | Check that Cabal recognizes the benchmark stanza defined below. 11 | 12 | Library 13 | exposed-modules: MyLibrary 14 | build-depends: base 15 | 16 | benchmark dummy 17 | main-is: dummy.hs 18 | type: exitcode-stdio-1.0 19 | build-depends: base -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/GlobalBuildDepsNotAdditive1/GlobalBuildDepsNotAdditive1.cabal: -------------------------------------------------------------------------------- 1 | name: GlobalBuildDepsNotAdditive1 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.6 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | If you specify 'base' in the global build dependencies, then define 12 | a library without base, it fails to find 'base' for the library. 13 | 14 | --------------------------------------- 15 | 16 | build-depends: base 17 | 18 | Library 19 | exposed-modules: MyLibrary 20 | build-depends: bytestring, pretty 21 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/GlobalBuildDepsNotAdditive1/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/GlobalBuildDepsNotAdditive2/GlobalBuildDepsNotAdditive2.cabal: -------------------------------------------------------------------------------- 1 | name: GlobalBuildDepsNotAdditive1 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.6 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | If you specify 'base' in the global build dependencies, then define 12 | an executable without base, it fails to find 'base' for the executable 13 | 14 | --------------------------------------- 15 | 16 | build-depends: base 17 | 18 | Executable lemon 19 | main-is: lemon.hs 20 | build-depends: bytestring, pretty 21 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/GlobalBuildDepsNotAdditive2/lemon.hs: -------------------------------------------------------------------------------- 1 | import qualified Data.ByteString.Char8 as C 2 | import Text.PrettyPrint 3 | 4 | main = do 5 | putStrLn (render (text "foo")) 6 | let text = "lemon" 7 | C.putStrLn $ C.pack text 8 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary0/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary0/my.cabal: -------------------------------------------------------------------------------- 1 | name: InternalLibrary0 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.6 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | Check that with 'cabal-version:' containing versions less than 1.7, we do *not* 12 | have the new behaviour to allow executables to refer to the library defined 13 | in the same module. 14 | 15 | --------------------------------------- 16 | 17 | Library 18 | exposed-modules: MyLibrary 19 | build-depends: base, bytestring, pretty 20 | 21 | Executable lemon 22 | main-is: lemon.hs 23 | hs-source-dirs: programs 24 | build-depends: base, bytestring, pretty, InternalLibrary0 25 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary0/programs/lemon.hs: -------------------------------------------------------------------------------- 1 | import Text.PrettyPrint 2 | import MyLibrary 3 | 4 | main = do 5 | putStrLn (render (text "foo")) 6 | myLibFunc 7 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary1/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary1/my.cabal: -------------------------------------------------------------------------------- 1 | name: InternalLibrary1 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.7.1 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | Check for the new (in >= 1.7.1) ability to allow executables to refer to 12 | the library defined in the same module. 13 | 14 | --------------------------------------- 15 | 16 | Library 17 | exposed-modules: MyLibrary 18 | build-depends: base, bytestring, pretty 19 | 20 | Executable lemon 21 | main-is: lemon.hs 22 | hs-source-dirs: programs 23 | build-depends: base, bytestring, pretty, InternalLibrary1 24 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary1/programs/lemon.hs: -------------------------------------------------------------------------------- 1 | import Text.PrettyPrint 2 | import MyLibrary 3 | 4 | main = do 5 | putStrLn (render (text "foo")) 6 | myLibFunc 7 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary2/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc internal" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary2/my.cabal: -------------------------------------------------------------------------------- 1 | name: InternalLibrary2 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.7.1 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | This test is to make sure that the internal library is preferred by ghc to 12 | an installed one of the same name and version. 13 | 14 | --------------------------------------- 15 | 16 | Library 17 | exposed-modules: MyLibrary 18 | build-depends: base, bytestring, pretty 19 | 20 | Executable lemon 21 | main-is: lemon.hs 22 | hs-source-dirs: programs 23 | build-depends: base, bytestring, pretty, InternalLibrary2 24 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary2/programs/lemon.hs: -------------------------------------------------------------------------------- 1 | import Text.PrettyPrint 2 | import MyLibrary 3 | 4 | main = do 5 | putStrLn (render (text "foo")) 6 | myLibFunc 7 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary2/to-install/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc installed" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary2/to-install/my.cabal: -------------------------------------------------------------------------------- 1 | name: InternalLibrary2 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.6 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | This test is to make sure that the internal library is preferred by ghc to 12 | an installed one of the same name and version. 13 | 14 | --------------------------------------- 15 | 16 | Library 17 | exposed-modules: MyLibrary 18 | build-depends: base, bytestring, pretty 19 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary3/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc internal" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary3/my.cabal: -------------------------------------------------------------------------------- 1 | name: InternalLibrary3 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.7.1 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | This test is to make sure that the internal library is preferred by ghc to 12 | an installed one of the same name, but a *newer* version. 13 | 14 | --------------------------------------- 15 | 16 | Library 17 | exposed-modules: MyLibrary 18 | build-depends: base, bytestring, pretty 19 | 20 | Executable lemon 21 | main-is: lemon.hs 22 | hs-source-dirs: programs 23 | build-depends: base, bytestring, pretty, InternalLibrary3 24 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary3/programs/lemon.hs: -------------------------------------------------------------------------------- 1 | import Text.PrettyPrint 2 | import MyLibrary 3 | 4 | main = do 5 | putStrLn (render (text "foo")) 6 | myLibFunc 7 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary3/to-install/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc installed" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary3/to-install/my.cabal: -------------------------------------------------------------------------------- 1 | name: InternalLibrary3 2 | version: 0.2 3 | license: BSD3 4 | cabal-version: >= 1.6 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | This test is to make sure that the internal library is preferred by ghc to 12 | an installed one of the same name but a *newer* version. 13 | 14 | --------------------------------------- 15 | 16 | Library 17 | exposed-modules: MyLibrary 18 | build-depends: base, bytestring, pretty 19 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary4/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc internal" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary4/my.cabal: -------------------------------------------------------------------------------- 1 | name: InternalLibrary4 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.7.1 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | This test is to make sure that we can explicitly say we want InternalLibrary4-0.2 12 | and it will give us the *installed* version 0.2 instead of the internal 0.1. 13 | 14 | --------------------------------------- 15 | 16 | Library 17 | exposed-modules: MyLibrary 18 | build-depends: base, bytestring, pretty 19 | 20 | Executable lemon 21 | main-is: lemon.hs 22 | hs-source-dirs: programs 23 | build-depends: base, bytestring, pretty, InternalLibrary4 >= 0.2 24 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary4/programs/lemon.hs: -------------------------------------------------------------------------------- 1 | import Text.PrettyPrint 2 | import MyLibrary 3 | 4 | main = do 5 | putStrLn (render (text "foo")) 6 | myLibFunc 7 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary4/to-install/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc installed" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/InternalLibrary4/to-install/my.cabal: -------------------------------------------------------------------------------- 1 | name: InternalLibrary4 2 | version: 0.2 3 | license: BSD3 4 | cabal-version: >= 1.6 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | This test is to make sure that the internal library is preferred by ghc to 12 | an installed one of the same name but a *newer* version. 13 | 14 | --------------------------------------- 15 | 16 | Library 17 | exposed-modules: MyLibrary 18 | build-depends: base, bytestring, pretty 19 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/SameDepsAllRound/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/SameDepsAllRound/lemon.hs: -------------------------------------------------------------------------------- 1 | import qualified Data.ByteString.Char8 as C 2 | import Text.PrettyPrint 3 | 4 | main = do 5 | putStrLn (render (text "foo")) 6 | let text = "lemon" 7 | C.putStrLn $ C.pack text 8 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/SameDepsAllRound/pineapple.hs: -------------------------------------------------------------------------------- 1 | import qualified Data.ByteString.Char8 as C 2 | import Text.PrettyPrint 3 | 4 | main = do 5 | putStrLn (render (text "foo")) 6 | let text = "pineapple" 7 | C.putStrLn $ C.pack text 8 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps1/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps1/lemon.hs: -------------------------------------------------------------------------------- 1 | import qualified Data.ByteString.Char8 as C 2 | import Text.PrettyPrint 3 | 4 | main = do 5 | putStrLn (render (text "foo")) 6 | let text = "lemon" 7 | C.putStrLn $ C.pack text 8 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps1/my.cabal: -------------------------------------------------------------------------------- 1 | name: TargetSpecificDeps1 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.7.1 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | Check for the new build-dep behaviour, where build-depends are 12 | handled specifically for each target 13 | 14 | --------------------------------------- 15 | 16 | Library 17 | exposed-modules: MyLibrary 18 | build-depends: base, bytestring 19 | 20 | Executable lemon 21 | main-is: lemon.hs 22 | build-depends: base, bytestring, pretty 23 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps2/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps2/lemon.hs: -------------------------------------------------------------------------------- 1 | import qualified Data.ByteString.Char8 as C 2 | 3 | main = do 4 | let text = "lemon" 5 | C.putStrLn $ C.pack text 6 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps2/my.cabal: -------------------------------------------------------------------------------- 1 | name: TargetSpecificDeps1 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.7.1 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | Check for the new build-dep behaviour, where build-depends are 12 | handled specifically for each target 13 | This one is a control against TargetSpecificDeps1 - it is correct and should 14 | succeed. 15 | 16 | --------------------------------------- 17 | 18 | Library 19 | exposed-modules: MyLibrary 20 | build-depends: base, bytestring, pretty 21 | 22 | Executable lemon 23 | main-is: lemon.hs 24 | build-depends: base, bytestring 25 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps3/MyLibrary.hs: -------------------------------------------------------------------------------- 1 | module MyLibrary where 2 | 3 | import qualified Data.ByteString.Char8 as C 4 | import Text.PrettyPrint 5 | 6 | myLibFunc :: IO () 7 | myLibFunc = do 8 | putStrLn (render (text "foo")) 9 | let text = "myLibFunc" 10 | C.putStrLn $ C.pack text 11 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps3/lemon.hs: -------------------------------------------------------------------------------- 1 | import qualified Data.ByteString.Char8 as C 2 | import Text.PrettyPrint 3 | 4 | main = do 5 | putStrLn (render (text "foo")) 6 | let text = "lemon" 7 | C.putStrLn $ C.pack text 8 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildDeps/TargetSpecificDeps3/my.cabal: -------------------------------------------------------------------------------- 1 | name: test 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.7.1 5 | author: Stephen Blackheath 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | Check for the new build-dep behaviour, where build-depends are 12 | handled specifically for each target 13 | 14 | --------------------------------------- 15 | 16 | Library 17 | exposed-modules: MyLibrary 18 | build-depends: base, bytestring, pretty 19 | 20 | Executable lemon 21 | main-is: lemon.hs 22 | build-depends: base, bytestring 23 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildTestSuiteDetailedV09/Dummy2.hs: -------------------------------------------------------------------------------- 1 | module Dummy2 where 2 | 3 | import Distribution.TestSuite (Test) 4 | 5 | tests :: IO [Test] 6 | tests = return [] 7 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildableField/BuildableField.cabal: -------------------------------------------------------------------------------- 1 | name: BuildableField 2 | version: 0.1.0.0 3 | cabal-version: >=1.2 4 | build-type: Simple 5 | license: BSD3 6 | 7 | flag build-exe 8 | default: True 9 | 10 | library 11 | 12 | executable my-executable 13 | build-depends: base, unavailable-package 14 | main-is: Main.hs 15 | if !flag(build-exe) 16 | buildable: False 17 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/BuildableField/Main.hs: -------------------------------------------------------------------------------- 1 | import UnavailableModule 2 | 3 | main :: IO () 4 | main = putStrLn "Hello" 5 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/CMain/Bar.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ForeignFunctionInterface #-} 2 | module Bar where 3 | 4 | bar :: IO () 5 | bar = return () 6 | 7 | foreign export ccall bar :: IO () 8 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/CMain/foo.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "HsFFI.h" 3 | 4 | #ifdef __GLASGOW_HASKELL__ 5 | #include "Bar_stub.h" 6 | #endif 7 | 8 | int main(int argc, char **argv) { 9 | hs_init(&argc, &argv); 10 | bar(); 11 | printf("Hello world!"); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/CMain/my.cabal: -------------------------------------------------------------------------------- 1 | name: my 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.9.2 5 | build-type: Simple 6 | 7 | executable foo 8 | main-is: foo.c 9 | other-modules: Bar 10 | build-depends: base 11 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/DeterministicAr/Lib.hs: -------------------------------------------------------------------------------- 1 | module Lib where 2 | 3 | dummy :: IO () 4 | dummy = return () 5 | 6 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/DeterministicAr/my.cabal: -------------------------------------------------------------------------------- 1 | name: DeterministicAr 2 | version: 0 3 | license: BSD3 4 | cabal-version: >= 1.9.1 5 | author: Liyang HU 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | 10 | description: 11 | Ensure our GNU ar -D emulation (#1537) works as advertised: check that 12 | all metadata in the resulting .a archive match the default. 13 | 14 | Library 15 | exposed-modules: Lib 16 | build-depends: base 17 | 18 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/DuplicateModuleName/src/Foo.hs: -------------------------------------------------------------------------------- 1 | module Foo where 2 | 3 | import Distribution.TestSuite 4 | 5 | tests :: IO [Test] 6 | tests = return [Test $ TestInstance 7 | { run = return (Finished (Fail "A")) 8 | , name = "test A" 9 | , tags = [] 10 | , options = [] 11 | , setOption = \_ _-> Left "No Options" 12 | }] 13 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/DuplicateModuleName/tests/Foo.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PackageImports #-} 2 | module Foo where 3 | 4 | import Distribution.TestSuite 5 | import qualified "DuplicateModuleName" Foo as T 6 | 7 | tests :: IO [Test] 8 | tests = do 9 | r <- T.tests 10 | return $ [Test $ TestInstance 11 | { run = return (Finished (Fail "B")) 12 | , name = "test B" 13 | , tags = [] 14 | , options = [] 15 | , setOption = \_ _-> Left "No Options" 16 | }] ++ r 17 | 18 | this_is_test = True 19 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/DuplicateModuleName/tests2/Foo.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PackageImports #-} 2 | module Foo where 3 | 4 | import Distribution.TestSuite 5 | import qualified "DuplicateModuleName" Foo as T 6 | 7 | tests :: IO [Test] 8 | tests = do 9 | r <- T.tests 10 | return $ [Test $ TestInstance 11 | { run = return (Finished (Fail "C")) 12 | , name = "test C" 13 | , tags = [] 14 | , options = [] 15 | , setOption = \_ _-> Left "No Options" 16 | }] ++ r 17 | 18 | this_is_test2 = True 19 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/EmptyLib/empty/empty.cabal: -------------------------------------------------------------------------------- 1 | name: emptyLib 2 | Cabal-version: >= 1.2 3 | version: 1.0 4 | build-type: Simple 5 | 6 | Library 7 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectory/SameDirectory.cabal: -------------------------------------------------------------------------------- 1 | name: SameDirectory 2 | version: 0.1.0.0 3 | license: BSD3 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectory/ghc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ -z "$WITH_GHC" ]; then 3 | echo "Need to set WITH_GHC" 4 | exit 1 5 | fi 6 | exec "$WITH_GHC" "$@" 7 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectory/ghc-pkg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "GHC package manager version 9999999" 3 | exit 0 4 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectoryGhcVersion/SameDirectory.cabal: -------------------------------------------------------------------------------- 1 | name: SameDirectory 2 | version: 0.1.0.0 3 | license: BSD3 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectoryGhcVersion/ghc-7.10: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ -z "$WITH_GHC" ]; then 3 | echo "Need to set WITH_GHC" 4 | exit 1 5 | fi 6 | exec "$WITH_GHC" "$@" 7 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectoryGhcVersion/ghc-pkg-ghc-7.10: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "GHC package manager version 9999999" 3 | exit 0 4 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectoryVersion/SameDirectory.cabal: -------------------------------------------------------------------------------- 1 | name: SameDirectory 2 | version: 0.1.0.0 3 | license: BSD3 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectoryVersion/ghc-7.10: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ -z "$WITH_GHC" ]; then 3 | echo "Need to set WITH_GHC" 4 | exit 1 5 | fi 6 | exec "$WITH_GHC" "$@" 7 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectoryVersion/ghc-pkg-7.10: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "GHC package manager version 9999999" 3 | exit 0 4 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/GhcPkgGuess/Symlink/SameDirectory.cabal: -------------------------------------------------------------------------------- 1 | name: SameDirectory 2 | version: 0.1.0.0 3 | license: BSD3 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/GhcPkgGuess/Symlink/bin/ghc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ -z "$WITH_GHC" ]; then 3 | echo "Need to set WITH_GHC" 4 | exit 1 5 | fi 6 | exec "$WITH_GHC" "$@" 7 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/GhcPkgGuess/Symlink/bin/ghc-pkg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "GHC package manager version 9999999" 3 | exit 0 4 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/GhcPkgGuess/SymlinkGhcVersion/SameDirectory.cabal: -------------------------------------------------------------------------------- 1 | name: SameDirectory 2 | version: 0.1.0.0 3 | license: BSD3 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/GhcPkgGuess/SymlinkGhcVersion/bin/ghc-7.10: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ -z "$WITH_GHC" ]; then 3 | echo "Need to set WITH_GHC" 4 | exit 1 5 | fi 6 | exec "$WITH_GHC" "$@" 7 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/GhcPkgGuess/SymlinkGhcVersion/bin/ghc-pkg-7.10: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "GHC package manager version 9999999" 3 | exit 0 4 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/GhcPkgGuess/SymlinkVersion/SameDirectory.cabal: -------------------------------------------------------------------------------- 1 | name: SameDirectory 2 | version: 0.1.0.0 3 | license: BSD3 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/GhcPkgGuess/SymlinkVersion/bin/ghc-7.10: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ -z "$WITH_GHC" ]; then 3 | echo "Need to set WITH_GHC" 4 | exit 1 5 | fi 6 | exec "$WITH_GHC" "$@" 7 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/GhcPkgGuess/SymlinkVersion/bin/ghc-pkg-ghc-7.10: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "GHC package manager version 9999999" 3 | exit 0 4 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/Haddock/CPP.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE CPP #-} 2 | 3 | module CPP where 4 | 5 | #define HIDING hiding 6 | #define NEEDLES needles 7 | 8 | -- | For HIDING NEEDLES. 9 | data Haystack = Haystack 10 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/Haddock/Literate.lhs: -------------------------------------------------------------------------------- 1 | > module Literate where 2 | 3 | > -- | For hiding needles. 4 | > data Haystack = Haystack 5 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/Haddock/NoCPP.hs: -------------------------------------------------------------------------------- 1 | module NoCPP (Haystack) where 2 | 3 | -- | For hiding needles. 4 | data Haystack = Haystack 5 | 6 | -- | Causes a build failure if the CPP language extension is enabled. 7 | stringGap = "Foo\ 8 | \Bar" 9 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/Haddock/Simple.hs: -------------------------------------------------------------------------------- 1 | module Simple where 2 | 3 | -- | For hiding needles. 4 | data Haystack = Haystack 5 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/Haddock/my.cabal: -------------------------------------------------------------------------------- 1 | name: Haddock 2 | version: 0.1 3 | license: BSD3 4 | author: Iain Nicol 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | Cabal-version: >= 1.2 9 | 10 | description: 11 | Check that Cabal successfully invokes Haddock. 12 | 13 | Library 14 | exposed-modules: CPP, Literate, NoCPP, Simple 15 | other-extensions: CPP 16 | build-depends: base 17 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/HaddockNewline/A.hs: -------------------------------------------------------------------------------- 1 | module A where 2 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/HaddockNewline/ChangeLog.md: -------------------------------------------------------------------------------- 1 | # Revision history for HaddockNewline 2 | 3 | ## 0.1.0.0 -- YYYY-mm-dd 4 | 5 | * First version. Released on an unsuspecting world. 6 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/HaddockNewline/HaddockNewline.cabal: -------------------------------------------------------------------------------- 1 | name: HaddockNewline 2 | version: 0.1.0.0 3 | synopsis: This has a 4 | newline yo. 5 | -- description: 6 | license: BSD3 7 | license-file: LICENSE 8 | author: Edward Z. Yang 9 | maintainer: ezyang@cs.stanford.edu 10 | build-type: Simple 11 | extra-source-files: ChangeLog.md 12 | cabal-version: >=1.10 13 | 14 | library 15 | exposed-modules: A 16 | -- other-modules: 17 | -- other-extensions: 18 | build-depends: base 19 | -- hs-source-dirs: 20 | default-language: Haskell2010 21 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/HaddockNewline/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/Options.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DeriveDataTypeable #-} 2 | 3 | module PackageTests.Options 4 | ( OptionEnableAllTests(..) 5 | ) where 6 | 7 | import Data.Typeable (Typeable) 8 | 9 | import Test.Tasty.Options (IsOption(..), flagCLParser, safeRead) 10 | 11 | newtype OptionEnableAllTests = OptionEnableAllTests Bool 12 | deriving Typeable 13 | 14 | instance IsOption OptionEnableAllTests where 15 | defaultValue = OptionEnableAllTests False 16 | parseValue = fmap OptionEnableAllTests . safeRead 17 | optionName = return "enable-all-tests" 18 | optionHelp = return "Enable all tests" 19 | optionCLParser = flagCLParser Nothing (OptionEnableAllTests True) 20 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/OrderFlags/Foo.hs: -------------------------------------------------------------------------------- 1 | module Foo where 2 | 3 | x :: IO Int 4 | x = return 5 5 | 6 | f :: IO Int 7 | f = do x 8 | return 3 9 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/OrderFlags/my.cabal: -------------------------------------------------------------------------------- 1 | name: OrderFlags 2 | version: 0.1 3 | license: BSD3 4 | author: Oleksandr Manzyuk 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | cabal-version: >=1.9.2 9 | 10 | description: 11 | Check that Cabal correctly orders flags that are passed to GHC. 12 | 13 | library 14 | exposed-modules: Foo 15 | build-depends: base 16 | 17 | ghc-options: -Wall -Werror 18 | 19 | if impl(ghc >= 6.12.1) 20 | ghc-options: -fno-warn-unused-do-bind 21 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/PathsModule/Executable/Main.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import Paths_PathsModule (getBinDir) 4 | 5 | main :: IO () 6 | main = do 7 | _ <- getBinDir 8 | return () 9 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/PathsModule/Executable/my.cabal: -------------------------------------------------------------------------------- 1 | name: PathsModule 2 | version: 0.1 3 | license: BSD3 4 | author: Johan Tibell 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | Cabal-version: >= 1.2 9 | 10 | description: 11 | Check that the generated paths module compiles. 12 | 13 | Executable TestPathsModule 14 | main-is: Main.hs 15 | other-modules: Paths_PathsModule 16 | build-depends: base 17 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/PathsModule/Library/my.cabal: -------------------------------------------------------------------------------- 1 | name: PathsModule 2 | version: 0.1 3 | license: BSD3 4 | author: Johan Tibell 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | Cabal-version: >= 1.2 9 | 10 | description: 11 | Check that the generated paths module compiles. 12 | 13 | Library 14 | exposed-modules: Paths_PathsModule 15 | build-depends: base 16 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/PreProcess/Foo.hsc: -------------------------------------------------------------------------------- 1 | module Foo where 2 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/PreProcess/Main.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import Foo 4 | 5 | main :: IO () 6 | main = return () 7 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/PreProcess/my.cabal: -------------------------------------------------------------------------------- 1 | name: PreProcess 2 | version: 0.1 3 | license: BSD3 4 | author: Johan Tibell 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | Cabal-version: >= 1.2 9 | 10 | description: 11 | Check that preprocessors are run. 12 | 13 | Library 14 | exposed-modules: Foo 15 | build-depends: base 16 | 17 | Executable my-executable 18 | main-is: Main.hs 19 | other-modules: Foo 20 | build-depends: base 21 | 22 | Test-Suite my-test-suite 23 | main-is: Main.hs 24 | type: exitcode-stdio-1.0 25 | other-modules: Foo 26 | build-depends: base 27 | 28 | Benchmark my-benchmark 29 | main-is: Main.hs 30 | type: exitcode-stdio-1.0 31 | other-modules: Foo 32 | build-depends: base 33 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/PreProcessExtraSources/Foo.hsc: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ForeignFunctionInterface #-} 2 | module Foo where 3 | 4 | import Foreign.C.Types 5 | 6 | #def int incr(int x) { return x + 1; } 7 | 8 | foreign import ccall unsafe "Foo_hsc.h incr" 9 | incr :: CInt -> CInt 10 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/PreProcessExtraSources/Main.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import Foo 4 | 5 | main :: IO () 6 | main = do 7 | let x = incr 4 8 | return () 9 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/ReexportedModules/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal/Cabal/tests/PackageTests/ReexportedModules/LICENSE -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/ReexportedModules/ReexportedModules.cabal: -------------------------------------------------------------------------------- 1 | name: ReexportedModules 2 | version: 0.1.0.0 3 | license-file: LICENSE 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.21 8 | 9 | library 10 | build-depends: base, containers 11 | reexported-modules: containers:Data.Map as DataMap 12 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TemplateHaskell/dynamic/Exe.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module Main where 3 | 4 | import TH 5 | 6 | main = print $(splice) 7 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TemplateHaskell/dynamic/Lib.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module Lib where 3 | 4 | import TH 5 | 6 | val = $(splice) 7 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TemplateHaskell/dynamic/TH.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module TH where 3 | 4 | splice = [| () |] 5 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TemplateHaskell/dynamic/my.cabal: -------------------------------------------------------------------------------- 1 | Name: templateHaskell 2 | Version: 0.1 3 | Build-Type: Simple 4 | Cabal-Version: >= 1.2 5 | 6 | Library 7 | Exposed-Modules: Lib 8 | Other-Modules: TH 9 | Build-Depends: base, template-haskell 10 | Extensions: TemplateHaskell 11 | 12 | Executable main 13 | Main-is: Exe.hs 14 | Build-Depends: base, template-haskell 15 | Extensions: TemplateHaskell 16 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TemplateHaskell/profiling/Exe.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module Main where 3 | 4 | import TH 5 | 6 | main = print $(splice) 7 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TemplateHaskell/profiling/Lib.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module Lib where 3 | 4 | import TH 5 | 6 | val = $(splice) 7 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TemplateHaskell/profiling/TH.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module TH where 3 | 4 | splice = [| () |] 5 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TemplateHaskell/profiling/my.cabal: -------------------------------------------------------------------------------- 1 | Name: templateHaskell 2 | Version: 0.1 3 | Build-Type: Simple 4 | Cabal-Version: >= 1.2 5 | 6 | Library 7 | Exposed-Modules: Lib 8 | Other-Modules: TH 9 | Build-Depends: base, template-haskell 10 | Extensions: TemplateHaskell 11 | 12 | Executable main 13 | Main-is: Exe.hs 14 | Build-Depends: base, template-haskell 15 | Extensions: TemplateHaskell 16 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TemplateHaskell/vanilla/Exe.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module Main where 3 | 4 | import TH 5 | 6 | main = print $(splice) 7 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TemplateHaskell/vanilla/Lib.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module Lib where 3 | 4 | import TH 5 | 6 | val = $(splice) 7 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TemplateHaskell/vanilla/TH.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module TH where 3 | 4 | splice = [| () |] 5 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TemplateHaskell/vanilla/my.cabal: -------------------------------------------------------------------------------- 1 | Name: templateHaskell 2 | Version: 0.1 3 | Build-Type: Simple 4 | Cabal-Version: >= 1.2 5 | 6 | Library 7 | Exposed-Modules: Lib 8 | Other-Modules: TH 9 | Build-Depends: base, template-haskell 10 | Extensions: TemplateHaskell 11 | 12 | Executable main 13 | Main-is: Exe.hs 14 | Build-Depends: base, template-haskell 15 | Extensions: TemplateHaskell 16 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TestNameCollision/child/Child.hs: -------------------------------------------------------------------------------- 1 | module Child where 2 | import Parent 3 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TestNameCollision/child/child.cabal: -------------------------------------------------------------------------------- 1 | name: child 2 | version: 0.1 3 | description: This defines the colliding detailed-0.9 test suite 4 | license: BSD3 5 | author: Edward Z. Yang 6 | maintainer: ezyang@cs.stanford.edu 7 | build-type: Simple 8 | cabal-version: >=1.10 9 | 10 | library 11 | exposed-modules: Child 12 | build-depends: base, parent 13 | default-language: Haskell2010 14 | 15 | test-suite parent 16 | type: detailed-0.9 17 | test-module: Test 18 | hs-source-dirs: tests 19 | build-depends: base, Cabal, child 20 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TestNameCollision/child/tests/Test.hs: -------------------------------------------------------------------------------- 1 | module Test where 2 | 3 | import Distribution.TestSuite 4 | import Child 5 | 6 | tests :: IO [Test] 7 | tests = return $ [Test $ TestInstance 8 | { run = return (Finished Pass) 9 | , name = "test" 10 | , tags = [] 11 | , options = [] 12 | , setOption = \_ _-> Left "No Options" 13 | }] 14 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TestNameCollision/parent/Parent.hs: -------------------------------------------------------------------------------- 1 | module Parent where 2 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TestNameCollision/parent/parent.cabal: -------------------------------------------------------------------------------- 1 | name: parent 2 | version: 0.1 3 | description: This package is what the test suite is going to collide with 4 | license: BSD3 5 | author: Edward Z. Yang 6 | maintainer: ezyang@cs.stanford.edu 7 | build-type: Simple 8 | cabal-version: >=1.10 9 | 10 | library 11 | exposed-modules: Parent 12 | build-depends: base 13 | default-language: Haskell2010 14 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TestOptions/TestOptions.cabal: -------------------------------------------------------------------------------- 1 | name: TestOptions 2 | version: 0.1 3 | license: BSD3 4 | author: Thomas Tuegel 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | cabal-version: >= 1.9.2 9 | 10 | description: 11 | Check that Cabal passes the correct test options to test suites. 12 | 13 | executable dummy 14 | main-is: test-TestOptions.hs 15 | build-depends: base 16 | 17 | test-suite test-TestOptions 18 | main-is: test-TestOptions.hs 19 | type: exitcode-stdio-1.0 20 | build-depends: base 21 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TestOptions/test-TestOptions.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import System.Environment ( getArgs ) 4 | import System.Exit ( exitFailure, exitSuccess ) 5 | 6 | main :: IO () 7 | main = do 8 | args <- getArgs 9 | if args == ["1", "2", "3"] 10 | then exitSuccess 11 | else putStrLn ("Got: " ++ show args) >> exitFailure 12 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TestStanza/my.cabal: -------------------------------------------------------------------------------- 1 | name: TestStanza 2 | version: 0.1 3 | license: BSD3 4 | author: Thomas Tuegel 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | 9 | description: 10 | Check that Cabal recognizes the Test stanza defined below. 11 | 12 | Library 13 | exposed-modules: MyLibrary 14 | build-depends: base 15 | 16 | test-suite dummy 17 | main-is: dummy.hs 18 | type: exitcode-stdio-1.0 19 | build-depends: base -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TestSuiteTests/ExeV10/Foo.hs: -------------------------------------------------------------------------------- 1 | module Foo where 2 | 3 | fooTest :: [String] -> Bool 4 | fooTest _ = True 5 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TestSuiteTests/ExeV10/my.cabal: -------------------------------------------------------------------------------- 1 | name: my 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.9.2 5 | build-type: Simple 6 | 7 | library 8 | exposed-modules: Foo 9 | build-depends: base 10 | 11 | test-suite test-Foo 12 | type: exitcode-stdio-1.0 13 | hs-source-dirs: tests 14 | main-is: test-Foo.hs 15 | build-depends: base, my 16 | 17 | test-suite test-Short 18 | type: exitcode-stdio-1.0 19 | hs-source-dirs: tests 20 | main-is: test-Short.hs 21 | build-depends: base, my 22 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TestSuiteTests/ExeV10/tests/test-Foo.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import Foo 4 | import System.Exit 5 | import Control.Monad 6 | 7 | main :: IO () 8 | main | fooTest [] = do 9 | -- Make sure that the output buffer is drained 10 | replicateM 10000 $ putStrLn "The quick brown fox jumps over the lazy dog" 11 | exitSuccess 12 | | otherwise = exitFailure 13 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TestSuiteTests/ExeV10/tests/test-Short.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import Foo 4 | import System.Exit 5 | import Control.Monad 6 | 7 | main :: IO () 8 | main | fooTest [] = do 9 | replicateM 5 $ putStrLn "The quick brown fox jumps over the lazy dog" 10 | exitSuccess 11 | | otherwise = exitFailure 12 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TestSuiteTests/LibV09/Lib.hs: -------------------------------------------------------------------------------- 1 | module Lib where 2 | 3 | import Distribution.TestSuite 4 | 5 | nullt x = Test $ TestInstance 6 | { run = return $ Finished (Fail "no reason") 7 | , name = "test " ++ show x 8 | , tags = [] 9 | , options = [] 10 | , setOption = \_ _-> Left "No Options" 11 | } 12 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TestSuiteTests/LibV09/LibV09.cabal: -------------------------------------------------------------------------------- 1 | name: LibV09 2 | version: 0.1 3 | cabal-version: >= 1.2 4 | license: BSD3 5 | author: Thomas Tuegel 6 | stability: stable 7 | category: PackageTests 8 | build-type: Simple 9 | cabal-version: >= 1.9.2 10 | 11 | description: Check type detailed-0.9 test suites. 12 | 13 | library 14 | exposed-modules: Lib 15 | build-depends: base, Cabal 16 | 17 | test-suite LibV09-Deadlock 18 | type: detailed-0.9 19 | hs-source-dirs: tests 20 | test-module: Deadlock 21 | build-depends: base, Cabal, LibV09 22 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/TestSuiteTests/LibV09/tests/Deadlock.hs: -------------------------------------------------------------------------------- 1 | module Deadlock where 2 | 3 | import Distribution.TestSuite 4 | 5 | import Lib 6 | 7 | tests :: IO [Test] 8 | tests = return [nullt x | x <- [1 .. 1000]] 9 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/UniqueIPID/P1/M.hs: -------------------------------------------------------------------------------- 1 | module M(m) where 2 | 3 | m = print "1" 4 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/UniqueIPID/P1/my.cabal: -------------------------------------------------------------------------------- 1 | name: UniqueIPID 2 | version: 0.1 3 | license: BSD3 4 | author: Vishal Agrawal 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | Cabal-version: >= 1.2 9 | 10 | description: 11 | Check that Cabal generates unique IPID based on source. 12 | 13 | Library 14 | exposed-modules: M 15 | build-depends: base 16 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/UniqueIPID/P2/M.hs: -------------------------------------------------------------------------------- 1 | module M(m) where 2 | 3 | m = print "2" 4 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/UniqueIPID/P2/my.cabal: -------------------------------------------------------------------------------- 1 | name: UniqueIPID 2 | version: 0.1 3 | license: BSD3 4 | author: Vishal Agrawal 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | Cabal-version: >= 1.2 9 | 10 | description: 11 | Check that Cabal generates unique IPID based on source. 12 | 13 | Library 14 | exposed-modules: M 15 | build-depends: base, containers 16 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/PackageTests/multInst/my.cabal: -------------------------------------------------------------------------------- 1 | name: Haddock 2 | version: 0.1 3 | license: BSD3 4 | author: Iain Nicol 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | Cabal-version: >= 1.2 9 | 10 | description: 11 | Check that Cabal successfully invokes Haddock. 12 | 13 | Library 14 | exposed-modules: CPP, Literate, NoCPP, Simple 15 | other-extensions: CPP 16 | build-depends: base 17 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | 4 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/UnitTests/Distribution/Compat/CreatePipe.hs: -------------------------------------------------------------------------------- 1 | module UnitTests.Distribution.Compat.CreatePipe (tests) where 2 | 3 | import Distribution.Compat.CreatePipe 4 | import System.IO (hClose, hGetContents, hPutStr, hSetEncoding, localeEncoding) 5 | import Test.Tasty 6 | import Test.Tasty.HUnit 7 | 8 | tests :: [TestTree] 9 | tests = [testCase "Locale Encoding" case_Locale_Encoding] 10 | 11 | case_Locale_Encoding :: Assertion 12 | case_Locale_Encoding = assert $ do 13 | let str = "\0252" 14 | (r, w) <- createPipe 15 | hSetEncoding w localeEncoding 16 | out <- hGetContents r 17 | hPutStr w str 18 | hClose w 19 | return $! out == str 20 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/hackage/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | base_version=1.4.0.2 4 | test_version=1.5.6 5 | 6 | for setup in archive/*/*/Setup.hs archive/*/*/Setup.lhs; do 7 | 8 | pkgname=$(basename ${setup}) 9 | 10 | if test $(wc -w < ${setup}) -gt 21; then 11 | if ghc -package Cabal-${base_version} -S ${setup} -o /dev/null 2> /dev/null; then 12 | 13 | if ghc -package Cabal-${test_version} -S ${setup} -o /dev/null 2> /dev/null; then 14 | echo "OK ${setup}" 15 | else 16 | echo "FAIL ${setup} does not compile with Cabal-${test_version}" 17 | fi 18 | else 19 | echo "OK ${setup} (does not compile with Cabal-${base_version})" 20 | fi 21 | else 22 | echo "trivial ${setup}" 23 | fi 24 | 25 | done 26 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/hackage/download.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if test ! -f archive/archive.tar; then 4 | 5 | wget http://hackage.haskell.org/cgi-bin/hackage-scripts/archive.tar 6 | mkdir -p archive 7 | mv archive.tar archive/ 8 | tar -C archive -xf archive/archive.tar 9 | 10 | fi 11 | 12 | if test ! -f archive/00-index.tar.gz; then 13 | 14 | wget http://hackage.haskell.org/packages/archive/00-index.tar.gz 15 | mkdir -p archive 16 | mv 00-index.tar.gz archive/ 17 | tar -C archive -xzf archive/00-index.tar.gz 18 | 19 | fi 20 | -------------------------------------------------------------------------------- /special/cabal/Cabal/tests/hackage/unpack.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | for tarball in archive/*/*/*.tar.gz; do 4 | 5 | pkgdir=$(dirname ${tarball}) 6 | pkgname=$(basename ${tarball} .tar.gz) 7 | 8 | if tar -tzf ${tarball} ${pkgname}/Setup.hs 2> /dev/null; then 9 | tar -xzf ${tarball} ${pkgname}/Setup.hs -O > ${pkgdir}/Setup.hs 10 | elif tar -tzf ${tarball} ${pkgname}/Setup.lhs 2> /dev/null; then 11 | tar -xzf ${tarball} ${pkgname}/Setup.lhs -O > ${pkgdir}/Setup.lhs 12 | else 13 | echo "${pkgname} has no Setup.hs or .lhs at all!!?!" 14 | fi 15 | 16 | done 17 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/.ghci: -------------------------------------------------------------------------------- 1 | :set -idist/build/autogen -optP-include -optPdist/build/autogen/cabal_macros.h 2 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/Distribution/Client/Dependency/Modular/Configured.hs: -------------------------------------------------------------------------------- 1 | module Distribution.Client.Dependency.Modular.Configured 2 | ( CP(..) 3 | ) where 4 | 5 | import Distribution.PackageDescription (FlagAssignment) -- from Cabal 6 | import Distribution.Client.Types (OptionalStanza) 7 | import Distribution.Client.ComponentDeps (ComponentDeps) 8 | 9 | import Distribution.Client.Dependency.Modular.Package 10 | 11 | -- | A configured package is a package instance together with 12 | -- a flag assignment and complete dependencies. 13 | data CP qpn = CP (PI qpn) FlagAssignment [OptionalStanza] (ComponentDeps [PI qpn]) 14 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/custom/common.sh: -------------------------------------------------------------------------------- 1 | # Helper to run Cabal 2 | cabal() { 3 | "$CABAL" $CABAL_ARGS "$@" 4 | } 5 | 6 | die() { 7 | echo "die: $@" 8 | exit 1 9 | } 10 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/custom/should_run/plain.err: -------------------------------------------------------------------------------- 1 | Custom 2 | Custom 3 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/custom/should_run/plain.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cd plain 3 | cabal configure 4 | cabal build 5 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/custom/should_run/plain/A.hs: -------------------------------------------------------------------------------- 1 | module A where 2 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/custom/should_run/plain/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | import System.IO 3 | main = hPutStrLn stderr "Custom" >> defaultMain 4 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/custom/should_run/plain/plain.cabal: -------------------------------------------------------------------------------- 1 | name: plain 2 | version: 0.1.0.0 3 | license: BSD3 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Custom 7 | cabal-version: >=1.10 8 | 9 | library 10 | exposed-modules: A 11 | build-depends: base 12 | default-language: Haskell2010 13 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/exec/common.sh: -------------------------------------------------------------------------------- 1 | # Helper to run Cabal 2 | cabal() { 3 | "$CABAL" $CABAL_ARGS "$@" 4 | } 5 | 6 | die() { 7 | echo "die: $@" 8 | exit 1 9 | } 10 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/exec/should_fail/exit_with_failure_without_args.err: -------------------------------------------------------------------------------- 1 | RE:^cabal(\.exe)?: Please specify an executable to run$ 2 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/exec/should_fail/exit_with_failure_without_args.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | cabal exec 4 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/exec/should_run/Foo.hs: -------------------------------------------------------------------------------- 1 | module Foo where 2 | 3 | foo :: String 4 | foo = "foo" 5 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/exec/should_run/My.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | main :: IO () 4 | main = do 5 | putStrLn "This is my-executable" 6 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/exec/should_run/adds_sandbox_bin_directory_to_path.out: -------------------------------------------------------------------------------- 1 | This is my-executable 2 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/exec/should_run/adds_sandbox_bin_directory_to_path.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | cabal sandbox delete > /dev/null 4 | cabal exec my-executable && die "Unexpectedly found executable" 5 | 6 | cabal sandbox init > /dev/null 7 | cabal install > /dev/null 8 | 9 | # Execute indirectly via bash to ensure that we go through $PATH 10 | cabal exec sh -- -c my-executable || die "Did not find executable" 11 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/exec/should_run/auto_configures_on_exec.out: -------------------------------------------------------------------------------- 1 | Config file path source is commandline option. 2 | Config file config-file not found. 3 | Writing default configuration to config-file 4 | find_me_in_output 5 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/exec/should_run/auto_configures_on_exec.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cabal exec echo find_me_in_output 3 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/exec/should_run/can_run_executables_installed_in_sandbox.out: -------------------------------------------------------------------------------- 1 | This is my-executable 2 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/exec/should_run/can_run_executables_installed_in_sandbox.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | cabal sandbox delete > /dev/null 4 | cabal exec my-executable && die "Unexpectedly found executable" 5 | 6 | cabal sandbox init > /dev/null 7 | cabal install > /dev/null 8 | 9 | cabal exec my-executable || die "Did not find executable" 10 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/exec/should_run/configures_cabal_to_use_sandbox.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | cabal sandbox delete > /dev/null 4 | cabal exec my-executable && die "Unexpectedly found executable" 5 | 6 | cabal sandbox init > /dev/null 7 | cabal install > /dev/null 8 | 9 | # The library should not be available outside the sandbox 10 | "$GHC_PKG" list | grep -v "my-0.1" 11 | 12 | # When run inside 'cabal-exec' the 'sandbox hc-pkg list' sub-command 13 | # should find the library. 14 | cabal exec sh -- -c 'cd subdir && "$CABAL" sandbox hc-pkg list' | grep "my-0.1" 15 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/exec/should_run/configures_ghc_to_use_sandbox.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | cabal sandbox delete > /dev/null 4 | cabal exec my-executable && die "Unexpectedly found executable" 5 | 6 | cabal sandbox init > /dev/null 7 | cabal install > /dev/null 8 | 9 | # The library should not be available outside the sandbox 10 | "$GHC_PKG" list | grep -v "my-0.1" 11 | 12 | # Execute ghc-pkg inside the sandbox; it should find my-0.1 13 | cabal exec ghc-pkg list | grep "my-0.1" 14 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/exec/should_run/my.cabal: -------------------------------------------------------------------------------- 1 | name: my 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.2 5 | build-type: Simple 6 | 7 | library 8 | exposed-modules: Foo 9 | build-depends: base 10 | 11 | 12 | executable my-executable 13 | main-is: My.hs 14 | build-depends: base 15 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/exec/should_run/runs_given_command.out: -------------------------------------------------------------------------------- 1 | this string 2 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/exec/should_run/runs_given_command.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cabal configure > /dev/null 3 | cabal exec echo this string 4 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/exec/should_run/subdir/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal/cabal-install/tests/IntegrationTests/exec/should_run/subdir/.gitkeep -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/freeze/common.sh: -------------------------------------------------------------------------------- 1 | # Helper to run Cabal 2 | cabal() { 3 | "$CABAL" $CABAL_ARGS "$@" 4 | } 5 | 6 | die() { 7 | echo "die: $@" 8 | exit 1 9 | } 10 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/freeze/should_run/disable_benchmarks_freezes_bench_deps.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cabal freeze --disable-benchmarks 3 | grep -v " criterion ==" cabal.config || die "should NOT have frozen criterion" 4 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/freeze/should_run/disable_tests_freezes_test_deps.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cabal freeze --disable-tests 3 | grep -v " test-framework ==" cabal.config || die "should NOT have frozen test-framework" 4 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/freeze/should_run/does_not_freeze_nondeps.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | # TODO: Test this against a package installed in the sandbox but not 3 | # depended upon. 4 | cabal freeze 5 | grep -v "exceptions ==" cabal.config || die "should not have frozen exceptions" 6 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/freeze/should_run/does_not_freeze_self.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cabal freeze 3 | grep -v " my ==" cabal.config || die "should not have frozen self" 4 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/freeze/should_run/dry_run_does_not_create_config.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cabal freeze --dry-run 3 | [ ! -e cabal.config ] || die "cabal.config file should not have been created" 4 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/freeze/should_run/enable_benchmarks_freezes_bench_deps.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | # TODO: solver should find solution without extra flags too 3 | cabal freeze --enable-benchmarks --reorder-goals --max-backjumps=-1 4 | grep " criterion ==" cabal.config || die "should have frozen criterion" 5 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/freeze/should_run/enable_tests_freezes_test_deps.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cabal freeze --enable-tests 3 | grep " test-framework ==" cabal.config || die "should have frozen test-framework" 4 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/freeze/should_run/freezes_direct_dependencies.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cabal freeze 3 | grep " base ==" cabal.config || die "'base' should have been frozen" 4 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/freeze/should_run/freezes_transitive_dependencies.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cabal freeze 3 | grep " ghc-prim ==" cabal.config || die "'ghc-prim' should have been frozen" 4 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/freeze/should_run/my.cabal: -------------------------------------------------------------------------------- 1 | name: my 2 | version: 0.1 3 | license: BSD3 4 | cabal-version: >= 1.20.0 5 | build-type: Simple 6 | 7 | library 8 | exposed-modules: Foo 9 | build-depends: base 10 | 11 | test-suite test-Foo 12 | type: exitcode-stdio-1.0 13 | hs-source-dirs: tests 14 | main-is: test-Foo.hs 15 | build-depends: base, my, test-framework 16 | 17 | benchmark bench-Foo 18 | type: exitcode-stdio-1.0 19 | hs-source-dirs: benchmarks 20 | main-is: benchmark-Foo.hs 21 | build-depends: base, my, criterion 22 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/freeze/should_run/runs_without_error.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | cabal freeze 3 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/manpage/common.sh: -------------------------------------------------------------------------------- 1 | # Helper to run Cabal 2 | cabal() { 3 | "$CABAL" $CABAL_ARGS "$@" 4 | } 5 | 6 | die() { 7 | echo "die: $@" 8 | exit 1 9 | } 10 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/manpage/should_run/outputs_manpage.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | OUTPUT=`cabal manpage` 4 | 5 | # contains visible command descriptions 6 | echo $OUTPUT | grep -q '\.B cabal install' || die "visible command description line not found in:\n----$OUTPUT\n----" 7 | 8 | # does not contain hidden command descriptions 9 | echo $OUTPUT | grep -q '\.B cabal manpage' && die "hidden command description line found in:\n----$OUTPUT\n----" 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/multiple-source/common.sh: -------------------------------------------------------------------------------- 1 | cabal() { 2 | "$CABAL" $CABAL_ARGS "$@" 3 | } 4 | 5 | die() { 6 | echo "die: $@" 7 | exit 1 8 | } 9 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/multiple-source/should_run/finds_second_source_of_multiple_source.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | # Create the sandbox 4 | cabal sandbox init 5 | 6 | # Add the sources 7 | cabal sandbox add-source p 8 | cabal sandbox add-source q 9 | 10 | # Install the second package 11 | cabal install q 12 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/multiple-source/should_run/p/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal/cabal-install/tests/IntegrationTests/multiple-source/should_run/p/LICENSE -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/multiple-source/should_run/p/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/multiple-source/should_run/p/p.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 0.1.0.0 3 | license-file: LICENSE 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/multiple-source/should_run/q/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal/cabal-install/tests/IntegrationTests/multiple-source/should_run/q/LICENSE -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/multiple-source/should_run/q/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/multiple-source/should_run/q/q.cabal: -------------------------------------------------------------------------------- 1 | name: q 2 | version: 0.1.0.0 3 | license-file: LICENSE 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/new-build/monitor_cabal_files.sh: -------------------------------------------------------------------------------- 1 | . ./common.sh 2 | cd monitor_cabal_files 3 | cp q/q-broken.cabal.in q/q.cabal 4 | echo "Run 1" | awk '{print;print > "/dev/stderr"}' 5 | ! cabal new-build q 6 | cp q/q-fixed.cabal.in q/q.cabal 7 | echo "Run 2" | awk '{print;print > "/dev/stderr"}' 8 | cabal new-build q 9 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/new-build/monitor_cabal_files/cabal.project: -------------------------------------------------------------------------------- 1 | packages: p/p.cabal q/ 2 | 3 | -- use both matching a .cabal file, and a dir 4 | -- since these are slightly different code paths 5 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/new-build/monitor_cabal_files/p/P.hs: -------------------------------------------------------------------------------- 1 | module P where 2 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/new-build/monitor_cabal_files/p/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/new-build/monitor_cabal_files/p/p.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 1.0 3 | license: BSD3 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | exposed-modules: P 11 | build-depends: base 12 | default-language: Haskell2010 13 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/new-build/monitor_cabal_files/q/Main.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | import P 3 | main :: IO () 4 | main = return () 5 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/new-build/monitor_cabal_files/q/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/new-build/monitor_cabal_files/q/q-broken.cabal.in: -------------------------------------------------------------------------------- 1 | name: q 2 | version: 0.1.0.0 3 | license: BSD3 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | executable q 10 | main-is: Main.hs 11 | build-depends: base 12 | default-language: Haskell2010 13 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/new-build/monitor_cabal_files/q/q-fixed.cabal.in: -------------------------------------------------------------------------------- 1 | name: q 2 | version: 0.1.0.0 3 | license: BSD3 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | executable q 10 | main-is: Main.hs 11 | build-depends: base, p 12 | default-language: Haskell2010 13 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/regression/common.sh: -------------------------------------------------------------------------------- 1 | # Helper to run Cabal 2 | cabal() { 3 | "$CABAL" $CABAL_ARGS "$@" 4 | } 5 | 6 | die() { 7 | echo "die: $@" 8 | exit 1 9 | } 10 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/regression/t3199.sh: -------------------------------------------------------------------------------- 1 | . ./common.sh 2 | 3 | if [[ `ghc --numeric-version` =~ "7\\." ]]; then 4 | cd t3199 5 | tmpfile=$(mktemp /tmp/cabal-t3199.XXXXXX) 6 | cabal sandbox init 7 | cabal sandbox add-source ../../../../../Cabal 8 | cabal install --package-db=clear --package-db=global --only-dep --dry-run > $tmpfile 9 | grep -q "the following would be installed" $tmpfile || die "Should've installed Cabal" 10 | grep -q Cabal $tmpfile || die "Should've installed Cabal" 11 | rm $tmpfile 12 | fi 13 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/regression/t3199/Main.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | main :: IO () 4 | main = putStrLn "Hello, Haskell!" 5 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/regression/t3199/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/common.sh: -------------------------------------------------------------------------------- 1 | cabal() { 2 | "$CABAL" $CABAL_ARGS "$@" 3 | } 4 | 5 | die() { 6 | echo "die: $@" 7 | exit 1 8 | } 9 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/should_fail/fail_removing_source_thats_not_registered.err: -------------------------------------------------------------------------------- 1 | Warning: Sources not registered: "q" 2 | 3 | RE:^cabal(\.exe)?: The sources with the above errors were skipped\. \("q"\)$ 4 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/should_fail/fail_removing_source_thats_not_registered.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | # Create the sandbox 4 | cabal sandbox init > /dev/null 5 | 6 | # Add one source 7 | cabal sandbox add-source p > /dev/null 8 | 9 | # Remove a source that exists on disk, but is not registered 10 | cabal sandbox delete-source q 11 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/should_fail/p/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/should_fail/p/LICENSE -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/should_fail/p/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/should_fail/p/p.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 0.1.0.0 3 | license-file: LICENSE 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/should_fail/q/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/should_fail/q/LICENSE -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/should_fail/q/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/should_fail/q/q.cabal: -------------------------------------------------------------------------------- 1 | name: q 2 | version: 0.1.0.0 3 | license-file: LICENSE 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/should_run/p/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/should_run/p/LICENSE -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/should_run/p/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/should_run/p/p.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 0.1.0.0 3 | license-file: LICENSE 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/should_run/q/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/should_run/q/LICENSE -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/should_run/q/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/should_run/q/q.cabal: -------------------------------------------------------------------------------- 1 | name: q 2 | version: 0.1.0.0 3 | license-file: LICENSE 4 | author: Edward Z. Yang 5 | maintainer: ezyang@cs.stanford.edu 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | build-depends: base 11 | default-language: Haskell2010 12 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/should_run/report_success_removing_source.out: -------------------------------------------------------------------------------- 1 | Success deleting sources: "p" "q" 2 | 3 | Note: 'sandbox delete-source' only unregisters the source dependency, but does 4 | not remove the package from the sandbox package DB. 5 | 6 | Use 'sandbox hc-pkg -- unregister' to do that. 7 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/sandbox-sources/should_run/report_success_removing_source.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | # Create the sandbox 4 | cabal sandbox init > /dev/null 5 | 6 | # Add the sources 7 | cabal sandbox add-source p > /dev/null 8 | cabal sandbox add-source q > /dev/null 9 | 10 | # Remove one of the sources 11 | cabal sandbox delete-source p q 12 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/user-config/common.sh: -------------------------------------------------------------------------------- 1 | # Helper to run Cabal 2 | cabal() { 3 | "$CABAL" $CABAL_ARGS_NO_CONFIG_FILE "$@" 4 | } 5 | 6 | die() { 7 | echo "die: $@" 8 | exit 1 9 | } 10 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/user-config/should_fail/doesnt_overwrite_without_f.err: -------------------------------------------------------------------------------- 1 | RE:^cabal(\.exe)?: \./cabal-config already exists\.$ 2 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/user-config/should_fail/doesnt_overwrite_without_f.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | rm -f ./cabal-config 4 | cabal --config-file=./cabal-config user-config init > /dev/null 5 | cabal --config-file=./cabal-config user-config init 6 | rm -f ./cabal-config 7 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/user-config/should_run/overwrites_with_f.out: -------------------------------------------------------------------------------- 1 | Writing default configuration to ./cabal-config 2 | Writing default configuration to ./cabal-config 3 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/user-config/should_run/overwrites_with_f.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | rm -f ./cabal-config 4 | cabal --config-file=./cabal-config user-config init \ 5 | || die "Couldn't create config file" 6 | cabal --config-file=./cabal-config user-config -f init \ 7 | || die "Couldn't create config file" 8 | test -e ./cabal-config || die "Config file doesn't exist" 9 | rm -f ./cabal-config 10 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/user-config/should_run/runs_without_error.out: -------------------------------------------------------------------------------- 1 | Writing default configuration to ./cabal-config 2 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/user-config/should_run/runs_without_error.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | rm -f ./cabal-config 4 | cabal --config-file=./cabal-config user-config init \ 5 | || die "Couldn't create config file" 6 | test -e ./cabal-config || die "Config file doesn't exist" 7 | rm -f ./cabal-config 8 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/user-config/should_run/uses_CABAL_CONFIG.out: -------------------------------------------------------------------------------- 1 | Writing default configuration to ./my-config 2 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/IntegrationTests/user-config/should_run/uses_CABAL_CONFIG.sh: -------------------------------------------------------------------------------- 1 | . ../common.sh 2 | 3 | export CABAL_CONFIG=./my-config 4 | cabal user-config init || die "Couldn't create config file" 5 | test -e ./my-config || die "Config file doesn't exist" 6 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/UnitTests/Distribution/Client/Dependency/Modular/PSQ.hs: -------------------------------------------------------------------------------- 1 | module UnitTests.Distribution.Client.Dependency.Modular.PSQ ( 2 | tests 3 | ) where 4 | 5 | import Distribution.Client.Dependency.Modular.PSQ 6 | 7 | import Test.Tasty 8 | import Test.Tasty.QuickCheck 9 | 10 | tests :: [TestTree] 11 | tests = [ testProperty "splitsAltImplementation" splitsTest 12 | ] 13 | 14 | -- | Original splits implementation 15 | splits' :: PSQ k a -> PSQ k (a, PSQ k a) 16 | splits' xs = 17 | casePSQ xs 18 | (PSQ []) 19 | (\ k v ys -> cons k (v, ys) (fmap (\ (w, zs) -> (w, cons k v zs)) (splits' ys))) 20 | 21 | splitsTest :: [(Int, Int)] -> Bool 22 | splitsTest psq = splits' (PSQ psq) == splits (PSQ psq) 23 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/test-cabal-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | darcs get --partial http://darcs.haskell.org/packages/Cabal/ && \ 4 | cd Cabal/cabal-install && \ 5 | make && \ 6 | sudo make install && \ 7 | sudo cabal-install update && \ 8 | cabal-install install --prefix=/tmp --user hnop && \ 9 | ls -l /tmp/bin/hnop 10 | -------------------------------------------------------------------------------- /special/cabal/cabal-install/tests/test-cabal-install-user: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | darcs get --partial http://darcs.haskell.org/packages/Cabal/ && \ 4 | cd Cabal/cabal-install && \ 5 | make install-user && \ 6 | cabal-install update && \ 7 | cabal-install install --prefix=/tmp --user hnop && \ 8 | ls -l /tmp/bin/hnop 9 | -------------------------------------------------------------------------------- /special/cabal/cabal.project: -------------------------------------------------------------------------------- 1 | packages: Cabal/ cabal-install/ 2 | 3 | -- Uncomment to allow picking up extra local unpacked deps: 4 | --optional-packages: */ 5 | -------------------------------------------------------------------------------- /special/cabal/ghc-packages: -------------------------------------------------------------------------------- 1 | Cabal 2 | 3 | -------------------------------------------------------------------------------- /special/err: -------------------------------------------------------------------------------- 1 | Configuring Cabal-1.22.4.0... 2 | setup: The program 'ghcjs' version >=0.1 is required but the version of 3 | /home/m/.stack/programs/x86_64-linux/ghcjs-0.2.0.9005001_ghc-7.10.3/src/.stack-work/install/x86_64-linux/lts-5.1/7.10.3/bin/ghcjs 4 | could not be determined. 5 | -------------------------------------------------------------------------------- /special/integer-gmp-next/Setup.hs: -------------------------------------------------------------------------------- 1 | module Main (main) where 2 | 3 | import Distribution.Simple 4 | 5 | main :: IO () 6 | main = defaultMainWithHooks autoconfUserHooks 7 | -------------------------------------------------------------------------------- /special/integer-gmp-next/gmp/config.mk.in: -------------------------------------------------------------------------------- 1 | ifeq "$(HaveLibGmp)" "" 2 | HaveLibGmp = @HaveLibGmp@ 3 | endif 4 | 5 | ifeq "$(HaveFrameworkGMP)" "" 6 | HaveFrameworkGMP = @HaveFrameworkGMP@ 7 | endif 8 | 9 | GMP_INCLUDE_DIRS = @GMP_INCLUDE_DIRS@ 10 | GMP_LIB_DIRS = @GMP_LIB_DIRS@ 11 | 12 | -------------------------------------------------------------------------------- /special/integer-gmp-next/include/HsIntegerGmp.h.in: -------------------------------------------------------------------------------- 1 | #ifndef _HS_INTEGER_GMP_H_ 2 | #define _HS_INTEGER_GMP_H_ 3 | 4 | /* Whether GMP is embedded into integer-gmp */ 5 | #define GHC_GMP_INTREE @UseIntreeGmp@ 6 | 7 | /* The following values denote the GMP version used during GHC build-time */ 8 | #define GHC_GMP_VERSION_MJ @GhcGmpVerMj@ 9 | #define GHC_GMP_VERSION_MI @GhcGmpVerMi@ 10 | #define GHC_GMP_VERSION_PL @GhcGmpVerPl@ 11 | #define GHC_GMP_VERSION \ 12 | (@GhcGmpVerMj@ * 10000 + @GhcGmpVerMi@ * 100 + @GhcGmpVerPl@) 13 | 14 | #endif /* _HS_INTEGER_GMP_H_ */ 15 | -------------------------------------------------------------------------------- /special/integer-gmp-next/integer-gmp.buildinfo.in: -------------------------------------------------------------------------------- 1 | include-dirs: @GMP_INCLUDE_DIRS@ 2 | extra-lib-dirs: @GMP_LIB_DIRS@ 3 | extra-libraries: @GMP_LIBS@ 4 | frameworks: @GMP_FRAMEWORK@ 5 | install-includes: HsIntegerGmp.h 6 | -------------------------------------------------------------------------------- /special/integer-gmp/Setup.hs: -------------------------------------------------------------------------------- 1 | module Main (main) where 2 | 3 | import Distribution.Simple 4 | 5 | main :: IO () 6 | main = defaultMain 7 | -------------------------------------------------------------------------------- /special/integer-gmp/cbits/cbits.c: -------------------------------------------------------------------------------- 1 | 2 | /* We combine the C files here. 3 | * 4 | * There is actually a good reason for this, really! 5 | * The alloc file contains a __attribute__((constructor)) function. We must 6 | * have this function in the same .o file as other stuff that actually gets 7 | * used otherwise the static linker doesn't bother to pull in the .o file 8 | * containing the constructor function. While we could just stick them in 9 | * the same .c file that'd be a bit annoying. So we combine them here. 10 | * */ 11 | 12 | #include "alloc.c" 13 | #include "float.c" 14 | #include "longlong.c" 15 | -------------------------------------------------------------------------------- /special/integer-gmp/gmp/config.mk.in: -------------------------------------------------------------------------------- 1 | ifeq "$(HaveLibGmp)" "" 2 | HaveLibGmp = @HaveLibGmp@ 3 | endif 4 | 5 | ifeq "$(HaveFrameworkGMP)" "" 6 | HaveFrameworkGMP = @HaveFrameworkGMP@ 7 | endif 8 | 9 | GMP_INCLUDE_DIRS = @GMP_INCLUDE_DIRS@ 10 | GMP_LIB_DIRS = @GMP_LIB_DIRS@ 11 | 12 | -------------------------------------------------------------------------------- /special/integer-gmp/gmp/ln: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exit 1 3 | 4 | -------------------------------------------------------------------------------- /special/integer-gmp/gmp/tarball/README: -------------------------------------------------------------------------------- 1 | 2 | Download linked from http://gmplib.org/ 3 | 4 | Untar. 5 | Remove doc/ directory. 6 | Apply patch. 7 | Re-tar. 8 | 9 | -------------------------------------------------------------------------------- /special/integer-gmp/gmp/tarball/gmp-5.0.3-nodoc-patched.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/integer-gmp/gmp/tarball/gmp-5.0.3-nodoc-patched.tar.bz2 -------------------------------------------------------------------------------- /special/integer-gmp/gmp/tarball/gmp-5.0.4.patch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/integer-gmp/gmp/tarball/gmp-5.0.4.patch -------------------------------------------------------------------------------- /special/integer-gmp/include/HsIntegerGmp.h.in: -------------------------------------------------------------------------------- 1 | #ifndef _HS_INTEGER_GMP_H_ 2 | #define _HS_INTEGER_GMP_H_ 3 | 4 | #define HAVE_SECURE_POWM @HaveSecurePowm@ 5 | 6 | #endif /* _HS_INTEGER_GMP_H_ */ 7 | -------------------------------------------------------------------------------- /special/integer-gmp/integer-gmp.buildinfo.in: -------------------------------------------------------------------------------- 1 | include-dirs: @GMP_INCLUDE_DIRS@ 2 | extra-lib-dirs: @GMP_LIB_DIRS@ 3 | extra-libraries: @GMP_LIBS@ 4 | frameworks: @GMP_FRAMEWORK@ 5 | install-includes: HsIntegerGmp.h -------------------------------------------------------------------------------- /special/integer-gmp/mkGmpDerivedConstants/Makefile: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------- 2 | # 3 | # (c) 2009 The University of Glasgow 4 | # 5 | # This file is part of the GHC build system. 6 | # 7 | # To understand how the build system works and how to modify it, see 8 | # http://ghc.haskell.org/trac/ghc/wiki/Building/Architecture 9 | # http://ghc.haskell.org/trac/ghc/wiki/Building/Modifying 10 | # 11 | # ----------------------------------------------------------------------------- 12 | 13 | dir = libraries/integer-gmp/mkGmpDerivedConstants 14 | TOP = ../../.. 15 | include $(TOP)/mk/sub-makefile.mk 16 | -------------------------------------------------------------------------------- /stack.yaml: -------------------------------------------------------------------------------- 1 | flags: {} 2 | extra-package-dbs: [] 3 | packages: 4 | - '.' 5 | extra-deps: 6 | - possible-0.1.0.5 7 | - integer-gmp-0.5.1.0 8 | resolver: lts-6.15 9 | --------------------------------------------------------------------------------