Skip to content
This repository has been archived by the owner on Apr 25, 2020. It is now read-only.

Support Cabal 2.0 #909

Closed
dmalikov opened this issue Sep 10, 2017 · 2 comments
Closed

Support Cabal 2.0 #909

dmalikov opened this issue Sep 10, 2017 · 2 comments

Comments

@dmalikov
Copy link

At the moment, Setup.hs depends on cabal < 1.25. Thus, ghc-mod cannot be installed via cabal-install > 1.25:

[1 of 1] Compiling Main             ( /Users/m/git/ghc-mod/dist-newstyle/build/x86_64-osx/ghc-8.2.1/ghc-mod-5.8.0.0/setup/setup.hs, /Users/m/git/ghc-mo
d/dist-newstyle/build/x86_64-osx/ghc-8.2.1/ghc-mod-5.8.0.0/setup/Main.o )

/Users/m/git/ghc-mod/dist-newstyle/build/x86_64-osx/ghc-8.2.1/ghc-mod-5.8.0.0/setup/setup.hs:85:60: error:
    • Couldn't match expected type ‘UnitId’
                  with actual type ‘PathTemplate’
    • In the third argument of ‘substPathTemplate’, namely
        ‘(progPrefix lbi)’
      In the expression:
        substPathTemplate (packageId pd) lbi (progPrefix lbi)
      In an equation for ‘progprefix’:
          progprefix = substPathTemplate (packageId pd) lbi (progPrefix lbi)
   |
85 |         progprefix = substPathTemplate (packageId pd) lbi (progPrefix lbi)
   |                                                            ^^^^^^^^^^^^^^
...
@DanielG
Copy link
Owner

DanielG commented Sep 11, 2017

I think almost all of the code in the currently released Setup.hs is not used anymore so in principle we could release a minor version that just removes that. However I'm working on GHC-8.2 support already and it'll be fixed as part of that either way so I'd prefer not to double the testing effort required. Unless there are a significant number of users that are using Cabal-2 together with GHC<8.2. I do think cabal-install should be able to fall back to an older Cabal versions (if one is installed) in that case though.

@DanielG
Copy link
Owner

DanielG commented Oct 10, 2017

Closing in favor of #900

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants