-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nil candidates without any other errors #29
Comments
nil
candidates without any other errors
I don't have environment to try right now, sorry. In the screenshot, |
Can you check what is written in |
I have the same problem. The haskell code: import System.Random
import System.IO
import Control.Monad(when)
main :: IO ()
main = do
gen <- getStdGen
askForNumber gen
askForNumber :: StdGen -> IO ()
askForNumber gen = do
let (randNumber, newGen) = randomR (1,10) gen :: (Int, StdGen)
putStr "Which number in the range from 1 to 10 am I thinking of? "
hFlush stdout
numberString <- getLine
when (not $ null numberString) $ do
let number = read numberString
if randNumber == number
then putStrLn "You are correct!"
else putStrLn $ "Sorry, it was " ++ show randNumber
askForNumber newGen The output of
The output of GHC Debug:
|
I could not reproduce the problem. |
Thank you for your answer. I managed to get candidates by adding
in the beginning. However, I still cannot complete for functions that are defined in this document. |
It is just not implemented. #31 (comment) |
I still seem to be having this issue. Any ideas what the problem may be? |
Hmm. simply running (mapc 'company-ghc--source-keywords ghc-module-names) Fixed the issue. When is this function supposed to be called? |
Normally, it is called just before displaying completion candidates. |
I'm having the same error as the OP. Completions actually can complete though, although the |
The recommended |
Is there any reproducible steps from scratch I can try? |
@iquiw I can give you the repository I tried this with initially. Its located here: https://github.com/IvanMalison/dotfiles/tree/master/dotfiles/xmonad Note that this is a subdirectory of the main repository. Everything should compile correctly with stack. |
@IvanMalison Thank you! I will give it a try. |
@iquiw One thing that is worth noting is that after I fixed this once with my mapc incantation, the problem seemed to be fixed forever... |
@freckletonj did you find the same thing? |
@IvanMalison strangely no. I show |
@IvanMalison I just tried, but could not build with stack.
|
@iquiw Oops, that sha no longer exists bc i did a force push. I set the correct sha just now |
@IvanMalison Still could not build. Commits of |
@IvanMalison I could get completion candidates in the Here is the init.el I use. (require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(add-to-list 'package-selected-packages 'company)
(add-to-list 'package-selected-packages 'haskell-mode)
(add-to-list 'package-selected-packages 'ghc-mod)
(add-to-list 'package-selected-packages 'company-ghc)
(package-install-selected-packages)
(global-company-mode)
(add-hook 'haskell-mode-hook 'ghc-init)
(add-to-list 'company-backends 'company-ghc) |
@iquiw Yeah I am also able to get completions sometimes, but not when I setup on a new machine. no Idea whats going on there. |
Upon running
company-ghc-diagnose
all modules get loaded, but no candidates appear, andghc-mod
reports no errors either:Further investigation shows that
ghc-mod browse
can see the symbols exported without problems:On a side-note,
ghc-mod boot
shows all modules but very few names compared to whatghc-mod browse
does. However, none of those functions show up as candidates in the diagnose!You can use the repository https://github.com/kerscher/preliminaries to try to reproduce.
The library is not on Hackage, yet.
The text was updated successfully, but these errors were encountered: