hxt 9.0.0 → 9.0.1
raw patch · 6 files changed
+38/−15 lines, 6 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ Text.XML.HXT.Arrow.XmlState: withFileMimeType :: String -> SysConfig
+ Text.XML.HXT.Arrow.XmlState.SystemConfig: withFileMimeType :: String -> SysConfig
+ Text.XML.HXT.Arrow.XmlState.TypeDefs: theFileMimeType :: Selector XIOSysState String
+ Text.XML.HXT.Arrow.XmlState.TypeDefs: xioFileMimeType :: XIOParseConfig -> String
- Text.XML.HXT.Arrow.XmlState.TypeDefs: XIOEnv :: !Int -> (Int -> String -> IO ()) -> !Int -> (String -> IO ()) -> !Bool -> !String -> !String -> !Attributes -> !XIOInputConfig -> !XIOParseConfig -> !XIOOutputConfig -> !XIORelaxConfig -> !XIOCacheConfig -> XIOSysEnv
+ Text.XML.HXT.Arrow.XmlState.TypeDefs: XIOEnv :: !Int -> (Int -> String -> IO ()) -> (String -> IO ()) -> !Bool -> !String -> !String -> !Attributes -> !XIOInputConfig -> !XIOParseConfig -> !XIOOutputConfig -> !XIORelaxConfig -> !XIOCacheConfig -> XIOSysEnv
- Text.XML.HXT.Arrow.XmlState.TypeDefs: XIOPcfg :: MimeTypeTable -> String -> [String] -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> IOSArrow XmlTree XmlTree -> XIOParseConfig
+ Text.XML.HXT.Arrow.XmlState.TypeDefs: XIOPcfg :: MimeTypeTable -> String -> [String] -> String -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> IOSArrow XmlTree XmlTree -> XIOParseConfig
- Text.XML.HXT.Arrow.XmlState.TypeDefs: XIOwrt :: !XmlTrees -> XIOSysWriter
+ Text.XML.HXT.Arrow.XmlState.TypeDefs: XIOwrt :: !Int -> !XmlTrees -> XIOSysWriter
- Text.XML.HXT.Arrow.XmlState.TypeDefs: xioErrorStatus :: XIOSysEnv -> !Int
+ Text.XML.HXT.Arrow.XmlState.TypeDefs: xioErrorStatus :: XIOSysWriter -> !Int
Files
- hxt.cabal +1/−1
- src/Text/XML/HXT/Arrow/DocumentInput.hs +9/−3
- src/Text/XML/HXT/Arrow/XmlState.hs +1/−0
- src/Text/XML/HXT/Arrow/XmlState/RunIOStateArrow.hs +3/−2
- src/Text/XML/HXT/Arrow/XmlState/SystemConfig.hs +7/−0
- src/Text/XML/HXT/Arrow/XmlState/TypeDefs.hs +17/−9
hxt.cabal view
@@ -1,6 +1,6 @@ -- arch-tag: Haskell XML Toolbox main description file Name: hxt-Version: 9.0.0+Version: 9.0.1 Synopsis: A collection of tools for processing XML with Haskell. Description: The Haskell XML Toolbox bases on the ideas of HaXml and HXML, but introduces a more general approach for processing XML with Haskell.
src/Text/XML/HXT/Arrow/DocumentInput.hs view
@@ -143,9 +143,15 @@ addMimeType :: IOStateArrow s XmlTree XmlTree addMimeType- = addMime $< ( getAttrValue transferURI- >>>- ( uriToMime $< getMimeTypeTable )+ = addMime $< ( ( getSysVar theFileMimeType+ >>>+ isA (not . null)+ )+ `orElse`+ ( getAttrValue transferURI+ >>>+ ( uriToMime $< getMimeTypeTable )+ ) ) where addMime mt
src/Text/XML/HXT/Arrow/XmlState.hs view
@@ -117,6 +117,7 @@ , withDefaultBaseURI , withEncodingErrors , withErrors+ , withFileMimeType , withIgnoreNoneXmlContents , withIndent , withInputEncoding
src/Text/XML/HXT/Arrow/XmlState/RunIOStateArrow.hs view
@@ -72,14 +72,14 @@ initialSysWriter :: XIOSysWriter initialSysWriter = XIOwrt- { xioErrorMsgList = []+ { xioErrorStatus = c_ok+ , xioErrorMsgList = [] } initialSysEnv :: XIOSysEnv initialSysEnv = XIOEnv { xioTraceLevel = 0 , xioTraceCmd = traceOutputToStderr- , xioErrorStatus = c_ok , xioErrorMsgHandler = errorOutputToStderr , xioErrorMsgCollect = False , xioBaseURI = ""@@ -108,6 +108,7 @@ { xioMimeTypes = defaultMimeTypeTable , xioMimeTypeFile = "" , xioAcceptedMimeTypes = []+ , xioFileMimeType = "" , xioWarnings = True , xioRemoveWS = False , xioParseByMimeType = False
src/Text/XML/HXT/Arrow/XmlState/SystemConfig.hs view
@@ -49,6 +49,13 @@ withMimeTypeFile :: String -> SysConfig withMimeTypeFile = setS theMimeTypeFile +-- | Force a given mime type for all file contents.+--+-- The mime type for file access will then not be computed by looking into a mime.types file++withFileMimeType :: String -> SysConfig+withFileMimeType = setS theFileMimeType+ -- | @withWarnings yes/no@ : system option, issue warnings during reading, HTML parsing and processing, -- default is 'yes'
src/Text/XML/HXT/Arrow/XmlState/TypeDefs.hs view
@@ -160,12 +160,12 @@ instance NFData XIOSysState -- all fields of interest are strict -data XIOSysWriter = XIOwrt { xioErrorMsgList :: ! XmlTrees+data XIOSysWriter = XIOwrt { xioErrorStatus :: ! Int+ , xioErrorMsgList :: ! XmlTrees } data XIOSysEnv = XIOEnv { xioTraceLevel :: ! Int , xioTraceCmd :: Int -> String -> IO ()- , xioErrorStatus :: ! Int , xioErrorMsgHandler :: String -> IO () , xioErrorMsgCollect :: ! Bool , xioBaseURI :: ! String@@ -190,6 +190,7 @@ data XIOParseConfig = XIOPcfg { xioMimeTypes :: MimeTypeTable , xioMimeTypeFile :: String , xioAcceptedMimeTypes :: [String]+ , xioFileMimeType :: String , xioWarnings :: ! Bool , xioRemoveWS :: ! Bool , xioParseByMimeType :: ! Bool@@ -263,6 +264,13 @@ , setS = \ x s -> s { xioSysWriter = x} } +theErrorStatus :: Selector XIOSysState Int+theErrorStatus = theSysWriter+ >>>+ S { getS = xioErrorStatus+ , setS = \ x s -> s { xioErrorStatus = x }+ }+ theErrorMsgList :: Selector XIOSysState XmlTrees theErrorMsgList = theSysWriter >>>@@ -493,13 +501,6 @@ , setS = \ x s -> s { xioParseConfig = x} } -theErrorStatus :: Selector XIOSysState Int-theErrorStatus = theSysEnv- >>>- S { getS = xioErrorStatus- , setS = \ x s -> s { xioErrorStatus = x }- }- theErrorMsgHandler :: Selector XIOSysState (String -> IO ()) theErrorMsgHandler = theSysEnv >>>@@ -571,6 +572,13 @@ >>> S { getS = xioAcceptedMimeTypes , setS = \ x s -> s { xioAcceptedMimeTypes = x }+ }++theFileMimeType :: Selector XIOSysState String+theFileMimeType = theParseConfig+ >>>+ S { getS = xioFileMimeType+ , setS = \ x s -> s { xioFileMimeType = x } } theWarnings :: Selector XIOSysState Bool