How do i use runhaskell with cabal-dev?

后端 未结 3 1587
名媛妹妹
名媛妹妹 2021-02-12 23:15

Unfortunately cabal-dev ghci does not work in this project, i get an error:

Loading package download-0.3.2 ... linking ... 
ghc: /home/stulli/haskell/ifdl/cabal-         


        
相关标签:
3条回答
  • 2021-02-12 23:51

    The cabal-dev setup doesn't work very well for ghci, so it might very well be that it also doesn't work well for runhaskell. Maybe virthualenv will work better for this use case?

    0 讨论(0)
  • 2021-02-12 23:57

    To use runhaskell with cabal sandboxes (cabal >= 1.18), run the command

    runhaskell -package-db=.cabal-sandbox/i386-windows-ghc-7.6.3-packages.conf.d <file.hs>
    

    substituting the proper *-packages.conf.d directory for your GHC version.

    0 讨论(0)
  • 2021-02-13 00:06

    You can try something like the next:

    runhaskell -package-conf=cabal-dev/packages-7.0.3.conf main.hs
    

    But I think if cabal-dev ghci doesn't work, then runhaskell will not work too. You need to find out what is wrong with download package.

    0 讨论(0)
提交回复
热议问题