Haskero not finding definitions - visual-studio-code

I installed the Haskero plugin into VS Code as per the instructions there. I then followed the steps outlined in https://gitlab.com/vannnns/haskero/blob/master/client/doc/installation.md, or specifically Steps 5 and 6 as I already had a Stack project built in that directory. VS code starts up and it opens the project folder. When I hover over a function for example it shows the signature for that function, but when I select "Go to Definition", after thinking for a bit, it returns "No definition found for XXX". This is even when the definition is in the same file. For types, the hover displays nothing at all.
P.S. What puzzles me is that I don't recall anywhere associating ghc with the VS Code project so I am curious as to how it knows which compiler to use?

It appears to be working now. I had to do a complete build before it was able to construct the necessary indices

Related

How can I view the machine code in Netbeans (or other ide)?

I can't find where to view the machine code anywhere from googling (the solutions I tried were either outdated or didn't work: it's not listed under Window or going through Debugging for me). I'm supposed to look at it and compare it to the source code that generated it for an assignment. I'm fine with using another ide or something else besides netbeans, I just need to see machine code based on my source code.

Adding the run-code option to a new language in VSCode

I'm currently writing my own language and I'm at a point where I would like to publish it to the VSCode-Marketplace so people can test it.
I have written a language extension and a syntax highlighter with the Yeoman-Generator and now want to merge it with my executable file that launches the interpreter, so that a file can get interpreted after clicking the run-code button.
I now have checked multiple articles, like:
How to add a run button in visual studio code? - StackOverflow
How to define or support a code language on Visual Studio? - StackOverflow
Debugger Extension Guide - VSCode API
However, I haven't found anything useful.
Currently, the code-runner displays the following error, when clicking on run, or pressing the shortcut:
(Code language not supported or defined.)
But even after a lot of browsing Google for adding new language support to the code-runner, I found absolutely nothing helpful.
(See this page, idk what Settings/Preferences they are referring to!?)
I also was not successful with tasks, as they don't seem to connect to the run-buttom or debug-button in any way.
My question is: How can I make the run-button execute a custom bash-command, when a file in my language is opened?
Okay, I finally did it.
For anyone wondering:
You have to go to the settings and type "code-runner" into the search bar.
Scroll down a little, and you should find the code runner-executor map.
Click on the "edit in settings.json" button.
Now a .json-file should've opened. There are two possible scenarios: Either, there is a json-object called code-runner.executorMapBy... or not.
If there is none, type code-runner.executorMapByFileExtension and let autocomplete do the job.
If the json-object exists, add the file-extension and a bash command that executes your compiler/interpreter. It gets automatically executed in the directory the program-file lies in.
Now still dont know, how to include the settings in my extension, but that was already a big step. Further help is still appreciated!
There is an open source extension called code runner, you can check source code there.

Linking library from Xcode Workspace causes "File is already being linked" dialog to appear

I have an Xcode (11.4.1- though this happened in 11.4 and 11.3) workspace. That workspace is composed of multiple iOS Swift static libraries. One of the libs: lib(A) needs to use another lib lib(B) located in the same workspace.
If I just try to import the module from some source file in lib(A) the compiler won't be able to find the symbols. Fair enough for "Find Implicit Dependencies" to work as I understand it, I have to Link Binary With Libraries; I can accept that, so I explicitly link it:
For lib(A) I go to its target and select Link Binary With Libraries under its Build Phases and select lib(B) from the workspace browser. When I do that I receive a warning dialog:
File is already being linked
If I press Cancel it still adds the selected item under Link Binary With Libraries, but now things build. Why the warning?
The same applies if I were to also add a Unit Testing target to the project for lib(A). If I explicitly link the required static libs, I get that warning. Pressing cancel adds the item, and things work.
Now, "things working" with Xcode is tempting just to back away slowly and take that for what it's worth. However, I'm curious what does that warning mean then/why is it there? Clearly, according to the compiler, the linking is necessary since it does not compile without it. When adding the linking though it seemingly complains about it.

CudafyModule km = CudafyTranslator.Cudafy(); causing an error, can't find compiler

I'm trying to run my 1st cudafy project but I'm getting the following error on the following line:
CudafyModule km = CudafyTranslator.Cudafy();
Below is a screenshot of the exact error message I'm getting.
I've run the example projects which come with Cudafy and they run fine so I don't understand why its saying it can't find the compiler. I've added the Cudafy.net to the references, see screenshot below, and all the info is exactly the same as the example projects, on the right hand side of the image, and that works.
Anyone have any ideas??
EDIT
It appears a similar issue has been answered on SO already but I don't understand where the path environment variable is that he is referring to.
Similar SO question
EDIT 2
Below are the following cl.exe I found. I'm not sure which one to use though. I'm running an Intel processor so I'm leaning towards the bottom one but that's just a guess.
Glad to hear it worked out for you. Here's the comments in answer form...
The linked SO answer is referring to the system PATH. In Windows 7 you can set it through:
Right-click on the My Computer icon
Choose Properties from the context menu
Click the Advanced tab
Click the Environment Variables button
Click on the variable called 'Path' and then click on Edit and enter the path for cl.exe
As for choosing the correct cl.exe, if you're on a non-itanium intel processor (i.e. x86) you'll want x86_amd64

Groovy debugger out of sync

I am having a difficulty while attempting to debug some code in grails. It is difficult to put into text, so I have posted a screencast showing exactly what the problem is here. In short, while I am debugging the debugger starts jumping from place to place and not following the program logic I have in place. The only other similar question I have found is a year old, had no solution, and can be found here.
The best guess I have so far is that the debugger is displaying the text I have typed in, but is actually executing an older version of the class file which it has cached somewhere. Therefore, I tried:
cleaning the project
manually deleting all of the class files from the target folder and from the target-eclipse folder
Searching my entire hdd for additional files with similar names
removing my project from the workspace and re-adding it
closing and reopening the IDE
grails refresh-dependencies
Importing the project into a new IDE (I was using GGTS, I switched to IntelliJ)
None of those solutions had any effect. I realized that the issue was in a .groovy file, and I was writing almost pure Java, so I deleted the .groovy file, and re-created the class in a .java file. That solved my problem. Unfortunately I am having the problem again, and this time it is in a controller that heavily relies on the grails framework, so that solution is not an option. Other than also being in a .groovy file, another similarity is that the code breaks on an if statement.
My next steps:
Verify that the application is not executing the code I see by using print functions to monitor actual execution flow.
comment out the entire function and re-add functionality one line at a time to see if I can see what breaks it.
Delete the .groovy file, and re-create it as another .groovy file.
Any help is appreciated, and since I can't find any answers online I will continue to update this question as I learn more.
See my comment on the jira issue that you raised. You have found a problem with the groovy compiler and how it calculates line numbers. This is not a problem with executing the wrong class files or using a broken debugger. The debugger is doing exactly what it is expected to do. It is the compiler that is providing erroneous line number information.
The next step, as described in the issue, is to provide a simple project that recreates the bug. I tried to do so myself, but could not. So, please supply something that we can work with. Then we can notify the groovy compiler team.