File: simple_server.hs

package info (click to toggle)
haskell-haxr 3000.11.6-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 232 kB
  • sloc: haskell: 1,541; makefile: 16
file content (8 lines) | stat: -rw-r--r-- 155 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
-- A minimal server

import Network.XmlRpc.Server

add :: Int -> Int -> IO Int
add x y = return (x + y)

main = cgiXmlRpcServer [("examples.add", fun add)]