chu2: FFI for Chu2 Agda Web Server Interface

[ bsd3, library, web ] [ Propose Tags ]

FFI for Chu2 Agda Web Server Interface


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 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 && <5), bytestring, hack2, hack2-handler-snap-server [details]
License BSD-3-Clause
Author Jinjing Wang
Maintainer Jinjing Wang <nfjinjing@gmail.com>
Category Web
Home page https://github.com/nfjinjing/chu2
Uploaded by JinjingWang at 2012-11-16T03:40:59Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 7686 total (23 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for chu2-2012.11.16.1

[back to package description]

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