gdritter repos nml / master Data / NML / Main.hs
master

Tree @master (Download .tar.gz)

Main.hs @masterraw · history · blame

module Main where

import           Data.NML.XMLLight
import qualified Data.Text.IO as T
import           Text.XML.Light.Output (showContent)

main :: IO ()
main = do
  contents <- T.getContents
  let xml = decode contents
  case xml of
    Just x  -> putStrLn (showContent x)
    Nothing -> error "Unable to parse NML document"