The chu2 package

[Tags:bsd3, library]

FFI for Chu2 Agda Web Server Interface


[Skip to Readme]

Properties

Versions 2012.11.16, 2012.11.16.1, 2012.11.17, 2012.11.17.1, 2012.11.17.2, 2012.11.18, 2012.11.18.1, 2012.11.18.2, 2012.11.19, 2012.11.20
Dependencies base (==4.*), bytestring, hack2, hack2-handler-snap-server [details]
License BSD3
Author Jinjing Wang
Maintainer Jinjing Wang <nfjinjing@gmail.com>
Stability Unknown
Category Web
Home page https://github.com/nfjinjing/chu2
Uploaded Fri Nov 16 03:40:59 UTC 2012 by JinjingWang
Distributions NixOS:2012.11.20
Downloads 2048 total (17 in the last 30 days)
Votes
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for chu2

Readme for chu2-2012.11.16.1

Example Chu2 Application in Agda


module Hello where

import IO.Primitive as Prim
open import Chu2
open import Foreign.Haskell
open import Data.List
open import Chu2.ByteString

{-# IMPORT Chu2.Handler.SnapServerFFI #-}

postulate
  runChu2 : Application -> Prim.IO Unit

{-# COMPILED runChu2 Chu2.Handler.SnapServerFFI.runChu2 #-}

hello_world_response = response OK [] (pack "Hello Agda!")

hello_world_app : Application
hello_world_app = \_ -> Prim.return hello_world_response

main = runChu2 hello_world_app


Note