#LyX 1.6.5 created this file. For more info see http://www.lyx.org/ \lyxformat 345 \begin_document \begin_header \textclass scrartcl \use_default_options false \language english \inputencoding auto \font_roman default \font_sans default \font_typewriter default \font_default_family default \font_sc false \font_osf false \font_sf_scale 100 \font_tt_scale 100 \graphics default \paperfontsize default \spacing single \use_hyperref false \papersize a4paper \use_geometry false \use_amsmath 1 \use_esint 0 \cite_engine basic \use_bibtopic false \paperorientation portrait \secnumdepth 3 \tocdepth 2 \paragraph_separation indent \defskip medskip \quotes_language english \papercolumns 1 \papersides 1 \paperpagestyle default \tracking_changes false \output_changes false \author "" \author "" \end_header \begin_body \begin_layout Title Leksah: An Integrated Development Environment for Haskell \begin_inset Newline newline \end_inset Version 0.8 \end_layout \begin_layout Author Jürgen Nicklisch-Franken \begin_inset Newline newline \end_inset Hamish Mackenzie \begin_inset Newline newline \end_inset edited for v. 0.8: Andrew U. Frank and Christian Gruber \end_layout \begin_layout Standard \begin_inset CommandInset toc LatexCommand tableofcontents \end_inset \end_layout \begin_layout Standard \begin_inset FloatList figure \end_inset \end_layout \begin_layout Section* License \end_layout \begin_layout Standard Leksah has been put under the GNU GENERAL PUBLIC LICENSE Version 2. The full license text can be found in the file data/LICENSE in the distribution. \end_layout \begin_layout Standard \begin_inset Newpage newpage \end_inset \end_layout \begin_layout Section Introduction \end_layout \begin_layout Standard Leksah is an IDE (Integrated Development Environment) for the programming language Haskell. It is written in Haskell and integrates various tools available for writing programs in Haskell: the GHC compiler and interpreter, the CABAL package management system (the Common Architecture for Building Applications and Libraries), Haddock for producing documentation, etc. in one, single, comprehensive and easy to use environment. It allows the developer to concentrate on writing the program and Leksah gives him easy access to all information she needs and helps with the necessary housekeeping for compiling, linking and package management. \end_layout \begin_layout Standard A unified focus for translating source code to executable programs: Leksah introduces the notion of a workspace that can include several packages transparently: to the programmer it appears as if there were a single program with a simple \begin_inset Quotes eld \end_inset make \begin_inset Quotes erd \end_inset command. Leksah manages rebuilding and installing packages as far as desired automatical ly. \end_layout \begin_layout Standard Support for writing source code: Leksah supports debugging with GHCi, evaluation of expressions, gathering type information, setting breakpoints, displays values at breakpoints, etc. is all possible from within Leksah. \end_layout \begin_layout Standard Last, but not least, Leksah collects information about installed packages, helps to find function names and their type and offers an auto-completion feature while you type new code. \end_layout \begin_layout Standard The features of Leksah often reflect directly features of the Haskell tools used; therefore, to understand behavior in special cases needs sometimes reading the specific documentation of GHC, Cabal or Haddock, (and this manual, to a degree repeats what is found, with more detail and authority, in the respective tool documentation). \end_layout \begin_layout Standard Leksah is written in Haskell, which means the Leksah developers use Leksah to develop Leksah and users of Leksah can read the code and contribute improvements. Leksah uses GTK+ as GUI Toolkit with the gtk2hs binding. It is platform independent and runs on any platform where GTK+, gtk2hs and GHC can be installed. It is used on Linux, Windows and Mac. \end_layout \begin_layout Standard This document is a reference to the functionality of Leksah, it is not intended to be a tutorial. Since Leksah is still under development the information may be incomplete or superseded. \end_layout \begin_layout Standard The current version is 0.8. \end_layout \begin_layout Subsection Further Information \end_layout \begin_layout Standard The home page for Leksah is \begin_inset CommandInset href LatexCommand href name "leksah.org" target "http://leksah.org" \end_inset . Stable version of Leksah can be installed from Hackage \begin_inset CommandInset href LatexCommand href name "hackage.haskell.org/package/leksah" target "http://hackage.haskell.org/package/leksah" \end_inset using Cabal install. The source code for Leksah is hosted under \begin_inset CommandInset href LatexCommand href name "code.haskell.org/leksah" target "http://code.haskell.org/leksah" \end_inset and \begin_inset CommandInset href LatexCommand href name "code.haskell.org/leksah-head" target "http://code.haskell.org/leksah-head" \end_inset . The Leksah user Wiki is \begin_inset CommandInset href LatexCommand href name "haskell.org/haskellwiki/Leksah" target "http://haskell.org/haskellwiki/Leksah" \end_inset . The Leksah forum can be accessed at \begin_inset CommandInset href LatexCommand href name "groups.google.com/group/leksah/topics" target "http://groups.google.com/group/leksah/topics" \end_inset . The current version of this manual can be found at \begin_inset CommandInset href LatexCommand href name "leksah.org/leksah_manual.pdf" target "http://leksah.org/leksah_manual.pdf" \end_inset . An issue tracker to collect bug reports and suggestions for improvements is at \begin_inset CommandInset href LatexCommand href name "code.google.com/p/leksah/issues/list" target "http://code.google.com/p/leksah/issues/list" \end_inset . You can contact the developers at \begin_inset CommandInset href LatexCommand href name "info (at) leksah.org" target "info@leksah.org" type "mailto:" \end_inset . \end_layout \begin_layout Standard For information about the Programming language Haskell go to \begin_inset CommandInset href LatexCommand href name "www.haskell.org" target "http://www.haskell.org" \end_inset . The GHC computer is found at \begin_inset CommandInset href LatexCommand href name "www.haskell.org/ghc" target "http://www.haskell.org/ghc" \end_inset . For information about gtk2hs \begin_inset CommandInset href LatexCommand href name "www.haskell.org/gtk2hs/" target "http://www.haskell.org/gtk2hs/" \end_inset . For information about GTK+ go to \begin_inset CommandInset href LatexCommand href name "www.gtk.org" target "http://www.gtk.org" \end_inset . \end_layout \begin_layout Subsection Release Notes \end_layout \begin_layout Subsubsection Version 0.8 Release March 2010 \end_layout \begin_layout Standard The 0.8 release adds the notion of workspaces to allow develop comfortably projects, where part of the code is in separate packages. This changes the handling of packages to a degree, which has been improved with introducing suitable defaults: a simple, single-shot program can be started with very few clicks and entering not much more than the name of the program; Leksah becomes usable even for just quickly testing an idea. Other changes include: \end_layout \begin_layout Itemize Better metadata with non exported definitions for workspace packages \end_layout \begin_layout Itemize Support for prebuild metadata packages \end_layout \begin_layout Itemize Better completion (keywords, language extensions, module name, non exported definitions) \end_layout \begin_layout Itemize Splittet in a client and server part (Client part doesn't import ghc-api) \end_layout \begin_layout Itemize Added support for Ghc 6.12 \end_layout \begin_layout Itemize Prepared for Yi (Abstract TextEditor interface, not ready for use) \end_layout \begin_layout Itemize Various other changes improve usability and stability of the platform. \end_layout \begin_layout Standard A large number of bugs has been fixed, but there remain, probably a large number of, bugs - some old and not yet fixed and some new ones. We expect also to improve and streamline the user interface in the next minor release to achieve more consistency and make Leksah easier to learn. You may see comments to this effect in this document, suggesting possible changes in the interface. Your opinion on these and other possible improvements you see will be highly appreciated! \end_layout \begin_layout Standard Version 0.8 works with GHC 6.10 and 6.12. The installation is described in \begin_inset CommandInset ref LatexCommand prettyref reference "sec:Installing-Leksah" \end_inset for the standard case, more up to date information on installation may be found on the Wiki \begin_inset CommandInset href LatexCommand href name "haskell.org/haskellwiki/Leksah" target "http://haskell.org/haskellwiki/Leksah" \end_inset . If you have any trouble installing, please check the Wiki, the forum or contact the developers to find a solution. A smooth implementation is a priority for us and we like to hear about difficulties you encounter to fix them; please report them on the bug and issues tracker \begin_inset CommandInset href LatexCommand href name "code.google.com/p/leksah/issues/list" target "http://code.google.com/p/leksah/issues/list" \end_inset . \end_layout \begin_layout Subsubsection Version 0.6 Beta Release Juli 2009 \end_layout \begin_layout Standard The 0.6 version introduces an interpreter/debugger mode. This mode can be switched on and off from the toolbar. In interpreter/debugger mode expressions can be evaluated and the type of expressions can be dynamically shown. The GHCi debugger is integrated, so that breakpoints can be set, it is possible to step through the code, observe the values of variables and trace the execution history. \end_layout \begin_layout Standard The other features of Leksah like building in the background and reporting errors on the fly work in debugger mode as in compiler mode (but not configurin g, installing, etc. of packages). \end_layout \begin_layout Standard Another new feature is integration of grep and text search with regular expression. This can be accessed from the findbar. \end_layout \begin_layout Standard The GUI framework has been enhanced, so that layouts can be nested in so called group panes. This feature is used for the debugger pane. Furthermore notebooks can be detached, so that Leksah can be used on multiple screens. \end_layout \begin_layout Standard A lot of little enhancements has been made and numerous bugs has been fixed. \end_layout \begin_layout Standard Known bugs and problems: \end_layout \begin_layout Itemize The package editor works only for cabal files without configurations. \end_layout \begin_layout Itemize MS Windows: The check for external modifications of source files does not work. \end_layout \begin_layout Itemize MS Windows: Interruption of a background build does not work. \end_layout \begin_layout Itemize GUI History still not working. \end_layout \begin_layout Itemize Traces pane of the Debugger does not work appropriately. \end_layout \begin_layout Subsubsection Version 0.4 Beta Release February/March 2009 \end_layout \begin_layout Standard The 0.4 Release is the first beta release of Leksah. It should be usable for practical work for the ones that wants to engage with it. \end_layout \begin_layout Standard It depends on GHC \begin_inset Formula $\geq$ \end_inset 6.10.1 and gtk2hs \begin_inset Formula $\geq$ \end_inset 0.10.0. \end_layout \begin_layout Standard The class pane and the history feature are not quite ready, so we propose not to use it yet. \end_layout \begin_layout Subsubsection Version 0.1 Alpha Release February 2008 \end_layout \begin_layout Standard This is a pre-release of Leksah. The editor for Cabal Files is not ready, so we propose not to use it yet. w \end_layout \begin_layout Standard \begin_inset Newpage pagebreak \end_inset \end_layout \begin_layout Section Installing Leksah \begin_inset CommandInset label LatexCommand label name "sec:Installing-Leksah" \end_inset \end_layout \begin_layout Subsection How to Install: Brief Instructions \end_layout \begin_layout Standard You can install from \end_layout \begin_layout Itemize a binary installer for your operating system, which is typically Windows or Macintosh. \end_layout \begin_layout Itemize a package for your platform, which is currently Arch Linux and Fedora Linux, and Debian(Ubuntu) is in preparation. \end_layout \begin_layout Itemize install from sources from Hackage via \family typewriter \emph on cabal install leksah \end_layout \begin_layout Itemize leksah or leksah-head development repositories. (If you want the very last or want to help with Leksah development). \end_layout \begin_layout Standard You can consult the Download page for up-to date information and try the user Wiki for further help. \end_layout \begin_layout Subsection Microsoft Windows \end_layout \begin_layout Enumerate Install Haskell Platform with an installer for Windows (alternatively install Ghc directly) \end_layout \begin_layout Enumerate Make sure wget and grep are on the path of your Windows shell \end_layout \begin_layout Enumerate Install Leksah from the most recent binary installer for Windows. \end_layout \begin_layout Enumerate Go to the post installation section. \end_layout \begin_layout Subsection Mac OS X \end_layout \begin_layout Enumerate Install Haskell Platform with an installer for Mac OS X (alternatively install Ghc directly) \end_layout \begin_layout Enumerate Make sure wget and grep are on the path. \end_layout \begin_layout Enumerate Install Leksah from the most recent binary installer for Mac \end_layout \begin_layout Enumerate Go to the post installation section. \end_layout \begin_layout Subsection Linux from Distro Packages \end_layout \begin_layout Enumerate Install Leksah with the package management system of your Linux platform, which should pull all prerequisites automatically. \end_layout \begin_layout Enumerate Go to the post installation section. \end_layout \begin_layout Subsection Install from Hackage \end_layout \begin_layout Enumerate Install Haskell Platform (alternatively install Ghc directly, install Cabal and cabal-install) \end_layout \begin_layout Enumerate Install gtk2hs in a version compatible with the installed Ghc compiler (Currentl y gtk2hs can't be installed via Hackage, but this should be possible in the near future, so that you don't have to care about this step any more). Make sure the gtk2hs gtksourceview2 package gets built and installed. \end_layout \begin_layout Enumerate open a Console and do: \end_layout \begin_deeper \begin_layout LyX-Code cabal update \begin_inset Newline newline \end_inset cabal install leksah \end_layout \end_deeper \begin_layout Enumerate Go to the post installation section. \end_layout \begin_layout Subsection Post Installation steps \end_layout \begin_layout Enumerate Until the next release of gtk2hs, for a pleasant visual appearance, you have to copy or append the .gtkrc-2.0 file from the Leksah data folder or from the data folder in Leksah sources to your home folder. If you miss the step, the cross [x] buttons on tabs are almost invisible (or don't fit in tabs). This step may become obsolete during the 0.8 release cycle. \end_layout \begin_deeper \begin_layout LyX-Code cd ~ \begin_inset Newline newline \end_inset wget http://code.haskell.org/leksah/leksah/data/.gtkrc-2.0 -O \begin_inset Newline newline \end_inset .gtkrc-2.0-leksah \begin_inset Newline newline \end_inset echo -e ' \backslash ninclude ".gtkrc-2.0-leksah"' >> .gtkrc-2.0 \end_layout \end_deeper \begin_layout Enumerate Before you start Leksah for the first time, do a: \end_layout \begin_deeper \begin_layout LyX-Code ghc-pkg recache \end_layout \begin_layout Standard It has been observed, that a package recache is often necessary after installati on. The symptom is an empty Module Browser, if you select the System scope. \end_layout \end_deeper \begin_layout Subsection First start of Leksah \end_layout \begin_layout Standard The first time you start Leksah it will take you through the follow steps: \end_layout \begin_layout Enumerate You are asked to fill in a form telling Leksah where your Haskell sources are (if you are not sure or just want to test, you can accept the defaults and correct them later in the \begin_inset Quotes eld \end_inset metadata \begin_inset Quotes erd \end_inset preferences) \end_layout \begin_layout Enumerate Leksah collects \begin_inset Quotes eld \end_inset metadata \begin_inset Quotes erd \end_inset , i.e. exported symbols and their type, comments explaining them etc. for all installed packages on your machine. This step may take a while and may give no feedback or a lot of strange errors and warnings, don't worry but be patient. \end_layout \begin_layout Enumerate The Leksah IDE starts and you can start working. \end_layout \begin_layout Standard Later starts will read in the previously collected metadata and check only for changes. After starting up, Leksah will open its Main window in a standard configuration. \end_layout \begin_layout Standard Progress on your first contact with Leksah: \end_layout \begin_layout Enumerate Start with the, infamous, \begin_inset Quotes eld \end_inset Hello World \begin_inset Quotes erd \end_inset example. The next section gives you a step by step description. \end_layout \begin_layout Enumerate Then it might be the best to construct a workspace and add an existing project and explore Leksah while you work on it. \end_layout \begin_layout Subsection First start dialog \end_layout \begin_layout Standard \begin_inset Float figure wide false sideways false status open \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_first_start.png lyxscale 50 width 90text% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout \begin_inset CommandInset label LatexCommand label name "fig:FirstStart-dialog" \end_inset First-Start dialog \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Standard When you start Leksah for the first time it must collect the information about the packages you have on your computer and may use in your projects. The first start dialog let you enter settings about this process. Leksah then collects information about exported symbols, their type and possible comments (collectively called metadata) to support your work, e.g. by suggesting auto-completion and type information about functions you may use while you edit your source. \end_layout \begin_layout Standard Later you can change this settings in the preferences pane in Leksah and you can rebuild the metadata at any time. \family typewriter leksah-server -sbo +RTS -N2 \family default from the console. Details about metadata collection can be found here: \begin_inset CommandInset ref LatexCommand ref reference "sub:Metadata-collection" \end_inset . \end_layout \begin_layout Standard If you want to start from scratch again delete or rename the .leksah-*.* folder in your home folder. Then you will see the first start dialog again. \end_layout \begin_layout Standard In the first start dialog you are asked for: \end_layout \begin_layout Enumerate The location of folders, where Haskell source code for installed packages can be found. This is important for packages which can't be found on Hackage. \end_layout \begin_layout Enumerate Maybe a directory, where Leksah will unpack source files for packages. If you give no directory here, Leksah will not try to unpack the sources. \end_layout \begin_layout Enumerate Some packages are difficult to process with Haddock. So we provide some prebuild metadata. If you allow this, Leksah will look for prebuild metadata, if sources are available, but Haddock fails to process. \end_layout \begin_layout Enumerate The port number used for the local connection to the Leksah server. \end_layout \begin_layout Enumerate By default the Leksah server terminates with the last connection. You can change this setting here. \end_layout \begin_layout Standard Leksah collects information about all installed packages on your system that will take some time (minutes to half an hour) the first time. Errors occuring in this metadata collection step indicate only that Leksah has not succeeded to extract the source locations and comments from a module or package; they are not consequential, except that some metainformation may be missing. The metadata is cached and future starts only scan newly installed packages, starts only information for new packages will be installed. \end_layout \begin_layout Standard \begin_inset Float figure wide false sideways false status open \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_welcome.png lyxscale 50 width 100text% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout Leksah after first start \end_layout \end_inset \end_layout \begin_layout Plain Layout \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset Newpage pagebreak \end_inset \end_layout \begin_layout Section Hello World example \end_layout \begin_layout Itemize Workspace -> New. Constructs a new workspace in a selected folder and give it a name (e.g. \begin_inset Quotes eld \end_inset Hello \begin_inset Quotes erd \end_inset ). This produces a file Hello.lkshw. \end_layout \begin_layout Itemize Package -> New and use the "Create Folder" button to make a new folder for the package. Make sure to be in this folder when you click \begin_inset Quotes eld \end_inset Open \begin_inset Quotes erd \end_inset . An editor opens up, which let you edit cabal files. The name proposed for your package is the name of the folder you just construct ed. That is the convention with Cabal packages. The defaults are set for creating a simple executable. The base package is specified as build dependencies, and an executable with the name of the package will be constructed. The main module resides in a file \begin_inset Quotes eld \end_inset Main.hs \begin_inset Quotes erd \end_inset . The sources are in a \begin_inset Quotes eld \end_inset src \begin_inset Quotes erd \end_inset subdirectory of the packages. \end_layout \begin_layout Itemize Click Save to write the .cabal file. \end_layout \begin_layout Itemize The main module gets automatically constructed and opens. \end_layout \begin_layout Itemize Now add your code to the module \end_layout \begin_deeper \begin_layout LyX-Code \emph on main = putStrLn "Hello World" . \end_layout \end_deeper \begin_layout Itemize By default, auto build is on and you can see that the file will be compiled in the Log pane. \end_layout \begin_layout Itemize Choose Package -> Run or ctrl-alt-r, and you will see Hello World in the Log pane. \end_layout \begin_layout Itemize Or: Choose Package -> Install, open a Shell and try out your newly created executable \end_layout \begin_layout Standard Congratulations ! you have now entered, compiled, linked and run your first Haskell program with Leksah. It is as easy as: Create workspace / New package / enter your code/ Run. Remember: \end_layout \begin_layout Itemize the project folder is the folder in which your .cabal file for the project is stored. \end_layout \begin_layout Itemize A workspace is just a file, which contain information about included packages. \end_layout \begin_layout Itemize You see what Leksah is doing by observing the output from the Log window. \end_layout \begin_layout Standard Furthermore: \end_layout \begin_layout Itemize You can add Packages with the context menu in the workspace pane. You can construct new packages with Package -> New, from the menubar. \end_layout \begin_layout Itemize You can add other modules by selecting \begin_inset Quotes eld \end_inset Add module \begin_inset Quotes erd \end_inset from the context menu of the modules pane of the browser group. \end_layout \begin_layout Itemize You can open panes you need by selecting Panes -> Browser | Log | ... from the menubar. \end_layout \begin_layout Itemize You can editing modules by selecting them in the Browser. You can search in the modules pane of the browser by typing text. \end_layout \begin_layout Standard You may as easily debug it \end_layout \begin_layout Itemize \begin_inset Graphics filename ../pics/ide_debug.png width 0.5cm \end_inset Switch debugger Mode on. \end_layout \begin_layout Itemize Pane -> Debugger \end_layout \begin_layout Itemize Select the word “main” in your code \end_layout \begin_layout Itemize Right click and choose “Eval” from the pop-up menu or press ctrl-enter. \end_layout \begin_layout Itemize Switch of debugger Mode if you want to compile an executable. \end_layout \begin_layout Standard \begin_inset Box Boxed position "t" hor_pos "c" has_inner_box 1 inner_pos "t" use_parbox 0 width "100col%" special "none" height "1in" height_special "totalheight" status open \begin_layout Plain Layout It is probably counter productive for new users to use Candy mode (converts some common ASCII based operators to Unicode alternatives) because all the tutorials use ASCII. Switch it off when you get irritated. Deselect Configuration -> To Candy from the menubar. \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset Newpage newpage \end_inset \end_layout \begin_layout Section The Editor \end_layout \begin_layout Standard \begin_inset Wrap figure lines 0 placement O overhang 0in width "30col%" status open \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_file_menu.png lyxscale 50 width 30text% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout \begin_inset CommandInset label LatexCommand label name "fig:File-menu" \end_inset File menu \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Standard Most of the time programming is editing source code. To edit Haskell source files Leksah uses the GtkSourceView2 widget. It provides editing, undo/redo, syntax highlighting and similar features. In the file menu ( \begin_inset CommandInset ref LatexCommand ref reference "fig:File-menu" \end_inset ) you find the customary functionality to open, save, close and revert files. To avoid confusion, it is useful to be able to close all files, or all files which are not stored in or below the top folder of the current project (this is the folder where the .cabal file resides) at once - this helps you focus on your project. This way it is as well possible to close all files, which don't belong to a workspace. \end_layout \begin_layout Standard \begin_inset Wrap figure lines 0 placement o overhang 0in width "30col%" status open \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_edit_menu.png lyxscale 50 scale 40 \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout \begin_inset CommandInset label LatexCommand label name "fig:Edit-menu" \end_inset Edit menu \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Standard Leksah does not store backup files. Leksah detects if a file which is currently edited has changed on disk and queries the user if a reload is desired. (Attention: This don't currently work for Windows, so take care). When you open a file which is already open, a dialog pops up to inquire if you want to make the currently open file active, instead of opening it a second time (Leksah does not support multiple views on a file, but if you open a file a second time, it's like editing the file two times, which makes little sense). The list of files is shown as notebook tabs (on top or left of the files - as you prefer (Menu -> View -> Tabs Left). \end_layout \begin_layout Standard When a file has changed compared to the stored version, the file name is shown in red in the notebook tab, reminding you that it needs to be saved before compilation. \end_layout \begin_layout Standard If you want to change to a different file editor buffer you can open a list of all open files by pressing the right mouse button, while the mouse is over a notebook tab. You can then select an entry in this list to select this file. (See \begin_inset CommandInset ref LatexCommand ref reference "sub:Using-the-Flipper" \end_inset for a better way to switch between source files). \end_layout \begin_layout Standard On the right side in the status bar at the bottom you can see the line and column, in which the cursor currently is; and if overwrite mode is switched on. In the second compartment from the left you can see the currently active pane, which is helpful if you want to be sure that you have selected the right pane for some operation. \end_layout \begin_layout Standard In the edit menu ( \begin_inset CommandInset ref LatexCommand ref reference "fig:Edit-menu" \end_inset ) you find the usual operations: undo, redo, cut, copy, paste and select all. In addition you can comment and un-comment selected lines in a per line style (--); however, the comment symbol must start in the first column (beware of illegal sequences like --# which may be automatically produced by inserting a comment in front of some symbol). \end_layout \begin_layout Standard Selected blocks of code can be shifted left or right using the tab or Tab/Shift- Tab keys. Furthermore, you can align some special characters (=,<-,->,::,|) in selected lines. The characters are never moved to the left, but the operation is very simple and takes the rightmost position of the special character in all lines, and inserts spaces before the first occurrence of this special characters in the other lines for alignment. \end_layout \begin_layout Subsection Find and Replace in the current folder \end_layout \begin_layout Standard Leksah supports searching in text files. When you select Edit/Find from the menu the find bar will open ( \begin_inset CommandInset ref LatexCommand ref reference "fig:Find-bar" \end_inset ) and you can type in a text string. Alternatively you can hit Ctrl-F or select a text and hit Ctrl-F (a standard keystrokes binding, which can be configured, see \begin_inset CommandInset ref LatexCommand ref reference "sub:Shortcuts" \end_inset ). Pressing the up and down arrow will bring you to the next/previous occurrence of the search string. Hitting Enter has a similar effect as the down arrow. Hitting Escape will closes the find bar and sets the cursor to the current find position. You have options for case sensitive search (labeled \begin_inset Quotes eld \end_inset c.S. \begin_inset Quotes erd \end_inset ), for searching only whole worlds (toggle Words) and for wrapping around (button Wrap), which means that the search will start at the beginning/end of the file, when the end/beginning is reached. If there is no occurrence of the search string in the currently open file the entry turns red. \end_layout \begin_layout Standard You can search for regular expressions by switching on the Regex option. Leksah supports regular expressions in the Posix style (by using the regex-posi x package). When the syntax of regular expressions is not legal, the background of the find pane turns orange. \end_layout \begin_layout Standard \begin_inset Float figure wide false sideways false status open \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_findbar.png lyxscale 40 width 100text% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout \begin_inset CommandInset label LatexCommand label name "fig:Find-bar" \end_inset Find bar \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Standard To replace a text enter the new text in the replace entry and select replace or replace all. \end_layout \begin_layout Standard The last field on the line gives you a mean to jump to a certain line number in the current text buffer. \end_layout \begin_layout Subsubsection Search in the package: Grep \end_layout \begin_layout Standard Searching for text in all files in a package is often useful For this feature the grep program must be on your path. You can then enter a search string in the find bar and search for all occurrenc es for the string in the folder and sub-folder of the current package with pressing the Grep button. A pane will open ( \begin_inset CommandInset ref LatexCommand ref reference "fig:Grep-pane" \end_inset ), and in every line show where the expression was found (with context). By clicking on the line, the file is opened in an editor and the focus is set to the selected line. You can navigate between lines with the up and down keys. \end_layout \begin_layout Standard Greps supports the search for regular expressions. \end_layout \begin_layout Standard \begin_inset Float figure wide false sideways false status open \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_grep.png width 70text% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout \begin_inset CommandInset label LatexCommand label name "fig:Grep-pane" \end_inset Grep pane \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Subsection Source Candy \end_layout \begin_layout Standard \begin_inset Float figure placement h wide false sideways false status open \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_source_candy.png width 80text% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout Source candy example \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Standard When using Source Candy, Leksah reads and writes pure ASCII Code files, but can nevertheless show you nice symbols like \begin_inset Formula $\lambda.$ \end_inset This is done by replacing certain character combinations by a Unicode character when loading a file or when typing, and replace it back when the file is saved. \end_layout \begin_layout Standard The use of the candy feature can be switched on and off in the menu and the preferences dialog. \end_layout \begin_layout Standard This feature can be configured by editing a .candy file in the .leksah folder or in the data folder. The name of the candy file to be used can be specified in the Preferences dialog. \end_layout \begin_layout Standard Lines in the *.candy file looks like: \end_layout \begin_layout Standard \begin_inset Box Frameless position "t" hor_pos "c" has_inner_box 1 inner_pos "t" use_parbox 1 width "100col%" special "none" height "1in" height_special "totalheight" status open \begin_layout Plain Layout \family typewriter " \backslash " 0x03bb --GREEK SMALL LETTER LAMBDA \end_layout \begin_layout Plain Layout \family typewriter "->" 0x2192 Trimming --RIGHTWARDS ARROW \end_layout \end_inset \end_layout \begin_layout Standard The first entry in a line are the characters to replace. The second entry is the hexadecimal representation of the Unicode character to replace with. The third entry is an optional argument, which specifies, that the replacement should add and remove blanks to keep the number of characters. This is important because of the layout feature of Haskell. The last entry in the line is an optional comment, which is by convention the name of the Unicode character. \end_layout \begin_layout Standard Using the source candy feature can give you problems with layout, because the alignment of characters with and without source candy may differ! \end_layout \begin_layout Standard \begin_inset Box Framed position "t" hor_pos "c" has_inner_box 0 inner_pos "t" use_parbox 1 width "100col%" special "none" height "1in" height_special "totalheight" status open \begin_layout Plain Layout Leksah reads and writes files encoded in UTF-8. So you can edit Unicode Haskell source files. When you want to do this, switch of source candy, because otherwise Unicode characters may be converted to ASCII when saving the file. \end_layout \end_inset \end_layout \begin_layout Subsection \begin_inset CommandInset label LatexCommand label name "sub:Completion" \end_inset Completion \end_layout \begin_layout Standard Leksah has the ability to auto complete identifiers in text you type. Additionally the Package, Module and Type of the id gets displayed if selected. The completion mode can either be always on, or only be activated on pressing Ctrl+Space (or a user defined keystroke). You can choose between these two possibilities in the Preferences. \end_layout \begin_layout Standard \begin_inset Float figure placement h wide false sideways false status open \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_completion.png width 70text% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout Completion \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Standard Autocompletion has currently limitations: \end_layout \begin_layout Itemize locally defined names are not included \end_layout \begin_layout Itemize Qualified imports are not handled \end_layout \begin_layout Itemize All names from all packages imported are provided; this may be more than you want \end_layout \begin_layout Subsection \begin_inset CommandInset label LatexCommand label name "sub:Using-the-Flipper" \end_inset Using the Flipper to Switch Between Editors \end_layout \begin_layout Standard You can change the active pane using a keyboard shortcut to bring up the flipper. It lists the most recently used panes first so they are easier to get to. The default shortcuts for the flipper are Ctrl+Tab and Ctrl+Shift+Tab or Ctrl+Page Down and Ctrl+Page Up. \end_layout \begin_layout Standard The approach in Leksah is comparable to the Alt+Tab and Alt+Shift+Tab used to switch between programs in the OS (Ubuntu, Windows). \end_layout \begin_layout Subsection \begin_inset CommandInset label LatexCommand label name "sub:Editor-Preferences" \end_inset Change Your Preferences for the Editor \end_layout \begin_layout Standard \begin_inset Float figure placement h wide false sideways false status open \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_prefs_editor.png width 80text% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout Editor Preferences \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Standard When selecting Configuration / Edit Prefs the preferences pane opens, which has a selection called Editor (Figure 8), were you can edit preferences for the editor. Some of the options you find here refer to visual elements, like the display of line numbers, the font used, the display of a right margin and the use of a style file for colors and syntax highlighting. \end_layout \begin_layout Standard You can set here the Tab size you want. Leksah always stores tabs as spaces. Using hard tabs is not recommended for Haskell and the Haskell compilers allow only tab size of 8. \end_layout \begin_layout Standard Leksah offers as well to remove trailing blanks in lines, which you may choose as default, because blanks at the end of lines make no sense in source code. \end_layout \begin_layout Verse \begin_inset Box Boxed position "t" hor_pos "c" has_inner_box 1 inner_pos "t" use_parbox 0 width "100col%" special "none" height "1in" height_special "totalheight" status open \begin_layout Plain Layout Leksah dialogs offer mostly a \noun on Apply, save \noun default and a \noun on close \noun default button. Be aware that the close button does not save your changes; press apply, save and then close! We will change this for the next version. \end_layout \begin_layout Plain Layout In dialogs, where you select something, there is typically an \noun on add \noun default button, selecting does not add, neither! Therefore: adding an item means select item, add, save, close. \end_layout \end_inset \end_layout \begin_layout Subsection Further info \end_layout \begin_layout Standard The work with the editor is influenced by other features \end_layout \begin_layout Itemize For background building, which may save your files automatically after every change refer to \begin_inset CommandInset ref LatexCommand ref reference "sub:Background-Build" \end_inset . \end_layout \begin_layout Itemize For information about editor preferences go to \begin_inset CommandInset ref LatexCommand ref reference "sub:Editor-Preferences" \end_inset . \end_layout \begin_layout Standard \begin_inset Newpage pagebreak \end_inset \end_layout \begin_layout Section Working with Projects: Workspaces and Packages \end_layout \begin_layout Standard Haskell organizes software projects in packages, which are managed independently. A package is compiled and linked as a unit to produce one or more executables or/and a library. It is installed with the package manager Cabal. A package can be uploaded to Hackage. And provided packages are downloaded from Hackage and installed. Packages have version numbers and specify version ranges for dependencies. Cabal assures that, if a packages is compiled, correct versions of other packages are selected. \end_layout \begin_layout Standard The difficulties, when working with a project where source code under developmen t is spread over several packages, are overcome in Leksah with the concept of a workspace. It combines several packages and allows smooth working with files from all packages. \end_layout \begin_layout Standard Leksah always works in a workspace and always needs at least one package, to do anything useful. This seems overkill for very simple projects, where the workspace contains just one package and this package just one source module producing one executable, but Leksah provides defaults that reduce the effort to a minimum. The principle to always to work in a workspace and in a package is beneficial in the long run, because it gives a smooth transition from a one-shot idea to a complex projects and integrates the widely used cabal system fully. \end_layout \begin_layout Standard Leksah, in addition, saves the state of your work environment with a workspace: so you can switch between workspaces and get exactly back to where you stopped working when leaving the workspace: the same files open in editors and the cursor in the same file and position. When you open a workspace, and a session is attached to it, Leksah prompts you, if you want to switch to the session associated with the workspace. Leksah silently always saves the session for the workspace you are closing. \end_layout \begin_layout Standard If you have auto-build on and you change a file, Leksah detects if this file belongs to any project in your Workspace. If this is the case, it builds the package. So the source file you are working on, doesn't need to belong to the active package. Leksah will detect and compile the package for you. The active project is important for the menu items of the package menu, because they always work on the active package. \end_layout \begin_layout Itemize Background build can be permanently set in Prefs -> Build -> Background build. You can temporarily enable and disable it from the toolbar with this button: \begin_inset Graphics filename ../pics/ide_build.png width 0.5cm \end_inset . \end_layout \begin_layout Itemize You can set, if Leksah automatically save all files before building, by the setting Prefs -> Build -> Automatically save all files before building. \end_layout \begin_layout Itemize Linking can take a long time, and on Windows we can't interrupt the build process in the moment, so it may be an advantage to switch of linking. This can be done by: Prefs -> Build -> Include linking in background builds. You can temporarily enable and disable it from the toolbar with this button: \begin_inset Graphics filename ../pics/ide_link.png width 0.5cm \end_inset . \end_layout \begin_layout Itemize The same option (disable linking) can be used to disable cross package build temporarily. \end_layout \begin_layout Subsection Cross package build \end_layout \begin_layout Standard The following is valid in compiler mode: Depending on your settings the following may happen. After a library has been successfully build, it will be installed if: \end_layout \begin_layout Itemize \begin_inset Quotes eld \end_inset Include linking in background builds \begin_inset Quotes erd \end_inset is on and either \end_layout \begin_deeper \begin_layout Itemize \begin_inset Quotes eld \end_inset Install always after a successful build \begin_inset Quotes erd \end_inset is selected or \end_layout \begin_layout Itemize \begin_inset Quotes eld \end_inset Install if it's a library with depended packages in the workspace \begin_inset Quotes erd \end_inset is selected, and it has dependent packages \end_layout \end_deeper \begin_layout Standard After this, dependend packages will be build. If you want a background build, but only for the one package you're working on, you can temporarily disable this mechanism, by deselecting \begin_inset Graphics filename ../pics/ide_link.png width 0.5cm \end_inset . \end_layout \begin_layout Subsection File Organization with Workspaces \end_layout \begin_layout Standard A workspace is represented by a file ( \emph on workspace_name.lkshws \emph default ) in a directory. You may choose a hierarchical folder structure with a workspace file at the top and the projects in sub-folders for complex projects, but you can as well put all \emph on workspaces \emph default in one directory and put all packages flat. You have to use care when you create a new workspace file. \end_layout \begin_layout Standard Each package directory contains at least a cabal file ( \emph on packagename.cabal \emph default ) and typically folders for the source files, following the usual Haskell ghc convention of hierarchical module names. \end_layout \begin_layout Standard Cabal controls the compilation and linking of packages with GHC and puts the results in a dist folder in the package; this folder is reconstructed often and may be deleted without loss. In the folder package_name/dist/build/executable_name you find the executable, but it is also installed in the folder ~ /.cabal/bin (for a build with the --user flag. You may wish to add this folder to your search path). \end_layout \begin_layout Subsection Workspace Operations \end_layout \begin_layout Standard \begin_inset Wrap figure lines 0 placement O overhang 0in width "30col%" status open \begin_layout Plain Layout \begin_inset Graphics filename screenshots2/screenshot_workspace_menu.png width 25text% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout \begin_inset CommandInset label LatexCommand label name "fig:Workspace-Menu" \end_inset Workspace Menu \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Subsubsection New workspace \end_layout \begin_layout Standard Under the menu workspace you find commands to create a new workspace with a specific name and select the folder in which it should reside. The windows title and the 3. compartment of the status bar informs you always about the currently open workspace. \end_layout \begin_layout Subsubsection Add packages to the workspace \end_layout \begin_layout Standard Open the workspace pane (from menu (Panes → Workspace) and do a right-click to get the pop-up menu to add a package by selecting the corresponding cabal file. \end_layout \begin_layout Subsubsection Open workspace \end_layout \begin_layout Standard When starting, Leksah opens the last workspace used. You can change to another workspace by opening the corresponding workspace file, or by choosing from the list of recently used workspaces. When opening a Workspace you can choose to \end_layout \begin_layout Subsubsection Clean and make workspace \end_layout \begin_layout Standard A workspace can be cleaned, meaning all packages gets cleaned and must be recompiled from scratch. Make builds all the packages in a meaningful order, and installs libraries if needed. It only stops if an error occurs. \end_layout \begin_layout Subsubsection Jump between errors \end_layout \begin_layout Standard There are menu items to move to the next or the previous error the compiler found. You can as well use keyboard shortcuts for this: \noun on ctr-j \noun default and \noun on shift-ctrl-j \noun default . It is as well possible to move by pointing to the error messages in the log pane or error pane. \end_layout \begin_layout Subsubsection Add all imports \end_layout \begin_layout Standard If you miss imports (given error messages ( \begin_inset Quotes eld \end_inset xx is not in scope \begin_inset Quotes erd \end_inset ) \noun on ctrl-r \noun default is adding them automatically to your import list. Limitation: it does so only, if the modules they export are in a workspace package or are in a package listed in the build dependencies of the package. \end_layout \begin_layout Subsection Packages \end_layout \begin_layout Standard \begin_inset Wrap figure lines 0 placement O overhang 0in width "30col%" status open \begin_layout Plain Layout \begin_inset Graphics filename screenshots2/screenshot_package_menu.png width 25text% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout \begin_inset CommandInset label LatexCommand label name "fig:Package-Menu" \end_inset Package Menu \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Standard The concept of a package is used to handle a unit of work for the development of some library or executable. It is, in the first place, the unit Cabal deals with and is a standard in the Haskell community. \end_layout \begin_layout Standard Leksah stores data for packages in the standard cabal files. The same files can be used outside of leksah: for example, you can issue the command cabal install in the folder that contains the cabal file and cabal will (as it would inside leksah) configures, compiles and links and install or register the library or executable produced. \end_layout \begin_layout Subsubsection Opening and activating a package \end_layout \begin_layout Standard Leksah uses Cabal for package management, and opening a package is done by opening the corresponding . \emph on cabal \emph default file. To open a package select \emph on Add Package \emph default from the context menu of the workspace, select the *.cabal file of the desired package. You must not have more than one *.cabal file in a folder! \end_layout \begin_layout Standard For workspaces with more then one package, you can activate a package in the workspace pane, by double clicking on it or by selecting \emph on Activate Package \emph default from the context menu. The active package is the one that the commands in the Package menu refers to. (e.g. configure, build, install). \end_layout \begin_layout Standard Leksah shows the currently active package in the third compartment in the status bar and in the window title. The package file contains appropriate defaults and for a small program, you may just save and close it. \end_layout \begin_layout Subsubsection New package \end_layout \begin_layout Standard To start with a new package select Package / NewPackage from the menu. Then you have to select a folder for the project, this is by GHC convention the same name you will give to your package in the package editor (see \begin_inset CommandInset ref LatexCommand prettyref reference "sub:Package-editor" \end_inset ). Then the package editor will open to collect the package details. \end_layout \begin_layout Standard This currently does not work, if an editor for a different package is open. \end_layout \begin_layout Subsubsection Package editor \begin_inset CommandInset label LatexCommand label name "sub:Package-editor" \end_inset \end_layout \begin_layout Standard The package editor ( \begin_inset CommandInset ref LatexCommand ref reference "fig:PackageEditor-1" \end_inset ) is an editor for cabal files and but you can edit the cabal files in your regular text editor as well. Leksah works (usually) with the cabal files you and others have already written, for example those you get when you install a package from Hackage. Since cabal files offer complex options the editor offers many separate sub-panes in a list on the right. For a complete description of all options see the \begin_inset CommandInset href LatexCommand href name "Cabal User's Guide" target "http://www.haskell.org/ghc/docs/latest/html/Cabal/index.html" \end_inset . \end_layout \begin_layout Standard The package editor does currently not support the cabal configurations feature. If you need cabal configurations, you need to edit the cabal files as a text file separately. Leksah uses standard cabal files with no modifications this is no problem just the package editor will not work for you. \end_layout \begin_layout Standard \begin_inset Float figure placement h wide false sideways false status open \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_package_editor_1.png scale 33 \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout \begin_inset CommandInset label LatexCommand label name "fig:PackageEditor-1" \end_inset PackageEditor 1 \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Subsubsection The most important parts of cabal files \end_layout \begin_layout Standard A package has, as a minimal requirement, a \bar under name \bar default and a \bar under version \bar default (default is 0.0.1 -- meaning something like \begin_inset Quotes eld \end_inset first idea \begin_inset Quotes erd \end_inset \begin_inset Quotes erd \end_inset ). If your code uses other packages then they must be listed in \bar under dependencies \bar default . This will be at least the \emph on base \emph default package (which is entered by default). This is independent whether you downloaded them, e.g., from Hackage produced them yourself. Version numbers are used to document (and enforce) that older versions of a program use the corresponding older versions of other packages with which it was developed originally. \end_layout \begin_layout Standard The result of the packages can be an executable and you enter the name of the Haskell file that contains the main function in the executable pane and the name of the executable. The result of the package can be a library; in the corresponding pane you tick off the modules which should be exposed (i.e., their exports can be used in other packages). Cabal gives the possibility to build more then one executable from one package and to build a library and executables from one package. \end_layout \begin_layout Standard You have to specify a build info. With build information you give additional \begin_inset space \space{} \end_inset information, e.g: \end_layout \begin_layout Itemize where the sources can be found (relative to the root folder of the project, which is the one with the cabal file). \end_layout \begin_layout Itemize what additional non-exposed or non main modules your project includes \end_layout \begin_layout Itemize compiler flags \end_layout \begin_layout Itemize used language extensions in addition to Haskell 98 (These can also be specified in the source files with pragmas) \end_layout \begin_layout Itemize and many more ... \end_layout \begin_layout Standard Because more than one executable and a library can be build from one package, it is possible to have cabal files with more than one build info. The package editor deals with this by the buttons Add / Remove Build Info. Every build info gets an index number, and for executables and a library you specify the index of the build info. \end_layout \begin_layout Subsubsection Initializing a package: Clean and configure operations \end_layout \begin_layout Standard Before a package can be acted on it must be configured; you may clean a package (i.e., delete its \emph on dist \emph default folder) to start afresh. \end_layout \begin_layout Standard Configure checks that the packages the current packages depend on are installed in GHC package manager; it checks for name and version, if you specify them. If an Hackage package is missing, you can \noun on cabal install \noun default it in a terminal window. \end_layout \begin_layout Standard Two types of errors regarding packages may be reported: \end_layout \begin_layout Standard While configuring, Cabal checks that the packages you have listed in the depends on section are installed on your computer. If one of your packages is missing (or missing the version that is needed) you can install it either -- for packages you have the source on your computer, e.g. because you wrote them -- by switching Leksah to the folder where this package is and configure, build and install them with the command \emph on cabal install \emph default . For packages that are on Hackage -- use a console, go to the directory where you keep such sources and type cabal install packageName (possibly package_name-version); cabal then recursively installs the package and all packages it depends on. \end_layout \begin_layout Standard Separate from this error message the case, where the compiler misses a module you want to import. Ghc provides an error message, indicating what package you have to add to the depends on' section in the cabal file. Edit the package, add the dependency and do configure/build. \end_layout \begin_layout Standard You have to take care as well, that there is a user and a global package db. Leksah uses the --user flag by default, to minimize errors. \end_layout \begin_layout Subsubsection Building \end_layout \begin_layout Standard The most frequently used functionality with packages is to make a build. If the package was not configured before, Leksah does that step automatically. When you start a build, you can see the standard output of the Cabal build procedure in the Log pane. \end_layout \begin_layout Standard A build may produce errors and warnings. If this is the case the focus is set to the first error/warning in the Log and the corresponding source file will open with the focus at the point where the compiler reports the error. You can navigate to the next or previous errors by clicking on the error or warning in the log window, or by using the menu, the toolbar or a keystroke. \end_layout \begin_layout Standard In the statusbar the state regarding to the build is displayed in the third compartment from the right. It reads \emph on Building \emph default as long as a build is on the way and displays the numbers of errors and warnings after a build. \end_layout \begin_layout Standard \begin_inset Graphics filename ../pics/ide_make.png width 0.5cm \end_inset This is the symbol, which initiates a \noun on build \noun default when clicked on the toolbar (Ctrl-b). \end_layout \begin_layout Standard The error pane ( \begin_inset CommandInset ref LatexCommand ref reference "fig:Error-Pane" \end_inset ) shows the errors in the form of a table and provides the same functionality you find in the log, but it may be more convenient to use. \end_layout \begin_layout Standard \begin_inset Float figure wide false sideways false status open \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_error_pane.png width 50text% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout \begin_inset CommandInset label LatexCommand label name "fig:Error-Pane" \end_inset Error Pane \end_layout \end_inset \end_layout \begin_layout Plain Layout \end_layout \end_inset \end_layout \begin_layout Subsubsection Run \end_layout \begin_layout Standard You can run your program after the build operation has compiled and linked it. there is a convenient button \begin_inset Graphics filename ../pics/ide_run.png width 0.5cm \end_inset to start it! \end_layout \begin_layout Subsubsection \begin_inset CommandInset label LatexCommand label name "sub:Background-Build" \end_inset Background build \end_layout \begin_layout Standard Leksah can run builds while you work and highlight errors as it finds them. This works with a timer that runs continuously in the background. If there are changes made to any open file it \SpecialChar \ldots{} \end_layout \begin_layout Itemize interrupts any running build by sending SIGINT (this step is OS X and Linux only at this point, it's not working on MS Windows) \end_layout \begin_layout Itemize waits for any running build processes to finish \end_layout \begin_layout Itemize saves all the modified files \end_layout \begin_layout Itemize starts a new build \end_layout \begin_layout Standard Current limitation: Because we can't interrupt the build on windows there is an option in the Leksah build preferences to have it skip the linking stage in background builds. This reduces the delay before a next build starts. Background build and linking can be configured in the preferences and as well switched on and off from the toolbar. \end_layout \begin_layout Standard \begin_inset Graphics filename ../pics/ide_build.png width 0.5cm \end_inset This is the toggle, which switches \noun on background build \noun default on or off in the toolbar. \end_layout \begin_layout Standard \begin_inset Graphics filename ../pics/ide_link.png width 0.5cm \end_inset The \noun on Linking \noun default toggle that switches background build \noun on \noun default on or off \noun on . \end_layout \begin_layout Subsubsection Build system flags \end_layout \begin_layout Standard Cabal allows more operations than just build; for example producing documentatio n with Haddock (with The \begin_inset Quotes eld \end_inset Build documentation \begin_inset Quotes erd \end_inset item in the package menu). For each of these operations you can enter the specific flags they require for you special case. We give here two often examples of flags, others work similarly and we recommend that you consult the respective documentations. \end_layout \begin_layout Standard \begin_inset Float figure wide false sideways false status open \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_package_flags.png width 50text% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout Package Flags \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Standard ( \begin_inset CommandInset ref LatexCommand ref reference "fig:Workspace-Menu" \end_inset ) consult the \begin_inset CommandInset href LatexCommand href name "Cabal User's Guide" target "http://www.haskell.org/ghc/docs/latest/html/Cabal/index.html" \end_inset . \end_layout \begin_layout Standard Cabal needs the --user flag (which is set by default in Leksah) to install the result of a built in the user package database (the alternative is --global to put the resulting files in global space in ghc-pkg). \end_layout \begin_layout Standard Haddock documentation for the leksah source will not be build, because it is not a library unless you pass the --executable flag. The flags are stored in a file called IDE.flags in the root folder of the project. \end_layout \begin_layout Subsection Import Helper \end_layout \begin_layout Standard A frequent and annoying error is the \noun on Not in scope \noun default compiler error. In the majority of cases it means that an import statement is missing and to write import statements is a frequent and annoying task. In Leksah if the compiler informs about a missing import, you can choose \emph on Add import \emph default from the context menu in the log pane. Leksah will then add an import statement to the import list. If there is more than one module that exports this identifier, a dialog will appear which queries you about the module you want to import it from. \end_layout \begin_layout Standard Leksah then adds a line or an entry to the import list of the affected module with the compiler error. Leksah imports individual elements, but imports all elements of a class or data structure if one of them is needed. The import helper can work with qualified identifiers and will add a correct import statement. You can as well select \emph on add all imports \emph default from the context menu, in which case all \emph on Not in scope \emph default errors \emph on \emph default will be treated sequentially. \end_layout \begin_layout Standard \begin_inset Box Framed position "t" hor_pos "c" has_inner_box 0 inner_pos "t" use_parbox 0 width "100col%" special "none" height "1in" height_special "totalheight" status open \begin_layout Plain Layout When Leksah does not find an identifier update the Leksah database. \end_layout \begin_layout Plain Layout \begin_inset Graphics filename ../pics/ide_rebuild_meta.png width 0.5cm \end_inset \noun on Update Metadata or (Ctrl-m) \end_layout \end_inset \end_layout \begin_layout Standard The import helper just looks in imported packages, so if you miss a package import, you have to fix it manually. \end_layout \begin_layout Standard Obviously some not in scope errors have other reasons, e.g. you have misspelled some identifier, which can't be resolved by adding imports. After adding all imports, you have to save the file and then start a new build. \end_layout \begin_layout Standard \begin_inset Newpage newpage \end_inset \end_layout \begin_layout Section Module Browser and Metadata \end_layout \begin_layout Standard \begin_inset Wrap table lines 0 placement o overhang 0in width "30col%" status open \begin_layout Plain Layout \begin_inset Tabular \begin_inset Text \begin_layout Plain Layout sort \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout symbol \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout function \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Graphics filename ../pics/ide_function.png width 0.5cm \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout data \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Graphics filename ../pics/ide_data.png \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset space ~ \end_inset \begin_inset space ~ \end_inset constructor \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Graphics filename ../pics/ide_konstructor.png \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset space ~ \end_inset \begin_inset space ~ \end_inset slot \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Graphics filename ../pics/ide_slot.png \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout type \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Graphics filename ../pics/ide_type.png \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout newtype \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Graphics filename ../pics/ide_newtype.png width 0.5cm \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout class \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Graphics filename ../pics/ide_class.png width 0.5cm \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset space ~ \end_inset \begin_inset space ~ \end_inset member \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Graphics filename ../pics/ide_method.png \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout instance \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Graphics filename ../pics/ide_instance.png width 0.5cm \end_inset \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout rule \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \begin_inset Graphics filename ../pics/ide_rule.png \end_inset \end_layout \end_inset \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout \begin_inset CommandInset label LatexCommand label name "tab:Sorts-of-identifiers" \end_inset Sorts of identifiers \end_layout \end_inset \end_layout \end_inset Leksah collects data about the modules of all installed Haskell packages on your system. It does this by reading the Haskell interface files .hi files (from GHC). It as well collects source positions and comments from sources. For this it looks in the source directories you specified in the preferences and downloads and unpacks sources from Hackage depending on your settings. Starting from the current version, Leksah can as well use prebuild metadata it might find on the web, to provide metadata for packages you have sources for, but the call to the Haddock library fails for some reason. \end_layout \begin_layout Standard The packages in the workspace are treated differently, as not only external exported entities are collected, but all exports from all modules are collected. As well identifiers, which are not exported from a module get listed. The source symbol for them is shown in gray. \end_layout \begin_layout Standard This metadata is used to answer questions like: \end_layout \begin_layout Itemize Which packages and modules export this identifier? \end_layout \begin_layout Itemize What is the type of the exported identifier? \end_layout \begin_layout Standard If the source was found, it lists as well : \end_layout \begin_layout Itemize The comment for this identifier \end_layout \begin_layout Itemize and can mark the item in the source file at the correct position \end_layout \begin_layout Standard If you like to get information about some identifier in the code, the easiest way is to press \noun on Ctrl \noun default and \noun on double click \noun default on it. \end_layout \begin_layout Standard More precisely the operation starts with a release of the left mouse button with a selection with \noun on Ctrl \noun default pressed; You can use this if the double click doesn't select the intended area. If the identifier is known unambiguously the modules and info pane will show information about it. If more than one possibility exist the search pane will open and present the alternatives. \end_layout \begin_layout Standard The sorts of the identifiers shown are differentiated by the symbols you find in Table \begin_inset CommandInset ref LatexCommand ref reference "tab:Sorts-of-identifiers" \end_inset . Note as well the special symbol for identifiers exposed, but only indirectly, because the definition is imported from another module. \begin_inset Graphics filename /home/jutaro/Develop/lws/leksah/pics/ide_reexported.png width 0.5cm \end_inset \end_layout \begin_layout Subsection The Module Browser \end_layout \begin_layout Standard \begin_inset Float figure wide false sideways false status open \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_module_browser.png width 80text% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout \begin_inset CommandInset label LatexCommand label name "fig:Modules-browser" \end_inset Module browser \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Standard The module browser ( \begin_inset CommandInset ref LatexCommand ref reference "fig:Modules-browser" \end_inset ) shows information about modules and their interface separated in scopes: package, workspace, and system. If no package or workspace is open only the system scope has information. (If a workspace/package is open, it's name(s) are displayed in the third subdivision from the left of the status and in the title bar.) \end_layout \begin_layout Standard The scope of the displayed information is selected with the radio button on top of the modules pane: The \emph on Package \emph default scope shows only modules which are part of the active project. The \emph on Workspace \emph default scope shows all modules of all packages in the workspace. The \emph on System \emph default scope shows all modules of installed packages of the system. \end_layout \begin_layout Standard (It lists all modules of installed packages. These you would get with \emph on ghc-pkg \emph default list. Leksah scans the user and the global package database, when both are present). \end_layout \begin_layout Standard The amount of information displayed may overwhelm you with details from packages that are not of interest to you (Like e.g. like Haskell-98, ghc, or base-3.0*). Such packages can be excluded, by blacklisting them. The packages you want to hide can be specified in the preferences and you can use the radio button at the right to hide them. \end_layout \begin_layout Standard If you select a module in the modules list, its interface is displayed in the interface list on the right. You can search for a module or package by selecting the modules list and typing some text. With the up and down arrows you find the next/previous matching item. With the escape key or by selecting any other GUI element you leave the search mode. \end_layout \begin_layout Standard \begin_inset Graphics filename ../pics/ide_source.png width 0.5cm \end_inset If this icon shows up, Leksah has found a \noun on source \noun default file or source position for this element. You can open the source file, or bring it to the front and display the source for the selected location with a \emph on double click \emph default on the element. (the same is achieved with selecting \emph on Go to definition \emph default from the context menu. \end_layout \begin_layout Standard \begin_inset Graphics filename /home/jutaro/Develop/lws/leksah/pics/ide_source_local.png width 0.5cm \end_inset This is the same as before, but is used for definitions not exported from the module. \end_layout \begin_layout Standard \begin_inset Graphics filename ../pics/ide_reexported.png width 0.5cm \end_inset This icon indicates that the symbol is \noun on reexported \noun default from another module., because its long list is not much hierarchically structure d. \end_layout \begin_layout Standard By selecting an element in the Interface List the so called Info Pane is shown with detailed information (see next subsection). \end_layout \begin_layout Standard The modules pane provides detailed information and are the quickest way to open a source file for edit. Go to the modules pane, select package or workspace scope, possibly find the module by entering some text, and double click on the module's name to open the file in the editor for editing the file. \end_layout \begin_layout Standard \begin_inset Float figure placement h wide false sideways false status open \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_construct_module.png scale 37 \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout \begin_inset CommandInset label LatexCommand label name "fig:Construct-module-dialog" \end_inset Construct module dialog \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Standard From the context menu of (right-click) the modules pane you can add a new module by selecting \emph on Add modul \emph default e. The Construct Module dialog will open ( \begin_inset CommandInset ref LatexCommand ref reference "fig:Construct-module-dialog" \end_inset ). You have to enter the name of the module, the source path to use if alternative s exist. If the project is a library you have to specify if the module is exposed. Leksah will construct the directory, modify the cabal file and construct an empty module file from a template (The template is stored in the file module.lksht in the data folder of the project, and will be read from the .leksah-** folder if you want to provide a different template file there. \end_layout \begin_layout Standard The modification of the cabal file will currently only happen, if it does not contain configurations. \end_layout \begin_layout Subsubsection* The Info Pane \end_layout \begin_layout Standard The Info Pane is the lower pane of the module browser and shows information about an interface element, which may be a function, a class, a data definition or a type (selected, for example, in the modules pane). It shows the identifier, the package and module that it is exported by, it's Haskell type and, if found, the Haddock documentation inserted in the source as a comment. \end_layout \begin_layout Standard If you select and initiate an identifier search in an editor pane, the informati on about this identifier is automatically displayed in the info pane (maybe nothing!). The easiest way to do this is to double click on an identifier while pressing \noun on Ctrl \noun default . \end_layout \begin_layout Standard Only previously collected metadata is available this way. If the item has changed you could initiate an update of the information collected with update workspace metadata (menu configuration → update workspace data, or Ctrl-m). \end_layout \begin_layout Standard If a source location is attached, you can go to the definition by clicking the \emph on Source \emph default button. \end_layout \begin_layout Standard You can select the module and the interface element in the modules pane by clicking the \emph on Modules \emph default button. \end_layout \begin_layout Standard With the \emph on Refs \emph default button a pane opens which displays modules which uses this element. \end_layout \begin_layout Standard With the \emph on Docu \emph default button you can initiate an external search in a browser with e.g. Hayoo or Hoogle, depending on the configuration in the Preferences. \end_layout \begin_layout Standard With the \emph on Search \emph default button you can initiate a metadata search for the identifier. \end_layout \begin_layout Subsection The Search Pane \end_layout \begin_layout Standard \begin_inset Float figure wide false sideways false status open \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_serach_pane.png width 80text% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout \begin_inset CommandInset label LatexCommand label name "fig:Search-pane" \end_inset Search pane \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Standard You can search for an identifier in the metadata by typing in characters in the entry at the bottom of the pane (not the search entry at the bottom of the window!). The search result depends on the settings in the search pane ( \begin_inset CommandInset ref LatexCommand ref reference "fig:Search-pane" \end_inset ). You can choose: \end_layout \begin_layout Enumerate The scope in which to search, which can be Package, Workspace or System. For Package and Workspace scopes you can search with or without imports, which gives 5 different scopes. \end_layout \begin_layout Enumerate The way the search is executed, which can be exact, prefix or as a regular expression. \end_layout \begin_layout Enumerate You can choose if the search shall be case sensitive or not. \end_layout \begin_layout Standard The result of the search is displayed in the list part of the Search pane. \end_layout \begin_layout Standard You can see if the module reexports the identifier, or if the source of the identifier is reachable. When you single click on a search result, the module browser shows the corresponding information. If you double click on an entry, the modules and info pane shows the correspond ing information. \end_layout \begin_layout Standard If you double click on an identifier while pressing Ctrl in an editor pane, a case sensitive and exact search in the is started. \end_layout \begin_layout Standard \begin_inset Newpage newpage \end_inset \end_layout \begin_layout Section Debugger and Interpreter mode \end_layout \begin_layout Standard \begin_inset Wrap figure lines 0 placement O overhang 0in width "30col%" status open \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_debug_menu.png lyxscale 50 width 25text% \end_inset \end_layout \begin_layout Plain Layout \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_buffer_menu.png lyxscale 50 width 25text% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout \begin_inset CommandInset label LatexCommand label name "fig:Debug-&-Buffer" \end_inset Debug & Buffer menu \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Standard You can switch Debugger mode on \emph on only \emph default from the toolbar with the: \end_layout \begin_layout Standard \begin_inset Graphics filename ../pics/ide_debug.png width 0.5cm \end_inset toggle, which switches debugger Mode on or off. \end_layout \begin_layout Standard In debugger mode the packages and modules for your current project are loaded into GHCi. \end_layout \begin_layout Standard In debugger mode, the menu entries from the Debug menu are no longer disabled (Fig \begin_inset CommandInset ref LatexCommand ref reference "fig:Debug-&-Buffer" \end_inset ), and the context menu of source buffers have entries that were not meaningful in the regular (GHC) mode. There is also a group of panes specifically used for debugging, allowing you to manage breakpoints, observe variables, etc. \end_layout \begin_layout Standard You can open the debugger group pane by choosing Panes / Debugger. Commands using the debugger are given mostly in the source editor pane with a context menu: You select some text and right-click to get the context menu. it lets you: \end_layout \begin_layout Itemize \noun on Evaluate \noun default the selected expression in the interpreter and observe the result. If no text is selected the current line is taken as input. Select eval. The result of the evaluation is shown in the log window and as \emph on it \emph default in the variables pane. You can as well use the keystroke Ctrl-Enter. \begin_inset Newline newline \end_inset Choose \begin_inset Quotes eld \end_inset Eval & Insert \begin_inset Quotes erd \end_inset , to insert a string representation of the result after the selected expression. \end_layout \begin_layout Itemize Determine the \noun on type \noun default of an expression: Select the expression in a source buffer and select Type from the context menu. \end_layout \begin_layout Itemize Get \noun on info \noun default about an identifier select: Select Info from the context menu. \end_layout \begin_layout Itemize Get \noun on the kind \noun default of a type select: Select Kind \end_layout \begin_layout Itemize \noun on Step \noun default through code: Select the expression in a source buffer. Select step from the context menu (or F7). Use the toolbar icons (or shortcuts) for stepping \end_layout \begin_layout Standard \begin_inset Graphics filename ../pics/ide_step.png width 0.5cm \end_inset Step (F6), \begin_inset Graphics filename ../pics/ide_local.png width 0.5cm \end_inset Step local (F7) \end_layout \begin_layout Standard \begin_inset Graphics filename ../pics/ide_module.png width 0.5cm \end_inset Step in module (F8), \begin_inset Graphics filename ../pics/ide_continue.png width 0.5cm \end_inset Continue (F9) \end_layout \begin_layout Itemize Set \noun on breakpoints \noun default by putting the cursor at the breakpoint and select \emph on set breakpoint \emph default from the context menu. Run your application or test cases and start stepping at the break point. After a break point is reached you use the operations of GHCi with convenient shortcuts. \end_layout \begin_layout Standard The debugger has a pane in which you can enter expressions and have them evaluated. The pane is a Haskell source buffer, which has the reserved name _Eval. Its contents is saved with the session. \end_layout \begin_layout Standard Note that: \end_layout \begin_layout Itemize breakpoints are set on identifiers selected, not necessarily where you have found it in the source (e.g., used in an expression); \end_layout \begin_layout Itemize current breakpoints are listed in the breakpoints pane; you can remove breakpoin ts from this pane \end_layout \begin_layout Itemize While stepping through code, you can observe \noun on variables \noun default in the variables pane. You can print or force a variable from the context menu of the variables pane. You can update the pane from the context menu. \end_layout \begin_layout Itemize You can observe an execution trace in the traces pane. Navigation in the traces pane is currently not supported (:back, :forward). \end_layout \begin_layout Itemize You can query information about the current state of GHCi from the Debugger menu. E.g. \emph on Show loaded modules \emph default , \emph on Show packages \emph default and \emph on Show languages \emph default . \end_layout \begin_layout Itemize You can directly communicate with GHCi by evaluating commands entered as text in the source editor and select it. E.g. \begin_inset Quotes eld \end_inset :set ... \begin_inset Quotes erd \end_inset \end_layout \begin_layout Standard For more information about debugging in GHCi read the GHCi section in the GHC manual. \end_layout \begin_layout Standard \begin_inset Float figure wide false sideways false status open \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_debug_pane.png width 70text% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout Debug Pane \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Section \begin_inset CommandInset label LatexCommand label name "sub:Metadata-collection" \end_inset Metadata collection \end_layout \begin_layout Standard Remember, that metadata is the data Leksah has collected from all the Haskell code (including .hi files for installed packages) it could reach on your computer. \end_layout \begin_layout Standard The initial scan may take a long time (some minutes); when Leksah starts later, it checks only for changes, but does not scan all files again. Metadata collection depends on the local configuration, especially the list of places where Haskell code may be found, which is entered in the preferences. Occasionally, you may find it useful to rebuild the metadata. \end_layout \begin_layout Standard Metadata collection can be manually triggered: If you select \emph on Configuration -> Update workspace data \emph default , the metadata for the current project is collected. This brings the metadata of the current project up-to-date. You can as well press Ctrl-m or hit this symbol in the toolbar: \begin_inset Graphics filename /home/jutaro/Develop/lws/leksah/pics/ide_rebuild_meta.png width 0.5cm \end_inset \end_layout \begin_layout Standard If you select \emph on Configuration -> Rebuild workspace data \emph default , the metadata for the current project is rebuild. \end_layout \begin_layout Standard If you select \emph on Configuration -> Update system data, \emph default Leksah checks, if a new library has been installed and then collects metadata for additions. \end_layout \begin_layout Standard If you select \emph on Configuration -> Rebuild system data, \emph default Leksah rebuilds all metadata, which may take a long time. Currently the preferred way to do this is to call leksah-server -rbo +RTS -N2 from the command line. The reason for this is that the server process may allocate a lot of memory during collection. \end_layout \begin_layout Subsection Background infos \end_layout \begin_layout Standard The metadata collection itself proceeds different for workspace and system packages: \end_layout \begin_layout Itemize For workspace packages Leksah just uses the parser without typechecking and maybe .hi files if available. \end_layout \begin_layout Itemize For system packages Leksah uses .hi files and if sources are available Haddock as a library. \end_layout \begin_layout Standard Collection for system packages works as follows: \end_layout \begin_layout Enumerate Packages you installed with cabal from Hackage. If Leksah can't find sources, it does a \emph on cabal unpack \emph default in the source directory you specified for this in the preferences (By default . \emph on leksah-**/packageSources \emph default ). \end_layout \begin_layout Enumerate Source files in the folders listed as source folder in the preferences. Leksah looks for all .cabal files it can find below the source folders. Therefore, Leksah collects source information only from \begin_inset Quotes eld \end_inset Cabalized \begin_inset Quotes erd \end_inset projects (i.e., projects that have a .cabal file). From this information the file source_packages.txt in the .leksah folder is written. If you miss sources for a package in Leksah, consult this file if the source place of the package has been correctly found. You can run this step by typing in a terminal: \emph on leksah-server -o \emph default (or \emph on -- \emph default sources). \end_layout \begin_layout Enumerate Problems may occur due to preprocessing, header files, language extensions, etc. Error message produced while metadata collection indicate that not all information for a package was found. If the Haddock call doesn't succeed, Leksah looks if it can download a prebuild metadata package from the server, if this option is selected in the preferences. \end_layout \begin_layout Enumerate The result of metadata collection is stored in the folder \emph on .leksah-*.*/metadata \emph default in files called \emph on *.lkshm. \emph default In this folder for every package a metadata file is stored (e.g. binary-0.4.1.lkshm). These files are in binary format. If you want to rebuild just one package you can delete it here and update the system metadata. The files .lkshe specify the base path to sources, if the collection for sources was successfully or if a metdata file could be downloaded for this. \end_layout \begin_layout Standard For the workspace packages a different procedure is used. \end_layout \begin_layout Enumerate Metadata is collected from the source directories of the packages you are working on. The results are stored in a per module base in a folder with the package name ( \emph on e.g .leksah-*.*/metadata/package-*.*.*). \end_layout \begin_layout Enumerate Update happens on a per file base only for changed source files. \end_layout \begin_layout Standard \begin_inset Float figure wide false sideways false status open \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_metadata_prefs.png width 60text% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout \begin_inset CommandInset label LatexCommand label name "fig:Metadata-Preferences" \end_inset Metadata Preferences \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset Newpage newpage \end_inset \end_layout \begin_layout Section Configuration \end_layout \begin_layout Standard Leksah is highly customizable and can be adapted to your specific needs and work organization. What follows here is not needed for initial use of Leksah (and need not be read on a first lecture of the manual). Leksah works well with the default settings and a desire to adapt better to your work habits comes only with extended use of Leksah. However, with time, you may use one or the other option to tailor Leksah to your personal preference. It is easy! Here it is explained how this works. \end_layout \begin_layout Subsection Layout \end_layout \begin_layout Standard \begin_inset Wrap figure lines 0 placement O overhang 0in width "30col%" status open \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_panes_menu.png width 15text% \end_inset \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_view_menu.png lyxscale 50 width 25text% \end_inset \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Plain Layout \align center \begin_inset Graphics filename screenshots2/screenshot_config_menu.png width 25text% \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout \begin_inset CommandInset label LatexCommand label name "fig:View-menu" \end_inset View and panes menus \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Standard Leksah has always one special pane, which is called the active pane, and its name is displayed in the second compartment from the left side in the status bar. Some actions like moving, splitting, closing panes or finding or replacing items in a text buffer act on the current pane, so check the display in the status bar to see if the pane you want to act on, is really the active one. \end_layout \begin_layout Standard You can tailor the layout with the View menu to suit your work style better. Internally, the panes are arranged in a layout of a binary tree, where the leaves are horizontal or vertical splits. Every area can be split horizontally or vertically and panes can collapse. With the commands in the View menu you manipulate this tree to change the layout. \end_layout \begin_layout Standard In the initial pane positions part of the Preferences, you can configure the placement of panes. Panes belongs to categories, and a category specify a path were a pane will open . \end_layout \begin_layout Standard The layout of the Leksah window contains areas which contain notebooks which contain panes. The division between the two areas is adjustable by the user by dragging a handle. \end_layout \begin_layout Standard Panes can be moved between areas in the window. This can be done by dragging the notebook tab, and release it on the frame of another notebook. Alternatively you can use keystrokes (Shift Alt Arrow) to move panes around. The tabs of notebooks can be positioned at any of the four directions, or the tabs can be switched off. \end_layout \begin_layout Standard Note that holding the mouse over the tabs and selecting the right button brings up a menu of all panes in this area, so that you can for example quickly select one of many open source buffers. \end_layout \begin_layout Standard The layout will be saved with sessions. The session mechanism will be explained in \begin_inset CommandInset ref LatexCommand ref reference "sub:Session-handling" \end_inset . \begin_inset Foot status open \begin_layout Plain Layout Currently there is no way to load different layouts independent of the other data stored in a sessions. \end_layout \end_inset \end_layout \begin_layout Subsubsection Advanced layout: Group panes \end_layout \begin_layout Standard A notebook cannot only contain single panes, but it can as well contain group panes, which have a layout on their own and may contain arbitrary other panes; the debug pane is an example for a group pane. This gives you the possibility to arrange the subpanes in a debugger pane as it fits you best. \end_layout \begin_layout Standard A new group starts by selecting \noun on View / Group \noun default from the menu. You have to give a unique name for the group. Then you can arrange panes in the group as you like. When closing a group, and the group is not empty, you have to confirm it. \end_layout \begin_layout Subsubsection Using Leksah with multiple displays: Detached windows \end_layout \begin_layout Standard This feature allows you to move panes to a separate window on a separate display. This is as simple as: You select a notebook and choose \noun on View / Detach \noun default from the menu bar. Then the notebook is opened in a new window, which you can then move to another screen. \end_layout \begin_layout Standard When you close the detached window, the pane goes back to the place where it was before detaching. The state of detached window is remembered, when you close Leksah, and they will be reopened when you restart Leksah. \end_layout \begin_layout Standard It is possible to drag and drop panes between windows. But splitting and collapsing of panes is disabled for detached windows. So a recommended way to use this feature is to split a pane, arrange the panes that you want to detach in the area of the new notebook. Select the new notebook and detach. \end_layout \begin_layout Standard The detached windows have no menu bar, toolbar and status bar on their own. This may be a problem, when you want to select a menu entry: the focus changes from a pane in the detached window to a pane in the main window, and you may not be able to do what you want. We recommend that you use keystrokes or context menus. \end_layout \begin_layout Subsection \begin_inset CommandInset label LatexCommand label name "sub:Session-handling" \end_inset Session handling \end_layout \begin_layout Standard When you close Leksah the current state is saved in the file \emph on current.lksks \emph default in the \emph on ~/.leksah-*.* \emph default folder. A session contains the layout of the window, its content, the active package and some other state. When you restart Leksah it recovers the state from this information. \end_layout \begin_layout Standard When you close a workspace, the session is saved in the folder of the workspace \emph on in \emph default a file named \emph on workspacename.lksks \emph default . When you open a workspace and Leksah finds a \emph on workspacename.lksks \emph default file together with the workspace file you are going to open, you get prompted if you want to open this session (this means mostly opening the files you had open before in the editor). This helps you to switch between different workspaces you are working on. \end_layout \begin_layout Standard In addition, sessions can be stored and loaded with a name manually by using the session menu, but the need to use these features occurs rarely. The menu Configuration -> Forget Session is useful if you inadvertently changed the layout drastically and do not want the current session to be stored. \end_layout \begin_layout Subsection \begin_inset CommandInset label LatexCommand label name "sub:Shortcuts" \end_inset Shortcuts \end_layout \begin_layout Standard You can configure the keystrokes by providing a keymap file, which should be be in the ~/.leksah-0.8 folder. The name of the key map file to be used can be specified in the Preferences dialog (without extension!). \end_layout \begin_layout Standard A line in the .keymap file looks like: \end_layout \begin_layout Standard o -> FileOpen "Opens an existing file" \end_layout \begin_layout Standard Description of the key or key combination: Allowed modifiers are . is on a Microsoft keyboard the windows key (and on a Mac, obviously, the apple key!). is right ALT key, often labeled Alt Gr. It is as well possible to specify Emacs like keystrokes in the following way: x/f -> FileOpen "Opens an existing file" \end_layout \begin_layout Standard The name of the action can be any one of the \emph on ActionDescr's \emph default given in the \emph on action \emph default function in the Module \emph on IDE. \emph default Command. The comment following will be displayed as tool tip for the toolbar button, if one exists for this action. \end_layout \begin_layout Standard Every keystroke must at most be associated with one action, and every action may only have one associated keystroke. \end_layout \begin_layout Standard Simple keystrokes are shown in the menu, but Emacs like keystrokes are not. This is because simple keystrokes are handled by the standard GTK mechanism, while other keystrokes are handled by Leksah. \end_layout \begin_layout Standard Independently how you initiated an action, by a menu, a toolbar button or a keystroke, the keystroke with its associated ActionsString is displayed in the Status bar in the leftmost compartment. \end_layout \begin_layout Subsection Configuration files \end_layout \begin_layout Standard Leksah stores its configuration in a directory called ~/.leksah-*.* under your home folder. Indexing the hidden Leksah directory with the version number avoids that changes to preferences file layout from version to version cause difficulties. Moving your preferences from a previous version can potentially be automatic. \end_layout \begin_layout Standard The file \emph on prefs.lkshp \emph default stores the general preferences. It is a text file you could edit with a text editor, but more comfortable and safer is to do it in Leksah with the menu \noun on Configuration / Edit Prefs \noun default from the menu. \end_layout \begin_layout Standard If no preference file is found in your .leksah-*.* folder then the global prefs.lkshp in the installed data folder will be used. If a preference file get corrupted, which means Leksah does not start; it is then often sufficient to just delete the preference file. \end_layout \begin_layout Standard The source_packages.txt file stores source locations for installed packages. It can be rebuild by calling leksah-server in a terminal with the -o or --sources argument . Do this after you moved your source or added sources for previous installed packages without sources. \end_layout \begin_layout Standard Files for Keymaps (keymap.lkshk) and SourceCandy(candy.lkshc) may be stored in the ~/.leksah-*.* folder and will be found according to the name selected in the Preferences Dialog. Leksah first searches in this folder and after this in the /data folder. \begin_inset Newpage pagebreak \end_inset \end_layout \begin_layout Section The Leksah Project \end_layout \begin_layout Standard The development of an integrated Development Environment is a major undertaking and Leksah should become increasingly supported by the user community. If you are a user or just test Leksah, we would appreciate to here from you. Do not miss to report bugs, unclear or wrong information in the documentation and suggestion for improvements on the Leksah issue tracker. \end_layout \begin_layout Standard Everyone is invited to contribute. Spreading the word, supplying error reports, providing keymap and candy files, providing a tutorial, caring for a platform will develop are all helpful and meaningful ways to contribute. \end_layout \begin_layout Standard Leksah will advance over time and become more useful. Possible extension and enhancements are: \end_layout \begin_layout Itemize Package editor with configurations \end_layout \begin_layout Itemize Add traces to the Debugger \end_layout \begin_layout Itemize Support for some kind of plug-ins or extensions \end_layout \begin_layout Itemize Context enriched completion \end_layout \begin_layout Itemize Version Control (Darcs, ...) \end_layout \begin_layout Itemize Testing (Quick check,...) \end_layout \begin_layout Itemize Object browser \end_layout \begin_layout Itemize Coverage (HPC,...) \end_layout \begin_layout Itemize Profiling (Ghc Profiler,...) \end_layout \begin_layout Itemize Re-factoring (HaRe,...) \end_layout \begin_layout Itemize FAD (Functional Analysis and Design,...) \end_layout \begin_layout Standard Acknowledgment \end_layout \begin_layout Standard Thanks to Ricardo Herrmann for making the new Leksah logo. \end_layout \begin_layout Standard Thanks to Fabian Emmes, who created the icons for the module browser. \end_layout \begin_layout Standard Thanks to Lakshmi Narasimhan for packaging for Fedora. \end_layout \begin_layout Standard Thanks to all others who helped us with patches, bug reports and helpful feedback. \end_layout \begin_layout Standard \begin_inset Newpage newpage \end_inset \end_layout \begin_layout Section Appendix \end_layout \begin_layout Subsection Command line arguments \end_layout \begin_layout Standard for leksah-server: \end_layout \begin_layout LyX-Code \size scriptsize Leksah Haskell IDE (server) Usage: leksah-server [OPTION...] files... \end_layout \begin_layout LyX-Code \size scriptsize -s --system Collects new information for installed packages \end_layout \begin_layout LyX-Code \size scriptsize -r[Maybe Port] --server[=Maybe Port] Start as server. \end_layout \begin_layout LyX-Code \size scriptsize -b --rebuild Modifier for -s and -p: Rebuild metadata \end_layout \begin_layout LyX-Code \size scriptsize -o --sources Modifier for -s: Gather info about pathes to sources \end_layout \begin_layout LyX-Code \size scriptsize -v --version Show the version number of ide \end_layout \begin_layout LyX-Code \size scriptsize -h --help Display command line options \end_layout \begin_layout LyX-Code \size scriptsize -d --debug Write ascii pack files \end_layout \begin_layout LyX-Code \size scriptsize -e Verbosity --verbosity=Verbosity One of DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY \end_layout \begin_layout LyX-Code \size scriptsize -l LogFile --logfile=LogFile File path for logging messages \end_layout \begin_layout LyX-Code \size scriptsize -f --forever Don't end the server when last connection ends \end_layout \begin_layout LyX-Code \size scriptsize -c --endWithLast End the server when last connection ends \size default \end_layout \begin_layout Standard for leksah: \end_layout \begin_layout LyX-Code \size scriptsize Usage: leksah [OPTION...] files... \end_layout \begin_layout LyX-Code \size scriptsize -v --Version Show the version number of ide \end_layout \begin_layout LyX-Code \size scriptsize -l NAME --LoadSession=NAME Load session \end_layout \begin_layout LyX-Code \size scriptsize -h --Help Display command line options \end_layout \begin_layout LyX-Code \size scriptsize -e Verbosity --verbosity=Verbosity One of DEBUG, INFO, NOTICE, WARNING, \end_layout \begin_layout LyX-Code \size scriptsize ERROR, CRITICAL, ALERT, EMERGENCY \end_layout \begin_layout Subsection The Candy file \end_layout \begin_layout LyX-Code \size scriptsize "->" 0x2192 Trimming --RIGHTWARDS ARROW \end_layout \begin_layout LyX-Code \size scriptsize "<-" 0x2190 Trimming --LEFTWARDS ARROW \end_layout \begin_layout LyX-Code \size scriptsize "=>" 0x21d2 --RIGHTWARDS DOUBLE ARROW \end_layout \begin_layout LyX-Code \size scriptsize ">=" 0x2265 --GREATER-THAN OR EQUAL TO \end_layout \begin_layout LyX-Code \size scriptsize "<=" 0x2264 --LESS-THAN OR EQUAL TO \end_layout \begin_layout LyX-Code \size scriptsize "/=" 0x2260 --NOT EQUAL TO \end_layout \begin_layout LyX-Code \size scriptsize "&&" 0x2227 --LOGICAL AND \end_layout \begin_layout LyX-Code \size scriptsize "||" 0x2228 --LOGICAL OR \end_layout \begin_layout LyX-Code \size scriptsize "++" 0x2295 --CIRCLED PLUS \end_layout \begin_layout LyX-Code \size scriptsize -- "::" 0x2237 Trimming --PROPORTION \end_layout \begin_layout LyX-Code \size scriptsize -- ".." 0x2025 --TWO DOT LEADER \end_layout \begin_layout LyX-Code \size scriptsize "^" 0x2191 --UPWARDS ARROW \end_layout \begin_layout LyX-Code \size scriptsize "==" 0x2261 --IDENTICAL TO \end_layout \begin_layout LyX-Code \size scriptsize " . " 0x2218 --RING OPERATOR \end_layout \begin_layout LyX-Code \size scriptsize " \backslash " 0x03bb --GREEK SMALL LETTER LAMBDA \end_layout \begin_layout LyX-Code \size scriptsize "=<<" 0x291e -- \end_layout \begin_layout LyX-Code \size scriptsize ">>=" 0x21a0 -- \end_layout \begin_layout LyX-Code \size scriptsize -- "$" 0x25ca -- \end_layout \begin_layout LyX-Code \size scriptsize ">>" 0x226b -- MUCH GREATER THEN \end_layout \begin_layout LyX-Code \size scriptsize "forall" 0x2200 --FOR ALL \end_layout \begin_layout LyX-Code \size scriptsize -- "exist" 0x2203 --THERE EXISTS \end_layout \begin_layout LyX-Code \size scriptsize "not" 0x00ac --NOT SIGN \end_layout \begin_layout LyX-Code \size scriptsize "alpha" 0x03b1 --ALPHA \end_layout \begin_layout LyX-Code \size scriptsize "beta" 0x03b2 --BETA \end_layout \begin_layout LyX-Code \size scriptsize "gamma" 0x03b3 --GAMMA \end_layout \begin_layout LyX-Code \size scriptsize "delta" 0x03b4 --DELTA \end_layout \begin_layout LyX-Code \size scriptsize "epsilon" 0x03b5 --EPSILON \end_layout \begin_layout LyX-Code \size scriptsize "zeta" 0x03b6 --ZETA \end_layout \begin_layout LyX-Code \size scriptsize "eta" 0x03b7 --ETA \end_layout \begin_layout LyX-Code \size scriptsize "theta" 0x03b8 --THETA \end_layout \begin_layout Subsection The Keymap file \end_layout \begin_layout LyX-Code \size tiny --Default Keymap file for Leksah \end_layout \begin_layout LyX-Code \size tiny --Allowed Modifiers are \end_layout \begin_layout LyX-Code \size tiny -- is the Windows key on PC keyboards \end_layout \begin_layout LyX-Code \size tiny -- is often labelled Alt Gr. \end_layout \begin_layout LyX-Code \size tiny --The defined values for the keys can can be found at \end_layout \begin_layout LyX-Code \size tiny -- http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymde f.h. \end_layout \begin_layout LyX-Code \size tiny -- The names of the keys are the names of the macros without the prefix. \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny --File \end_layout \begin_layout LyX-Code \size tiny n -> FileNew "Opens a new empty buffer" \end_layout \begin_layout LyX-Code \size tiny o -> FileOpen "Opens an existing file" \end_layout \begin_layout LyX-Code \size tiny --x/f -> FileOpen "Opens an existing file" \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny s -> FileSave "Saves the current buffer" \end_layout \begin_layout LyX-Code \size tiny s -> FileSaveAll "Saves all modified buffers" \end_layout \begin_layout LyX-Code \size tiny w -> FileClose "Closes the current buffer" \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny F4 -> Quit "Quits this program" \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny --Edit \end_layout \begin_layout LyX-Code \size tiny z -> EditUndo "Undos the last user action" \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny y -> EditRedo "Redos the last user action" \end_layout \begin_layout LyX-Code \size tiny --x/r -> EditRedo "Redos the last user action" \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny a -> EditSelectAll "Select the whole text in the current buffer" \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny f -> EditFind "Search for a text string (Toggles the " \end_layout \begin_layout LyX-Code \size tiny F3 -> EditFindNext "Find the next occurence of the text string" \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny F3 -> EditFindPrevious "Find the previous occurence of the text string" \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny l -> EditGotoLine "Go to line with a known index" \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny Right -> EditComment "Add a line style comment to the selected lies" \end_layout \begin_layout LyX-Code \size tiny Left -> EditUncomment "Remove a line style comment" \end_layout \begin_layout LyX-Code \size tiny Right -> EditShiftRight "Shift right" \end_layout \begin_layout LyX-Code \size tiny Left -> EditShiftLeft "Shift Left" \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny --View \end_layout \begin_layout LyX-Code \size tiny Left -> ViewMoveLeft "Move the current pane left" \end_layout \begin_layout LyX-Code \size tiny Right -> ViewMoveRight "Move the current pane right" \end_layout \begin_layout LyX-Code \size tiny Up -> ViewMoveUp "Move the current pane up" \end_layout \begin_layout LyX-Code \size tiny Down -> ViewMoveDown "Move the current pane down" \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny 2 -> ViewSplitHorizontal \end_layout \begin_layout LyX-Code \size tiny "Split the current pane in horizontal direction" \end_layout \begin_layout LyX-Code \size tiny 3 -> ViewSplitVertical \end_layout \begin_layout LyX-Code \size tiny "Split the current pane in vertical direction" \end_layout \begin_layout LyX-Code \size tiny 1 -> ViewCollapse "Collapse the panes around the currentla selected pane into one" \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny -> ViewTabsLeft "Shows the tabs of the current notebook on the left" \end_layout \begin_layout LyX-Code \size tiny -> ViewTabsRight "Shows the tabs of the current notebook on the right" \end_layout \begin_layout LyX-Code \size tiny -> ViewTabsUp "Shows the tabs of the current notebook on the top" \end_layout \begin_layout LyX-Code \size tiny -> ViewTabsDown "Shows the tabs of the current notebook on the bottom" \end_layout \begin_layout LyX-Code \size tiny -> ViewSwitchTabs "Switches if tabs for the current notebook are visible" \end_layout \begin_layout LyX-Code \size tiny t -> ToggleToolbar \end_layout \begin_layout LyX-Code \size tiny -> HelpDebug \end_layout \begin_layout LyX-Code \size tiny -> HelpAbout \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny b -> BuildPackage \end_layout \begin_layout LyX-Code \size tiny r -> AddAllImports \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny r -> RunPackage \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny j -> NextError \end_layout \begin_layout LyX-Code \size tiny j -> PreviousError \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny o -> ShowModules \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny --i -> ShowInterface \end_layout \begin_layout LyX-Code \size tiny -- i -> ShowInfo \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny e -> EditAlignEqual \end_layout \begin_layout LyX-Code \size tiny l -> EditAlignLeftArrow \end_layout \begin_layout LyX-Code \size tiny r -> EditAlignRightArrow \end_layout \begin_layout LyX-Code \size tiny t -> EditAlignTypeSig \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny i -> AddOneImport \end_layout \begin_layout LyX-Code \size tiny i -> AddAllImports \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny -- "For the next to entries the modifier is mandatory" \end_layout \begin_layout LyX-Code \size tiny Page_Up -> FlipUp "Switch to next pane in reverse recently used oder" \end_layout \begin_layout LyX-Code \size tiny Page_Down -> FlipDown "Switch to next pane in recently used oder" \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny space -> StartComplete "Initiate complete in a source buffer" \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny F6 -> DebugStep \end_layout \begin_layout LyX-Code \size tiny F7 -> DebugStepLocal \end_layout \begin_layout LyX-Code \size tiny F8 -> DebugStepModule \end_layout \begin_layout LyX-Code \size tiny F9 -> DebugContinue \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \size tiny Return -> ExecuteSelection \end_layout \begin_layout LyX-Code \size tiny m -> UpdateMetadataCurrent \end_layout \begin_layout LyX-Code \end_layout \begin_layout LyX-Code \end_layout \end_body \end_document