gdritter repos nml / 2a03d63
Added command-line conversion utility Getty Ritter 7 years ago
2 changed file(s) with 18 addition(s) and 0 deletion(s). Collapse all Expand all
1 module Main where
2
3 import Data.NML.XMLLight
4 import qualified Data.Text.IO as T
5 import Text.XML.Light.Output (showContent)
6
7 main :: IO ()
8 main = do
9 contents <- T.getContents
10 let xml = decode contents
11 case xml of
12 Just x -> putStrLn (showContent x)
13 Nothing -> error "Unable to parse NML document"
1818 -- other-extensions:
1919 build-depends: base >=4.6 && <4.7, xml, xml-types, text, attoparsec
2020 default-language: Haskell2010
21
22 executable from-nml
23 main-is: Data/NML/Main.hs
24 build-depends: base >= 4.6 && < 4.7, xml, xml-types, text, attoparsec
25 default-language: Haskell2010