[Initial hello-world style demo prog. Duncan Coutts **20080622192441] { addfile ./Main.hs hunk ./Main.hs 1 +module Main (main) where + +import Distribution.Package (PackageIdentifier(..)) +import Distribution.Text (display, simpleParse) +import HAppS.Server + +main = simpleHTTP nullConf { port = 5000 } impl + + +handlePackageById :: PackageIdentifier -> [ServerPart Response] +handlePackageById id = [ anyRequest $ ok $ toResponse $ "Project num " ++ display id ++ " addressed."] + +instance FromReqURI PackageIdentifier where + fromReqURI = simpleParse + +impl = [ dir "projects" + [ path $ handlePackageById ] + ] + addfile ./hackage-server.cabal hunk ./hackage-server.cabal 1 +name: hackage-server +version: 0.1 +build-type: Simple +cabal-version: >=1.2 + +executable hackage-server + main-is: Main.hs + build-depends: + base, Cabal >= 1.3.11 && < 1.5, + HAppS-Data >= 0.9.2 && < 1.0, + HAppS-IxSet >= 0.9.2 && < 1.0, + HAppS-State >= 0.9.2 && < 1.0, + HAppS-Server >= 0.9.2 && < 1.0 addfile ./hackage.html hunk ./hackage.html 1 - + +HackageDB: introduction + +
+

hackageDB :: [Package]

+ + + + + + + + + + +
+ +
+

About HackageDB

+ +

HackageDB is a collection of released +Haskell packages. +Each package is in the Cabal format, +a standard way of packaging Haskell source code that makes it easy to build +and install. +(HackageDB and Cabal are components of a broader Haskell infrastructure effort +called Hackage.) +These pages are a basic web interface to the Hackage package database. + +

Finding packages

+ +

The Packages link above lists the available packages +and provides a full text search of the package pages (via Google), +while What's new lists recent additions (also available +as an RSS feed). +See How to install a Cabal package for instructions on installing the packages you find here. +There is also an experimental +command-line tool +that will make this easier. + +

Releasing packages through HackageDB

+ +

To upload your own releases, you'll first need to package them as Cabal +source packages. +See How to create a Haskell package +for a tutorial. +You can check and upload your package using the Upload link above, +though to upload packages you'll need a HackageDB +username and password. + +

Getting the raw data

+ + + +

Development

+ +

See the +HackageDB wiki page. + +

+ }