Go to file
2012-07-06 15:03:25 +03:00
scripts@eba05a0b5f conduit update 2012-03-21 08:32:49 +02:00
yesod Updated and fixed Heroku Procfile instructions 2012-06-27 23:24:36 +02:00
yesod-auth Merge branch 'master' of https://github.com/tanakh/yesod 2012-06-05 06:22:31 +03:00
yesod-auth-oauth This is what I had to do to get oauth to actually install/run. 2012-06-16 15:10:39 -07:00
yesod-core hspec 1.2 (fixes warnings) 2012-07-06 15:03:25 +03:00
yesod-default Version bumps 2012-05-14 12:33:44 +03:00
yesod-examples Update license with MIT license 2012-04-29 09:38:45 +03:00
yesod-form Recognize 'on' for booleans 2012-07-05 11:58:53 +03:00
yesod-json Bump yesod-json to 1.0.1.0. 2012-07-05 23:18:45 -03:00
yesod-newsfeed Fix a typo 2012-06-05 06:14:45 +03:00
yesod-persistent Version bumps 2012-05-14 12:33:44 +03:00
yesod-platform new yesod-platform 2012-06-30 22:34:32 +03:00
yesod-routes Remove containers upper bound 2012-05-14 15:07:17 +03:00
yesod-sitemap Version bumps 2012-05-14 12:33:44 +03:00
yesod-static hspec 1.2 (fixes warnings) 2012-07-06 15:03:25 +03:00
yesod-test hspec 1.2 (fixes warnings) 2012-07-06 15:03:25 +03:00
.gitignore OpenID claimed IDs 2012-04-20 10:14:32 +03:00
.gitmodules Removed submodules 2012-04-03 07:55:56 +03:00
LICENSE Update license with MIT license 2012-04-29 09:38:45 +03:00
package-list.sh Merge remote-tracking branch 'origin/master' 2012-03-20 17:01:06 +02:00
README.md install yesod with cabal-meta 2012-04-07 17:40:55 -07:00
ReleaseNotes.md Updated relnotes 2012-01-22 20:32:43 +02:00
sources.txt Turn on blaze-html 0.5 by default 2012-05-09 09:50:37 +03:00

Yesod

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

  • safety & security guaranteed at compile time
  • developer productivity: tools for all your basic web development needs
  • raw performance
    • fast, compiled code
    • techniques for constant-space memory consumption
  • asynchronous IO
    • this is built in to the Haskell programming language (like Erlang)
    • handles a greater concurrent load than any other web application server

Learn more: http://yesodweb.com/

Installation: http://www.yesodweb.com/page/quickstart

cabal update && cabal install yesod

Create a new project after installing

yesod init

Your application is a cabal package and you use cabal to install its dependencies.

Using cabal-dev

cabal-dev creates a sandboxed environment for an individual cabal package. Instead of using the cabal command, use the cabal-dev command which will use the sandbox.

Use yesod-devel --dev when developing your application.

Installing the latest development version from github for use with your application

cabal update
cabal install cabal-meta cabal-src

In your application folder, create a sources.txt file with the following contents:

./
https://github.com/yesodweb/yesod
https://github.com/yesodweb/shakespeare
https://github.com/yesodweb/persistent
https://github.com/yesodweb/wai

./ means build your app. The yesod repos will be cloned and placed in a vendor repo. Now run: cabal-meta install. If you use cabal-dev, run cabal-meta --dev install

You should be good now! Install conflicts are unfortunately common in Haskell development. If you are not using any sandbox tools, you may discover that some of the other haskell installs on your system are broken. You can prevent this by using sandbox tools. cabal-dev was already mentioned. Another alternative is virthualenv.

virthualenv

We recommend using virthualenv when hacking on Yesod from Linux. This is optional, but prevents your custom build of Yesod from interfering with your currently installed cabal packages.

virthualenv will not work on Windows and maybe not Mac. Use cabal-dev instead

  • virthualenv creates an isolated environment like cabal-dev
  • virthualenv works at the shell level, so every shell must activate the virthualenv
  • cabal-dev by default isolates a single cabal package, but virthualenv isolates multiple packages together.
  • cabal-dev can isolate multiple packages together by using the -s sandbox argument

cabal-src

The cabal-src tool helps resolve dependency conflicts when installing local packages. This capability is already built in if you are using cabal-dev or cabal-meta. Otherwise install cabal-src with:

cabal install cabal-src

Whenever you would use cabal install to install a local package, use cabal-src-install instead. Our installer script now uses cabal-src-install when it is available.

Building your changes to Yesod

Cloning the repos

for repo in hamlet persistent wai yesod; do
  git clone http://github.com/yesodweb/$repo
  (
    cd $repo
    git submodule update --init
  )
done

install all repos

for repo in hamlet persistent wai yesod; do
    ./scripts/install
done

installing repo packages

# install and test all packages in a repo
./scripts/install

# If things seem weird, you may need to do a clean.
./scripts/install --clean

Building individual packages

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