ATermLibTest.hs revision e9458b1a7a19a63aa4c179f9ab20f4d50681c168
{- |
Module : ./Common/ATerm/ATermLibTest.hs
Copyright : (c) C. Maeder, DFKI GmbH 2010
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : experimental
Portability : portable
-}
module Main (main) where
import System.Environment
import ATerm.ReadWrite
import ATerm.SimpPretty
main :: IO ()
main = do
args <- getArgs
mapM_ testATC args
testATC :: FilePath -> IO ()
testATC fp = do
str <- readFile fp
let att = readATerm str
putStrLn ("Reading File " ++ fp ++ " ...")
let fp' = fp ++ ".ttttt"
putStrLn ("Writing File " ++ fp' ++ " ...")
writeFileSDoc fp' (writeSharedATermSDoc att)