testData2XmlProg.curry 470 Bytes
Newer Older
Michael Hanus's avatar
Michael Hanus committed
1
2
3
4
5
6
7
-- Test for Data2Xml tool
--
-- Execute:
-- > data2xml Prelude
-- > data2xml FlatCurry
-- > <REPL> :load testData2XmlProg :eval main :quit

8
9
import FlatCurry.Files
import FlatCurry_TypesDataToXml
Michael Hanus's avatar
Michael Hanus committed
10
11
12
import XML
import System

Michael Hanus's avatar
Michael Hanus committed
13
main :: IO ()
Michael Hanus's avatar
Michael Hanus committed
14
15
16
17
18
19
20
21
main = do
  prog <- readFlatCurry "testData2XmlProg"
  --print prog
  --putStrLn (showXmlDoc (progToXml prog))
  let nprog = xmlToProg (head (parseXmlString (showXmlDoc (progToXml prog))))
  exitWith (if (prog==nprog) then 0 else 1)