File: error.hs

package info (click to toggle)
haskell-cgi 3001.5.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 164 kB
  • sloc: haskell: 828; makefile: 3
file content (7 lines) | stat: -rw-r--r-- 202 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
import Network.CGI (CGI, CGIResult, runCGI, liftIO, output, handleErrors)

cgiMain :: CGI CGIResult
cgiMain = liftIO (readFile "foo") >> output "bar"

main :: IO ()
main = runCGI (handleErrors cgiMain)