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

I followed all the instructions mentioned in "Installing ghc-mod" with stack but it had some issues #945

Description

@shubhamkumar13

`shubham@shubham:~$ stack install ghc-mod
WARNING: Ignoring out of range dependency (allow-newer enabled): Cabal-2.4.1.0. ghc-mod requires: >=1.18 && <1.25
WARNING: Ignoring out of range dependency (allow-newer enabled): base-4.12.0.0. ghc-mod requires: >=4.6.0.1 && <4.10
WARNING: Ignoring out of range dependency (allow-newer enabled): Cabal-2.4.1.0. cabal-helper requires: >=1.14 && <1.25
WARNING: Ignoring out of range dependency (allow-newer enabled): process-1.6.3.0. cabal-helper requires: >=1.1.0.1 && <1.5
WARNING: Ignoring out of range dependency (allow-newer enabled): temporary-1.3. cabal-helper requires: <1.3 && >=1.2.0.4
WARNING: Ignoring out of range dependency (allow-newer enabled): extra-1.6.14. ghc-mod requires: <1.6 && >=1.4
WARNING: Ignoring out of range dependency (allow-newer enabled): ghc-8.6.3. ghc-mod requires: >=7.6 && <8.2
WARNING: Ignoring out of range dependency (allow-newer enabled): ghc-8.6.3. ghc-syb-utils requires: >=7.0 && <8.4
WARNING: Ignoring out of range dependency (allow-newer enabled): haskell-src-exts-1.20.3. ghc-mod requires: <1.20 && >=1.18
WARNING: Ignoring out of range dependency (allow-newer enabled): hlint-2.1.11. ghc-mod requires: <2.1 && >=2.0.8
WARNING: Ignoring out of range dependency (allow-newer enabled): monad-journal-0.8.1. ghc-mod requires: <0.8 && >=0.4
WARNING: Ignoring out of range dependency (allow-newer enabled): optparse-applicative-0.14.3.0. ghc-mod requires: >=0.13.0.0 && <0.14
WARNING: Ignoring out of range dependency (allow-newer enabled): temporary-1.3. ghc-mod requires: <1.3 && >=1.2.0.3
transformers-base-0.4.5.2: configure
transformers-base-0.4.5.2: build
cabal-helper-0.7.3.0: configure
Could not find custom-setup dep: Cabal
ghc-syb-utils-0.2.3.3: configure
djinn-ghc-0.0.2.3: download
ghc-syb-utils-0.2.3.3: build
djinn-ghc-0.0.2.3: configure
transformers-base-0.4.5.2: copy/register
djinn-ghc-0.0.2.3: build
djinn-ghc-0.0.2.3: copy/register
Progress 4/12

-- While building package ghc-syb-utils-0.2.3.3 using:
/home/shubham/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.3 --builddir=.stack-work/dist/x86_64-linux/Cabal-2.4.0.1 build --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
Logs have been written to: /home/shubham/.stack/global-project/.stack-work/logs/ghc-syb-utils-0.2.3.3.log

Configuring ghc-syb-utils-0.2.3.3...
Preprocessing library for ghc-syb-utils-0.2.3.3..
Building library for ghc-syb-utils-0.2.3.3..
[1 of 1] Compiling GHC.SYB.Utils    ( GHC/SYB/Utils.hs, .stack-work/dist/x86_64-linux/Cabal-2.4.0.1/build/GHC/SYB/Utils.o )

/tmp/stack10061/ghc-syb-utils-0.2.3.3/GHC/SYB/Utils.hs:258:64: error:
    • Couldn't match type ‘RdrName’ with ‘GhcPass pass0’
        arising from a use of ‘ppr’
    • In the second argument of ‘(.)’, namely ‘ppr’
      In the second argument of ‘(.)’, namely ‘showSDoc_ . ppr’
      In the second argument of ‘(.)’, namely
        ‘(++ "}") . showSDoc_ . ppr’
    |
258 |         overLit    = ("{HsOverLit:"++) . (++"}") . showSDoc_ . ppr
    |                                                                ^^^

-- While building package cabal-helper-0.7.3.0 using:
/home/shubham/.stack/programs/x86_64-linux/ghc-8.6.3/bin/ghc --make -odir /tmp/stack10061/cabal-helper-0.7.3.0/.stack-work/dist/x86_64-linux/Cabal-2.4.0.1/setup -hidir /tmp/stack10061/cabal-helper-0.7.3.0/.stack-work/dist/x86_64-linux/Cabal-2.4.0.1/setup -i -i. -clear-package-db -global-package-db -package-db=/home/shubham/.stack/snapshots/x86_64-linux/lts-13.1/8.6.3/pkgdb -package-db=/home/shubham/.stack/global-project/.stack-work/install/x86_64-linux/lts-13.1/8.6.3/pkgdb -hide-all-packages -package=Cabal -package-id=base-4.12.0.0 -package-id=containers-0.6.0.1 -package-id=directory-1.3.3.0 -package-id=filepath-1.4.2.1 -package-id=process-1.6.3.0 -package-id=template-haskell-2.14.0.0 -package-id=transformers-0.5.5.0 -optP-include -optP/tmp/stack10061/cabal-helper-0.7.3.0/.stack-work/dist/x86_64-linux/Cabal-2.4.0.1/setup/setup_macros.h /tmp/stack10061/cabal-helper-0.7.3.0/Setup.hs /home/shubham/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs -main-is StackSetupShim.mainOverride -o /tmp/stack10061/cabal-helper-0.7.3.0/.stack-work/dist/x86_64-linux/Cabal-2.4.0.1/setup/setup -threaded
Process exited with code: ExitFailure 1
Logs have been written to: /home/shubham/.stack/global-project/.stack-work/logs/cabal-helper-0.7.3.0.log

[1 of 2] Compiling Main             ( /tmp/stack10061/cabal-helper-0.7.3.0/Setup.hs, /tmp/stack10061/cabal-helper-0.7.3.0/.stack-work/dist/x86_64-linux/Cabal-2.4.0.1/setup/Main.o )

/tmp/stack10061/cabal-helper-0.7.3.0/Setup.hs:87: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)
   |
87 |         progprefix = substPathTemplate (packageId pd) lbi (progPrefix lbi)
   |                                                            ^^^^^^^^^^^^^^

/tmp/stack10061/cabal-helper-0.7.3.0/Setup.hs:88:60: error:
    • Couldn't match expected type ‘UnitId’
                  with actual type ‘PathTemplate’
    • In the third argument of ‘substPathTemplate’, namely
        ‘(progSuffix lbi)’
      In the expression:
        substPathTemplate (packageId pd) lbi (progSuffix lbi)
      In an equation for ‘progsuffix’:
          progsuffix = substPathTemplate (packageId pd) lbi (progSuffix lbi)
   |
88 |         progsuffix = substPathTemplate (packageId pd) lbi (progSuffix lbi)
   |                                                            ^^^^^^^^^^^^^^

/tmp/stack10061/cabal-helper-0.7.3.0/Setup.hs:89:28: error:
    • Couldn't match expected type ‘[a]’
                  with actual type ‘PathTemplate -> FilePath’
    • Probable cause: ‘progprefix’ is applied to too few arguments
      In the first argument of ‘(++)’, namely ‘progprefix’
      In the expression: progprefix ++ exeName exe ++ progsuffix
      In an equation for ‘fixedExeBaseName’:
          fixedExeBaseName = progprefix ++ exeName exe ++ progsuffix
    • Relevant bindings include
        fixedExeBaseName :: [a]
          (bound at /tmp/stack10061/cabal-helper-0.7.3.0/Setup.hs:89:9)
   |
89 |         fixedExeBaseName = progprefix ++ exeName exe ++ progsuffix
   |                            ^^^^^^^^^^

/tmp/stack10061/cabal-helper-0.7.3.0/Setup.hs:89:42: error:
    • Couldn't match expected type ‘[a]’
                  with actual type ‘Distribution.Types.UnqualComponentName.UnqualComponentName’
    • In the first argument of ‘(++)’, namely ‘exeName exe’
      In the second argument of ‘(++)’, namely
        ‘exeName exe ++ progsuffix’
      In the expression: progprefix ++ exeName exe ++ progsuffix
    • Relevant bindings include
        fixedExeBaseName :: [a]
          (bound at /tmp/stack10061/cabal-helper-0.7.3.0/Setup.hs:89:9)
   |
89 |         fixedExeBaseName = progprefix ++ exeName exe ++ progsuffix
   |                                          ^^^^^^^^^^^

/tmp/stack10061/cabal-helper-0.7.3.0/Setup.hs:89:57: error:
    • Couldn't match expected type ‘[a]’
                  with actual type ‘PathTemplate -> FilePath’
    • Probable cause: ‘progsuffix’ is applied to too few arguments
      In the second argument of ‘(++)’, namely ‘progsuffix’
      In the second argument of ‘(++)’, namely
        ‘exeName exe ++ progsuffix’
      In the expression: progprefix ++ exeName exe ++ progsuffix
    • Relevant bindings include
        fixedExeBaseName :: [a]
          (bound at /tmp/stack10061/cabal-helper-0.7.3.0/Setup.hs:89:9)
   |
89 |         fixedExeBaseName = progprefix ++ exeName exe ++ progsuffix
   |                                                         ^^^^^^^^^^

/tmp/stack10061/cabal-helper-0.7.3.0/Setup.hs:91:60: error:
    • Couldn't match type ‘Distribution.System.Platform -> String’
                     with ‘[Char]’
      Expected type: String
        Actual type: Distribution.System.Platform -> String
    • Probable cause: ‘exeExtension’ is applied to too few arguments
      In the second argument of ‘(<.>)’, namely ‘exeExtension’
      In the second argument of ‘(</>)’, namely
        ‘fixedExeBaseName <.> exeExtension’
      In the expression: bindir </> fixedExeBaseName <.> exeExtension
   |
91 |         fixedExeFileName = bindir </> fixedExeBaseName <.> exeExtension
   |                                                            ^^^^^^^^^^^^

/tmp/stack10061/cabal-helper-0.7.3.0/Setup.hs:92:64: error:
    • Couldn't match type ‘Distribution.System.Platform -> String’
                     with ‘[Char]’
      Expected type: String
        Actual type: Distribution.System.Platform -> String
    • Probable cause: ‘exeExtension’ is applied to too few arguments
      In the second argument of ‘(<.>)’, namely ‘exeExtension’
      In the second argument of ‘(</>)’, namely
        ‘fixedExeBaseName <.> exeExtension’
      In the expression: libexecdir </> fixedExeBaseName <.> exeExtension
   |
92 |         newExeFileName   = libexecdir </> fixedExeBaseName <.> exeExtension
   |                                                                ^^^^^^^^^^^^

shubham@shubham:~$
`

Is it incompatible? I also added extra deps in global stack.yaml

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions