Personal tools

Leksah

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(I installed leksah! looks great! instructions for Vista, leksah 0.4.3 installation, removed obsolete info)
m (oops now I know why the script had to look so horrible)
Line 56: Line 56:
 
Select packages wget, curl and gcc-core in adition to the standard selection. I used the 1.7.0 version of Cygwin setup, but it is still beta.
 
Select packages wget, curl and gcc-core in adition to the standard selection. I used the 1.7.0 version of Cygwin setup, but it is still beta.
   
4. Download darcs from http://wiki.darcs.net/DarcsWiki/Binaries, unpack it in under Program Files and add the path to your environment variables. The file I downloaded was darcsdir-cygwin-2.2.0.tar.bz2.
+
4*. Download darcs from http://wiki.darcs.net/DarcsWiki/Binaries, unpack it in under Program Files and add the path to your environment variables. The file I downloaded was darcsdir-cygwin-2.2.0.tar.bz2.
   
 
5. Download the GHC sources from http://www.haskell.org/ghc. Open a Cygwin shell, make a directory Haskell, copy the source tarballs here and unpack them.
 
5. Download the GHC sources from http://www.haskell.org/ghc. Open a Cygwin shell, make a directory Haskell, copy the source tarballs here and unpack them.
   
6. Download the binary and utf-8 packages from [http://hackage.haskell.org/packages/archive/pkg-list.html Hackage] and copy them to the Haskell folder. Open a Cygwin shell in Administrator mode and unpack the tar files. Go to the directories and do <tt>runhaskell Setup configure</tt>, <tt>runhaskell Setup build</tt>, <tt>runhaskell Setup install</tt>.
+
6*. Download the binary and utf-8 packages from [http://hackage.haskell.org/packages/archive/pkg-list.html Hackage] and copy them to the Haskell folder. Open a Cygwin shell in Administrator mode and unpack the tar files. Go to the directories and do <tt>runhaskell Setup configure</tt>, <tt>runhaskell Setup build</tt>, <tt>runhaskell Setup install</tt>.
   
7. In the Haskell directory do a <tt>darcs get http://code.haskell.org/leksah</tt>. Go to the leksah directory and do a <tt>runhaskell Setup configure</tt>, <tt>runhaskell Setup build</tt>, <tt>runhaskell Setup install</tt>.
+
7*. In the Haskell directory do a <tt>darcs get http://code.haskell.org/leksah</tt>. Go to the leksah directory and do a <tt>runhaskell Setup configure</tt>, <tt>runhaskell Setup build</tt>, <tt>runhaskell Setup install</tt>.
   
7a) Although I probably didn't get this, previously some gtk error message was resolved by editting C:/Program Files/Gtk2Hs/0.10.0/etc/gtk-2.0/gtkrc and change the theme name from MS-Windows to Raleigh: gtk-theme-name = "Raleigh"
+
7a) Although I probably didn't get this, previously some gtk error message was resolved by editting C:/Program Files/Gtk2Hs/0.10.0/etc/gtk-2.0/gtkrc and change the theme name from MS-Windows to Raleigh: <tt>gtk-theme-name = "Raleigh"</tt>
   
 
8. You may wish to install a full Unicode monospace font if you want to use the source candy feature of leksah. e.g. [http://www.evertype.com/emono/ Everson Mono] or [http://dejavu-fonts.org/wiki/index.php?title=Download Deja Vu Sans Mono].
 
8. You may wish to install a full Unicode monospace font if you want to use the source candy feature of leksah. e.g. [http://www.evertype.com/emono/ Everson Mono] or [http://dejavu-fonts.org/wiki/index.php?title=Download Deja Vu Sans Mono].
Line 71: Line 71:
 
 
 
10. Have fun with leksah, but remember it is a beta version!
 
10. Have fun with leksah, but remember it is a beta version!
  +
  +
NB* I actually experienced a bit of a problem here, darcs was taking too much time. While in Cygwin, I cabal-installed it! Voila! So the starred portions are actually unnecessary, I think.
   
 
=== Installation script for Ubuntu beginners ===
 
=== Installation script for Ubuntu beginners ===
Line 79: Line 81:
   
 
<tt>
 
<tt>
  +
-----------------------------------------------------------------------------------------------------------
  +
+++++++++++++++++++++++++++++++++++++++++++++++++
  +
-----------------------------------------------------------------------------------------------------------
  +
  +
 
echo "-----------INIT CONTEXT: START-------------------------------"
 
echo "-----------INIT CONTEXT: START-------------------------------"
  +
   
 
sudo apt-get install ghc6
 
sudo apt-get install ghc6
  +
 
sudo apt-get install libghc6-hgl-dev
 
sudo apt-get install libghc6-hgl-dev
  +
 
sudo apt-get install libghc6-network-dev
 
sudo apt-get install libghc6-network-dev
  +
 
sudo apt-get install zlib1g-dev libssl-dev
 
sudo apt-get install zlib1g-dev libssl-dev
  +
 
sudo apt-get install libghc6-gtk-dev
 
sudo apt-get install libghc6-gtk-dev
  +
 
sudo apt-get install libghc6-sourceview-dev
 
sudo apt-get install libghc6-sourceview-dev
  +
   
 
echo "-----------INIT CONTEXT: DONE--------------------------------"
 
echo "-----------INIT CONTEXT: DONE--------------------------------"
   
 
echo "-----------TEMP LOCATION CREATION: START---------------------"
 
echo "-----------TEMP LOCATION CREATION: START---------------------"
  +
   
 
cd ${HOME}
 
cd ${HOME}
  +
 
mkdir unique_tmp
 
mkdir unique_tmp
  +
 
cd unique_tmp
 
cd unique_tmp
  +
   
 
echo "-----------TEMP LOCATION CREATION: DONE----------------------"
 
echo "-----------TEMP LOCATION CREATION: DONE----------------------"
   
 
echo "-----------INSTALLING PACKAGES NEEDED FOR LEKSAH: START------"
 
echo "-----------INSTALLING PACKAGES NEEDED FOR LEKSAH: START------"
  +
   
 
sudo wget http://hackage.haskell.org/packages/archive/Cabal/1.6.0.1/Cabal-1.6.0.1.tar.gz
 
sudo wget http://hackage.haskell.org/packages/archive/Cabal/1.6.0.1/Cabal-1.6.0.1.tar.gz
  +
 
sudo tar -zxf Cabal-1.6.0.1.tar.gz
 
sudo tar -zxf Cabal-1.6.0.1.tar.gz
  +
 
cd Cabal-1.6.0.1
 
cd Cabal-1.6.0.1
  +
   
 
sudo ghc --make Setup
 
sudo ghc --make Setup
  +
 
sudo ./Setup configure
 
sudo ./Setup configure
  +
 
sudo ./Setup build
 
sudo ./Setup build
  +
 
sudo ./Setup install
 
sudo ./Setup install
  +
   
 
sudo wget http://hackage.haskell.org/packages/archive/HTTP/3001.1.3/HTTP-3001.1.3.tar.gz
 
sudo wget http://hackage.haskell.org/packages/archive/HTTP/3001.1.3/HTTP-3001.1.3.tar.gz
  +
 
sudo tar -zxf HTTP-3001.1.3.tar.gz
 
sudo tar -zxf HTTP-3001.1.3.tar.gz
   
 
cd HTTP-3001.1.3
 
cd HTTP-3001.1.3
  +
 
sudo runghc Setup configure --user
 
sudo runghc Setup configure --user
  +
 
sudo runghc Setup build
 
sudo runghc Setup build
  +
 
sudo runghc Setup install
 
sudo runghc Setup install
   
 
cd ..
 
cd ..
  +
  +
 
sudo wget http://hackage.haskell.org/packages/archive/zlib/0.5.0.0/zlib-0.5.0.0.tar.gz
 
sudo wget http://hackage.haskell.org/packages/archive/zlib/0.5.0.0/zlib-0.5.0.0.tar.gz
  +
 
sudo tar -zxf zlib-0.5.0.0.tar.gz
 
sudo tar -zxf zlib-0.5.0.0.tar.gz
  +
 
cd zlib-0.5.0.0
 
cd zlib-0.5.0.0
  +
 
sudo runghc Setup configure --user
 
sudo runghc Setup configure --user
  +
 
sudo runghc Setup build
 
sudo runghc Setup build
  +
 
sudo runghc Setup install
 
sudo runghc Setup install
   
 
cd ..
 
cd ..
  +
  +
 
sudo wget http://hackage.haskell.org/packages/archive/cabal-install/0.6.0/cabal-install-0.6.0.tar.gz
 
sudo wget http://hackage.haskell.org/packages/archive/cabal-install/0.6.0/cabal-install-0.6.0.tar.gz
  +
 
sudo tar -zxf cabal-install-0.6.0.tar.gz
 
sudo tar -zxf cabal-install-0.6.0.tar.gz
   
 
cd cabal-install-0.6.0
 
cd cabal-install-0.6.0
  +
 
sudo runghc Setup configure --user
 
sudo runghc Setup configure --user
  +
 
sudo runghc Setup build
 
sudo runghc Setup build
  +
 
sudo runghc Setup install
 
sudo runghc Setup install
   
 
cd ..
 
cd ..
  +
 
sudo echo 'PATH=${PATH}:${HOME}/.cabal/bin' >> ${HOME}/.bashrc
 
sudo echo 'PATH=${PATH}:${HOME}/.cabal/bin' >> ${HOME}/.bashrc
  +
 
sudo echo 'export PATH' >> ${HOME}/.bashrc
 
sudo echo 'export PATH' >> ${HOME}/.bashrc
  +
   
 
sudo wget http://hackage.haskell.org/packages/archive/binary/0.4.4/binary-0.4.4.tar.gz
 
sudo wget http://hackage.haskell.org/packages/archive/binary/0.4.4/binary-0.4.4.tar.gz
  +
 
sudo tar -zxf binary-0.4.4.tar.gz
 
sudo tar -zxf binary-0.4.4.tar.gz
   
 
cd binary-0.4.4
 
cd binary-0.4.4
  +
 
sudo runghc Setup configure --user
 
sudo runghc Setup configure --user
  +
 
sudo runghc Setup build
 
sudo runghc Setup build
  +
 
sudo runghc Setup install
 
sudo runghc Setup install
   
 
cd ..
 
cd ..
  +
  +
 
sudo wget http://hackage.haskell.org/packages/archive/leksah/0.1.1/leksah-0.1.1.tar.gz
 
sudo wget http://hackage.haskell.org/packages/archive/leksah/0.1.1/leksah-0.1.1.tar.gz
  +
 
sudo tar -zxf leksah-0.1.1.tar.gz
 
sudo tar -zxf leksah-0.1.1.tar.gz
   
 
cd leksah-0.1.1
 
cd leksah-0.1.1
  +
 
sudo runghc Setup configure --user
 
sudo runghc Setup configure --user
  +
 
sudo runghc Setup build
 
sudo runghc Setup build
  +
 
sudo runghc Setup install
 
sudo runghc Setup install
   
 
cd ..
 
cd ..
  +
  +
 
sudo wget http://hackage.haskell.org/packages/archive/utf8-string/0.3.3/utf8-string-0.3.3.tar.gz
 
sudo wget http://hackage.haskell.org/packages/archive/utf8-string/0.3.3/utf8-string-0.3.3.tar.gz
  +
 
sudo tar -zxf utf8-string-0.3.3.tar.gz
 
sudo tar -zxf utf8-string-0.3.3.tar.gz
  +
 
cd utf8-string-0.3.3
 
cd utf8-string-0.3.3
  +
 
sudo runghc Setup configure --user
 
sudo runghc Setup configure --user
  +
 
sudo runghc Setup build
 
sudo runghc Setup build
  +
 
sudo runghc Setup install
 
sudo runghc Setup install
  +
 
cd ..
 
cd ..
  +
   
 
echo "-----------INSTALLING PACKAGES NEEDED FOR LEKSAH: DONE------"
 
echo "-----------INSTALLING PACKAGES NEEDED FOR LEKSAH: DONE------"
   
 
echo "-----------GETTING DARCS: START-----------------------------"
 
echo "-----------GETTING DARCS: START-----------------------------"
  +
   
 
sudo apt-get install darcs
 
sudo apt-get install darcs
  +
   
 
echo "-----------GETTING DARCS: DONE------------------------------"
 
echo "-----------GETTING DARCS: DONE------------------------------"
   
 
echo "-----------GETTING LAST VER. OF LEKSAH: START---------------"
 
echo "-----------GETTING LAST VER. OF LEKSAH: START---------------"
  +
   
 
sudo darcs get http://code.haskell.org/leksah/
 
sudo darcs get http://code.haskell.org/leksah/
   
 
cd leksah
 
cd leksah
  +
  +
 
find ./src/IDE/Metainfo/SourceCollector.hs | sudo xargs perl -pi -e 's/HsModule _ _ _ decls _ _ _/HsModule _ _ _ decls _ _ _ _/g'
 
find ./src/IDE/Metainfo/SourceCollector.hs | sudo xargs perl -pi -e 's/HsModule _ _ _ decls _ _ _/HsModule _ _ _ decls _ _ _ _/g'
  +
   
 
echo "The previous command (find...) is designed for leksah.v0.3 (27.11.2008) to workaround an inconsistency. Perhaps you should put one '_' symbol as a first argument, not as a last. Didn't manage to figure it out yet."
 
echo "The previous command (find...) is designed for leksah.v0.3 (27.11.2008) to workaround an inconsistency. Perhaps you should put one '_' symbol as a first argument, not as a last. Didn't manage to figure it out yet."
  +
   
 
echo "-----------GETTING LAST VER. OF LEKSAH: DONE----------------"
 
echo "-----------GETTING LAST VER. OF LEKSAH: DONE----------------"
   
 
echo "-----------INSTALLING LEKSAH: START-------------------------"
 
echo "-----------INSTALLING LEKSAH: START-------------------------"
  +
   
 
sudo runghc Setup configure --user
 
sudo runghc Setup configure --user
  +
 
sudo runghc Setup build
 
sudo runghc Setup build
  +
 
sudo runghc Setup install
 
sudo runghc Setup install
  +
   
 
echo "-----------INSTALLING LEKSAH: DONE--------------------------"
 
echo "-----------INSTALLING LEKSAH: DONE--------------------------"
  +
   
 
cd ${HOME}
 
cd ${HOME}
  +
   
 
sudo rm -I -r unique_tmp
 
sudo rm -I -r unique_tmp
  +
  +
  +
-----------------------------------------------------------------------------------------------------------
  +
+++++++++++++++++++++++++++++++++++++++++++++++++
  +
-----------------------------------------------------------------------------------------------------------
 
</tt>
 
</tt>
   

Revision as of 15:21, 31 March 2009

Leksah.png
Leksah

Leksah: an IDE for Haskell written in Haskell

This is the Leksah users' wiki. Leksah is in active development. We plan to release a first beta soon. For general information:

  • Contact us for further info (info at leksah.org)

Contents

1 Installation

  • First look to the general information in the Manual
  • When you get the following error:

src/IDE/Completion.hs:87:26:

   Not in scope: `sourceLanguageManagerGuessLanguage'

you have to install gtksourceview2 in a version > 2.4.0

  • When you get the following error:

Linking dist/build/leksah/leksah ... /usr/bin/ld: cannot find -ledit collect2: ld returned 1 exit status

you have to install libedit development files.

  • The package type-level considered toxic!

This package defines > 20000 newtypes for numbers and wastes a lot of space for metadata. So consider to unregister it, if you don't really need it.


2 Release notes

Moved to the Leksah webside

3 Installation on Windows from scratch

In the future when Leksah reaches production quality I hope we can provide a Windows installer.

This is what you can do to get leksah 0.4.3 running on Vista

0. cabal-install was not working for me. Probably because currently there is no gtk2hs >= 0.10.0 on Hackage right now.

1. Install your GHC from http://www.haskell.org/ghc. Duh. Mine was GHC 6.10.1.

2. Install gtk2hs from http://www.haskell.org/gtk2hs/ or Sourceforge.net. It was 0.10.0 when I checked.

3. Install Cygwin with the online installer from http://www.cygwin.com/ Select packages wget, curl and gcc-core in adition to the standard selection. I used the 1.7.0 version of Cygwin setup, but it is still beta.

4*. Download darcs from http://wiki.darcs.net/DarcsWiki/Binaries, unpack it in under Program Files and add the path to your environment variables. The file I downloaded was darcsdir-cygwin-2.2.0.tar.bz2.

5. Download the GHC sources from http://www.haskell.org/ghc. Open a Cygwin shell, make a directory Haskell, copy the source tarballs here and unpack them.

6*. Download the binary and utf-8 packages from Hackage and copy them to the Haskell folder. Open a Cygwin shell in Administrator mode and unpack the tar files. Go to the directories and do runhaskell Setup configure, runhaskell Setup build, runhaskell Setup install.

7*. In the Haskell directory do a darcs get http://code.haskell.org/leksah. Go to the leksah directory and do a runhaskell Setup configure, runhaskell Setup build, runhaskell Setup install.

7a) Although I probably didn't get this, previously some gtk error message was resolved by editting C:/Program Files/Gtk2Hs/0.10.0/etc/gtk-2.0/gtkrc and change the theme name from MS-Windows to Raleigh: gtk-theme-name = "Raleigh"

8. You may wish to install a full Unicode monospace font if you want to use the source candy feature of leksah. e.g. Everson Mono or Deja Vu Sans Mono.

9. Start leksah and give your Haskell directory as source root. Select the right font from Help/Prefs.

10. Have fun with leksah, but remember it is a beta version!

NB* I actually experienced a bit of a problem here, darcs was taking too much time. While in Cygwin, I cabal-installed it! Voila! So the starred portions are actually unnecessary, I think.

4 Installation script for Ubuntu beginners

This was written for a version of leksah < 0.4 and is outdated

Script (27.11.2008, leksah version: 0.3, dev):


+++++++++++++++++++++++++++++++++++++++++++++++++



echo "-----------INIT CONTEXT: START-------------------------------"


sudo apt-get install ghc6

sudo apt-get install libghc6-hgl-dev

sudo apt-get install libghc6-network-dev

sudo apt-get install zlib1g-dev libssl-dev

sudo apt-get install libghc6-gtk-dev

sudo apt-get install libghc6-sourceview-dev


echo "-----------INIT CONTEXT: DONE--------------------------------"

echo "-----------TEMP LOCATION CREATION: START---------------------"


cd ${HOME}

mkdir unique_tmp

cd unique_tmp


echo "-----------TEMP LOCATION CREATION: DONE----------------------"

echo "-----------INSTALLING PACKAGES NEEDED FOR LEKSAH: START------"


sudo wget http://hackage.haskell.org/packages/archive/Cabal/1.6.0.1/Cabal-1.6.0.1.tar.gz

sudo tar -zxf Cabal-1.6.0.1.tar.gz

cd Cabal-1.6.0.1


sudo ghc --make Setup

sudo ./Setup configure

sudo ./Setup build

sudo ./Setup install


sudo wget http://hackage.haskell.org/packages/archive/HTTP/3001.1.3/HTTP-3001.1.3.tar.gz

sudo tar -zxf HTTP-3001.1.3.tar.gz

cd HTTP-3001.1.3

sudo runghc Setup configure --user

sudo runghc Setup build

sudo runghc Setup install

cd ..


sudo wget http://hackage.haskell.org/packages/archive/zlib/0.5.0.0/zlib-0.5.0.0.tar.gz

sudo tar -zxf zlib-0.5.0.0.tar.gz

cd zlib-0.5.0.0

sudo runghc Setup configure --user

sudo runghc Setup build

sudo runghc Setup install

cd ..


sudo wget http://hackage.haskell.org/packages/archive/cabal-install/0.6.0/cabal-install-0.6.0.tar.gz

sudo tar -zxf cabal-install-0.6.0.tar.gz

cd cabal-install-0.6.0

sudo runghc Setup configure --user

sudo runghc Setup build

sudo runghc Setup install

cd ..

sudo echo 'PATH=${PATH}:${HOME}/.cabal/bin' >> ${HOME}/.bashrc

sudo echo 'export PATH' >> ${HOME}/.bashrc


sudo wget http://hackage.haskell.org/packages/archive/binary/0.4.4/binary-0.4.4.tar.gz

sudo tar -zxf binary-0.4.4.tar.gz

cd binary-0.4.4

sudo runghc Setup configure --user

sudo runghc Setup build

sudo runghc Setup install

cd ..


sudo wget http://hackage.haskell.org/packages/archive/leksah/0.1.1/leksah-0.1.1.tar.gz

sudo tar -zxf leksah-0.1.1.tar.gz

cd leksah-0.1.1

sudo runghc Setup configure --user

sudo runghc Setup build

sudo runghc Setup install

cd ..


sudo wget http://hackage.haskell.org/packages/archive/utf8-string/0.3.3/utf8-string-0.3.3.tar.gz

sudo tar -zxf utf8-string-0.3.3.tar.gz

cd utf8-string-0.3.3

sudo runghc Setup configure --user

sudo runghc Setup build

sudo runghc Setup install

cd ..


echo "-----------INSTALLING PACKAGES NEEDED FOR LEKSAH: DONE------"

echo "-----------GETTING DARCS: START-----------------------------"


sudo apt-get install darcs


echo "-----------GETTING DARCS: DONE------------------------------"

echo "-----------GETTING LAST VER. OF LEKSAH: START---------------"


sudo darcs get http://code.haskell.org/leksah/

cd leksah


find ./src/IDE/Metainfo/SourceCollector.hs | sudo xargs perl -pi -e 's/HsModule _ _ _ decls _ _ _/HsModule _ _ _ decls _ _ _ _/g'


echo "The previous command (find...) is designed for leksah.v0.3 (27.11.2008) to workaround an inconsistency. Perhaps you should put one '_' symbol as a first argument, not as a last. Didn't manage to figure it out yet."


echo "-----------GETTING LAST VER. OF LEKSAH: DONE----------------"

echo "-----------INSTALLING LEKSAH: START-------------------------"


sudo runghc Setup configure --user

sudo runghc Setup build

sudo runghc Setup install


echo "-----------INSTALLING LEKSAH: DONE--------------------------"


cd ${HOME}


sudo rm -I -r unique_tmp



+++++++++++++++++++++++++++++++++++++++++++++++++


5 Code

Leksah Darcs repository: http://code.haskell.org/leksah