[Haskell-cafe] ANN: Leksah 0.10.0

Hamish Mackenzie hamish.k.mackenzie at googlemail.com
Tue May 3 05:50:05 CEST 2011


I did most of the Yi integration work done so far, but I have not had time to work on it lately.  Yi already is a library (for dyre) and is designed to work with different front ends.  The approach I took was to add a new "Pango Control" front end based on the existing Pango front end.

I think the Yi team are planning on making all the front ends into separate packages so at that point the Pango Control front end would hopefully be in yi-pango (or perhaps its own yi-pango-control).  The main thing is that the front end modules depend on the core Yi stuff, but not the other way around.  So in that sense the design you describe is already close to how Yi works now.

Most of what I imagine you mean when you say "basic editing commands" already work in Leksah with Yi.  There is a lot left to do though...
  * Improve speed of rendering the text so it is usable (currently the
    entire window is redrawn for each key press)
  * Support for displaying minibuffers (vim : and / for instance do not work)
  * Fire an event on text insertion for autocomplete
  * Tagging of text to highlight search results and compiler errors
  * Locate X Y coordinates of text so we can display the autocomplete window
    in the right place
  * Scroll to a text location (if the user selects error or grep result)
  * When a new file is opened by Yi we should fire an event and open a window
    in Leksah for it
  * Likewise if a buffer is closed via a Yi command
  * Work out how to make Yi more configurable in the Windows and OS X
    binary installers

To get an idea of some of what is left to do search for TODO in 
  https://github.com/jutaro/leksah/blob/master/src/IDE/TextEditor.hs

The Pango Control front end is currently here
  https://github.com/yi-editor/yi/blob/master/yi/src/library/Yi/UI/Pango/Control.hs

To build Yi support into Leksah get Yi from github and install it with
  cabal configure --flags="pango -vte" --constraint='parsec<2.2'
(not sure if the -vte is needed, may just need that on OS X)
(also the parsec restraint is not needed if you get Leksah from github)

Then install Leksah with
  cabal configure --flags="yi"
(add -dyre to the flags if you want to use the Leksah default Yi config)

Once that is done you should edit your ~/.yi/yi.hs file so that DYRE will
not turn Leksah into Yi.  Add this to the start...

