Skip to content
  • Duncan Coutts's avatar
    Change TargetSelector to remove TargetCwdPackage · 34e0d5cd
    Duncan Coutts authored
    Refactor so that instead of two constructors TargetPackage and
    TargetCwdPackage we have just TargetPackage with an extra bool-like field to
    distinguish the two.
    
    This simplifies things in the consumers of TargetSelector which
    typically have to treat TargetPackage and TargetCwdPackage in the same
    way.
    
    Also eliminate the list field in TargetCwdPackage. We don't yet support
    multiple .cabal files in one dir, and when we do we'll do the same for
    the cwd targets as for other explicit targets. The only annoying thing
    here is that we need to use a dummy package info value because the
    representation does not allow for not having one. The tradeoff is still
    worth it in terms of less verbose consumers.
    
    Also adjust tests.
    34e0d5cd