Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Executing and debugging per file basis

Help
2009-12-08
2012-12-06
  • Hugo Ferreira
    Hugo Ferreira
    2009-12-08

    Hello,

    I have installed and experimented with the latest version.
    I am using Ubuntu 8.04 x86_64 with a local GHC 6.10.4 install.
    It seem to be working correclty.

    Two questions:

    1.) After reading the blog at http://jpmoresmau.blogspot.com/ 
    I realize that we have only access to interactive sessions on a
    source file. As per suggestion in the blog I have added a
    run -> external tools -> external tools configuration with:

    a) Main: ${workspace_loc:/${project_name}/.dist-scion/build/${project_name}/${project_name}}

    b) build : build before launch , project containing resource

    Unfortunately this only works for a single file (Project's main).
    Any way I can do this for a specific file only? I assume this may
    require some configuration at scion's end.

    2) Are their any plans for a debugger interface?

    TIA

     
  • JP Moresmau
    JP Moresmau
    2009-12-08

    Hello again,
    I don't understand 1). The compiled executable only offers main as the entry point. So you can change your main of provide options to do different things, or change Main-Is in your cabal file, but an executable has only one entry point. If you want to launch arbitrary functions in arbitrary modules you need to go through an interpreter, which is what **run as GHCi** does.

    For 2) yes it'd be great, wouldn't it? First I need to read up on debugging in GHC and then see how I can integrate with Eclipse. Hopefully, it will happen, but I cant' commit to a timeline… but it is on my radar.

     
  • Hugo Ferreira
    Hugo Ferreira
    2009-12-08

    Hi, <br>

    I regards to (1) I was thinking of having having several "modules" each with a  main and simply clicking on that file and executing it. A little like a java project wherein we may execute any class with a main. I have a similar set-up for the eclipse OcalIDE, however in this case I have to explicitly indicate which files must be compiled into an executable  and/or bytecode. I take it then that you assume one project one executable. I also assume this is because of the way GHC + cabal work.
    I will have to learn more about Haskell to know how to manage projects with several executables.

    As for (2) great. An IDE without a debugger is IMHO not complete.

    Once again thanks for the heads-up.