This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. 03 Jan, 2016 1 commit
  2. 02 Jan, 2016 2 commits
  3. 31 Dec, 2015 1 commit
  4. 29 Dec, 2015 3 commits
  5. 28 Dec, 2015 3 commits
    • Erik de Castro Lopo's avatar
      4cd6ef0b
    • Edward Z. Yang's avatar
      Rewrite the package test suite. · e94552e8
      Edward Z. Yang authored
      
      
      I've rewritten the test suite to be more concise and "correct by
      construction".  The primary method that this is achieved by
      is introducing the 'TestM' monad, which carries around the
      important state for the tests so that (1) we don't have to
      pass it as an argument all around, and (2) we can automatically
      make the correct decisions about how to do things.  This new
      method emphasises "configuration by convention": we assume
      that a test-case named "Foo" has its test packages in the
      directory "tests/PackageTests/Foo".
      
      A secondary change is that all command functions automatically fail if
      they have a non-zero exit code (unless you use the 'shouldFail'
      combinator which inverts the sense.)  This saves a lot of typing
      on test-cases.  (In fact, I've reorganized all of the commands
      related here.)
      
      In the process, I've tightened up the logic for how to find the
      LocalBuildInfo of the Cabal we've testing, so we should now
      reliably be testing the inplace Cabal library, and not the
      system library (as was often the case.)
      
      Because things are a lot shorter, there is no good reason to
      make Check modules except for the biggest test cases.  Most
      test-cases have been folded into PackageTests.Tests; if you
      have a small test-case you should just put it there.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      e94552e8
    • Edward Z. Yang's avatar
  6. 27 Dec, 2015 2 commits
  7. 24 Dec, 2015 1 commit
  8. 23 Dec, 2015 2 commits
  9. 22 Dec, 2015 2 commits
  10. 21 Dec, 2015 7 commits
  11. 20 Dec, 2015 2 commits
  12. 18 Dec, 2015 2 commits
  13. 17 Dec, 2015 10 commits
    • Herbert Valerio Riedel's avatar
      Define semigroup instances · f6428740
      Herbert Valerio Riedel authored
      This makes the code `-Wcompat`-clean with GHC 8.0
      
      Due to the amount of `Monoid` instances, a compat-layer is used
      rather than flooding the code-base with CPP conditionals.
      f6428740
    • bardur.arantsson's avatar
      a0192ee7
    • Mikhail Glushenkov's avatar
      Merge pull request #2949 from edsko/pr/more-types · 121cbf1c
      Mikhail Glushenkov authored
      Type refactoring
      121cbf1c
    • Herbert Valerio Riedel's avatar
      Merge pull request #2955 from bgamari/master · 5e1d33dd
      Herbert Valerio Riedel authored
      Program.Find: Fix on Win32
      5e1d33dd
    • Ben Gamari's avatar
      Program.Find: Fix on Win32 · e275a162
      Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
      ee0ed0b9 added another codepath to
      Distribution.Simple.Program.Find for Win32 platforms however did not add
      correct imports or a dependency on the Win32 library. Fix this.
      e275a162
    • Edsko de Vries's avatar
      Address comments on #2949. · ef6fe247
      Edsko de Vries authored
      This changes the definition of `Index` to
      
      ``` haskell
      data Index =
          -- | The main index for the specified repository
          RepoIndex Repo
      
          -- | A sandbox-local repository
          -- Argument is the location of the index file
        | SandboxIndex FilePath
      ```
      
      with
      
      ```
      cacheFile (SandboxIndex index) = index `replaceExtension` "cache"
      ```
      
      This also renames `repoRemote'` to `maybeRepoRemote`.
      
      I believe this addresses all comments.
      ef6fe247
    • Edsko de Vries's avatar
      Change globalRepos to withGlobalRepos · a301b156
      Edsko de Vries authored
      In other words, give it a callback, changing the type from
      
          globalRepos :: GlobalFlags -> [Repo]
      
      to
      
          Verbosity -> GlobalFlags -> ([Repo] -> IO a) -> IO a
      
      This will be necessary for repositories that need to do some
      repository-specific initialization (even if we don't currently have any, we
      will soon). The Verbosity flag is not used yet, but will be.
      
      This just changes the type and deals with the fallout.
      a301b156
    • Edsko de Vries's avatar
      Change Repo type · a8056d47
      Edsko de Vries authored
      The old Repo type has a repoKind
      
          repoKind     :: Either RemoteRepo LocalRepo,
      
      where LocalRepo was isomorphic to unit:
      
          data LocalRepo = LocalRepo
      
      This commit changes Repo to
      
          data Repo =
              -- | Local repositories
              RepoLocal {
                  repoLocalDir :: FilePath
                }
      
              -- | Standard (unsecured) remote repositores
            | RepoRemote {
                  repoRemote   :: RemoteRepo
                , repoLocalDir :: FilePath
                }
      
      instead, which is a little more idiomatic and will make adding more repository
      types easier.
      a8056d47
    • Edsko de Vries's avatar
      Introduce datatype for the Cabal index cache · 2cce2cb8
      Edsko de Vries authored
      Right now this just wraps the list of cache entries, but this might make it
      easier in the future to change the structure of the cache.
      2cce2cb8
    • Edsko de Vries's avatar
      Introduce structured type for specifying index · 99454f73
      Edsko de Vries authored
      In particular, distinguish between the repo-global index and a (sandbox-)local
      index.
      99454f73
  14. 16 Dec, 2015 2 commits
    • Herbert Valerio Riedel's avatar
      Make Distribution.Simple.Configure warning-free & CPP-free · 4e33454f
      Herbert Valerio Riedel authored
      GHC 8.0 changed the `ErrorCall` type to have an extended constructor,
      and backward compatibility has been provided via PatternSynonyms:
      
          data ErrorCall = ErrorCallWithLocation String String
              deriving (Eq, Ord)
      
          pattern ErrorCall :: String -> ErrorCall
          pattern ErrorCall err <- ErrorCallWithLocation err _ where
                  ErrorCall err  = ErrorCallWithLocation err ""
      
      However, due to https://ghc.haskell.org/ticket/8779 the
      exhaustive-checker doesn't cope well with pattern-synonyms yet, and so
      we get a non-exhaustive pattern-match failure when matching on
      'ErrorCall' now.
      
      As the matching on the constructor 'ErrorCall' is done here to help
      infer the Exception instance, we can also just annotate the type
      directly, and eschew the problematic pattern match.
      
      While at it, this commit also makes this module CPP-free.
      4e33454f
    • Mikhail Glushenkov's avatar
      Changelog update. · 81f98998
      Mikhail Glushenkov authored
      81f98998