@hackage chu22012.11.17.2

FFI for Chu2 Agda Web Server Interface

Example Chu2 Application in Agda


module Hello where

open import IO.Primitive    using (return)
open import Data.List       using ([])
open import Chu2.ByteString using (pack)
open import Function        using (_$_; const)
open import Chu2             

hello-world-response = response OK [] (pack "Hello Agda!")

hello-world-app : Application
hello-world-app = const $ return hello-world-response

open import Chu2.Handler.SnapServer
main = onPort 3000 run $ chu2 hello-world-app


Note