From HaskellWiki
< Yi
Revision as of 11:02, 25 March 2008 by Nominolo (talk | contribs) (link to current workaround for common bug)
Jump to: navigation, search


  • How do I install Yi?
get it from Hackage. Configure, compile and install Yi as you would do for any other Cabal package.
  • Setup.hs does not compile!
You need to use Cabal version 1.2.3. To make sure you use it, do:
   ghc -package Cabal- --make Setup.hs
   ./Setup configure ...
  • Setup configure fails with
Setup.hs: Package yi-0.3 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)
  • ByteString problems: Yi as of 27 January 2008 cannot use the most recent ByteString library (because of the regexp libraries) which is - it needs a version like 0.9 or You may have the correct ByteString library installed, but still see an error like:
Couldn't match expected type
against inferred type `B.ByteString'
In the second argument of `renderBS', namely `(B.pack str)'
In the expression: renderBS (styleToAttr sty) (B.pack str)
In the definition of `withStyle':
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 this message.


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.