├── archive └── .empty ├── lib └── PrepGhcJS │ ├── .spot │ ├── Utils.hs │ └── Types.hs ├── spec-lts └── cabal │ ├── ghc-packages │ ├── Cabal │ ├── tests │ │ ├── PackageTests │ │ │ ├── ReexportedModules │ │ │ │ ├── LICENSE │ │ │ │ └── ReexportedModules.cabal │ │ │ ├── HaddockNewline │ │ │ │ ├── A.hs │ │ │ │ ├── Setup.hs │ │ │ │ ├── ChangeLog.md │ │ │ │ └── HaddockNewline.cabal │ │ │ ├── PreProcess │ │ │ │ ├── Foo.hsc │ │ │ │ ├── Main.hs │ │ │ │ └── my.cabal │ │ │ ├── BuildTargetErrors │ │ │ │ ├── Main.hs │ │ │ │ └── BuildTargetErrors.cabal │ │ │ ├── TestNameCollision │ │ │ │ ├── parent │ │ │ │ │ ├── Parent.hs │ │ │ │ │ └── parent.cabal │ │ │ │ └── child │ │ │ │ │ ├── Child.hs │ │ │ │ │ ├── tests │ │ │ │ │ └── Test.hs │ │ │ │ │ └── child.cabal │ │ │ ├── UniqueIPID │ │ │ │ ├── P1 │ │ │ │ │ ├── M.hs │ │ │ │ │ └── my.cabal │ │ │ │ └── P2 │ │ │ │ │ ├── M.hs │ │ │ │ │ └── my.cabal │ │ │ ├── .gitignore │ │ │ ├── AllowNewer │ │ │ │ ├── src │ │ │ │ │ └── Foo.hs │ │ │ │ ├── tests │ │ │ │ │ └── Test.hs │ │ │ │ ├── benchmarks │ │ │ │ │ └── Bench.hs │ │ │ │ └── AllowNewer.cabal │ │ │ ├── DeterministicAr │ │ │ │ ├── Lib.hs │ │ │ │ └── my.cabal │ │ │ ├── BenchmarkExeV10 │ │ │ │ ├── Foo.hs │ │ │ │ ├── benchmarks │ │ │ │ │ └── bench-Foo.hs │ │ │ │ └── my.cabal │ │ │ ├── BuildableField │ │ │ │ ├── Main.hs │ │ │ │ └── BuildableField.cabal │ │ │ ├── GhcPkgGuess │ │ │ │ ├── Symlink │ │ │ │ │ ├── bin │ │ │ │ │ │ ├── ghc-pkg │ │ │ │ │ │ └── ghc │ │ │ │ │ └── SameDirectory.cabal │ │ │ │ ├── SameDirectory │ │ │ │ │ ├── ghc-pkg │ │ │ │ │ ├── ghc │ │ │ │ │ └── SameDirectory.cabal │ │ │ │ ├── SameDirectoryVersion │ │ │ │ │ ├── ghc-pkg-7.10 │ │ │ │ │ ├── ghc-7.10 │ │ │ │ │ └── SameDirectory.cabal │ │ │ │ ├── SymlinkGhcVersion │ │ │ │ │ ├── bin │ │ │ │ │ │ ├── ghc-pkg-7.10 │ │ │ │ │ │ └── ghc-7.10 │ │ │ │ │ └── SameDirectory.cabal │ │ │ │ ├── SymlinkVersion │ │ │ │ │ ├── bin │ │ │ │ │ │ ├── ghc-pkg-ghc-7.10 │ │ │ │ │ │ └── ghc-7.10 │ │ │ │ │ └── SameDirectory.cabal │ │ │ │ └── SameDirectoryGhcVersion │ │ │ │ │ ├── ghc-pkg-ghc-7.10 │ │ │ │ │ ├── ghc-7.10 │ │ │ │ │ └── SameDirectory.cabal │ │ │ ├── Haddock │ │ │ │ ├── Simple.hs │ │ │ │ ├── Literate.lhs │ │ │ │ ├── CPP.hs │ │ │ │ ├── NoCPP.hs │ │ │ │ └── my.cabal │ │ │ ├── TestSuiteTests │ │ │ │ ├── ExeV10 │ │ │ │ │ ├── Foo.hs │ │ │ │ │ ├── tests │ │ │ │ │ │ ├── test-Short.hs │ │ │ │ │ │ └── test-Foo.hs │ │ │ │ │ └── my.cabal │ │ │ │ └── LibV09 │ │ │ │ │ ├── tests │ │ │ │ │ └── Deadlock.hs │ │ │ │ │ ├── Lib.hs │ │ │ │ │ └── LibV09.cabal │ │ │ ├── TemplateHaskell │ │ │ │ ├── dynamic │ │ │ │ │ ├── TH.hs │ │ │ │ │ ├── Lib.hs │ │ │ │ │ ├── Exe.hs │ │ │ │ │ └── my.cabal │ │ │ │ ├── vanilla │ │ │ │ │ ├── TH.hs │ │ │ │ │ ├── Lib.hs │ │ │ │ │ ├── Exe.hs │ │ │ │ │ └── my.cabal │ │ │ │ └── profiling │ │ │ │ │ ├── TH.hs │ │ │ │ │ ├── Lib.hs │ │ │ │ │ ├── Exe.hs │ │ │ │ │ └── my.cabal │ │ │ ├── EmptyLib │ │ │ │ └── empty │ │ │ │ │ └── empty.cabal │ │ │ ├── OrderFlags │ │ │ │ ├── Foo.hs │ │ │ │ └── my.cabal │ │ │ ├── PreProcessExtraSources │ │ │ │ ├── Main.hs │ │ │ │ ├── Foo.hsc │ │ │ │ └── my.cabal │ │ │ ├── BuildTestSuiteDetailedV09 │ │ │ │ └── Dummy2.hs │ │ │ ├── BuildDeps │ │ │ │ ├── TargetSpecificDeps2 │ │ │ │ │ ├── lemon.hs │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ └── my.cabal │ │ │ │ ├── InternalLibrary0 │ │ │ │ │ ├── programs │ │ │ │ │ │ └── lemon.hs │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ └── my.cabal │ │ │ │ ├── InternalLibrary1 │ │ │ │ │ ├── programs │ │ │ │ │ │ └── lemon.hs │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ └── my.cabal │ │ │ │ ├── InternalLibrary2 │ │ │ │ │ ├── programs │ │ │ │ │ │ └── lemon.hs │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── to-install │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ │ └── my.cabal │ │ │ │ ├── InternalLibrary3 │ │ │ │ │ ├── programs │ │ │ │ │ │ └── lemon.hs │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── to-install │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ │ └── my.cabal │ │ │ │ ├── InternalLibrary4 │ │ │ │ │ ├── programs │ │ │ │ │ │ └── lemon.hs │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── to-install │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ │ └── my.cabal │ │ │ │ ├── SameDepsAllRound │ │ │ │ │ ├── lemon.hs │ │ │ │ │ ├── pineapple.hs │ │ │ │ │ └── MyLibrary.hs │ │ │ │ ├── TargetSpecificDeps1 │ │ │ │ │ ├── lemon.hs │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ └── my.cabal │ │ │ │ ├── TargetSpecificDeps3 │ │ │ │ │ ├── lemon.hs │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ └── my.cabal │ │ │ │ ├── GlobalBuildDepsNotAdditive2 │ │ │ │ │ ├── lemon.hs │ │ │ │ │ ├── GlobalBuildDepsNotAdditive2.cabal │ │ │ │ │ └── Check.hs │ │ │ │ └── GlobalBuildDepsNotAdditive1 │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ ├── GlobalBuildDepsNotAdditive1.cabal │ │ │ │ │ └── Check.hs │ │ │ ├── CMain │ │ │ │ ├── Bar.hs │ │ │ │ ├── my.cabal │ │ │ │ └── foo.c │ │ │ ├── PathsModule │ │ │ │ ├── Executable │ │ │ │ │ ├── Main.hs │ │ │ │ │ └── my.cabal │ │ │ │ └── Library │ │ │ │ │ └── my.cabal │ │ │ ├── TestOptions │ │ │ │ ├── test-TestOptions.hs │ │ │ │ └── TestOptions.cabal │ │ │ ├── BenchmarkOptions │ │ │ │ ├── test-BenchmarkOptions.hs │ │ │ │ └── BenchmarkOptions.cabal │ │ │ ├── DuplicateModuleName │ │ │ │ ├── src │ │ │ │ │ └── Foo.hs │ │ │ │ ├── tests │ │ │ │ │ └── Foo.hs │ │ │ │ ├── tests2 │ │ │ │ │ └── Foo.hs │ │ │ │ └── DuplicateModuleName.cabal │ │ │ ├── multInst │ │ │ │ └── my.cabal │ │ │ ├── TestStanza │ │ │ │ └── my.cabal │ │ │ ├── BenchmarkStanza │ │ │ │ └── my.cabal │ │ │ └── Options.hs │ │ ├── Setup.hs │ │ ├── hackage │ │ │ ├── download.sh │ │ │ ├── unpack.sh │ │ │ └── check.sh │ │ └── UnitTests │ │ │ └── Distribution │ │ │ └── Compat │ │ │ └── CreatePipe.hs │ ├── misc │ │ ├── travis-diff-files.sh │ │ └── gen-extra-source-files.sh │ ├── prologue.txt │ ├── Distribution │ │ ├── Compat │ │ │ └── Exception.hs │ │ └── PackageDescription │ │ │ └── Utils.hs │ └── Setup.hs │ ├── cabal-install │ ├── .ghci │ └── Distribution │ │ └── Client │ │ └── Dependency │ │ └── Modular │ │ └── Configured.hs │ ├── .arcconfig │ ├── cabal.project │ ├── .gitignore │ ├── README.md │ └── stack.yaml ├── spec-lts8 ├── cabal │ ├── ghc-packages │ ├── Cabal │ │ ├── tests │ │ │ ├── PackageTests │ │ │ │ ├── ReexportedModules │ │ │ │ │ ├── LICENSE │ │ │ │ │ └── ReexportedModules.cabal │ │ │ │ ├── HaddockNewline │ │ │ │ │ ├── A.hs │ │ │ │ │ ├── Setup.hs │ │ │ │ │ ├── ChangeLog.md │ │ │ │ │ └── HaddockNewline.cabal │ │ │ │ ├── PreProcess │ │ │ │ │ ├── Foo.hsc │ │ │ │ │ ├── Main.hs │ │ │ │ │ └── my.cabal │ │ │ │ ├── BuildTargetErrors │ │ │ │ │ ├── Main.hs │ │ │ │ │ └── BuildTargetErrors.cabal │ │ │ │ ├── TestNameCollision │ │ │ │ │ ├── parent │ │ │ │ │ │ ├── Parent.hs │ │ │ │ │ │ └── parent.cabal │ │ │ │ │ └── child │ │ │ │ │ │ ├── Child.hs │ │ │ │ │ │ ├── tests │ │ │ │ │ │ └── Test.hs │ │ │ │ │ │ └── child.cabal │ │ │ │ ├── UniqueIPID │ │ │ │ │ ├── P1 │ │ │ │ │ │ ├── M.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ │ └── P2 │ │ │ │ │ │ ├── M.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ ├── .gitignore │ │ │ │ ├── AllowNewer │ │ │ │ │ ├── src │ │ │ │ │ │ └── Foo.hs │ │ │ │ │ ├── tests │ │ │ │ │ │ └── Test.hs │ │ │ │ │ ├── benchmarks │ │ │ │ │ │ └── Bench.hs │ │ │ │ │ └── AllowNewer.cabal │ │ │ │ ├── DeterministicAr │ │ │ │ │ ├── Lib.hs │ │ │ │ │ └── my.cabal │ │ │ │ ├── BenchmarkExeV10 │ │ │ │ │ ├── Foo.hs │ │ │ │ │ ├── benchmarks │ │ │ │ │ │ └── bench-Foo.hs │ │ │ │ │ └── my.cabal │ │ │ │ ├── BuildableField │ │ │ │ │ ├── Main.hs │ │ │ │ │ └── BuildableField.cabal │ │ │ │ ├── GhcPkgGuess │ │ │ │ │ ├── SameDirectory │ │ │ │ │ │ ├── ghc-pkg │ │ │ │ │ │ ├── ghc │ │ │ │ │ │ └── SameDirectory.cabal │ │ │ │ │ ├── Symlink │ │ │ │ │ │ ├── bin │ │ │ │ │ │ │ ├── ghc-pkg │ │ │ │ │ │ │ └── ghc │ │ │ │ │ │ └── SameDirectory.cabal │ │ │ │ │ ├── SameDirectoryVersion │ │ │ │ │ │ ├── ghc-pkg-7.10 │ │ │ │ │ │ ├── ghc-7.10 │ │ │ │ │ │ └── SameDirectory.cabal │ │ │ │ │ ├── SymlinkGhcVersion │ │ │ │ │ │ ├── bin │ │ │ │ │ │ │ ├── ghc-pkg-7.10 │ │ │ │ │ │ │ └── ghc-7.10 │ │ │ │ │ │ └── SameDirectory.cabal │ │ │ │ │ ├── SymlinkVersion │ │ │ │ │ │ ├── bin │ │ │ │ │ │ │ ├── ghc-pkg-ghc-7.10 │ │ │ │ │ │ │ └── ghc-7.10 │ │ │ │ │ │ └── SameDirectory.cabal │ │ │ │ │ └── SameDirectoryGhcVersion │ │ │ │ │ │ ├── ghc-pkg-ghc-7.10 │ │ │ │ │ │ ├── ghc-7.10 │ │ │ │ │ │ └── SameDirectory.cabal │ │ │ │ ├── Haddock │ │ │ │ │ ├── Simple.hs │ │ │ │ │ ├── Literate.lhs │ │ │ │ │ ├── CPP.hs │ │ │ │ │ ├── NoCPP.hs │ │ │ │ │ └── my.cabal │ │ │ │ ├── TestSuiteTests │ │ │ │ │ ├── ExeV10 │ │ │ │ │ │ ├── Foo.hs │ │ │ │ │ │ ├── tests │ │ │ │ │ │ │ ├── test-Short.hs │ │ │ │ │ │ │ └── test-Foo.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ │ └── LibV09 │ │ │ │ │ │ ├── tests │ │ │ │ │ │ └── Deadlock.hs │ │ │ │ │ │ ├── Lib.hs │ │ │ │ │ │ └── LibV09.cabal │ │ │ │ ├── TemplateHaskell │ │ │ │ │ ├── dynamic │ │ │ │ │ │ ├── TH.hs │ │ │ │ │ │ ├── Lib.hs │ │ │ │ │ │ ├── Exe.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ │ ├── profiling │ │ │ │ │ │ ├── TH.hs │ │ │ │ │ │ ├── Lib.hs │ │ │ │ │ │ ├── Exe.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ │ └── vanilla │ │ │ │ │ │ ├── TH.hs │ │ │ │ │ │ ├── Lib.hs │ │ │ │ │ │ ├── Exe.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ ├── EmptyLib │ │ │ │ │ └── empty │ │ │ │ │ │ └── empty.cabal │ │ │ │ ├── OrderFlags │ │ │ │ │ ├── Foo.hs │ │ │ │ │ └── my.cabal │ │ │ │ ├── PreProcessExtraSources │ │ │ │ │ ├── Main.hs │ │ │ │ │ ├── Foo.hsc │ │ │ │ │ └── my.cabal │ │ │ │ ├── BuildTestSuiteDetailedV09 │ │ │ │ │ └── Dummy2.hs │ │ │ │ ├── BuildDeps │ │ │ │ │ ├── TargetSpecificDeps2 │ │ │ │ │ │ ├── lemon.hs │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ │ ├── InternalLibrary0 │ │ │ │ │ │ ├── programs │ │ │ │ │ │ │ └── lemon.hs │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ │ ├── InternalLibrary1 │ │ │ │ │ │ ├── programs │ │ │ │ │ │ │ └── lemon.hs │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ │ ├── InternalLibrary2 │ │ │ │ │ │ ├── programs │ │ │ │ │ │ │ └── lemon.hs │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ ├── to-install │ │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ │ └── my.cabal │ │ │ │ │ │ └── my.cabal │ │ │ │ │ ├── InternalLibrary3 │ │ │ │ │ │ ├── programs │ │ │ │ │ │ │ └── lemon.hs │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ ├── to-install │ │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ │ └── my.cabal │ │ │ │ │ │ └── my.cabal │ │ │ │ │ ├── InternalLibrary4 │ │ │ │ │ │ ├── programs │ │ │ │ │ │ │ └── lemon.hs │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ ├── to-install │ │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ │ └── my.cabal │ │ │ │ │ │ └── my.cabal │ │ │ │ │ ├── SameDepsAllRound │ │ │ │ │ │ ├── lemon.hs │ │ │ │ │ │ ├── pineapple.hs │ │ │ │ │ │ └── MyLibrary.hs │ │ │ │ │ ├── TargetSpecificDeps1 │ │ │ │ │ │ ├── lemon.hs │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ │ ├── TargetSpecificDeps3 │ │ │ │ │ │ ├── lemon.hs │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ │ ├── GlobalBuildDepsNotAdditive2 │ │ │ │ │ │ ├── lemon.hs │ │ │ │ │ │ ├── GlobalBuildDepsNotAdditive2.cabal │ │ │ │ │ │ └── Check.hs │ │ │ │ │ └── GlobalBuildDepsNotAdditive1 │ │ │ │ │ │ ├── MyLibrary.hs │ │ │ │ │ │ ├── GlobalBuildDepsNotAdditive1.cabal │ │ │ │ │ │ └── Check.hs │ │ │ │ ├── CMain │ │ │ │ │ ├── Bar.hs │ │ │ │ │ ├── my.cabal │ │ │ │ │ └── foo.c │ │ │ │ ├── PathsModule │ │ │ │ │ ├── Executable │ │ │ │ │ │ ├── Main.hs │ │ │ │ │ │ └── my.cabal │ │ │ │ │ └── Library │ │ │ │ │ │ └── my.cabal │ │ │ │ ├── TestOptions │ │ │ │ │ ├── test-TestOptions.hs │ │ │ │ │ └── TestOptions.cabal │ │ │ │ ├── BenchmarkOptions │ │ │ │ │ ├── test-BenchmarkOptions.hs │ │ │ │ │ └── BenchmarkOptions.cabal │ │ │ │ ├── DuplicateModuleName │ │ │ │ │ ├── src │ │ │ │ │ │ └── Foo.hs │ │ │ │ │ ├── tests │ │ │ │ │ │ └── Foo.hs │ │ │ │ │ ├── tests2 │ │ │ │ │ │ └── Foo.hs │ │ │ │ │ └── DuplicateModuleName.cabal │ │ │ │ ├── multInst │ │ │ │ │ └── my.cabal │ │ │ │ ├── TestStanza │ │ │ │ │ └── my.cabal │ │ │ │ ├── BenchmarkStanza │ │ │ │ │ └── my.cabal │ │ │ │ └── Options.hs │ │ │ ├── Setup.hs │ │ │ ├── hackage │ │ │ │ ├── download.sh │ │ │ │ ├── unpack.sh │ │ │ │ └── check.sh │ │ │ └── UnitTests │ │ │ │ └── Distribution │ │ │ │ └── Compat │ │ │ │ └── CreatePipe.hs │ │ ├── misc │ │ │ ├── travis-diff-files.sh │ │ │ └── gen-extra-source-files.sh │ │ ├── prologue.txt │ │ ├── Distribution │ │ │ ├── Compat │ │ │ │ └── Exception.hs │ │ │ └── PackageDescription │ │ │ │ └── Utils.hs │ │ └── Setup.hs │ ├── cabal-install │ │ ├── .ghci │ │ └── Distribution │ │ │ └── Client │ │ │ └── Dependency │ │ │ └── Modular │ │ │ └── Configured.hs │ ├── .arcconfig │ ├── cabal.project │ ├── .gitignore │ ├── README.md │ └── stack.yaml ├── ghc │ └── stage2 │ │ └── empty.txt ├── aeson │ ├── Setup.lhs │ ├── include │ │ ├── incoherent-compat.h │ │ └── overlapping-compat.h │ ├── benchmarks │ │ ├── Options.hs │ │ ├── json-data │ │ │ ├── dates.json │ │ │ ├── dates-fract.json │ │ │ └── twitter1.json │ │ ├── Typed.hs │ │ ├── Makefile │ │ ├── encode.py │ │ ├── parse.py │ │ ├── Micro.hs │ │ ├── Typed │ │ │ └── Common.hs │ │ └── Compare.hs │ ├── tests │ │ ├── Tests.hs │ │ └── Functions.hs │ ├── examples │ │ ├── aeson-examples.cabal │ │ └── TemplateHaskell.hs │ └── Data │ │ └── Aeson │ │ └── Internal.hs ├── ghci │ ├── changelog.md │ ├── GNUmakefile │ └── ghc.mk ├── ghc-boot │ ├── changelog.md │ ├── GNUmakefile │ ├── GHC │ │ ├── Lexeme.hs │ │ ├── LanguageExtensions │ │ │ └── Type.hs │ │ └── LanguageExtensions.hs │ └── ghc.mk ├── ghc-boot-th │ ├── changelog.md │ ├── GNUmakefile │ └── ghc.mk ├── unix-bad │ ├── unix.buildinfo.in │ ├── Setup.hs │ └── include │ │ └── execvpe.h ├── unix │ ├── unix.buildinfo.in │ ├── Setup.hs │ └── include │ │ └── execvpe.h ├── base │ ├── Setup.hs │ ├── base.buildinfo.in │ ├── GHC │ │ ├── IO.hs-boot │ │ ├── IO │ │ │ ├── Handle.hs-boot │ │ │ ├── Handle │ │ │ │ └── FD.hs-boot │ │ │ ├── Encoding.hs-boot │ │ │ ├── Exception.hs-boot │ │ │ └── IOMode.hs │ │ ├── Profiling.hs │ │ ├── Constants.hs │ │ ├── Fingerprint.hs-boot │ │ ├── Stack │ │ │ └── CCS.hs-boot │ │ ├── Event │ │ │ └── Clock.hsc │ │ └── Char.hs │ ├── cbits │ │ ├── README.Unicode │ │ ├── SetEnv.c │ │ ├── sysconf.c │ │ ├── DarwinUtils.c │ │ ├── iconv.c │ │ └── rts.c │ ├── include │ │ ├── consUtils.h │ │ ├── WCsubst.h │ │ ├── md5.h │ │ └── HsEvent.h │ ├── Data │ │ ├── Kind.hs │ │ ├── Eq.hs │ │ └── STRef │ │ │ └── Strict.hs │ ├── Numeric │ │ └── Natural.hs │ ├── Control │ │ └── Monad │ │ │ ├── ST │ │ │ └── Strict.hs │ │ │ └── Instances.hs │ ├── Foreign │ │ ├── C.hs │ │ └── ForeignPtr │ │ │ └── Unsafe.hs │ └── Text │ │ └── Show │ │ └── Functions.hs └── base-pure │ ├── Setup.hs │ ├── base.buildinfo.in │ ├── GHC │ ├── IO.hs-boot │ ├── IO │ │ ├── Handle.hs-boot │ │ ├── Handle │ │ │ └── FD.hs-boot │ │ ├── Encoding.hs-boot │ │ ├── Exception.hs-boot │ │ └── IOMode.hs │ ├── Profiling.hs │ ├── Constants.hs │ ├── Fingerprint.hs-boot │ ├── Stack │ │ └── CCS.hs-boot │ ├── Event │ │ └── Clock.hsc │ └── Char.hs │ ├── cbits │ ├── SetEnv.c │ ├── sysconf.c │ ├── DarwinUtils.c │ ├── iconv.c │ └── rts.c │ ├── include │ ├── consUtils.h │ ├── WCsubst.h │ └── md5.h │ ├── Data │ ├── Kind.hs │ ├── Eq.hs │ └── STRef │ │ └── Strict.hs │ ├── Numeric │ └── Natural.hs │ ├── Control │ └── Monad │ │ ├── ST │ │ └── Strict.hs │ │ └── Instances.hs │ ├── Foreign │ └── C.hs │ └── Text │ └── Show │ └── Functions.hs ├── Setup.hs ├── stack.yaml └── .gitignore /archive/.empty: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/PrepGhcJS/.spot: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec-lts/cabal/ghc-packages: -------------------------------------------------------------------------------- 1 | Cabal 2 | 3 | -------------------------------------------------------------------------------- /spec-lts8/cabal/ghc-packages: -------------------------------------------------------------------------------- 1 | Cabal 2 | 3 | -------------------------------------------------------------------------------- /spec-lts8/ghc/stage2/empty.txt: -------------------------------------------------------------------------------- 1 | empty 2 | -------------------------------------------------------------------------------- /Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/ReexportedModules/LICENSE: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/ReexportedModules/LICENSE: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/HaddockNewline/A.hs: -------------------------------------------------------------------------------- 1 | module A where 2 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/PreProcess/Foo.hsc: -------------------------------------------------------------------------------- 1 | module Foo where 2 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/HaddockNewline/A.hs: -------------------------------------------------------------------------------- 1 | module A where 2 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/PreProcess/Foo.hsc: -------------------------------------------------------------------------------- 1 | module Foo where 2 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/BuildTargetErrors/Main.hs: -------------------------------------------------------------------------------- 1 | main = return () 2 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/BuildTargetErrors/Main.hs: -------------------------------------------------------------------------------- 1 | main = return () 2 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/TestNameCollision/parent/Parent.hs: -------------------------------------------------------------------------------- 1 | module Parent where 2 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | 4 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | 4 | -------------------------------------------------------------------------------- /stack.yaml: -------------------------------------------------------------------------------- 1 | resolver: lts-7.14 2 | allow-newer: true 3 | extra-deps: 4 | - rawstring-qm-0.2.2.2 5 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/UniqueIPID/P1/M.hs: -------------------------------------------------------------------------------- 1 | module M(m) where 2 | 3 | m = print "1" 4 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/UniqueIPID/P2/M.hs: -------------------------------------------------------------------------------- 1 | module M(m) where 2 | 3 | m = print "2" 4 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/TestNameCollision/parent/Parent.hs: -------------------------------------------------------------------------------- 1 | module Parent where 2 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/UniqueIPID/P1/M.hs: -------------------------------------------------------------------------------- 1 | module M(m) where 2 | 3 | m = print "1" 4 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/UniqueIPID/P2/M.hs: -------------------------------------------------------------------------------- 1 | module M(m) where 2 | 3 | m = print "2" 4 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/TestNameCollision/child/Child.hs: -------------------------------------------------------------------------------- 1 | module Child where 2 | import Parent 3 | -------------------------------------------------------------------------------- /spec-lts8/aeson/Setup.lhs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env runhaskell 2 | > import Distribution.Simple 3 | > main = defaultMain 4 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/HaddockNewline/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /spec-lts/cabal/cabal-install/.ghci: -------------------------------------------------------------------------------- 1 | :set -idist/build/autogen -optP-include -optPdist/build/autogen/cabal_macros.h 2 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/HaddockNewline/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/TestNameCollision/child/Child.hs: -------------------------------------------------------------------------------- 1 | module Child where 2 | import Parent 3 | -------------------------------------------------------------------------------- /spec-lts8/cabal/cabal-install/.ghci: -------------------------------------------------------------------------------- 1 | :set -idist/build/autogen -optP-include -optPdist/build/autogen/cabal_macros.h 2 | -------------------------------------------------------------------------------- /spec-lts8/ghci/changelog.md: -------------------------------------------------------------------------------- 1 | ## 8.0.1 *Feb 2016* 2 | 3 | * Bundled with GHC 8.0.1 4 | 5 | * Initial version 6 | -------------------------------------------------------------------------------- /spec-lts8/ghc-boot/changelog.md: -------------------------------------------------------------------------------- 1 | ## 8.0.1 *May 2016* 2 | 3 | * Bundled with GHC 8.0.1 4 | 5 | * Initial version 6 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/.gitignore: -------------------------------------------------------------------------------- 1 | test-log.txt 2 | Setup 3 | /TestSuiteExeV10/dist-* 4 | tmp.package.conf 5 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/AllowNewer/src/Foo.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | main :: IO () 4 | main = return () 5 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/.gitignore: -------------------------------------------------------------------------------- 1 | test-log.txt 2 | Setup 3 | /TestSuiteExeV10/dist-* 4 | tmp.package.conf 5 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/AllowNewer/src/Foo.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | main :: IO () 4 | main = return () 5 | -------------------------------------------------------------------------------- /spec-lts8/ghc-boot-th/changelog.md: -------------------------------------------------------------------------------- 1 | ## 8.0.1 *May 2016* 2 | 3 | * Bundled with GHC 8.0.1 4 | 5 | * Initial version 6 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/AllowNewer/tests/Test.hs: -------------------------------------------------------------------------------- 1 | !module Main where 2 | 3 | main :: IO () 4 | main = return () 5 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/AllowNewer/tests/Test.hs: -------------------------------------------------------------------------------- 1 | !module Main where 2 | 3 | main :: IO () 4 | main = return () 5 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/AllowNewer/benchmarks/Bench.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | main :: IO () 4 | main = return () 5 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/DeterministicAr/Lib.hs: -------------------------------------------------------------------------------- 1 | module Lib where 2 | 3 | dummy :: IO () 4 | dummy = return () 5 | 6 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/AllowNewer/benchmarks/Bench.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | main :: IO () 4 | main = return () 5 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/DeterministicAr/Lib.hs: -------------------------------------------------------------------------------- 1 | module Lib where 2 | 3 | dummy :: IO () 4 | dummy = return () 5 | 6 | -------------------------------------------------------------------------------- /spec-lts8/ghci/GNUmakefile: -------------------------------------------------------------------------------- 1 | dir = libraries/ghci 2 | TOP = ../.. 3 | include $(TOP)/mk/sub-makefile.mk 4 | FAST_MAKE_OPTS += stage=0 5 | -------------------------------------------------------------------------------- /spec-lts/cabal/.arcconfig: -------------------------------------------------------------------------------- 1 | { 2 | "repository.callsign" : "CABAL", 3 | "phabricator.uri" : "https://phabricator.haskell.org" 4 | } 5 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/BenchmarkExeV10/Foo.hs: -------------------------------------------------------------------------------- 1 | module Foo where 2 | 3 | fooTest :: [String] -> Bool 4 | fooTest _ = True 5 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/BuildableField/Main.hs: -------------------------------------------------------------------------------- 1 | import UnavailableModule 2 | 3 | main :: IO () 4 | main = putStrLn "Hello" 5 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/GhcPkgGuess/Symlink/bin/ghc-pkg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "GHC package manager version 9999999" 3 | exit 0 4 | -------------------------------------------------------------------------------- /spec-lts8/cabal/.arcconfig: -------------------------------------------------------------------------------- 1 | { 2 | "repository.callsign" : "CABAL", 3 | "phabricator.uri" : "https://phabricator.haskell.org" 4 | } 5 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/BenchmarkExeV10/Foo.hs: -------------------------------------------------------------------------------- 1 | module Foo where 2 | 3 | fooTest :: [String] -> Bool 4 | fooTest _ = True 5 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/BuildableField/Main.hs: -------------------------------------------------------------------------------- 1 | import UnavailableModule 2 | 3 | main :: IO () 4 | main = putStrLn "Hello" 5 | -------------------------------------------------------------------------------- /spec-lts8/ghc-boot/GNUmakefile: -------------------------------------------------------------------------------- 1 | dir = libraries/ghc-boot 2 | TOP = ../.. 3 | include $(TOP)/mk/sub-makefile.mk 4 | FAST_MAKE_OPTS += stage=0 5 | -------------------------------------------------------------------------------- /spec-lts8/unix-bad/unix.buildinfo.in: -------------------------------------------------------------------------------- 1 | buildable: @BUILD_PACKAGE_BOOL@ 2 | extra-libraries: @EXTRA_LIBS@ 3 | install-includes: HsUnixConfig.h 4 | -------------------------------------------------------------------------------- /spec-lts8/unix/unix.buildinfo.in: -------------------------------------------------------------------------------- 1 | buildable: @BUILD_PACKAGE_BOOL@ 2 | extra-libraries: @EXTRA_LIBS@ 3 | install-includes: HsUnixConfig.h 4 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectory/ghc-pkg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "GHC package manager version 9999999" 3 | exit 0 4 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/Haddock/Simple.hs: -------------------------------------------------------------------------------- 1 | module Simple where 2 | 3 | -- | For hiding needles. 4 | data Haystack = Haystack 5 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/PreProcess/Main.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import Foo 4 | 5 | main :: IO () 6 | main = return () 7 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/TestSuiteTests/ExeV10/Foo.hs: -------------------------------------------------------------------------------- 1 | module Foo where 2 | 3 | fooTest :: [String] -> Bool 4 | fooTest _ = True 5 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectory/ghc-pkg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "GHC package manager version 9999999" 3 | exit 0 4 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/GhcPkgGuess/Symlink/bin/ghc-pkg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "GHC package manager version 9999999" 3 | exit 0 4 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/Haddock/Simple.hs: -------------------------------------------------------------------------------- 1 | module Simple where 2 | 3 | -- | For hiding needles. 4 | data Haystack = Haystack 5 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/PreProcess/Main.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import Foo 4 | 5 | main :: IO () 6 | main = return () 7 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/TestSuiteTests/ExeV10/Foo.hs: -------------------------------------------------------------------------------- 1 | module Foo where 2 | 3 | fooTest :: [String] -> Bool 4 | fooTest _ = True 5 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/TemplateHaskell/dynamic/TH.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module TH where 3 | 4 | splice = [| () |] 5 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/TemplateHaskell/vanilla/TH.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module TH where 3 | 4 | splice = [| () |] 5 | -------------------------------------------------------------------------------- /spec-lts8/ghc-boot-th/GNUmakefile: -------------------------------------------------------------------------------- 1 | dir = libraries/ghc-boot-th 2 | TOP = ../.. 3 | include $(TOP)/mk/sub-makefile.mk 4 | FAST_MAKE_OPTS += stage=0 5 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectoryVersion/ghc-pkg-7.10: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "GHC package manager version 9999999" 3 | exit 0 4 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/Haddock/Literate.lhs: -------------------------------------------------------------------------------- 1 | > module Literate where 2 | 3 | > -- | For hiding needles. 4 | > data Haystack = Haystack 5 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/TemplateHaskell/profiling/TH.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module TH where 3 | 4 | splice = [| () |] 5 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/GhcPkgGuess/SameDirectoryVersion/ghc-pkg-7.10: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "GHC package manager version 9999999" 3 | exit 0 4 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/Haddock/Literate.lhs: -------------------------------------------------------------------------------- 1 | > module Literate where 2 | 3 | > -- | For hiding needles. 4 | > data Haystack = Haystack 5 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/TemplateHaskell/dynamic/TH.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module TH where 3 | 4 | splice = [| () |] 5 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/TemplateHaskell/profiling/TH.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module TH where 3 | 4 | splice = [| () |] 5 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/TemplateHaskell/vanilla/TH.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module TH where 3 | 4 | splice = [| () |] 5 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base/Setup.hs: -------------------------------------------------------------------------------- 1 | module Main (main) where 2 | 3 | import Distribution.Simple 4 | 5 | main :: IO () 6 | main = defaultMainWithHooks autoconfUserHooks 7 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/ghc-boot/GHC/Lexeme.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PackageImports #-} 2 | 3 | module GHC.Lexeme ( module X ) where 4 | 5 | import "ghc-boot-th" GHC.Lexeme as X 6 | -------------------------------------------------------------------------------- /spec-lts8/unix/Setup.hs: -------------------------------------------------------------------------------- 1 | module Main (main) where 2 | 3 | import Distribution.Simple 4 | 5 | main :: IO () 6 | main = defaultMainWithHooks autoconfUserHooks 7 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/Setup.hs: -------------------------------------------------------------------------------- 1 | module Main (main) where 2 | 3 | import Distribution.Simple 4 | 5 | main :: IO () 6 | main = defaultMainWithHooks autoconfUserHooks 7 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/unix-bad/Setup.hs: -------------------------------------------------------------------------------- 1 | module Main (main) where 2 | 3 | import Distribution.Simple 4 | 5 | main :: IO () 6 | main = defaultMainWithHooks autoconfUserHooks 7 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/TemplateHaskell/dynamic/Lib.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module Lib where 3 | 4 | import TH 5 | 6 | val = $(splice) 7 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/TemplateHaskell/vanilla/Lib.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module Lib where 3 | 4 | import TH 5 | 6 | val = $(splice) 7 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/TemplateHaskell/dynamic/Lib.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module Lib where 3 | 4 | import TH 5 | 6 | val = $(splice) 7 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/TemplateHaskell/vanilla/Lib.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module Lib where 3 | 4 | import TH 5 | 6 | val = $(splice) 7 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/TemplateHaskell/profiling/Lib.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module Lib where 3 | 4 | import TH 5 | 6 | val = $(splice) 7 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/TemplateHaskell/profiling/Lib.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module Lib where 3 | 4 | import TH 5 | 6 | val = $(splice) 7 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base/base.buildinfo.in: -------------------------------------------------------------------------------- 1 | extra-lib-dirs: @ICONV_LIB_DIRS@ 2 | extra-libraries: @EXTRA_LIBS@ 3 | include-dirs: @ICONV_INCLUDE_DIRS@ 4 | install-includes: HsBaseConfig.h EventConfig.h 5 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/base.buildinfo.in: -------------------------------------------------------------------------------- 1 | extra-lib-dirs: @ICONV_LIB_DIRS@ 2 | extra-libraries: @EXTRA_LIBS@ 3 | include-dirs: @ICONV_INCLUDE_DIRS@ 4 | install-includes: HsBaseConfig.h EventConfig.h 5 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/ghc-boot/GHC/LanguageExtensions/Type.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PackageImports #-} 2 | 3 | module GHC.LanguageExtensions.Type ( module X ) where 4 | 5 | import "ghc-boot-th" GHC.LanguageExtensions.Type as X 6 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/base/GHC/IO.hs-boot: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Unsafe #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | module GHC.IO where 5 | 6 | import GHC.Types 7 | 8 | failIO :: [Char] -> IO a 9 | mplusIO :: IO a -> IO a -> IO a 10 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/GHC/IO.hs-boot: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Unsafe #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | module GHC.IO where 5 | 6 | import GHC.Types 7 | 8 | failIO :: [Char] -> IO a 9 | mplusIO :: IO a -> IO a -> IO a 10 | -------------------------------------------------------------------------------- /spec-lts8/base/cbits/README.Unicode: -------------------------------------------------------------------------------- 1 | 2 | WCsubst.c is generated with: 3 | 4 | sh ubconfc < UnicodeData.txt > WCsubst.c 5 | 6 | where UnicodeData.txt came from 7 | 8 | http://www.unicode.org/Public/6.0.0/ucd/UnicodeData.txt 9 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/base/GHC/IO/Handle.hs-boot: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | module GHC.IO.Handle where 5 | 6 | import GHC.IO 7 | import GHC.IO.Handle.Types 8 | 9 | hFlush :: Handle -> IO () 10 | 11 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/GHC/IO/Handle.hs-boot: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | module GHC.IO.Handle where 5 | 6 | import GHC.IO 7 | import GHC.IO.Handle.Types 8 | 9 | hFlush :: Handle -> IO () 10 | 11 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/aeson/include/incoherent-compat.h: -------------------------------------------------------------------------------- 1 | #if __GLASGOW_HASKELL__ >= 710 2 | #define INCOHERENT_ {-# INCOHERENT #-} 3 | #else 4 | -- This causes some type class instances to break: 5 | -- {-# LANGUAGE IncoherentInstances #-} 6 | #define INCOHERENT_ 7 | #endif 8 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/aeson/benchmarks/Options.hs: -------------------------------------------------------------------------------- 1 | module Options () where 2 | 3 | import Prelude () 4 | import Prelude.Compat 5 | 6 | import Data.Aeson.Types 7 | 8 | opts :: Options 9 | opts = defaultOptions 10 | { sumEncoding = ObjectWithSingleField 11 | } 12 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base/cbits/SetEnv.c: -------------------------------------------------------------------------------- 1 | #include "HsBase.h" 2 | #ifdef HAVE_UNSETENV 3 | int __hsbase_unsetenv(const char *name) { 4 | #ifdef UNSETENV_RETURNS_VOID 5 | unsetenv(name); 6 | return 0; 7 | #else 8 | return unsetenv(name); 9 | #endif 10 | } 11 | #endif 12 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/aeson/include/overlapping-compat.h: -------------------------------------------------------------------------------- 1 | #if __GLASGOW_HASKELL__ >= 710 2 | #define OVERLAPPABLE_ {-# OVERLAPPABLE #-} 3 | #define OVERLAPPING_ {-# OVERLAPPING #-} 4 | #else 5 | {-# LANGUAGE OverlappingInstances #-} 6 | #define OVERLAPPABLE_ 7 | #define OVERLAPPING_ 8 | #endif 9 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/cbits/SetEnv.c: -------------------------------------------------------------------------------- 1 | #include "HsBase.h" 2 | #ifdef HAVE_UNSETENV 3 | int __hsbase_unsetenv(const char *name) { 4 | #ifdef UNSETENV_RETURNS_VOID 5 | unsetenv(name); 6 | return 0; 7 | #else 8 | return unsetenv(name); 9 | #endif 10 | } 11 | #endif 12 | -------------------------------------------------------------------------------- /spec-lts8/base/GHC/IO/Handle/FD.hs-boot: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | module GHC.IO.Handle.FD where 5 | 6 | import GHC.IO.Handle.Types 7 | 8 | -- used in GHC.Conc, which is below GHC.IO.Handle.FD 9 | stdout :: Handle 10 | 11 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/BuildTargetErrors/BuildTargetErrors.cabal: -------------------------------------------------------------------------------- 1 | name: BuildTargetErrors 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.9 5 | 6 | library 7 | 8 | executable not-buildable-exe 9 | main-is: Main.hs 10 | buildable: False 11 | -------------------------------------------------------------------------------- /spec-lts/cabal/cabal.project: -------------------------------------------------------------------------------- 1 | packages: Cabal/ cabal-install/ 2 | 3 | -- Uncomment to allow picking up extra local unpacked deps: 4 | --optional-packages: */ 5 | 6 | -- program-options 7 | -- So us hackers get all the assertion failures early: 8 | -- ghc-options: -fno-ignore-asserts 9 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/GHC/IO/Handle/FD.hs-boot: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | module GHC.IO.Handle.FD where 5 | 6 | import GHC.IO.Handle.Types 7 | 8 | -- used in GHC.Conc, which is below GHC.IO.Handle.FD 9 | stdout :: Handle 10 | 11 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/BuildTargetErrors/BuildTargetErrors.cabal: -------------------------------------------------------------------------------- 1 | name: BuildTargetErrors 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.9 5 | 6 | library 7 | 8 | executable not-buildable-exe 9 | main-is: Main.hs 10 | buildable: False 11 | -------------------------------------------------------------------------------- /spec-lts8/cabal/cabal.project: -------------------------------------------------------------------------------- 1 | packages: Cabal/ cabal-install/ 2 | 3 | -- Uncomment to allow picking up extra local unpacked deps: 4 | --optional-packages: */ 5 | 6 | -- program-options 7 | -- So us hackers get all the assertion failures early: 8 | -- ghc-options: -fno-ignore-asserts 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /propellor 2 | dist/* 3 | tags 4 | privdata/local 5 | privdata/keyring.gpg~ 6 | Setup 7 | Setup.hi 8 | Setup.o 9 | docker 10 | chroot 11 | propellor.1 12 | .lock 13 | .lastchecked 14 | .stack-work/* 15 | .cabal-sandbox/ 16 | .dir-locals.el 17 | cabal.sandbox.config 18 | *~ 19 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base/GHC/Profiling.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | -- | @since 4.7.0.0 5 | module GHC.Profiling where 6 | 7 | import GHC.Base 8 | 9 | foreign import ccall startProfTimer :: IO () 10 | foreign import ccall stopProfTimer :: IO () 11 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/aeson/benchmarks/json-data/dates.json: -------------------------------------------------------------------------------- 1 | ["2015-02-02T09:10:11Z","2015-02-03T09:10:11+0000","2014-01-02T09:10:11Z","2014-01-03T02:09:12-0300","2013-05-06T07:08:09Z","2015-02-02T09:10:11+04:00","2015-02-03T09:10:11Z","2014-01-02T09:10:11-11:45","2014-01-03T02:09:12Z","2013-05-06T07:08:09+0000"] 2 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/GHC/Profiling.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | -- | @since 4.7.0.0 5 | module GHC.Profiling where 6 | 7 | import GHC.Base 8 | 9 | foreign import ccall startProfTimer :: IO () 10 | foreign import ccall stopProfTimer :: IO () 11 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/base/GHC/IO/Encoding.hs-boot: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | module GHC.IO.Encoding where 5 | 6 | import GHC.IO (IO) 7 | import GHC.IO.Encoding.Types 8 | 9 | getLocaleEncoding, getFileSystemEncoding, getForeignEncoding :: IO TextEncoding 10 | 11 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/GHC/IO/Encoding.hs-boot: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | module GHC.IO.Encoding where 5 | 6 | import GHC.IO (IO) 7 | import GHC.IO.Encoding.Types 8 | 9 | getLocaleEncoding, getFileSystemEncoding, getForeignEncoding :: IO TextEncoding 10 | 11 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/aeson/benchmarks/json-data/dates-fract.json: -------------------------------------------------------------------------------- 1 | ["2015-02-02T09:10:11.123Z","2015-02-03T09:10:11.000+0000","2014-01-02T09:10:11.333Z","2014-01-03T02:09:12.000-02:00","2013-05-06T07:08:09.444Z","2015-02-02T09:10:11.66+03:00","2015-02-03T09:10:11.66Z","2014-01-02T09:10:11.66-1200","2014-01-03T02:09:12.66Z","2013-05-06T07:08:09.66+00:00"] 2 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base/GHC/Constants.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | module GHC.Constants where 5 | 6 | -- TODO: This used to include HaskellConstants.hs, but that has now gone. 7 | -- We probably want to include the constants in platformConstants somehow 8 | -- instead. 9 | 10 | import GHC.Base () -- dummy dependency 11 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/GHC/Constants.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | module GHC.Constants where 5 | 6 | -- TODO: This used to include HaskellConstants.hs, but that has now gone. 7 | -- We probably want to include the constants in platformConstants somehow 8 | -- instead. 9 | 10 | import GHC.Base () -- dummy dependency 11 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base/GHC/IO/Exception.hs-boot: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | module GHC.IO.Exception where 5 | 6 | import GHC.Base 7 | import GHC.Exception 8 | 9 | data IOException 10 | instance Exception IOException 11 | 12 | type IOError = IOException 13 | userError :: String -> IOError 14 | unsupportedOperation :: IOError 15 | 16 | -------------------------------------------------------------------------------- /spec-lts8/base/cbits/sysconf.c: -------------------------------------------------------------------------------- 1 | #include "HsBaseConfig.h" 2 | 3 | /* For _SC_CLK_TCK */ 4 | #if HAVE_UNISTD_H 5 | #include 6 | #endif 7 | 8 | /* for CLK_TCK */ 9 | #if HAVE_TIME_H 10 | #include 11 | #endif 12 | 13 | long clk_tck(void) { 14 | #if defined(CLK_TCK) 15 | return (CLK_TCK); 16 | #else 17 | return sysconf(_SC_CLK_TCK); 18 | #endif 19 | } 20 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/GHC/IO/Exception.hs-boot: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | module GHC.IO.Exception where 5 | 6 | import GHC.Base 7 | import GHC.Exception 8 | 9 | data IOException 10 | instance Exception IOException 11 | 12 | type IOError = IOException 13 | userError :: String -> IOError 14 | unsupportedOperation :: IOError 15 | 16 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/cbits/sysconf.c: -------------------------------------------------------------------------------- 1 | #include "HsBaseConfig.h" 2 | 3 | /* For _SC_CLK_TCK */ 4 | #if HAVE_UNISTD_H 5 | #include 6 | #endif 7 | 8 | /* for CLK_TCK */ 9 | #if HAVE_TIME_H 10 | #include 11 | #endif 12 | 13 | long clk_tck(void) { 14 | #if defined(CLK_TCK) 15 | return (CLK_TCK); 16 | #else 17 | return sysconf(_SC_CLK_TCK); 18 | #endif 19 | } 20 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base/GHC/Fingerprint.hs-boot: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | module GHC.Fingerprint ( 5 | fingerprintString, 6 | fingerprintFingerprints 7 | ) where 8 | 9 | import GHC.Base 10 | import GHC.Fingerprint.Type 11 | 12 | fingerprintFingerprints :: [Fingerprint] -> Fingerprint 13 | fingerprintString :: String -> Fingerprint 14 | 15 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/ghci/ghc.mk: -------------------------------------------------------------------------------- 1 | libraries/ghci_PACKAGE = ghci 2 | libraries/ghci_dist-install_GROUP = libraries 3 | $(if $(filter ghci,$(PACKAGES_STAGE0)),$(eval $(call build-package,libraries/ghci,dist-boot,0))) 4 | $(if $(filter ghci,$(PACKAGES_STAGE1)),$(eval $(call build-package,libraries/ghci,dist-install,1))) 5 | $(if $(filter ghci,$(PACKAGES_STAGE2)),$(eval $(call build-package,libraries/ghci,dist-install,2))) 6 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/aeson/benchmarks/Typed.hs: -------------------------------------------------------------------------------- 1 | module Main (main) where 2 | 3 | import Prelude () 4 | import Prelude.Compat 5 | 6 | import Criterion.Main 7 | import qualified Typed.Generic as Generic 8 | import qualified Typed.Manual as Manual 9 | import qualified Typed.TH as TH 10 | 11 | main :: IO () 12 | main = defaultMain [ 13 | Generic.benchmarks 14 | , Manual.benchmarks 15 | , TH.benchmarks 16 | ] 17 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/GHC/Fingerprint.hs-boot: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | module GHC.Fingerprint ( 5 | fingerprintString, 6 | fingerprintFingerprints 7 | ) where 8 | 9 | import GHC.Base 10 | import GHC.Fingerprint.Type 11 | 12 | fingerprintFingerprints :: [Fingerprint] -> Fingerprint 13 | fingerprintString :: String -> Fingerprint 14 | 15 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/aeson/benchmarks/Makefile: -------------------------------------------------------------------------------- 1 | ghc := ghc 2 | ghcflags := -O 3 | 4 | binaries := AesonParse AesonEncode JsonParse AesonCompareAutoInstances 5 | 6 | all: $(binaries) $(binaries:%=%_p) 7 | 8 | %_p: %.hs 9 | $(ghc) $(ghcflags) -prof -auto-all -rtsopts --make -o $@ $^ 10 | 11 | %: %.hs 12 | $(ghc) $(ghcflags) --make -rtsopts -o $@ $^ 13 | 14 | clean: 15 | -rm -f *.o *.hi $(binaries) $(binaries:%=%_p) 16 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/aeson/tests/Tests.hs: -------------------------------------------------------------------------------- 1 | module Main (main) where 2 | 3 | import Prelude () 4 | import Prelude.Compat 5 | 6 | import Test.Framework (defaultMain) 7 | import qualified DataFamilies.Properties as DF 8 | import qualified Properties 9 | import qualified UnitTests 10 | 11 | main :: IO () 12 | main = do 13 | ioTests <- UnitTests.ioTests 14 | defaultMain (DF.tests : Properties.tests : UnitTests.tests : ioTests) 15 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base/include/consUtils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (c) The University of Glasgow, 2000-2002 3 | * 4 | * Win32 Console API helpers. 5 | */ 6 | #ifndef __CONSUTILS_H__ 7 | #define __CONSUTILS_H__ 8 | extern int is_console__(int fd); 9 | extern int set_console_buffering__(int fd, int cooked); 10 | extern int set_console_echo__(int fd, int on); 11 | extern int get_console_echo__(int fd); 12 | extern int flush_input_console__ (int fd); 13 | #endif 14 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/ghc-boot/ghc.mk: -------------------------------------------------------------------------------- 1 | libraries/ghc-boot_PACKAGE = ghc-boot 2 | libraries/ghc-boot_dist-install_GROUP = libraries 3 | $(if $(filter ghc-boot,$(PACKAGES_STAGE0)),$(eval $(call build-package,libraries/ghc-boot,dist-boot,0))) 4 | $(if $(filter ghc-boot,$(PACKAGES_STAGE1)),$(eval $(call build-package,libraries/ghc-boot,dist-install,1))) 5 | $(if $(filter ghc-boot,$(PACKAGES_STAGE2)),$(eval $(call build-package,libraries/ghc-boot,dist-install,2))) 6 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/include/consUtils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (c) The University of Glasgow, 2000-2002 3 | * 4 | * Win32 Console API helpers. 5 | */ 6 | #ifndef __CONSUTILS_H__ 7 | #define __CONSUTILS_H__ 8 | extern int is_console__(int fd); 9 | extern int set_console_buffering__(int fd, int cooked); 10 | extern int set_console_echo__(int fd, int on); 11 | extern int get_console_echo__(int fd); 12 | extern int flush_input_console__ (int fd); 13 | #endif 14 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/ghc-boot-th/ghc.mk: -------------------------------------------------------------------------------- 1 | libraries/ghc-boot-th_PACKAGE = ghc-boot-th 2 | libraries/ghc-boot-th_dist-install_GROUP = libraries 3 | $(if $(filter ghc-boot-th,$(PACKAGES_STAGE0)),$(eval $(call build-package,libraries/ghc-boot-th,dist-boot,0))) 4 | $(if $(filter ghc-boot-th,$(PACKAGES_STAGE1)),$(eval $(call build-package,libraries/ghc-boot-th,dist-install,1))) 5 | $(if $(filter ghc-boot-th,$(PACKAGES_STAGE2)),$(eval $(call build-package,libraries/ghc-boot-th,dist-install,2))) 6 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 -------------------------------------------------------------------------------- /spec-lts8/base/GHC/Stack/CCS.hs-boot: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module GHC.Stack.CCS where 3 | 4 | {- Cuts the following loop: 5 | 6 | GHC.Exception.errorCallWithCallStackException requires 7 | GHC.Stack.CCS.currentCallStack, which requires 8 | Foreign.C (for peeking CostCentres) 9 | GHC.Foreign, GHC.IO.Encoding (for decoding UTF-8 strings) 10 | .. lots of stuff ... 11 | GHC.Exception 12 | -} 13 | 14 | import GHC.Base 15 | 16 | currentCallStack :: IO [String] 17 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 -------------------------------------------------------------------------------- /spec-lts8/base-pure/GHC/Stack/CCS.hs-boot: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module GHC.Stack.CCS where 3 | 4 | {- Cuts the following loop: 5 | 6 | GHC.Exception.errorCallWithCallStackException requires 7 | GHC.Stack.CCS.currentCallStack, which requires 8 | Foreign.C (for peeking CostCentres) 9 | GHC.Foreign, GHC.IO.Encoding (for decoding UTF-8 strings) 10 | .. lots of stuff ... 11 | GHC.Exception 12 | -} 13 | 14 | import GHC.Base 15 | 16 | currentCallStack :: IO [String] 17 | -------------------------------------------------------------------------------- /spec-lts/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 -------------------------------------------------------------------------------- /spec-lts8/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 -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/aeson/tests/Functions.hs: -------------------------------------------------------------------------------- 1 | module Functions 2 | ( 3 | approxEq 4 | , approxEqWith 5 | ) where 6 | 7 | import Prelude () 8 | import Prelude.Compat 9 | 10 | approxEq :: (Fractional a, Ord a) => a -> a -> Bool 11 | approxEq = approxEqWith 1e-15 1e-15 12 | 13 | approxEqWith :: (Fractional a, Ord a) => a -> a -> a -> a -> Bool 14 | approxEqWith maxAbsoluteError maxRelativeError a b = 15 | a == b || d < maxAbsoluteError || 16 | d / max (abs b) (abs a) <= maxRelativeError 17 | where d = abs (a - b) 18 | -------------------------------------------------------------------------------- /lib/PrepGhcJS/Utils.hs: -------------------------------------------------------------------------------- 1 | module PrepGhcJS.Utils where 2 | 3 | import qualified Text.Printf as T 4 | import qualified Data.Text as T 5 | 6 | toVer sres@('l':'t':'s':'-':p) d = 7 | let tv = T.printf "9%03d%03d" (read ma::Int) (read (tail mi)::Int) 8 | in 9 | (tv, "ghc-8.0-" ++ d ++ "-" ++ sres ++ "-" ++ tv) 10 | where 11 | aa@(ma,mi) = break (=='.') p 12 | toVer sres@('n':'i':'g':'h':'t':'l':'y':'-':s) d = 13 | let tv = '8':filter (/= '-') s 14 | in 15 | (tv, "ghc-8.0-" ++ d ++ "-" ++ sres ++ "-" ++ tv) 16 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/base/GHC/Event/Clock.hsc: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | module GHC.Event.Clock (getMonotonicTime) where 5 | 6 | import GHC.Base 7 | import GHC.Real 8 | import Data.Word 9 | 10 | -- | Return monotonic time in seconds, since some unspecified starting point 11 | getMonotonicTime :: IO Double 12 | getMonotonicTime = do w <- getMonotonicNSec 13 | return (fromIntegral w / 1000000000) 14 | 15 | foreign import ccall unsafe "getMonotonicNSec" 16 | getMonotonicNSec :: IO Word64 17 | 18 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/GHC/Event/Clock.hsc: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | module GHC.Event.Clock (getMonotonicTime) where 5 | 6 | import GHC.Base 7 | import GHC.Real 8 | import Data.Word 9 | 10 | -- | Return monotonic time in seconds, since some unspecified starting point 11 | getMonotonicTime :: IO Double 12 | getMonotonicTime = do w <- getMonotonicNSec 13 | return (fromIntegral w / 1000000000) 14 | 15 | foreign import ccall unsafe "getMonotonicNSec" 16 | getMonotonicNSec :: IO Word64 17 | 18 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base/include/WCsubst.h: -------------------------------------------------------------------------------- 1 | #ifndef WCSUBST_INCL 2 | 3 | #define WCSUBST_INCL 4 | 5 | #include "HsFFI.h" 6 | #include 7 | 8 | HsInt u_iswupper(HsInt wc); 9 | HsInt u_iswdigit(HsInt wc); 10 | HsInt u_iswalpha(HsInt wc); 11 | HsInt u_iswcntrl(HsInt wc); 12 | HsInt u_iswspace(HsInt wc); 13 | HsInt u_iswprint(HsInt wc); 14 | HsInt u_iswlower(HsInt wc); 15 | 16 | HsInt u_iswalnum(HsInt wc); 17 | 18 | HsInt u_towlower(HsInt wc); 19 | HsInt u_towupper(HsInt wc); 20 | HsInt u_towtitle(HsInt wc); 21 | 22 | HsInt u_gencat(HsInt wc); 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/include/WCsubst.h: -------------------------------------------------------------------------------- 1 | #ifndef WCSUBST_INCL 2 | 3 | #define WCSUBST_INCL 4 | 5 | #include "HsFFI.h" 6 | #include 7 | 8 | HsInt u_iswupper(HsInt wc); 9 | HsInt u_iswdigit(HsInt wc); 10 | HsInt u_iswalpha(HsInt wc); 11 | HsInt u_iswcntrl(HsInt wc); 12 | HsInt u_iswspace(HsInt wc); 13 | HsInt u_iswprint(HsInt wc); 14 | HsInt u_iswlower(HsInt wc); 15 | 16 | HsInt u_iswalnum(HsInt wc); 17 | 18 | HsInt u_towlower(HsInt wc); 19 | HsInt u_towupper(HsInt wc); 20 | HsInt u_towtitle(HsInt wc); 21 | 22 | HsInt u_gencat(HsInt wc); 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/base/cbits/DarwinUtils.c: -------------------------------------------------------------------------------- 1 | #include "HsBase.h" 2 | 3 | #if defined(darwin_HOST_OS) || defined(ios_HOST_OS) 4 | #include 5 | 6 | static double scaling_factor = 0.0; 7 | 8 | void initialize_timer() 9 | { 10 | mach_timebase_info_data_t info; 11 | (void) mach_timebase_info(&info); 12 | scaling_factor = (double)info.numer / (double)info.denom; 13 | scaling_factor *= 1e-9; 14 | } 15 | 16 | void absolute_time(double *result) 17 | { 18 | uint64_t time = mach_absolute_time(); 19 | *result = (double)time * scaling_factor; 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/cbits/DarwinUtils.c: -------------------------------------------------------------------------------- 1 | #include "HsBase.h" 2 | 3 | #if defined(darwin_HOST_OS) || defined(ios_HOST_OS) 4 | #include 5 | 6 | static double scaling_factor = 0.0; 7 | 8 | void initialize_timer() 9 | { 10 | mach_timebase_info_data_t info; 11 | (void) mach_timebase_info(&info); 12 | scaling_factor = (double)info.numer / (double)info.denom; 13 | scaling_factor *= 1e-9; 14 | } 15 | 16 | void absolute_time(double *result) 17 | { 18 | uint64_t time = mach_absolute_time(); 19 | *result = (double)time * scaling_factor; 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/aeson/benchmarks/encode.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import json, sys, time 4 | 5 | def isint(x): 6 | try: 7 | int(x) 8 | return True 9 | except: 10 | return False 11 | 12 | if len(sys.argv) > 2 and isint(sys.argv[1]) and isint(sys.argv[2]): 13 | sys.argv.pop(1) 14 | 15 | count = int(sys.argv[1]) 16 | 17 | for n in sys.argv[2:]: 18 | print '%s:' % n 19 | obj = json.load(open(n)) 20 | start = time.time() 21 | for i in xrange(count): 22 | json.dumps(obj) 23 | end = time.time() 24 | print ' %d good, %gs' % (count, end - start) 25 | -------------------------------------------------------------------------------- /spec-lts8/base/include/md5.h: -------------------------------------------------------------------------------- 1 | /* MD5 message digest */ 2 | #ifndef _MD5_H 3 | #define _MD5_H 4 | 5 | #include "HsFFI.h" 6 | 7 | typedef HsWord32 word32; 8 | typedef HsWord8 byte; 9 | 10 | struct MD5Context { 11 | word32 buf[4]; 12 | word32 bytes[2]; 13 | word32 in[16]; 14 | }; 15 | 16 | void __hsbase_MD5Init(struct MD5Context *context); 17 | void __hsbase_MD5Update(struct MD5Context *context, byte const *buf, int len); 18 | void __hsbase_MD5Final(byte digest[16], struct MD5Context *context); 19 | void __hsbase_MD5Transform(word32 buf[4], word32 const in[16]); 20 | 21 | #endif /* _MD5_H */ 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/include/md5.h: -------------------------------------------------------------------------------- 1 | /* MD5 message digest */ 2 | #ifndef _MD5_H 3 | #define _MD5_H 4 | 5 | #include "HsFFI.h" 6 | 7 | typedef HsWord32 word32; 8 | typedef HsWord8 byte; 9 | 10 | struct MD5Context { 11 | word32 buf[4]; 12 | word32 bytes[2]; 13 | word32 in[16]; 14 | }; 15 | 16 | void __hsbase_MD5Init(struct MD5Context *context); 17 | void __hsbase_MD5Update(struct MD5Context *context, byte const *buf, int len); 18 | void __hsbase_MD5Final(byte digest[16], struct MD5Context *context); 19 | void __hsbase_MD5Transform(word32 buf[4], word32 const in[16]); 20 | 21 | #endif /* _MD5_H */ 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /spec-lts8/aeson/benchmarks/parse.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import json, sys, time 4 | 5 | def isint(x): 6 | try: 7 | int(x) 8 | return True 9 | except: 10 | return False 11 | 12 | if len(sys.argv) > 2 and isint(sys.argv[1]) and isint(sys.argv[2]): 13 | sys.argv.pop(1) 14 | 15 | count = int(sys.argv[1]) 16 | 17 | for n in sys.argv[2:]: 18 | print '%s:' % n 19 | start = time.time() 20 | fp = open(n) 21 | for i in xrange(count): 22 | fp.seek(0) 23 | val = json.load(fp) 24 | end = time.time() 25 | print ' %d good, %gs' % (count, end - start) 26 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base/Data/Kind.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy, ExplicitNamespaces #-} 2 | 3 | ----------------------------------------------------------------------------- 4 | -- | 5 | -- Module : Data.Kind 6 | -- License : BSD-style (see the LICENSE file in the distribution) 7 | -- 8 | -- Maintainer : libraries@haskell.org 9 | -- Stability : experimental 10 | -- Portability : not portable 11 | -- 12 | -- Basic kinds 13 | -- 14 | -- @since 4.9.0.0 15 | ----------------------------------------------------------------------------- 16 | 17 | module Data.Kind ( Type, Constraint, type (*), type (★) ) where 18 | 19 | import GHC.Types 20 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/Data/Kind.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy, ExplicitNamespaces #-} 2 | 3 | ----------------------------------------------------------------------------- 4 | -- | 5 | -- Module : Data.Kind 6 | -- License : BSD-style (see the LICENSE file in the distribution) 7 | -- 8 | -- Maintainer : libraries@haskell.org 9 | -- Stability : experimental 10 | -- Portability : not portable 11 | -- 12 | -- Basic kinds 13 | -- 14 | -- @since 4.9.0.0 15 | ----------------------------------------------------------------------------- 16 | 17 | module Data.Kind ( Type, Constraint, type (*), type (★) ) where 18 | 19 | import GHC.Types 20 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base/Data/Eq.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | ----------------------------------------------------------------------------- 5 | -- | 6 | -- Module : Data.Eq 7 | -- Copyright : (c) The University of Glasgow 2005 8 | -- License : BSD-style (see the file libraries/base/LICENSE) 9 | -- 10 | -- Maintainer : libraries@haskell.org 11 | -- Stability : stable 12 | -- Portability : portable 13 | -- 14 | -- Equality 15 | -- 16 | ----------------------------------------------------------------------------- 17 | 18 | module Data.Eq ( 19 | Eq(..), 20 | ) where 21 | 22 | import GHC.Base 23 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/Data/Eq.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | ----------------------------------------------------------------------------- 5 | -- | 6 | -- Module : Data.Eq 7 | -- Copyright : (c) The University of Glasgow 2005 8 | -- License : BSD-style (see the file libraries/base/LICENSE) 9 | -- 10 | -- Maintainer : libraries@haskell.org 11 | -- Stability : stable 12 | -- Portability : portable 13 | -- 14 | -- Equality 15 | -- 16 | ----------------------------------------------------------------------------- 17 | 18 | module Data.Eq ( 19 | Eq(..), 20 | ) where 21 | 22 | import GHC.Base 23 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/base/cbits/iconv.c: -------------------------------------------------------------------------------- 1 | #ifndef _WIN32 2 | 3 | #include 4 | #include 5 | 6 | iconv_t hs_iconv_open(const char* tocode, 7 | const char* fromcode) 8 | { 9 | return iconv_open(tocode, fromcode); 10 | } 11 | 12 | size_t hs_iconv(iconv_t cd, 13 | const char* * inbuf, size_t * inbytesleft, 14 | char* * outbuf, size_t * outbytesleft) 15 | { 16 | // (void*) cast avoids a warning. Some iconvs use (const 17 | // char**inbuf), other use (char **inbuf). 18 | return iconv(cd, (void*)inbuf, inbytesleft, outbuf, outbytesleft); 19 | } 20 | 21 | int hs_iconv_close(iconv_t cd) { 22 | return iconv_close(cd); 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/cbits/iconv.c: -------------------------------------------------------------------------------- 1 | #ifndef _WIN32 2 | 3 | #include 4 | #include 5 | 6 | iconv_t hs_iconv_open(const char* tocode, 7 | const char* fromcode) 8 | { 9 | return iconv_open(tocode, fromcode); 10 | } 11 | 12 | size_t hs_iconv(iconv_t cd, 13 | const char* * inbuf, size_t * inbytesleft, 14 | char* * outbuf, size_t * outbytesleft) 15 | { 16 | // (void*) cast avoids a warning. Some iconvs use (const 17 | // char**inbuf), other use (char **inbuf). 18 | return iconv(cd, (void*)inbuf, inbytesleft, outbuf, outbytesleft); 19 | } 20 | 21 | int hs_iconv_close(iconv_t cd) { 22 | return iconv_close(cd); 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/base/GHC/Char.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude, MagicHash #-} 3 | 4 | module GHC.Char 5 | ( -- * Utilities 6 | chr 7 | 8 | -- * Monomorphic equality operators 9 | -- | See GHC.Classes#matching_overloaded_methods_in_rules 10 | , eqChar, neChar 11 | ) where 12 | 13 | import GHC.Base 14 | import GHC.Show 15 | 16 | -- | The 'Prelude.toEnum' method restricted to the type 'Data.Char.Char'. 17 | chr :: Int -> Char 18 | chr i@(I# i#) 19 | | isTrue# (int2Word# i# `leWord#` 0x10FFFF##) = C# (chr# i#) 20 | | otherwise 21 | = errorWithoutStackTrace ("Prelude.chr: bad argument: " ++ showSignedInt (I# 9#) i "") 22 | 23 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/GHC/Char.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude, MagicHash #-} 3 | 4 | module GHC.Char 5 | ( -- * Utilities 6 | chr 7 | 8 | -- * Monomorphic equality operators 9 | -- | See GHC.Classes#matching_overloaded_methods_in_rules 10 | , eqChar, neChar 11 | ) where 12 | 13 | import GHC.Base 14 | import GHC.Show 15 | 16 | -- | The 'Prelude.toEnum' method restricted to the type 'Data.Char.Char'. 17 | chr :: Int -> Char 18 | chr i@(I# i#) 19 | | isTrue# (int2Word# i# `leWord#` 0x10FFFF##) = C# (chr# i#) 20 | | otherwise 21 | = errorWithoutStackTrace ("Prelude.chr: bad argument: " ++ showSignedInt (I# 9#) i "") 22 | 23 | -------------------------------------------------------------------------------- /spec-lts8/aeson/benchmarks/Micro.hs: -------------------------------------------------------------------------------- 1 | module Main (main) where 2 | 3 | import Prelude () 4 | import Prelude.Compat 5 | 6 | import Criterion.Main 7 | import qualified Data.Aeson.Encoding.Builder as AB 8 | import qualified Data.ByteString.Builder as B 9 | import qualified Data.Text as T 10 | 11 | main :: IO () 12 | main = do 13 | let txt = "append (append b (primBounded w1 x1)) (primBounded w2 x2)" 14 | defaultMain [ 15 | bgroup "string" [ 16 | bench "text" $ nf (B.toLazyByteString . AB.text) (T.pack txt) 17 | , bench "string direct" $ nf (B.toLazyByteString . AB.string) txt 18 | , bench "string via text" $ nf (B.toLazyByteString . AB.text . T.pack) txt 19 | ] 20 | ] 21 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/ghc-boot/GHC/LanguageExtensions.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -fno-warn-orphans #-} 2 | 3 | -- | This module re-exports the 'Extension' type along with an orphan 'Binary' 4 | -- instance for it. 5 | -- 6 | -- Note that the @ghc-boot@ package has a large set of dependencies; for this 7 | -- reason the 'Extension' type itself is defined in the 8 | -- "GHC.LanguageExtensions.Type" module provided by the @ghc-boot-th@ package, 9 | -- which has no dependencies outside of @base@. For this reason 10 | -- @template-haskell@ depends upon @ghc-boot-th@, not @ghc-boot@. 11 | -- 12 | module GHC.LanguageExtensions ( module GHC.LanguageExtensions.Type ) where 13 | 14 | import Data.Binary 15 | import GHC.LanguageExtensions.Type 16 | 17 | instance Binary Extension 18 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/aeson/examples/aeson-examples.cabal: -------------------------------------------------------------------------------- 1 | name: aeson-examples 2 | version: 0 3 | build-type: Simple 4 | cabal-version: >=1.8 5 | 6 | executable aeson-example-generic 7 | main-is: Generic.hs 8 | ghc-options: -Wall 9 | build-depends: 10 | aeson >= 0.10, 11 | base, 12 | base-compat, 13 | bytestring, 14 | ghc-prim 15 | 16 | executable aeson-example-simplest 17 | main-is: Simplest.hs 18 | ghc-options: -Wall 19 | build-depends: 20 | aeson, 21 | base, 22 | base-compat, 23 | bytestring 24 | 25 | executable aeson-example-th 26 | main-is: TemplateHaskell.hs 27 | ghc-options: -Wall 28 | build-depends: 29 | aeson, 30 | base, 31 | base-compat, 32 | bytestring 33 | -------------------------------------------------------------------------------- /spec-lts8/base/Data/STRef/Strict.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Safe #-} 2 | 3 | ----------------------------------------------------------------------------- 4 | -- | 5 | -- Module : Data.STRef.Strict 6 | -- Copyright : (c) The University of Glasgow 2001 7 | -- License : BSD-style (see the file libraries/base/LICENSE) 8 | -- 9 | -- Maintainer : libraries@haskell.org 10 | -- Stability : provisional 11 | -- Portability : non-portable (uses Control.Monad.ST.Strict) 12 | -- 13 | -- Mutable references in the (strict) ST monad (re-export of "Data.STRef") 14 | -- 15 | ----------------------------------------------------------------------------- 16 | 17 | module Data.STRef.Strict ( 18 | module Data.STRef 19 | ) where 20 | 21 | import Data.STRef 22 | 23 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/Data/STRef/Strict.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Safe #-} 2 | 3 | ----------------------------------------------------------------------------- 4 | -- | 5 | -- Module : Data.STRef.Strict 6 | -- Copyright : (c) The University of Glasgow 2001 7 | -- License : BSD-style (see the file libraries/base/LICENSE) 8 | -- 9 | -- Maintainer : libraries@haskell.org 10 | -- Stability : provisional 11 | -- Portability : non-portable (uses Control.Monad.ST.Strict) 12 | -- 13 | -- Mutable references in the (strict) ST monad (re-export of "Data.STRef") 14 | -- 15 | ----------------------------------------------------------------------------- 16 | 17 | module Data.STRef.Strict ( 18 | module Data.STRef 19 | ) where 20 | 21 | import Data.STRef 22 | 23 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base/Numeric/Natural.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE Trustworthy #-} 3 | 4 | ----------------------------------------------------------------------------- 5 | -- | 6 | -- Module : Numeric.Natural 7 | -- Copyright : (C) 2014 Herbert Valerio Riedel, 8 | -- (C) 2011 Edward Kmett 9 | -- License : see libraries/base/LICENSE 10 | -- 11 | -- Maintainer : libraries@haskell.org 12 | -- Stability : provisional 13 | -- Portability : portable 14 | -- 15 | -- The arbitrary-precision 'Natural' number type. 16 | -- 17 | -- @since 4.8.0.0 18 | ----------------------------------------------------------------------------- 19 | 20 | module Numeric.Natural 21 | ( Natural 22 | ) where 23 | 24 | import GHC.Natural 25 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/aeson/Data/Aeson/Internal.hs: -------------------------------------------------------------------------------- 1 | -- | 2 | -- Module: Data.Aeson.Internal 3 | -- Copyright: (c) 2015-2016 Bryan O'Sullivan 4 | -- License: BSD3 5 | -- Maintainer: Bryan O'Sullivan 6 | -- Stability: experimental 7 | -- Portability: portable 8 | -- 9 | -- Internal types and functions. 10 | -- 11 | -- __Note__: all declarations in this module are unstable, and prone 12 | -- to being changed at any time. 13 | 14 | module Data.Aeson.Internal 15 | ( 16 | IResult(..) 17 | , JSONPathElement(..) 18 | , JSONPath 19 | , () 20 | , formatError 21 | , ifromJSON 22 | , iparse 23 | ) where 24 | 25 | import Prelude () 26 | 27 | import Data.Aeson.Types.Internal 28 | import Data.Aeson.Types.FromJSON (ifromJSON) 29 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/Numeric/Natural.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE Trustworthy #-} 3 | 4 | ----------------------------------------------------------------------------- 5 | -- | 6 | -- Module : Numeric.Natural 7 | -- Copyright : (C) 2014 Herbert Valerio Riedel, 8 | -- (C) 2011 Edward Kmett 9 | -- License : see libraries/base/LICENSE 10 | -- 11 | -- Maintainer : libraries@haskell.org 12 | -- Stability : provisional 13 | -- Portability : portable 14 | -- 15 | -- The arbitrary-precision 'Natural' number type. 16 | -- 17 | -- @since 4.8.0.0 18 | ----------------------------------------------------------------------------- 19 | 20 | module Numeric.Natural 21 | ( Natural 22 | ) where 23 | 24 | import GHC.Natural 25 | -------------------------------------------------------------------------------- /spec-lts8/base/cbits/rts.c: -------------------------------------------------------------------------------- 1 | #include "Rts.h" 2 | #include "rts/Flags.h" 3 | 4 | GC_FLAGS *getGcFlags() 5 | { 6 | return &RtsFlags.GcFlags; 7 | } 8 | 9 | CONCURRENT_FLAGS *getConcFlags() 10 | { 11 | return &RtsFlags.ConcFlags; 12 | } 13 | 14 | MISC_FLAGS *getMiscFlags() 15 | { 16 | return &RtsFlags.MiscFlags; 17 | } 18 | 19 | DEBUG_FLAGS *getDebugFlags() 20 | { 21 | return &RtsFlags.DebugFlags; 22 | } 23 | 24 | COST_CENTRE_FLAGS *getCcFlags() 25 | { 26 | return &RtsFlags.CcFlags; 27 | } 28 | 29 | PROFILING_FLAGS *getProfFlags() 30 | { 31 | return &RtsFlags.ProfFlags; 32 | } 33 | 34 | TRACE_FLAGS *getTraceFlags() 35 | { 36 | return &RtsFlags.TraceFlags; 37 | } 38 | 39 | TICKY_FLAGS *getTickyFlags() 40 | { 41 | return &RtsFlags.TickyFlags; 42 | } 43 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/cbits/rts.c: -------------------------------------------------------------------------------- 1 | #include "Rts.h" 2 | #include "rts/Flags.h" 3 | 4 | GC_FLAGS *getGcFlags() 5 | { 6 | return &RtsFlags.GcFlags; 7 | } 8 | 9 | CONCURRENT_FLAGS *getConcFlags() 10 | { 11 | return &RtsFlags.ConcFlags; 12 | } 13 | 14 | MISC_FLAGS *getMiscFlags() 15 | { 16 | return &RtsFlags.MiscFlags; 17 | } 18 | 19 | DEBUG_FLAGS *getDebugFlags() 20 | { 21 | return &RtsFlags.DebugFlags; 22 | } 23 | 24 | COST_CENTRE_FLAGS *getCcFlags() 25 | { 26 | return &RtsFlags.CcFlags; 27 | } 28 | 29 | PROFILING_FLAGS *getProfFlags() 30 | { 31 | return &RtsFlags.ProfFlags; 32 | } 33 | 34 | TRACE_FLAGS *getTraceFlags() 35 | { 36 | return &RtsFlags.TraceFlags; 37 | } 38 | 39 | TICKY_FLAGS *getTickyFlags() 40 | { 41 | return &RtsFlags.TickyFlags; 42 | } 43 | -------------------------------------------------------------------------------- /spec-lts8/base/Control/Monad/ST/Strict.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Safe #-} 2 | 3 | ----------------------------------------------------------------------------- 4 | -- | 5 | -- Module : Control.Monad.ST.Strict 6 | -- Copyright : (c) The University of Glasgow 2001 7 | -- License : BSD-style (see the file libraries/base/LICENSE) 8 | -- 9 | -- Maintainer : libraries@haskell.org 10 | -- Stability : provisional 11 | -- Portability : non-portable (requires universal quantification for runST) 12 | -- 13 | -- The strict ST monad (re-export of "Control.Monad.ST") 14 | -- 15 | ----------------------------------------------------------------------------- 16 | 17 | module Control.Monad.ST.Strict ( 18 | module Control.Monad.ST 19 | ) where 20 | 21 | import Control.Monad.ST 22 | 23 | -------------------------------------------------------------------------------- /spec-lts/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 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/Control/Monad/ST/Strict.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Safe #-} 2 | 3 | ----------------------------------------------------------------------------- 4 | -- | 5 | -- Module : Control.Monad.ST.Strict 6 | -- Copyright : (c) The University of Glasgow 2001 7 | -- License : BSD-style (see the file libraries/base/LICENSE) 8 | -- 9 | -- Maintainer : libraries@haskell.org 10 | -- Stability : provisional 11 | -- Portability : non-portable (requires universal quantification for runST) 12 | -- 13 | -- The strict ST monad (re-export of "Control.Monad.ST") 14 | -- 15 | ----------------------------------------------------------------------------- 16 | 17 | module Control.Monad.ST.Strict ( 18 | module Control.Monad.ST 19 | ) where 20 | 21 | import Control.Monad.ST 22 | 23 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /spec-lts8/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 | -------------------------------------------------------------------------------- /lib/PrepGhcJS/Types.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE OverloadedStrings 2 | , LambdaCase 3 | #-} 4 | module PrepGhcJS.Types where 5 | 6 | import Turtle 7 | import Data.Either 8 | 9 | data PrepConfig = PrepConfig 10 | { master :: Turtle.FilePath 11 | , workdir :: Turtle.FilePath 12 | , checkResolver :: IO Text 13 | , tag :: Text 14 | , copyIgnore :: [Text] 15 | , copyOverride :: [Text] 16 | , forceVersion :: [(Text, Text)] 17 | , forceFresh :: [(Text, Text)] 18 | , overwriteFiles:: [(Text, Text)] 19 | , ghc :: Text 20 | , nameSuffix :: Text 21 | , extraBlob :: Text 22 | , extraBoot :: [Text] 23 | , extraBuild :: [Text] 24 | } 25 | 26 | defPC = PrepConfig 27 | 28 | fromPath :: Turtle.FilePath -> Text 29 | fromPath = either (const "") id . toText 30 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/AllowNewer/AllowNewer.cabal: -------------------------------------------------------------------------------- 1 | name: AllowNewer 2 | version: 0.1.0.0 3 | license: BSD3 4 | author: Foo Bar 5 | maintainer: cabal-dev@haskell.org 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | exposed-modules: Foo 11 | hs-source-dirs: src 12 | build-depends: base < 1 13 | default-language: Haskell2010 14 | 15 | test-suite foo-test 16 | type: exitcode-stdio-1.0 17 | main-is: Test.hs 18 | hs-source-dirs: tests 19 | build-depends: base < 1 20 | 21 | benchmark foo-bench 22 | type: exitcode-stdio-1.0 23 | main-is: Bench.hs 24 | hs-source-dirs: benchmarks 25 | build-depends: base < 1 26 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/AllowNewer/AllowNewer.cabal: -------------------------------------------------------------------------------- 1 | name: AllowNewer 2 | version: 0.1.0.0 3 | license: BSD3 4 | author: Foo Bar 5 | maintainer: cabal-dev@haskell.org 6 | build-type: Simple 7 | cabal-version: >=1.10 8 | 9 | library 10 | exposed-modules: Foo 11 | hs-source-dirs: src 12 | build-depends: base < 1 13 | default-language: Haskell2010 14 | 15 | test-suite foo-test 16 | type: exitcode-stdio-1.0 17 | main-is: Test.hs 18 | hs-source-dirs: tests 19 | build-depends: base < 1 20 | 21 | benchmark foo-bench 22 | type: exitcode-stdio-1.0 23 | main-is: Bench.hs 24 | hs-source-dirs: benchmarks 25 | build-depends: base < 1 26 | -------------------------------------------------------------------------------- /spec-lts/cabal/.gitignore: -------------------------------------------------------------------------------- 1 | # trivial gitignore file 2 | .cabal-sandbox/ 3 | cabal.sandbox.config 4 | cabal-dev/ 5 | .hpc/ 6 | *.hi 7 | *.o 8 | *.p_hi 9 | *.prof 10 | *.tix 11 | cabal.config 12 | dist 13 | dist-* 14 | .ghc.environment.* 15 | 16 | /Cabal/dist/ 17 | /Cabal/tests/Setup 18 | /Cabal/Setup 19 | /Cabal/source-file-list 20 | 21 | /cabal-install/dist/ 22 | /cabal-install/Setup 23 | /cabal-install/source-file-list 24 | 25 | 26 | # editor temp files 27 | 28 | *# 29 | .#* 30 | *~ 31 | .*.swp 32 | 33 | # GHC build 34 | 35 | Cabal/GNUmakefile 36 | Cabal/dist-boot/ 37 | Cabal/dist-install/ 38 | Cabal/ghc.mk 39 | 40 | 41 | # TAGS files 42 | TAGS 43 | tags 44 | 45 | # stack artifacts 46 | /.stack-work/ 47 | 48 | # Shake artifacts 49 | .shake* 50 | progress.txt 51 | 52 | # test files 53 | dist-test 54 | -------------------------------------------------------------------------------- /spec-lts8/cabal/.gitignore: -------------------------------------------------------------------------------- 1 | # trivial gitignore file 2 | .cabal-sandbox/ 3 | cabal.sandbox.config 4 | cabal-dev/ 5 | .hpc/ 6 | *.hi 7 | *.o 8 | *.p_hi 9 | *.prof 10 | *.tix 11 | cabal.config 12 | dist 13 | dist-* 14 | .ghc.environment.* 15 | 16 | /Cabal/dist/ 17 | /Cabal/tests/Setup 18 | /Cabal/Setup 19 | /Cabal/source-file-list 20 | 21 | /cabal-install/dist/ 22 | /cabal-install/Setup 23 | /cabal-install/source-file-list 24 | 25 | 26 | # editor temp files 27 | 28 | *# 29 | .#* 30 | *~ 31 | .*.swp 32 | 33 | # GHC build 34 | 35 | Cabal/GNUmakefile 36 | Cabal/dist-boot/ 37 | Cabal/dist-install/ 38 | Cabal/ghc.mk 39 | 40 | 41 | # TAGS files 42 | TAGS 43 | tags 44 | 45 | # stack artifacts 46 | /.stack-work/ 47 | 48 | # Shake artifacts 49 | .shake* 50 | progress.txt 51 | 52 | # test files 53 | dist-test 54 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/DuplicateModuleName/DuplicateModuleName.cabal: -------------------------------------------------------------------------------- 1 | name: DuplicateModuleName 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 | exposed-modules: Foo 11 | hs-source-dirs: src 12 | build-depends: base, Cabal 13 | default-language: Haskell2010 14 | 15 | test-suite foo 16 | type: detailed-0.9 17 | test-module: Foo 18 | hs-source-dirs: tests 19 | build-depends: base, Cabal, DuplicateModuleName 20 | 21 | test-suite foo2 22 | type: detailed-0.9 23 | test-module: Foo 24 | hs-source-dirs: tests2 25 | build-depends: base, Cabal, DuplicateModuleName 26 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/DuplicateModuleName/DuplicateModuleName.cabal: -------------------------------------------------------------------------------- 1 | name: DuplicateModuleName 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 | exposed-modules: Foo 11 | hs-source-dirs: src 12 | build-depends: base, Cabal 13 | default-language: Haskell2010 14 | 15 | test-suite foo 16 | type: detailed-0.9 17 | test-module: Foo 18 | hs-source-dirs: tests 19 | build-depends: base, Cabal, DuplicateModuleName 20 | 21 | test-suite foo2 22 | type: detailed-0.9 23 | test-module: Foo 24 | hs-source-dirs: tests2 25 | build-depends: base, Cabal, DuplicateModuleName 26 | -------------------------------------------------------------------------------- /spec-lts8/base/Control/Monad/Instances.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Safe #-} 2 | 3 | ----------------------------------------------------------------------------- 4 | -- | 5 | -- Module : Control.Monad.Instances 6 | -- Copyright : (c) The University of Glasgow 2001 7 | -- License : BSD-style (see the file libraries/base/LICENSE) 8 | -- 9 | -- Maintainer : libraries@haskell.org 10 | -- Stability : provisional 11 | -- Portability : portable 12 | -- 13 | -- /This module is DEPRECATED and will be removed in the future!/ 14 | -- 15 | -- 'Functor' and 'Monad' instances for @(->) r@ and 16 | -- 'Functor' instances for @(,) a@ and @'Either' a@. 17 | 18 | module Control.Monad.Instances {-# DEPRECATED "This module now contains no instances and will be removed in the future" #-} -- deprecated in 7.8 19 | (Functor(..),Monad(..)) where 20 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/Control/Monad/Instances.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Safe #-} 2 | 3 | ----------------------------------------------------------------------------- 4 | -- | 5 | -- Module : Control.Monad.Instances 6 | -- Copyright : (c) The University of Glasgow 2001 7 | -- License : BSD-style (see the file libraries/base/LICENSE) 8 | -- 9 | -- Maintainer : libraries@haskell.org 10 | -- Stability : provisional 11 | -- Portability : portable 12 | -- 13 | -- /This module is DEPRECATED and will be removed in the future!/ 14 | -- 15 | -- 'Functor' and 'Monad' instances for @(->) r@ and 16 | -- 'Functor' instances for @(,) a@ and @'Either' a@. 17 | 18 | module Control.Monad.Instances {-# DEPRECATED "This module now contains no instances and will be removed in the future" #-} -- deprecated in 7.8 19 | (Functor(..),Monad(..)) where 20 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/PreProcessExtraSources/my.cabal: -------------------------------------------------------------------------------- 1 | name: PreProcessExtraSources 2 | version: 0.1 3 | license: BSD3 4 | author: Ian Ross 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | Cabal-version: >= 1.2 9 | 10 | description: 11 | Check that preprocessors that generate extra C sources are handled. 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 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/PreProcessExtraSources/my.cabal: -------------------------------------------------------------------------------- 1 | name: PreProcessExtraSources 2 | version: 0.1 3 | license: BSD3 4 | author: Ian Ross 5 | stability: stable 6 | category: PackageTests 7 | build-type: Simple 8 | Cabal-version: >= 1.2 9 | 10 | description: 11 | Check that preprocessors that generate extra C sources are handled. 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 | -------------------------------------------------------------------------------- /spec-lts8/unix/include/execvpe.h: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | (c) The University of Glasgow 2004 3 | 4 | Interface for code in cbits/execvpe.c 5 | ------------------------------------------------------------------------- */ 6 | 7 | #ifndef HSUNIX_EXECVPE_H 8 | #define HSUNIX_EXECVPE_H 9 | 10 | extern int 11 | __hsunix_execvpe(const char *name, char *const argv[], char *const envp[]); 12 | 13 | // this hack is needed for `process`; to be removed in unix-2.8 14 | #ifndef HSUNIX_EXECVPE_H_NO_COMPAT 15 | #include "HsUnixConfig.h" 16 | #if HAVE_EXECVPE 17 | # include 18 | extern int 19 | execvpe(const char *name, char *const argv[], char *const envp[]); 20 | #else 21 | # define execvpe(name,argv,envp) __hsunix_execvpe(name,argv,envp) 22 | #endif 23 | #endif 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /spec-lts8/aeson/benchmarks/Typed/Common.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE CPP #-} 2 | {-# LANGUAGE PackageImports #-} 3 | 4 | {-# OPTIONS_GHC -fno-warn-unused-imports #-} 5 | 6 | module Typed.Common (load) where 7 | 8 | import Prelude () 9 | import Prelude.Compat 10 | 11 | import Data.ByteString.Lazy as L 12 | import System.Exit 13 | import System.IO 14 | 15 | #ifndef HAS_BOTH_AESON_AND_BENCHMARKS 16 | import Data.Aeson hiding (Result) 17 | #else 18 | import "aeson" Data.Aeson hiding (Result) 19 | import qualified "aeson-benchmarks" Data.Aeson as B 20 | #endif 21 | 22 | load :: FromJSON a => FilePath -> IO a 23 | load fileName = do 24 | mv <- eitherDecode' <$> L.readFile fileName 25 | case mv of 26 | Right v -> return v 27 | Left err -> do 28 | hPutStrLn stderr $ fileName ++ ": JSON decode failed - " ++ err 29 | exitWith (ExitFailure 1) 30 | -------------------------------------------------------------------------------- /spec-lts8/unix-bad/include/execvpe.h: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | (c) The University of Glasgow 2004 3 | 4 | Interface for code in cbits/execvpe.c 5 | ------------------------------------------------------------------------- */ 6 | 7 | #ifndef HSUNIX_EXECVPE_H 8 | #define HSUNIX_EXECVPE_H 9 | 10 | extern int 11 | __hsunix_execvpe(const char *name, char *const argv[], char *const envp[]); 12 | 13 | // this hack is needed for `process`; to be removed in unix-2.8 14 | #ifndef HSUNIX_EXECVPE_H_NO_COMPAT 15 | #include "HsUnixConfig.h" 16 | #if HAVE_EXECVPE 17 | # include 18 | extern int 19 | execvpe(const char *name, char *const argv[], char *const envp[]); 20 | #else 21 | # define execvpe(name,argv,envp) __hsunix_execvpe(name,argv,envp) 22 | #endif 23 | #endif 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /spec-lts8/base/Foreign/C.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Safe #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | ----------------------------------------------------------------------------- 5 | -- | 6 | -- Module : Foreign.C 7 | -- Copyright : (c) The FFI task force 2001 8 | -- License : BSD-style (see the file libraries/base/LICENSE) 9 | -- 10 | -- Maintainer : ffi@haskell.org 11 | -- Stability : provisional 12 | -- Portability : portable 13 | -- 14 | -- Bundles the C specific FFI library functionality 15 | -- 16 | ----------------------------------------------------------------------------- 17 | 18 | module Foreign.C 19 | ( module Foreign.C.Types 20 | , module Foreign.C.String 21 | , module Foreign.C.Error 22 | ) where 23 | 24 | import Foreign.C.Types 25 | import Foreign.C.String 26 | import Foreign.C.Error 27 | 28 | -------------------------------------------------------------------------------- /spec-lts8/base/include/HsEvent.h: -------------------------------------------------------------------------------- 1 | #ifndef __HS_EVENT_H__ 2 | #define __HS_EVENT_H__ 3 | 4 | #include "EventConfig.h" 5 | 6 | #include 7 | #include 8 | 9 | #if !defined(INLINE) 10 | # if defined(_MSC_VER) 11 | # define INLINE extern __inline 12 | # else 13 | # define INLINE inline 14 | # endif 15 | #endif 16 | 17 | INLINE int __hsevent_num_signals(void) 18 | { 19 | #if defined(_NSIG) 20 | return _NSIG; 21 | #else 22 | return 128; /* best guess */ 23 | #endif 24 | } 25 | 26 | INLINE void __hsevent_thread_self(pthread_t *tid) 27 | { 28 | *tid = pthread_self(); 29 | } 30 | 31 | INLINE int __hsevent_kill_thread(pthread_t *tid, int sig) 32 | { 33 | return pthread_kill(*tid, sig); 34 | } 35 | 36 | #endif /* __HS_EVENT_H__ */ 37 | /* 38 | * Local Variables: 39 | * c-file-style: "stroustrup" 40 | * End: 41 | */ 42 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/Foreign/C.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Safe #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | ----------------------------------------------------------------------------- 5 | -- | 6 | -- Module : Foreign.C 7 | -- Copyright : (c) The FFI task force 2001 8 | -- License : BSD-style (see the file libraries/base/LICENSE) 9 | -- 10 | -- Maintainer : ffi@haskell.org 11 | -- Stability : provisional 12 | -- Portability : portable 13 | -- 14 | -- Bundles the C specific FFI library functionality 15 | -- 16 | ----------------------------------------------------------------------------- 17 | 18 | module Foreign.C 19 | ( module Foreign.C.Types 20 | , module Foreign.C.String 21 | , module Foreign.C.Error 22 | ) where 23 | 24 | import Foreign.C.Types 25 | import Foreign.C.String 26 | import Foreign.C.Error 27 | 28 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/misc/gen-extra-source-files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "$#" -ne 1 ]; then 4 | echo "Error: too few arguments!" 5 | echo "Usage: $0 FILE" 6 | exit 1 7 | fi 8 | 9 | set -ex 10 | 11 | git ls-files tests \ 12 | | awk '/\.(hs|lhs|c|sh|cabal|hsc|err|out|in)$|ghc/ { print } { next }' \ 13 | | awk '/Check.hs$|UnitTests|PackageTester|autogen|register.sh|PackageTests.hs|IntegrationTests.hs|CreatePipe|^tests\/Test/ { next } { print }' \ 14 | | LC_ALL=C sort \ 15 | | sed -e 's/^/ /' \ 16 | > source-file-list 17 | 18 | lead='^ -- BEGIN gen-extra-source-files' 19 | tail='^ -- END gen-extra-source-files' 20 | # cribbed off of http://superuser.com/questions/440013/how-to-replace-part-of-a-text-file-between-markers-with-another-text-file 21 | sed -i.bak -e "/$lead/,/$tail/{ /$lead/{p; r source-file-list 22 | }; /$tail/p; d }" $1 23 | -------------------------------------------------------------------------------- /spec-lts8/aeson/benchmarks/json-data/twitter1.json: -------------------------------------------------------------------------------- 1 | {"results":[{"from_user_id_str":"80430860","profile_image_url":"http://a2.twimg.com/profile_images/536455139/icon32_normal.png","created_at":"Wed, 26 Jan 2011 07:07:02 +0000","from_user":"kazu_yamamoto","id_str":"30159761706061824","metadata":{"result_type":"recent"},"to_user_id":null,"text":"Haskell Server Pages \u3063\u3066\u3001\u307e\u3060\u7d9a\u3044\u3066\u3044\u305f\u306e\u304b\uff01","id":30159761706061824,"from_user_id":80430860,"geo":null,"iso_language_code":"no","to_user_id_str":null,"source":"<a href="http://twitter.com/">web</a>"}],"max_id":30159761706061824,"since_id":0,"refresh_url":"?since_id=30159761706061824&q=haskell","next_page":"?page=2&max_id=30159761706061824&rpp=1&q=haskell","results_per_page":1,"page":1,"completed_in":0.012606,"since_id_str":"0","max_id_str":"30159761706061824","query":"haskell"} 2 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/misc/gen-extra-source-files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "$#" -ne 1 ]; then 4 | echo "Error: too few arguments!" 5 | echo "Usage: $0 FILE" 6 | exit 1 7 | fi 8 | 9 | set -ex 10 | 11 | git ls-files tests \ 12 | | awk '/\.(hs|lhs|c|sh|cabal|hsc|err|out|in)$|ghc/ { print } { next }' \ 13 | | awk '/Check.hs$|UnitTests|PackageTester|autogen|register.sh|PackageTests.hs|IntegrationTests.hs|CreatePipe|^tests\/Test/ { next } { print }' \ 14 | | LC_ALL=C sort \ 15 | | sed -e 's/^/ /' \ 16 | > source-file-list 17 | 18 | lead='^ -- BEGIN gen-extra-source-files' 19 | tail='^ -- END gen-extra-source-files' 20 | # cribbed off of http://superuser.com/questions/440013/how-to-replace-part-of-a-text-file-between-markers-with-another-text-file 21 | sed -i.bak -e "/$lead/,/$tail/{ /$lead/{p; r source-file-list 22 | }; /$tail/p; d }" $1 23 | -------------------------------------------------------------------------------- /spec-lts/cabal/README.md: -------------------------------------------------------------------------------- 1 | # Cabal [![Hackage version](https://img.shields.io/hackage/v/Cabal.svg?label=Hackage)](https://hackage.haskell.org/package/Cabal) [![Build Status](https://secure.travis-ci.org/haskell/cabal.svg?branch=master)](http://travis-ci.org/haskell/cabal) [![Windows build status](https://ci.appveyor.com/api/projects/status/yotutrf4i4wn5d9y/branch/master?svg=true)](https://ci.appveyor.com/project/23Skidoo/cabal) 2 | 3 | This Cabal Git repository contains the following packages: 4 | 5 | * [Cabal](Cabal/README.md): the Cabal library package ([license](Cabal/LICENSE)) 6 | * [cabal-install](cabal-install/README.md): the package containing the `cabal` tool ([license](cabal-install/LICENSE)) 7 | 8 | See [HACKING.md](HACKING.md) for information about contributing and building 9 | from git cloned sources. 10 | 11 | The canonical upstream repository is located at 12 | https://github.com/haskell/cabal. 13 | -------------------------------------------------------------------------------- /spec-lts8/cabal/README.md: -------------------------------------------------------------------------------- 1 | # Cabal [![Hackage version](https://img.shields.io/hackage/v/Cabal.svg?label=Hackage)](https://hackage.haskell.org/package/Cabal) [![Build Status](https://secure.travis-ci.org/haskell/cabal.svg?branch=master)](http://travis-ci.org/haskell/cabal) [![Windows build status](https://ci.appveyor.com/api/projects/status/yotutrf4i4wn5d9y/branch/master?svg=true)](https://ci.appveyor.com/project/23Skidoo/cabal) 2 | 3 | This Cabal Git repository contains the following packages: 4 | 5 | * [Cabal](Cabal/README.md): the Cabal library package ([license](Cabal/LICENSE)) 6 | * [cabal-install](cabal-install/README.md): the package containing the `cabal` tool ([license](cabal-install/LICENSE)) 7 | 8 | See [HACKING.md](HACKING.md) for information about contributing and building 9 | from git cloned sources. 10 | 11 | The canonical upstream repository is located at 12 | https://github.com/haskell/cabal. 13 | -------------------------------------------------------------------------------- /spec-lts/cabal/stack.yaml: -------------------------------------------------------------------------------- 1 | flags: 2 | text: 3 | integer-simple: false 4 | allow-newer: true 5 | packages: 6 | - cabal-install/ 7 | - Cabal/ 8 | 9 | extra-deps: 10 | - HTTP-4000.2.20 11 | - mtl-2.2.1 12 | - network-2.6.2.0 13 | - network-uri-2.6.0.3 14 | - old-locale-1.0.0.7 15 | - old-time-1.1.0.3 16 | - parsec-3.1.9 17 | - random-1.1 18 | - stm-2.4.4 19 | - text-1.2.1.1 20 | - zlib-0.5.4.2 21 | 22 | # test suite dependencies 23 | - QuickCheck-2.8.1 24 | - extensible-exceptions-0.1.1.4 25 | - regex-posix-0.95.2 26 | - tagged-0.8.0.1 27 | - tasty-0.10.1.2 28 | - tasty-hunit-0.9.2 29 | - tasty-quickcheck-0.8.3.2 30 | - ansi-terminal-0.6.2.1 31 | - async-2.0.2 32 | - optparse-applicative-0.11.0.2 33 | - regex-base-0.93.2 34 | - regex-tdfa-rc-1.1.8.3 35 | - tf-random-0.5 36 | - unbounded-delays-0.1.0.9 37 | - ansi-wl-pprint-0.6.7.2 38 | - primitive-0.6 39 | - transformers-compat-0.4.0.4 40 | 41 | resolver: lts-7.14 42 | -------------------------------------------------------------------------------- /spec-lts8/cabal/stack.yaml: -------------------------------------------------------------------------------- 1 | flags: 2 | text: 3 | integer-simple: false 4 | allow-newer: true 5 | packages: 6 | - cabal-install/ 7 | - Cabal/ 8 | 9 | extra-deps: 10 | - HTTP-4000.2.20 11 | - mtl-2.2.1 12 | - network-2.6.2.0 13 | - network-uri-2.6.0.3 14 | - old-locale-1.0.0.7 15 | - old-time-1.1.0.3 16 | - parsec-3.1.9 17 | - random-1.1 18 | - stm-2.4.4 19 | - text-1.2.1.1 20 | - zlib-0.5.4.2 21 | 22 | # test suite dependencies 23 | - QuickCheck-2.8.1 24 | - extensible-exceptions-0.1.1.4 25 | - regex-posix-0.95.2 26 | - tagged-0.8.0.1 27 | - tasty-0.10.1.2 28 | - tasty-hunit-0.9.2 29 | - tasty-quickcheck-0.8.3.2 30 | - ansi-terminal-0.6.2.1 31 | - async-2.0.2 32 | - optparse-applicative-0.11.0.2 33 | - regex-base-0.93.2 34 | - regex-tdfa-rc-1.1.8.3 35 | - tf-random-0.5 36 | - unbounded-delays-0.1.0.9 37 | - ansi-wl-pprint-0.6.7.2 38 | - primitive-0.6 39 | - transformers-compat-0.4.0.4 40 | 41 | resolver: lts-7.14 42 | -------------------------------------------------------------------------------- /spec-lts8/aeson/benchmarks/Compare.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PackageImports #-} 2 | {-# LANGUAGE ScopedTypeVariables #-} 3 | 4 | module Main (main) where 5 | 6 | import Prelude () 7 | import Prelude.Compat 8 | 9 | import Compare.BufferBuilder () 10 | import Compare.JsonBuilder () 11 | import Criterion.Main 12 | import Data.BufferBuilder.Json 13 | import Data.Json.Builder 14 | import Twitter 15 | import Twitter.Manual () 16 | import Typed.Common 17 | import qualified "aeson-benchmarks" Data.Aeson as Aeson 18 | import qualified Compare.JsonBench as JsonBench 19 | 20 | main :: IO () 21 | main = 22 | defaultMain [ 23 | env (load "json-data/twitter100.json") $ \ ~(twtr :: Result) -> 24 | bgroup "twitter" [ 25 | bench "aeson" $ nf Aeson.encode twtr 26 | , bench "buffer-builder" $ nf encodeJson twtr 27 | , bench "json-builder" $ nf toJsonLBS twtr 28 | ] 29 | , JsonBench.benchmarks 30 | ] 31 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/Distribution/PackageDescription/Utils.hs: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------- 2 | -- | 3 | -- Module : Distribution.PackageDescription.Utils 4 | -- 5 | -- Maintainer : cabal-devel@haskell.org 6 | -- Portability : portable 7 | -- 8 | -- Common utils used by modules under Distribution.PackageDescription.*. 9 | 10 | module Distribution.PackageDescription.Utils ( 11 | cabalBug, userBug 12 | ) where 13 | 14 | -- ---------------------------------------------------------------------------- 15 | -- Exception and logging utils 16 | 17 | userBug :: String -> a 18 | userBug msg = error $ msg ++ ". This is a bug in your .cabal file." 19 | 20 | cabalBug :: String -> a 21 | cabalBug msg = error $ msg ++ ". This is possibly a bug in Cabal.\n" 22 | ++ "Please report it to the developers: " 23 | ++ "https://github.com/haskell/cabal/issues/new" 24 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/Distribution/PackageDescription/Utils.hs: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------- 2 | -- | 3 | -- Module : Distribution.PackageDescription.Utils 4 | -- 5 | -- Maintainer : cabal-devel@haskell.org 6 | -- Portability : portable 7 | -- 8 | -- Common utils used by modules under Distribution.PackageDescription.*. 9 | 10 | module Distribution.PackageDescription.Utils ( 11 | cabalBug, userBug 12 | ) where 13 | 14 | -- ---------------------------------------------------------------------------- 15 | -- Exception and logging utils 16 | 17 | userBug :: String -> a 18 | userBug msg = error $ msg ++ ". This is a bug in your .cabal file." 19 | 20 | cabalBug :: String -> a 21 | cabalBug msg = error $ msg ++ ". This is possibly a bug in Cabal.\n" 22 | ++ "Please report it to the developers: " 23 | ++ "https://github.com/haskell/cabal/issues/new" 24 | -------------------------------------------------------------------------------- /spec-lts8/base/Text/Show/Functions.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Safe #-} 2 | -- This module deliberately declares orphan instances: 3 | {-# OPTIONS_GHC -Wno-orphans #-} 4 | 5 | ----------------------------------------------------------------------------- 6 | -- | 7 | -- Module : Text.Show.Functions 8 | -- Copyright : (c) The University of Glasgow 2001 9 | -- License : BSD-style (see the file libraries/base/LICENSE) 10 | -- 11 | -- Maintainer : libraries@haskell.org 12 | -- Stability : provisional 13 | -- Portability : portable 14 | -- 15 | -- Optional instance of 'Text.Show.Show' for functions: 16 | -- 17 | -- > instance Show (a -> b) where 18 | -- > showsPrec _ _ = showString \"\\" 19 | -- 20 | ----------------------------------------------------------------------------- 21 | 22 | module Text.Show.Functions () where 23 | 24 | instance Show (a -> b) where 25 | showsPrec _ _ = showString "" 26 | 27 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/Text/Show/Functions.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Safe #-} 2 | -- This module deliberately declares orphan instances: 3 | {-# OPTIONS_GHC -Wno-orphans #-} 4 | 5 | ----------------------------------------------------------------------------- 6 | -- | 7 | -- Module : Text.Show.Functions 8 | -- Copyright : (c) The University of Glasgow 2001 9 | -- License : BSD-style (see the file libraries/base/LICENSE) 10 | -- 11 | -- Maintainer : libraries@haskell.org 12 | -- Stability : provisional 13 | -- Portability : portable 14 | -- 15 | -- Optional instance of 'Text.Show.Show' for functions: 16 | -- 17 | -- > instance Show (a -> b) where 18 | -- > showsPrec _ _ = showString \"\\" 19 | -- 20 | ----------------------------------------------------------------------------- 21 | 22 | module Text.Show.Functions () where 23 | 24 | instance Show (a -> b) where 25 | showsPrec _ _ = showString "" 26 | 27 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/BuildDeps/GlobalBuildDepsNotAdditive1/Check.hs: -------------------------------------------------------------------------------- 1 | module PackageTests.BuildDeps.GlobalBuildDepsNotAdditive1.Check where 2 | 3 | import Test.Tasty.HUnit 4 | import PackageTests.PackageTester 5 | import System.FilePath 6 | import Data.List 7 | import Control.Exception 8 | import Prelude hiding (catch) 9 | 10 | 11 | suite :: FilePath -> Assertion 12 | suite ghcPath = do 13 | let spec = PackageSpec ("PackageTests" "BuildDeps" "GlobalBuildDepsNotAdditive1") [] 14 | result <- cabal_build spec ghcPath 15 | do 16 | assertEqual "cabal build should fail - see test-log.txt" False (successful result) 17 | let sb = "Could not find module `Prelude'" 18 | assertBool ("cabal output should be "++show sb) $ 19 | sb `isInfixOf` outputText result 20 | `catch` \exc -> do 21 | putStrLn $ "Cabal result was "++show result 22 | throwIO (exc :: SomeException) 23 | -------------------------------------------------------------------------------- /spec-lts/cabal/Cabal/tests/PackageTests/BuildDeps/GlobalBuildDepsNotAdditive2/Check.hs: -------------------------------------------------------------------------------- 1 | module PackageTests.BuildDeps.GlobalBuildDepsNotAdditive2.Check where 2 | 3 | import Test.Tasty.HUnit 4 | import PackageTests.PackageTester 5 | import System.FilePath 6 | import Data.List 7 | import Control.Exception 8 | import Prelude hiding (catch) 9 | 10 | 11 | suite :: FilePath -> Assertion 12 | suite ghcPath = do 13 | let spec = PackageSpec ("PackageTests" "BuildDeps" "GlobalBuildDepsNotAdditive2") [] 14 | result <- cabal_build spec ghcPath 15 | do 16 | assertEqual "cabal build should fail - see test-log.txt" False (successful result) 17 | let sb = "Could not find module `Prelude'" 18 | assertBool ("cabal output should be "++show sb) $ 19 | sb `isInfixOf` outputText result 20 | `catch` \exc -> do 21 | putStrLn $ "Cabal result was "++show result 22 | throwIO (exc :: SomeException) 23 | -------------------------------------------------------------------------------- /spec-lts8/aeson/examples/TemplateHaskell.hs: -------------------------------------------------------------------------------- 1 | -- We can use Template Haskell (TH) to generate instances of the 2 | -- FromJSON and ToJSON classes automatically. This is the fastest way 3 | -- to add JSON support for a type. 4 | {-# LANGUAGE OverloadedStrings #-} 5 | {-# LANGUAGE TemplateHaskell #-} 6 | 7 | module Main (main) where 8 | 9 | import Prelude () 10 | import Prelude.Compat 11 | 12 | import Data.Aeson (decode, encode) 13 | import Data.Aeson.TH (deriveJSON, defaultOptions) 14 | import qualified Data.ByteString.Lazy.Char8 as BL 15 | 16 | data Coord = Coord { x :: Double, y :: Double } 17 | deriving (Show) 18 | 19 | -- This splice will derive instances of ToJSON and FromJSON for us. 20 | 21 | $(deriveJSON defaultOptions ''Coord) 22 | 23 | main :: IO () 24 | main = do 25 | let req = decode "{\"x\":3.0,\"y\":-1.0}" :: Maybe Coord 26 | print req 27 | let reply = Coord { x = 123.4, y = 20 } 28 | BL.putStrLn (encode reply) 29 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/BuildDeps/GlobalBuildDepsNotAdditive1/Check.hs: -------------------------------------------------------------------------------- 1 | module PackageTests.BuildDeps.GlobalBuildDepsNotAdditive1.Check where 2 | 3 | import Test.Tasty.HUnit 4 | import PackageTests.PackageTester 5 | import System.FilePath 6 | import Data.List 7 | import Control.Exception 8 | import Prelude hiding (catch) 9 | 10 | 11 | suite :: FilePath -> Assertion 12 | suite ghcPath = do 13 | let spec = PackageSpec ("PackageTests" "BuildDeps" "GlobalBuildDepsNotAdditive1") [] 14 | result <- cabal_build spec ghcPath 15 | do 16 | assertEqual "cabal build should fail - see test-log.txt" False (successful result) 17 | let sb = "Could not find module `Prelude'" 18 | assertBool ("cabal output should be "++show sb) $ 19 | sb `isInfixOf` outputText result 20 | `catch` \exc -> do 21 | putStrLn $ "Cabal result was "++show result 22 | throwIO (exc :: SomeException) 23 | -------------------------------------------------------------------------------- /spec-lts8/cabal/Cabal/tests/PackageTests/BuildDeps/GlobalBuildDepsNotAdditive2/Check.hs: -------------------------------------------------------------------------------- 1 | module PackageTests.BuildDeps.GlobalBuildDepsNotAdditive2.Check where 2 | 3 | import Test.Tasty.HUnit 4 | import PackageTests.PackageTester 5 | import System.FilePath 6 | import Data.List 7 | import Control.Exception 8 | import Prelude hiding (catch) 9 | 10 | 11 | suite :: FilePath -> Assertion 12 | suite ghcPath = do 13 | let spec = PackageSpec ("PackageTests" "BuildDeps" "GlobalBuildDepsNotAdditive2") [] 14 | result <- cabal_build spec ghcPath 15 | do 16 | assertEqual "cabal build should fail - see test-log.txt" False (successful result) 17 | let sb = "Could not find module `Prelude'" 18 | assertBool ("cabal output should be "++show sb) $ 19 | sb `isInfixOf` outputText result 20 | `catch` \exc -> do 21 | putStrLn $ "Cabal result was "++show result 22 | throwIO (exc :: SomeException) 23 | -------------------------------------------------------------------------------- /spec-lts8/base/GHC/IO/IOMode.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | {-# OPTIONS_HADDOCK hide #-} 4 | 5 | ----------------------------------------------------------------------------- 6 | -- | 7 | -- Module : GHC.IO.IOMode 8 | -- Copyright : (c) The University of Glasgow, 1994-2008 9 | -- License : see libraries/base/LICENSE 10 | -- 11 | -- Maintainer : libraries@haskell.org 12 | -- Stability : internal 13 | -- Portability : non-portable 14 | -- 15 | -- The IOMode type 16 | -- 17 | ----------------------------------------------------------------------------- 18 | 19 | module GHC.IO.IOMode (IOMode(..)) where 20 | 21 | import GHC.Base 22 | import GHC.Show 23 | import GHC.Read 24 | import GHC.Arr 25 | import GHC.Enum 26 | 27 | -- | See 'System.IO.openFile' 28 | data IOMode = ReadMode | WriteMode | AppendMode | ReadWriteMode 29 | deriving (Eq, Ord, Ix, Enum, Read, Show) 30 | 31 | -------------------------------------------------------------------------------- /spec-lts8/base-pure/GHC/IO/IOMode.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | {-# OPTIONS_HADDOCK hide #-} 4 | 5 | ----------------------------------------------------------------------------- 6 | -- | 7 | -- Module : GHC.IO.IOMode 8 | -- Copyright : (c) The University of Glasgow, 1994-2008 9 | -- License : see libraries/base/LICENSE 10 | -- 11 | -- Maintainer : libraries@haskell.org 12 | -- Stability : internal 13 | -- Portability : non-portable 14 | -- 15 | -- The IOMode type 16 | -- 17 | ----------------------------------------------------------------------------- 18 | 19 | module GHC.IO.IOMode (IOMode(..)) where 20 | 21 | import GHC.Base 22 | import GHC.Show 23 | import GHC.Read 24 | import GHC.Arr 25 | import GHC.Enum 26 | 27 | -- | See 'System.IO.openFile' 28 | data IOMode = ReadMode | WriteMode | AppendMode | ReadWriteMode 29 | deriving (Eq, Ord, Ix, Enum, Read, Show) 30 | 31 | -------------------------------------------------------------------------------- /spec-lts8/base/Foreign/ForeignPtr/Unsafe.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Unsafe #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | ----------------------------------------------------------------------------- 5 | -- | 6 | -- Module : Foreign.ForeignPtr.Unsafe 7 | -- Copyright : (c) The University of Glasgow 2001 8 | -- License : BSD-style (see the file libraries/base/LICENSE) 9 | -- 10 | -- Maintainer : ffi@haskell.org 11 | -- Stability : provisional 12 | -- Portability : portable 13 | -- 14 | -- The 'ForeignPtr' type and operations. This module is part of the 15 | -- Foreign Function Interface (FFI) and will usually be imported via 16 | -- the "Foreign" module. 17 | -- 18 | -- Unsafe API Only. 19 | -- 20 | ----------------------------------------------------------------------------- 21 | 22 | module Foreign.ForeignPtr.Unsafe ( 23 | -- ** Unsafe low-level operations 24 | unsafeForeignPtrToPtr, 25 | ) where 26 | 27 | import Foreign.ForeignPtr.Imp 28 | 29 | --------------------------------------------------------------------------------