File: HelloWorld.hs

package info (click to toggle)
haskell-hxt 9.3.1.22-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,448 kB
  • sloc: haskell: 15,853; xml: 1,464; makefile: 390
file content (23 lines) | stat: -rw-r--r-- 383 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module Main
where

import Text.XML.HXT.Core
import System.Exit

main	:: IO()
main
    = do
      [rc] <- runX ( readDocument [ withTrace 1
				  , withValidate no
				  ] "hello.xml"
		     >>>
		     writeDocument [ withOutputEncoding utf8
				   ] "-"
		     >>>
		     getErrStatus
		   )
      exitWith ( if rc >= c_err
		 then ExitFailure 1
		 else ExitSuccess
	       )