This project is mirrored from Pull mirroring updated .
  1. 05 Nov, 2017 9 commits
    • Duncan Coutts's avatar
      Add a target selector for extra-packages. · f438b057
      Duncan Coutts authored
      Add TargetPackageNamed, like TargetPackage but for known packages
      within the project that are only specified by name. This includes the
      extra-packages from the @cabal.project@ file.
      It does not include indirect deps or other packages from hackage. That
      will be covered by a separate constructor.
      This replaces the previous TargetPackageName constructor which was part
      of a much more limited implementation of the same general idea.
    • Duncan Coutts's avatar
      Add and rename a utility · 5ebae3e3
      Duncan Coutts authored
      We'll need display of component kind both for component names (as now)
      and also directly for ComponentKind. Rename so the naming is sane.
    • Duncan Coutts's avatar
      Drop instance Package KnownPackage and fix consequences · 9bca00af
      Duncan Coutts authored
      We are about to generalise KnownPackage in such a way that it can no
      longer be an instance of Package. The extra constructor will only hold
      a PackageName, not a full PackageId.
      In addition, whenever we get a KnownPackage, we do case analysis and
      record pattern matching to select the bits we need. This is in
      preparation for adding the second constructor. We switch to record
      pattern matching rather than field names as functions since those
      functions will become partial once we add the second constructor.
    • Duncan Coutts's avatar
      TargetPackage TargetSelector allows multiple package ids · 1fb24861
      Duncan Coutts authored
      That is, the TargetPackage instead of having a single PackageId contains
      a [PackageId].
      Ultimately this will allow us to support multiple .cabal files in a
      single directory. But the real reason to do this generalisation now is
      that it helps with the TargetImplicitCwd case. For the implicit CWD case
      we need to be able to parse the target whether or not there is a package
      in the CWD. So the simplest solution is to pass in all the local CWD
      packages (though typically only 0 or 1) and put all of them in. Then at
      the end we can check if in fact there were 0 and fail.
      When we do want to support multiple .cabal files in a dir, we'll also
      need to adjust the project config code, and extend the syntax slightly
      so that we render as the package location for the case of multiple
    • Duncan Coutts's avatar
      Make the KnownPackage/KnownComponent construction non-recursive · 0cdaeaa9
      Duncan Coutts authored
      It is unnecessary now that we do not put the whole KnownPackage into the
      TargetSelector. It not being recursive also makes it possible to have a
      Show instance, which is handy.
    • Duncan Coutts's avatar
      Don't paramaterise the TargetSelector type · 11872e57
      Duncan Coutts authored
      Previously the TargetSelector type had a type param for the type of the
      package that it referred to. In particular we used it with types like:
      type Matcher  = ... -> Match (TargetSelector KnownPackage)
      type Renderer = TargetSelector PackageId -> ...
      However we are about to extend the TargetSelector so that it does not
      just refer to one form of package (e.g. KnownPackage) but can refer to
      packages via various different forms and partial information. So it no
      longer makes sense to have TargetSelector be paramaterised by the
      different states of the one kind of package it refers to, as there are
      now many kinds. So in preparation for that we simplify it so that it is
      equivalent to always using TargetSelector PackageId, and we remove the
      type paramater.
    • Duncan Coutts's avatar
      Rename PackageInfo and ComponentInfo · 9724c46c
      Duncan Coutts authored
      To KnownPackage and KnownComponent. This is in preparation for
      extending  KnownPackage by adding more constructors for known package
    • Duncan Coutts's avatar
      Refactor: add KnownTargets type to target selection code · 271d3ab9
      Duncan Coutts authored
      Bundle up what we had been passing as separate args into a single
      KnownTargets type, and separate out some utils for constructing it.
    • Duncan Coutts's avatar
      Refactor the Match monad somewhat · a51f565b
      Duncan Coutts authored
      Instead of two constructors MatchExact and MatchInexact we now have one
      Match constructor with a field of data MatchClass = Inexact | Exact.
      This factoring helps simplify several other functions where we treat
      them uniformly or according to the Ord instance.
      The real ulterior motive however is that we'd like to introduce a third
      Match class value between Inexact and Exact. This refactoring is a
      prerequisite to that, to avoid a combinatorial explosion of cases.
  2. 04 Nov, 2017 1 commit
  3. 03 Nov, 2017 13 commits
  4. 02 Nov, 2017 6 commits
  5. 01 Nov, 2017 3 commits
  6. 28 Oct, 2017 1 commit
  7. 27 Oct, 2017 4 commits
  8. 26 Oct, 2017 3 commits
    • Herbert Valerio Riedel's avatar
      Relax coding guideline regarding module imports · d291bd1c
      Herbert Valerio Riedel authored
      I notice imports like
          import qualified Text.PrettyPrint as Disp
                ( Doc, render, char, text )
      which seem overly precise to me, when `Disp.` is only used
      locally as a module prefix, and there's no other imports sharing
      the same module prefix.
      Instead, it should suffice to either use
          import qualified Text.PrettyPrint as Disp
          import Text.PrettyPrint
                ( Doc, render, char, text )
      or in rare cases even
          import Text.PrettyPrint as Disp
                ( Doc, render, char, text )
      Hence this relaxes the coding guidelines to allow these simpler forms
      to be used.
      [skip ci]
    • Herbert Valerio Riedel's avatar
    • Herbert Valerio Riedel's avatar
      Extend native DNS to support os(windows) · 6e52cea6
      Herbert Valerio Riedel authored
      ...via the new @windns@ package (which provides a compatible subset
      of the @resolv@ API)
      The flag is renamed from `resolv` to `native-dns`