Giter Site home page Giter Site logo

gelisam / haskell.org Goto Github PK

View Code? Open in Web Editor NEW

This project forked from haskell-infra/hl

0.0 3.0 0.0 2.13 MB

Haskell web site

Home Page: http://haskell-lang.org/

License: BSD 3-Clause "New" or "Revised" License

Emacs Lisp 0.17% Haskell 41.13% Shell 0.17% CSS 21.28% JavaScript 37.24%

haskell.org's Introduction

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 [email protected]:haskell-infra/hl.git

You need one of these GHC versions:

  • GHC 7.6
  • GHC 7.8

Heads up: hsenv doesn't currently work on GHC 7.8. To get around this, you can instead try just making a cabal sandbox and using the hl-ghc7.8.cabal file to setup all direct and transient dependencies.

Create an hsenv (cabal sandbox doesn't support specifying a repo yet):

$ 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:

$ git submodule init
$ sh scripts/pull-build

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

Done!

Using sandboxes

Clone the repo:

$ git clone [email protected]:haskell-infra/hl.git

Set up sandbox:

$ cabal sandbox init

Install dependencies and build:

$ cabal install --only-dependencies
$ cabal build

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 Lucid. There is presently no database.

Style

We generally use this style for this project. You don't have to use this style, we can reformat patches as they come in.

haskell.org's People

Contributors

chrisdone avatar relrod avatar thoughtpolice avatar adamse avatar mietek avatar nagisa avatar bitemyapp avatar jwiegley avatar kvanbere avatar cartazio avatar nicolast avatar samsymons avatar srid avatar rietmann avatar

Watchers

Samuel Gélineau avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.