Personal tools

Yi/FAQ

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(Added development instructions)
Line 4: Line 4:
:get it from Hackage. Configure, compile and install Yi as you would do for any other Cabal package.
:get it from Hackage. Configure, compile and install Yi as you would do for any other Cabal package.
-
*Setup.hs does not compile!
+
*cabal install -fghcAPI fails
-
:You need to use Cabal version 1.2.3. To make sure you use it, do:
+
:If you want GHC API special capabilities, you have to download, configure, build and copy separately:
-
 
+
cd yi
-
ghc -package Cabal-1.2.3.0 --make Setup.hs
+
cabal configure -fghcAPI
-
./Setup configure ...
+
cabal build
 +
cabal copy
*Setup configure fails with
*Setup configure fails with
-
Setup.hs: Package yi-0.3 can't be built on this system.
+
Setup.hs: Package yi-0.4 can't be built on this system.
:It means that you have no UI package available. You need VTY or GTK2hs installed. Get them from Hackage.
:It means that you have no UI package available. You need VTY or GTK2hs installed. Get them from Hackage.
Line 22: Line 23:
:(Adjust the specific path to your system. You can find the right location using <tt>locate libgthread</tt>)
:(Adjust the specific path to your system. You can find the right location using <tt>locate libgthread</tt>)
-
 
-
*ByteString problems: Yi as of 27 January 2008 cannot use the most recent ByteString library (because of the regexp libraries) which is 0.9.0.4 - it needs a version like 0.9 or 0.9.0.1. You may have the correct ByteString library installed, but still see an error like:
 
-
 
-
Yi/UI/Vty.hs:342:48:<br>
 
-
Couldn't match expected type<br> `bytestring-0.9.0.4:Data.ByteString.Internal.ByteString'<br>
 
-
against inferred type `B.ByteString'<br>
 
-
In the second argument of `renderBS', namely `(B.pack str)'<br>
 
-
In the expression: renderBS (styleToAttr sty) (B.pack str)<br>
 
-
In the definition of `withStyle':<br>
 
-
withStyle sty str = renderBS (styleToAttr sty) (B.pack str)
 
-
 
-
:This is because versions of ByteString often aren't compatible, and in this case, the VTY library was compiled with a different version.
 
-
 
-
*I get
 
-
No instance for (RegexLike Regex B.ByteString)
 
-
 
-
:The proper fix requires some more cabal features which hopefully come with Cabal 1.4. So long we have a workaround as described in [http://groups.google.com/group/yi-devel/msg/309fef4bac9f97e3 this message].
 
-
 
-
For a more extensive explanation, see http://blog.well-typed.com/2008/04/the-dreaded-diamond-dependency-problem/
 
==== Development ====
==== Development ====
Line 48: Line 30:
*What are some of the dependancies?
*What are some of the dependancies?
-
:The development version of Yi currently requires Cabal-1.5.2, Crypto-4.1.0, fingertree-0.0, and utf8-string-0.3.1.
+
:The development version of Yi currently requires Cabal-1.4, fingertree-0.0, and utf8-string-0.3.1.
::If you are on Mac OS X and are using MacPorts, then these will not be included in the GHC in that distribution. Many of the dependancies are in MacPorts (for example: ghc, ghc-devel, alex, and gtk2hs). However, you may have some trouble building with Cabal-1.5.2, since it is a development version of Cabal. To work around these issues, you might have to add the line "Build-Type: Simple" to the .cabal files in the above required packages.
::If you are on Mac OS X and are using MacPorts, then these will not be included in the GHC in that distribution. Many of the dependancies are in MacPorts (for example: ghc, ghc-devel, alex, and gtk2hs). However, you may have some trouble building with Cabal-1.5.2, since it is a development version of Cabal. To work around these issues, you might have to add the line "Build-Type: Simple" to the .cabal files in the above required packages.

Revision as of 11:55, 25 July 2008

Contents

1 Installation

  • How do I install Yi?
get it from Hackage. Configure, compile and install Yi as you would do for any other Cabal package.
  • cabal install -fghcAPI fails
If you want GHC API special capabilities, you have to download, configure, build and copy separately:
cd yi
cabal configure -fghcAPI
cabal build
cabal copy
  • Setup configure fails with
Setup.hs: Package yi-0.4 can't be built on this system.
It means that you have no UI package available. You need VTY or GTK2hs installed. Get them from Hackage.
  • On Mac OS X if you get an error message similar to this:
yi: can't load .so/.DLL for: gthread-2.0 (dlopen(libgthread-2.0.dylib, 10): image not found)
then your dynamic library search path variable is probably not set correctly. You can set it (in Bash) using:
export DYLD_LIBRARY_PATH=/opt/local/lib
(Adjust the specific path to your system. You can find the right location using locate libgthread)

1.1 Development

  • How do I install Yi for development?
Get it from http://code.haskell.org/yi while there are other repositories of Yi out there, this is the latest.
  • What are some of the dependancies?
The development version of Yi currently requires Cabal-1.4, fingertree-0.0, and utf8-string-0.3.1.
If you are on Mac OS X and are using MacPorts, then these will not be included in the GHC in that distribution. Many of the dependancies are in MacPorts (for example: ghc, ghc-devel, alex, and gtk2hs). However, you may have some trouble building with Cabal-1.5.2, since it is a development version of Cabal. To work around these issues, you might have to add the line "Build-Type: Simple" to the .cabal files in the above required packages.

2 Configuration

2.1 How to Configure Yi

You can find configuration file examples in the 'examples/' directory, or online at http://code.haskell.org/yi/examples/.

A good way to start is to copy yi.hs in your ~/.yi directory (create it if needed), and hack as needed.

3 Usage