[Haskell-cafe] what's the best environment for haskell work?

David Virebayre dav.vire+haskell at gmail.com
Thu Aug 5 05:12:38 EDT 2010


On Wed, Aug 4, 2010 at 8:01 PM, Hamish Mackenzie
<hamish.k.mackenzie at googlemail.com> wrote:
> I use Leksah and have done since I started contributing to it.  The best way to make it work for you is to use Leksah to fix what you don't like about Leksah ;-)  Failing that giving good feedback about bugs and missing features is the next best thing.

I did check the bug/feature tracker, and most issues I have are
already there, but with a low priority.
I could try to contribute, but I'm both lazy and unsure I can be of help

>
> On 3 Aug 2010, at 18:48, David Virebayre wrote:
>> Trying code completion in comments on string constants, for example.
>> Code completion makes the text jump if you're editing near the bottom
>> of the editor area.

>> I like the "tocandy" feature but then it breaks alignment if you open
>> the file in another editor. Something probably fixable by editing the
>> candy file.

> Just out of interest which of the candy replacements caused problems.  Some of them (such as ->) already are set to include spaces to pad out differences.

For example, .

Here's an example without, and with candy :

listeEtageres = flip zip [1..]  -- on les numérote
              . nub             -- on élimine les doublons
              . sort            -- on les trie
              . map simple      -- on ne garde que le type et la position
              $ listeEtagTot    -- on part de la liste totale des étagères
  where simple (_arm,tpe,pos) = (tpe,pos)
        f n (t,p)             = (n,t,p)
--------------------------------
listeEtageres = flip zip [1..]  -- on les numérote
             ∘nub             -- on élimine les doublons
             ∘sort            -- on les trie
             ∘map simple      -- on ne garde que le type et la position
              $ listeEtagTot    -- on part de la liste totale des étagères
  where simple (_arm,tpe,pos) = (tpe,pos)
        f n (t,p)             = (n,t,p)
-------------------------------------------
> Does your existing editor handle candy better? If so how?
It doesn't handle them at all :)


> Thanks for the feedback, please let us know if you think of anything else.

This is an example of how i'm confused.
In this example, I'm trying to load a single file. It's for test
purposes only, I only need it made by ghc --make, I don't need a cabal
package.

$ cd code/euler
$ leksah Euler.hs

leksah loads with my previous package loaded.
Here, I hoped it'd open the file I mentionned on the command line.
Now, I need to close the package or workspace I'm working on, but I'm
not sure which. as there's no such option in the Package menu, I
suppose I have to close the workspace.
I close it, but my source file remains open. I close it.
Since I want to see if 'leksah file' works, I close leksah and I'm
back at the shell.

$ leksah Euler.hs

I back again in leksah, this time with no package/workspace opened,
but my Euler.hs file did not open either.
back to the shell again

$ leksah -v
Leksah the Haskell IDE, version 0.8.0.6

$ leksah --help
Leksah the Haskell IDE Usage: leksah [OPTION...] files...
  -v            --version              Show the version number of ide
  -l NAME       --loadSession=NAME     Load session
  -h            --help                 Display command line options
  -e Verbosity  --verbosity=Verbosity  One of DEBUG, INFO, NOTICE,
WARNING, ERROR, CRITICAL, ALERT, EMERGENCY

According to this help, I should be able to give it a file on the
commande line, but it seems it does nothing. No message to tell me
what's wrong.
Also, there's an option to load a session. What's a session ? the IDE
tells of workspace and package, how is that related to sessions ?
anyway, back to leksah.

I open my file Euler.hs.

I can't seem to use the browser if I don't define a package.
I click several times the menu Package->New package, but nothing happens
I click also Package->Edit package.
After a few clicks, I try Package->Edit flags and leksah exits without
warning. On the shell, I see
------
Needs an open workspace
Needs an open workspace
No active package to edit
Needs an open workspace
Needs an open workspace
No active package to edit
leksah: Can't get pane
***lost connection
***lost last connection - exiting
leksah-server: ExitSuccess
***lost last connection - waiting
ExitSuccess
----
So I understand why the package menus didn't work, but there was no
alert while I was in leksah. And it did crash when I clicked on
Package->Edit flags (reproductible)

Now I create a workspace since I have to.
On the browser I still don't have access to my file.
Make workspace does nothing, and tells me nothing. I suspect I need a package.

So I'm creating a package. When I click save, it creates a Main.hs file for me.
Right now I'm kind of annoyed, I just wanted to edit Euler.hs, add
another problem to it, compile, run, and get on with something else.
That's usually where I close leksah, and lauch kate.

For another programs (that compile fine with ghc --make), I didn't
bother making the package. But I had to find out the package
dependencies by building, checking where it fails, and trying to add a
package to the dependency list. Maybe there's a better way, didn't
find it.

> As well as the google forum we now also have #leksah on IRC.

I'm subscribed on the mailing list, it seems inactive. I'll find and
have a look at the forum.

David.


More information about the Haskell-Cafe mailing list