plist 0.0.3 → 0.0.4
raw patch · 3 files changed
+7/−8 lines, 3 files
Files
- README +1/−0
- plist.cabal +5/−4
- src/Text/XML/Plist/Write.hs +1/−4
README view
@@ -23,3 +23,4 @@ Yuras Shumovich <shumovichy@gmail.com> Michael Tolly <tolly@wisc.edu>+Philip Lundrigan <philiplundrigan@gmail.com>
plist.cabal view
@@ -1,15 +1,16 @@ name: plist-version: 0.0.3+version: 0.0.4 license: BSD3 license-file: LICENSE author: Yuras Shumovich <shumovichy@gmail.com>, Michael Tolly <tolly@wisc.edu>+ Philip Lundrigan <philiplundrigan@gmail.com> maintainer: Yuras Shumovich <shumovichy@gmail.com> copyright: (c) 2009, 2012 Yuras Shumovich category: XML build-type: Simple cabal-version: >= 1.6-synopsis: Generate and parse Mac OX property list format+synopsis: Generate and parse Mac OS X property list format description: Simple helper to generate and parse Mac OS X plist format. Currently it supports only 'xml1' format. It is based on Haskell XML Toolbox.@@ -24,7 +25,7 @@ location: http://github.com/Yuras/plist.git library- hs-source-dirs: src+ hs-source-dirs: src build-depends: base >= 4.3 && < 5, dataenc -any, hxt >= 9 && < 10@@ -32,4 +33,4 @@ Text.XML.Plist.PlObject Text.XML.Plist.Write Text.XML.Plist.Read- ghc-options: -Wall+ ghc-options: -Wall
src/Text/XML/Plist/Write.hs view
@@ -28,11 +28,9 @@ import Control.Arrow.IOStateListArrow import Text.XML.HXT.Arrow.WriteDocument import Text.XML.HXT.Arrow.XmlArrow-import Text.XML.HXT.Arrow.XmlOptions import Control.Arrow import Control.Arrow.ArrowList import Text.XML.HXT.DOM.TypeDefs-import Text.XML.HXT.Arrow.XmlState.TypeDefs -- | Write 'PlObject' to file writePlistToFile :: String -> PlObject -> IO ()@@ -41,8 +39,7 @@ writePlist :: String -> IOSLA (XIOState s) PlObject XmlTree writePlist fileName = objectToPlist >>>- writeDocument [setS theAttrList attrs] fileName- where attrs = [(a_indent, "1"), (a_add_default_dtd, "1")]+ writeDocument [withIndent yes, withAddDefaultDTD yes] fileName -- | Arrow to convert 'PlObject' to plist with root element and DTD declaration. objectToPlist :: ArrowDTD a => a PlObject XmlTree