hdevtools
                                
                                 hdevtools copied to clipboard
                                
                                    hdevtools copied to clipboard
                            
                            
                            
                        Add command 'findsymbol'
Hi Bit,
I've added the command 'findsymbol', to be able find the modules where a given symbol is defined.
Greetings, Daniel
Interesting. Could you please explain a bit more what this does, maybe with an example? And the difference between the "info" command? Thanks!
Hi Bit,
On Sun, Nov 10, 2013 at 03:32:19PM -0800, Bit Connor wrote:
Interesting. Could you please explain a bit more what this does, maybe with an example? And the difference between the "info" command? Thanks!
The 'info' command shows the type information of a given symbol and in which module the symbol is defined. The basis for this command are the already imported moduls.
The 'findsymbol' command should be the basis for extending the import list. The idea is, that 'findsymbol' finds all occurences of the given symbol, if it's defined in multiple modules, than the user can choose which one the wants and than the import list gets extended, if necessary.
Until now I didn't have put that much time into the whole thing, but I have started a simple command line program which should be extending the import list.
Would you have something against a 'hdevtools import' command: hdevtools import 'Control.Applicative' '<$>' ?
From a user perspective it would be easier if he just needs to install 'hdevtools' and 'vim-hdevtools' to get the whole thing working.
Greetings, Daniel
Hi Bit,
I have done some further changes which I try to summarize.
The first few commits are about better error handling for the 'findsymbol' command and about catching GHC exceptions when reading module informations.
The bigger change is about allowing the 'findsymbol' command to take any number of source files.
This is the basis to be able to extend the import list by modules of the current project.
Greetings, Daniel