{-# LANGUAGE CPP #-}
import Yi
#ifdef LEKSAH
import IDE.Leksah
#endif

And change the main function so it looks like this...

main :: IO ()
#ifdef LEKSAH
main = leksah $ myConfig
#else
main = yi $ myConfig
#endif

Finally run Leksah and check the box Edit Prefs -> Editor -> Use Yi.  This change comes into play when you open a new file (already opened buffers will still be GtkSourceView).

mahrz expressed an interest in helping out on #leksah IRC a couple of weeks back, but I have not heard how he is getting on.  Other than that I am not aware of anyone else working on it, so if anyone can help out that would be great.  Send any questions to Leksah and Yi lists or IRC #leksah.

On 3 May 2011, at 11:49, Mathew de Detrich wrote:

> I actually agree with you on that regard, I think the best thing you can get from Yi is just the basic editing commands (the same you would get from vim), such as visual/edit mode and whatnot
> 
> The best thing that Leksah can turn into (and something that Haskell desperately needs) is a Haskell version of Eclipse, because as Java has a weakness of being incredibly verbose (which Eclipse gets around with very easily, try coding Java in vim!!!), Haskell being a statically typed language has a weakness that in non trivial code, types can become convoluted and 'piping' functions together becoming complicated, something that a very smart code completion along with very powerful refactoring techniques that Eclipse has would do wonders.
> 
> The one thing that Haskell is missing is a proper editing environment, and at least in my opinion one of the major things that a language needs to become widely adopted (unless its a first like perl,C was) is a proper editing environment that is approachable for newer people but remains powerful for advanced users
> 
> On Tue, May 3, 2011 at 1:43 AM, jutaro <jnf at arcor.de> wrote:
> Hi Mathew,
> I was not the one working on Yi integration so far, but let me tell
> you
> what I think of the matter. Yi attempts to be a full blown editor,
> while Leksah
> needs Yi as a library for text editing with features typical of a
> source code editor component.
> 
> What we have in Leksah is an abstract TextEditor interface.
> So if I would work on it (and I can't say if I will do) I would fork
> Yi, and
> factor out a simple TextEditor library, and then would try to convince
> the
> Yi people that it would make sense to refactor Yi this way.
> 
> As it is now we have Yi in some way integrated, but it is not well
> defined,
> what part of functionality Leksah and Yi play, and I guess we will not
> reach
> something usable this way.
> 
> Jürgen
> 
> On 30 Apr., 11:25, Mathew de Detrich <dete... at gmail.com> wrote:
> > Is there going to be any plans to integrate Yi into Leksah as you originally
> > planned to, or is that idea for the short term out the window?
> >
> > On Fri, Apr 22, 2011 at 8:40 PM, Hamish Mackenzie <
> >
> >
> >
> >
> >
> >
> >
> > hamish.k.macken... at googlemail.com> wrote:
> > > Yesterday we uploaded our official 0.10.0 release (0.10.0.4) to Hackage
> > > and we have Windows and OS X installers athttp://leksah.org/download.html
> >
> > > Anyone using an earlier version should upgrade.
> >
> > > This release is mainly small improvements and bug fixes.  Some of the
> > > improvements include:
> >
> > > * Better messages for some common problems.
> > > * Improved grep (now searches all source directories in your workspace)
> > > * Updated build system for more reliable rebuilding of dependent
> > >  packages in your workspace
> >
> > > We have automated the building of the Leksah installers and this should
> > > allow us to do more frequent releases in the future.
> >
> > > There is a lot more to do and we would love to hear from anyone who has
> > > time to help out.
> >
> > > Worth mentioning because they can be hard to find:
> >
> > > * <Ctrl> R adds missing imports
> > > * <Ctrl> <Enter> evaluates current line or selection in GHCi
> > > * Right click menu in the editor has other debug functions
> > > * Comment and uncomment are now <Ctrl> D and <Ctrl> <Shift> D
> >
> > > To build Leksah yourself:
> >
> > > * Install Gtk and GtkSourceView2 (C libraries and headers)
> > > * Install The Haskell Platform (or GHC >= 6.12.3)
> > > * cabal update
> > > * cabal install gtk2hs-buildtools
> > > * cabal install leksah
> > > * leksah
> >
> > > Making a Gtk application look nice on Windows and OS X is not easy so
> > > we recommend using one of these prebuilt binaries:
> >
> > > Windows users using GHC 7.0.3
> > >http://leksah.org/packages/leksah-0.10.0.4-ghc-7.0.3.exe
> >
> > > Windows users using GHC 6.12.3
> > >http://leksah.org/packages/leksah-0.10.0.4-ghc-6.12.3.exe
> >
> > > OS X 10.6 users using GHC 7.0.3
> > >http://leksah.org/packages/leksah-0.8.0.6.dmg
> >
> > > (These installers do not install Gtk2Hs packages on your system)
> >
> > > Please consulthttp://leksah.org/download.htmlfor more details about
> > > installation! Background information can be found in the Leksah manual
> > >http://leksah.org/leksah_manual.pdf.
> >
> > > Known bugs and problems:
> >
> > > * Leksah does not run with GHC 6.12.2
> > >  (http://http://hackage.haskell.org/trac/ghc/ticket/4038)
> >
> > > Have fun
> > > Jürgen & Hamish
> > > See you on #leksah IRC
> >
> > > _______________________________________________
> > > Haskell-Cafe mailing list
> > > Haskell-C... at haskell.org
> > >http://www.haskell.org/mailman/listinfo/haskell-cafe
> >
> >
> >
> > _______________________________________________
> > Haskell-Cafe mailing list
> > Haskell-C... at haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe
> 
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe




More information about the Haskell-Cafe mailing list