Skip to content
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

Multiple loads of file during add-clause #55

Open
steshaw opened this issue Sep 15, 2016 · 0 comments
Open

Multiple loads of file during add-clause #55

steshaw opened this issue Sep 15, 2016 · 0 comments

Comments

@steshaw
Copy link

steshaw commented Sep 15, 2016

I happened to be logging the arguments the idris process to a log file while testing the interactive features with vim. It seems that when you do a case-split, the file is loading 3 times.

args = ["--client",":l  test/interactive001/test032.idr "]
args = ["--client",":l  test/interactive001/test032.idr "]
args = ["--client",":l /Users/steshaw/Projects/idris/test/interactive001/test032.idr"]
args = ["--client",":ac! 6 f"]

This makes things feel quite sluggish.

I had a peek at ftplugin.vim but I'm not that familiar with Vim Script. Looks like at least one of the loads comes from a call to w (but I don't see how w calls back to IdrisReload).

Note that originally, I was outputting the idris args to stderr but it seemed to interfere with idris-vim. If you want to set up your idris like I did, a minimal code change to main/Main.hs is to update your main to something like this:

main = do
  args <- getArgs
  appendFile "idris.log" ("args = " ++ show args ++ "\n")
  opts <- runArgParser
  runMain (runIdris opts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant