ModuleExplorer for navigating module heirachy

Help
asop
2012-11-18
2012-12-06
  • asop
    asop
    2012-11-18

    Hi in C++ visual studio one can organise functionality into a heirarchical structure via namespaces. Then visual studio has a certain window which allows one to navigate the heirarchy structure of the namespace to find the relevant functionality.

    I guess that in Haskell this done via modules (??), and the heirarchy is implemented using directories as mentioned by Don Stewart in the following post : http://stackoverflow.com/questions/1404908/how-to-organize-files-in-haskell-programs

    If this is indeed the case, then it might be useful to have a "Module explorer" window which allows one to explore this heirarchical module structure.

    Right now I dont have any experience implementing a heirarchical module structure as mentioned by Don in the article above, but I just wanted to bounce the idea. Thanks

     
  • asop
    asop
    2012-11-18

    For example in http://www.techrepublic.com/i/tr/cms/contentPics/ClassViewNEW.gif "CSharpWebClient" is a namespace.

    The benefit of this is when you have several namespaces (both "parallel" namespaces and "nested" namespaces), and when you have load of functionality/objects defined in the various namespaces

     
  • asop
    asop
    2012-11-18

    p.s. "xmethods" and "www" are also namespaces in the picture above.

     
  • JP Moresmau
    JP Moresmau
    2012-11-18

    It's already there, Haskell Browser.

     
  • asop
    asop
    2012-11-19

    Aha. Let me go and examine..

     
  • asop
    asop
    2012-11-25

    Hi, I had a look at Haskell Browser and it does not contain anything. So in my haskell project I have two files :

    --MyMod.hs
    module MyMod where
    myadd::Int->Int->Int
    myadd x y = x + y
    
    --Main.hs
    import MyMod
    main = do
        print (myadd 3 4)
    

    This program runs fine, but when I switch over to the "Haskell Browser" perspective, the "f(.) functions" window is empty.

    Note however that the function "myadd" does appear in the "Outline" window when one switches to the "Haskell" perspective. Thanks

     
  • JP Moresmau
    JP Moresmau
    2012-11-25

    Yeah, I'm afraid the Haskell Browser at the moment only shows what *installed* on your system, and it doesn't show everything that's in your modules. So you're probably right, there is nothing at the moment that gives you a full namespace view of the code under development.

     
  • asop
    asop
    2012-11-25

    Hi, when you say installed on your system, do you mean a package installed via "cabal install …"? Thanks

     
  • JP Moresmau
    JP Moresmau
    2012-11-25

    Yes, so code still in development is not going to show up.

     
  • asop
    asop
    2012-11-25

    It is strange because I am sure I did a few cabal installs (I cannot remember what exactly I installed), and nothing is showing up. My configuration is slightly different from the default in that I follow the instructions in :

    http://www.volkerschatz.com/haskell/glocabal.html

    In order to install cabal globally, but I dont think that this should have anything to do with it. Hmm maybe I will investigate later.  Thanks