No description
Find a file
2014-05-29 16:07:38 +02:00
config Start of downloads split off 2014-05-29 16:06:11 +02:00
design Theme tweaks 2014-03-14 17:47:35 +01:00
scripts Use lzma for deployment (a bit faster to upload) 2014-05-28 23:08:48 +02:00
src Add coming soon to docs 2014-05-29 16:07:38 +02:00
static Add coming soon to docs 2014-05-29 16:07:38 +02:00
submodules Add submodule and README.md 2014-05-27 17:53:23 +02:00
themes/purple/fonts First commit 2014-03-04 06:48:16 +01:00
.ghci Add landing page 2014-05-28 07:03:30 +02:00
.gitignore Ignore .hsenvs 2014-05-27 18:32:30 +02:00
.gitmodules Add submodule and README.md 2014-05-27 17:53:23 +02:00
hl.cabal Fix warnings 2014-05-28 23:01:31 +02:00
hl.org Add to hl.org 2014-05-27 11:56:35 +02:00
LICENSE First commit 2014-03-04 06:48:16 +01:00
README.md Haskell code pages docs 2014-05-29 01:01:37 +02:00
Setup.hs First commit 2014-03-04 06:48:16 +01:00

haskell-lang

Haskell web site.

Editing pages

If you're just here to contribute a content change, read this section.

All pages that are produced by markdown are here. To contribute changes simply fork this repo and open a pull request. It will be merged and redeployed in short order.

If you want to edit a page which has some custom code in it, you'll want to see the next sections for building and running instructions. Maybe also take a look at architecture.

If you want to include Haskell code samples in markdown, use:

``` haskell
main = putStrLn "Hello, World!"
```

If you want to include Haskell code samples in Haskell code pages, use:

haskellPre "main = print 123"
haskellCode "peyton `simon` jones"

Pre for <pre> block, code for <code> span snippet.

Building

Clone the repo:

$ git clone git@github.com:chrisdone/hl.git

You need one of these GHC versions:

  • GHC 7.6
  • GHC 7.8

Create an hsenv:

$ cd hl
$ hsenv
$ source .hsenv/bin/activate

You need the right package set. Add the following to your .hsenv/cabal/config, replacing the Hackage reference:

  • If you have GHC 7.6:

      remote-repo: stackage:http://www.stackage.org/stackage/1ba546f8f281c02d135ec3babd86516f726b4453
    
  • If you have GHC 7.8:

      remote-repo: stackage:http://www.stackage.org/stackage/160b97ce7459820d4de720d6a867b85297ab4351
    

Now just run:

$ sh scripts/pull-build

To do the above cabal update, submodule, install, etc.

Done!

Running

It runs at: http://localhost:1990/

Manually running the binary:

$ dist/build/hl/hl

Running from inside GHCi:

> :l DevelMain
> DevelMain.update

Run this every time you want to update the web handler in-place, as in this demo.

If you use Emacs, you can just bind it to a key:

(define-key html-mode-map [f12] 'haskell-process-reload-devel-main)

Just hit f12 to recompile and restart.

Architecture

It uses Yesod and an MVC organization.

Templates are written in senza, a convenience wrapper to blaze-html. There is presently no database.

Style

I use this style for code. You don't have to use this style, I can reformat patches as they come in.