开发者

How to 'go to definition' for user defined function in Leksah?

开发者 https://www.devze.com 2023-04-12 11:55 出处:网络
I can do this for system functions like const by selecting it, right clicking and choosing search(metadata). The same does not work for user defined functions.

I can do this for system functions like const by selecting it, right clicking and choosing search(metadata). The same does not work for user defined functions.

How do you do such a search?

If it is impossible for user defined 开发者_运维技巧functions, how do you read an already existing Haskell project and jump between definitions and invocations?

Vim + ctags work for user defined functions only, and are not as powerful as cscope for c/c++ source.


I tried what you said with user-defined functions and it works fine for me. I select name of function, right click, search(metadata) and it appears in the search tab to the right. Then i click "go to definition" and it takes me to definition. Maybe you should try restarting Leksah? I noticed that sometimes it doesn't recognize functions immediately as I write them, but if you restart it, it will recognize them.


You need to use 'Update Workspace data' under the 'Configuration' menu -- Leksah doesn't index user-created functions until you do this (or restart the compiler). The default shortcut under Windows is Ctrl+M.


This solution may be totally off base because I don't use Haskell, but would ack-grep work for you? I have found it very useful for doing code dives.

I see in the documentation that it supports haskell.

I believe you would use: ack --haskell user_function

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号