atsky / haskell-idea-plugin

IntelliJ IDEA plugin for Haskell
Apache License 2.0
201 stars 21 forks source link

Can't read installed package list using ghc-pkg #129

Open OnkelTem opened 8 years ago

OnkelTem commented 8 years ago

Hi,

I've installed the plugin from inside of PhpStorm. Then I've installed cabal and ghc-mod via stack:

stack -j1 install ghc-mod
stack -j1 install cabal-install

and configured the plugin correspondingly (set paths to cabal and ghc-mod/ghc-modi). Now when I open a tutorial project "helloworld" I see these two messages in the Event Log:

8:25:42 PM cabal: Can't read cabal package list.
8:25:42 PM cabal: Can't read installed package list using ghc-pkg.

What ghc-pkg? There seems to be no such an installation option. What am I supposed to do next?

I don't know whether the following is related to the above messages, probably not.

1) I have errors in my code which is presumably correct (at least it is compiled fine using stack build). For example:

{-# LANGUAGE OverloadedStrings #-}
module Lib
    ( someFunc
    ) where

import qualified Data.Text.IO as T

someFunc :: IO ()
someFunc = T.putStrLn "someFunc"

— it has Data.Text.IO highlighted with the message: "Could not find module Data.Text.IO. Use -v to see a list of the files searched for".

2) There seems to be no way to launch a program. Should I have Run button enabled or something?

3) Also I don't see how to build a project from the IDE.