- How do I install Yi?
- get it from Hackage. Configure, compile and install Yi as you would do for any other Cabal package.
- 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.
- cabal install yi fails with dependency errors, eg:
$ cabal install yi Resolving dependencies... cabal.exe: dependencies conflict: ghc-6.8.3 requires bytestring ==0.9.0.1.1 however bytestring-0.9.0.1.1 was excluded because bytestring-0.9.0.1 was selected instead bytestring-0.9.0.1.1 was excluded because yi-0.3 requires bytestring =0.9.0.1
- Try removing all your old yi packages, and do
before attempting to install.
- 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
- Compilation fails with a message about alex not being available?
- Currently, Cabal doesn't track programs, just libraries, so it won't warn you if you are missing Alex (as many people are). The solution here is to just cabal install alex first. (Yi uses Alex to generate code for parsing stuff with syntax, like Haskell source.)
- I can't install yi-gtk or yi-vty! It wants sourceview or something.
- As the Hackage descriptions say, yi-gtk and yi-vty are only for versions of older than Yi 0.3. You really should be running the latest development (Darcs) or stable (Hackage) versions of Yi, so don't try to install these two packages. Yi supports VTY and Gtk2hs directly in the yi package now.
- 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:
- (Adjust the specific path to your system. You can find the right location using locate libgthread)
- Compilation fails with errors about template-haskell or data-accessor:
Add constraints about which release of those libraries to use.
$ cabal install yi --constraint="data-accessor < 0.2.1" --constraint="template-haskell < 2.4"
- 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.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.1 GError on startup
I get the error message "yi.exe: <<System.Glib.GError.GError>>" when I try to run yi.
Sometimes this is a result of yi not being able to find the contents of the art directory when trying to start in graphical mode (e.g. Gtk or Pango). Check that the install has be done correctly or use the VTY mode ($ yi -f vty).
For more detail on the error, modify main in Yi/Main.hs to catch GError:
Right finalCfg -> do catchGError (do when (debugMode finalCfg) $ initDebug ".yi.dbg" startEditor finalCfg state) (\(GError dom code msg) -> fail msg)
Note that more recent versions of Yi (e.g. from the darcs repo) no longer simply display the anonymous GError but instead provide a more detailed error message (making the above code snippet unnecessary).