GPipe-Collada 0.1.2 → 0.1.3
raw patch · 2 files changed
+11/−11 lines, 2 filesdep ~GPipedep ~HaXmldep ~Vec
Dependency ranges changed: GPipe, HaXml, Vec, Vec-Transform
Files
GPipe-Collada.cabal view
@@ -1,5 +1,5 @@ name: GPipe-Collada-version: 0.1.2 +version: 0.1.3 cabal-version: >= 1.8 build-type: Simple license: BSD3@@ -20,12 +20,12 @@ Library build-depends: - GPipe >= 1.3.1, + GPipe >= 1.3.2, base >= 4 && <5, - HaXml >= 1.20 && < 1.21, + HaXml >= 1.23 && < 1.24, containers >= 0.4 && < 0.5, - Vec == 0.9.8, - Vec-Transform == 1.0.5, + Vec == 0.9.9, + Vec-Transform == 1.0.6, array >= 0.3, mtl hs-source-dirs: src
src/Graphics/GPipe/Collada/Parse.hs view
@@ -52,7 +52,7 @@ import Data.Typeable import Data.Dynamic-import qualified Control.Monad as Control.Monad (unless) +import qualified Control.Monad (unless) -- | Parse a string containing a collada document and return 'Either' an error message or the parsed Collada 'Scene'. readCollada :: String -> Either String Scene@@ -107,7 +107,7 @@ missingLinkErr el id c = el ++ " element with id '" ++ id ++ "' not found when processing " ++ errorPos c -errorPos c@(CElem (Elem n _ _) p) = n ++ " element in " ++ show p ++ "."+errorPos c@(CElem (Elem n _ _) p) = show n ++ " element in " ++ show p ++ "." withError err m = m `mplus` throwError err @@ -148,9 +148,9 @@ getFromListLengthContents n c = do xs <- getFromListContents c if length xs == n then return xs else- if (length xs < n) then- throwError $ "Too few elements in " ++ errorPos c else- throwError $ "Too many elements in " ++ errorPos c+ if length xs < n + then throwError $ "Too few elements in " ++ errorPos c + else throwError $ "Too many elements in " ++ errorPos c fromList err = mapM (fromString err) . words fromString err = parse . reads@@ -167,7 +167,7 @@ -- Parser actions: readCollada' f s = do p <- xmlParse' f s- xs <- withError "Expecting COLLADA top-element" $ do XML.Document _ _ (Elem "COLLADA" _ xs) _ <- return p+ xs <- withError "Expecting COLLADA top-element" $ do XML.Document _ _ (Elem (N "COLLADA") _ xs) _ <- return p return xs RefVisualScene vs <- runParser $ parseDoc xs return vs