Go to file
2011-12-04 19:43:14 -05:00
scripts@b626b41422 scripts 2011-11-28 10:32:38 +02:00
test get yesod-static tests running again 2011-11-27 08:12:49 -06:00
yesod attoparsec 0.10 fix 2011-11-29 08:09:53 +02:00
yesod-auth aeson 0.4 2011-12-01 12:49:28 +02:00
yesod-core Add (another) missing file 2011-11-30 18:37:25 +02:00
yesod-default Version bumps 2011-11-28 14:58:56 +02:00
yesod-examples yesod-examples updated (finally) 2011-11-30 08:20:15 +02:00
yesod-form Relaxed upper bounds 2011-11-27 15:50:02 +02:00
yesod-json aeson 0.4 2011-12-01 12:49:28 +02:00
yesod-newsfeed Version bumps 2011-11-28 14:58:56 +02:00
yesod-persistent Version bumps 2011-11-28 14:58:56 +02:00
yesod-sitemap Version bumps 2011-11-28 14:58:56 +02:00
yesod-static Version bumps 2011-11-28 14:58:56 +02:00
.gitignore Remove a painful slowdown from randomIV 2011-11-25 15:11:15 +02:00
.gitmodules Add scripts submodule 2011-09-11 20:22:35 -04:00
input add yesod-mega 2011-11-23 08:44:13 -06:00
LICENSE add yesod-mega 2011-11-23 08:44:13 -06:00
README.md remove megas from README 2011-12-04 19:43:14 -05:00
scaffold add yesod-mega 2011-11-23 08:44:13 -06:00
sources.txt add sources file for cabal-dev add-source-list 2011-11-26 09:28:37 -06:00
yesod-mega.cabal fix inconsistent / conflicting attoparsec dependency 2011-12-03 20:22:10 -08:00

An advanced web framework using the Haskell programming language. Featuring:

  • safety & security guaranteed at compile time
  • performance
    • fast, compiled code
    • a greater concurrent load than any other web application server
  • developer productivity: tools for all your basic web development needs

Learn more: http://yesodweb.com/

Installation: http://www.yesodweb.com/page/five-minutes

cabal update && cabal install yesod

Create a new project after installing

yesod init

Using cabal-dev

cabal-dev creates a sandboxed environment for an individual cabal package. Your application is a cabal package and you should use cabal-dev with your Yesod application. Instead of using the cabal command, use the cabal-dev command. Use yesod-devel --dev when developing your application.

Installing the latest development version from github

Yesod is broken up into 4 separate code repositories each built upon many smaller packages.

Install conflicts are unfortunately common in Haskell development. However, we can prevent most of them by using some extra tools. This will require a little up-front reading and learning, but save you from a lot of misery in the long-run. See the above explanation of cabal-dev, and below of virthualenv.

Please note that cabal-dev will not work in a virthualenv shell - you can't use both at the same time.

virthualenv

To just install Yesod from github, we only need cabal-dev. However, cabal-dev may be more hassle than it is worth when hacking on Yesod.

We recommend using virthualenv when hacking on Yesod. This is optional, but prevents your custom build of Yesod from interfering with your currently installed cabal packages. virthualenv creates an isolated environment like cabal-dev. cabal-dev isolates a single cabal package, but virthualenv isolates multiple packages together.

virthualenv works at the shell level, so every shell must activate the virthualenv.

cabal-src

Michael just released the cabal-src tool. Whenever you would use cabal install for a local package, use cabal-src-install instead. Our installer script now uses cabal-src-install when it is available.

Building Yesod

# update your package database if you haven't recently
cabal update
# install required libraries
cabal install Cabal cabal-install cabal-dev cabal-src virthualenv

# finally build Yesod.
# this is completely sandboxed, except that it installs an unreleased vesion of cabal-dev
git clone http://github.com/yesodweb/install yesodweb && cd yesodweb
cd install && cabal-dev install && dist/build/install/install && cd ..

Hacking on Yesod

To prevent Yesod from conflicting with your other installs, you should use virthualenv, although it is optional.

virthualenv

cabal update
cabal install virthualenv
cd yesodweb
virthualenv --name=yesod
./virthualenv/bin/activate

# from the yesodweb directory, install the mega-mega repo to align all your dependencies
cabal install

individual cabal packages

If you first install the mega repo, then it should be easier to work on an individual package rather than the mega.

# build all packages individually
./scripts/install

# move to the individual package you are working on
cd shakespeare-text

# build and test the individual package
cabal configure -ftest --enable-tests
cabal build
cabal test

cabal-dev

cabal-dev works very well if you are working on a single package, but it can be very cumbersome to work on multiple packages at once.

Use your development version of Yesod in your application

Note that we have told you to install Yesod into a sandboxed virthualenv or cabal-dev environment. This means it is not available through your user/global cabal database for your application. Instead you should use cabal-dev add-source-list to retrieve these packages. cd to your application directory, and the reference the source list.

cabal-dev install /path/to/yesodweb/yesod/*(/)