Hello community,

here is the log from the commit of package ghc-yaml for openSUSE:Factory 
checked in at 2015-05-21 08:33:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yaml (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-yaml.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-yaml"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yaml/ghc-yaml.changes        2015-03-03 
11:14:16.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-yaml.new/ghc-yaml.changes   2015-05-21 
08:33:36.000000000 +0200
@@ -1,0 +2,11 @@
+Tue Apr 28 10:44:08 UTC 2015 - mimi...@gmail.com
+
+- change libyaml deps from pkgconfig to direct libyaml-devel for SLE12 support 
+
+-------------------------------------------------------------------
+Mon Apr 27 08:33:55 UTC 2015 - mimi...@gmail.com
+
+- update to 0.8.11
+* Function to print prettier parse exceptions 
[#59](https://github.com/snoyberg/yaml/pull/59)
+
+-------------------------------------------------------------------

Old:
----
  _service
  yaml-0.8.10.1.tar.gz

New:
----
  yaml-0.8.11.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-yaml.spec ++++++
--- /var/tmp/diff_new_pack.as1fFz/_old  2015-05-21 08:33:36.000000000 +0200
+++ /var/tmp/diff_new_pack.as1fFz/_new  2015-05-21 08:33:36.000000000 +0200
@@ -17,19 +17,17 @@
 
 
 %global pkg_name yaml
-
 Name:           ghc-%{pkg_name}
-Version:        0.8.10.1
+Version:        0.8.11
 Release:        0
 Summary:        Support for parsing and rendering YAML documents
 License:        BSD-3-Clause
 Group:          System/Libraries
 Url:            http://hackage.haskell.org/package/%{pkg_name}
 Source0:        
http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-
+# End cabal-rpm deps
+BuildRequires:  chrpath
 BuildRequires:  ghc-Cabal-devel
-BuildRequires:  ghc-rpm-macros
 # Begin cabal-rpm deps:
 BuildRequires:  ghc-aeson-devel
 BuildRequires:  ghc-attoparsec-devel
@@ -38,16 +36,14 @@
 BuildRequires:  ghc-containers-devel
 BuildRequires:  ghc-enclosed-exceptions-devel
 BuildRequires:  ghc-resourcet-devel
+BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-scientific-devel
 BuildRequires:  ghc-text-devel
 BuildRequires:  ghc-transformers-devel
 BuildRequires:  ghc-unordered-containers-devel
 BuildRequires:  ghc-vector-devel
-# End cabal-rpm deps
-BuildRequires:  chrpath
 BuildRequires:  libyaml-devel
-BuildRequires:  pkg-config
-
+BuildRequires:  pkgconfig(pkg-config)
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
@@ -73,6 +69,7 @@
 %setup -q -n %{pkg_name}-%{version}
 
 %build
+
 %define cabal_configure_options -f system-libyaml
 %ghc_lib_build
 

++++++ yaml-0.8.10.1.tar.gz -> yaml-0.8.11.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yaml-0.8.10.1/ChangeLog.md 
new/yaml-0.8.11/ChangeLog.md
--- old/yaml-0.8.10.1/ChangeLog.md      2014-12-03 12:38:27.000000000 +0100
+++ new/yaml-0.8.11/ChangeLog.md        2015-04-19 08:52:46.000000000 +0200
@@ -1,3 +1,7 @@
+## 0.8.11
+
+* Function to print prettier parse exceptions 
[#59](https://github.com/snoyberg/yaml/pull/59)
+
 ## 0.8.10
 
 Add the Data.Yaml.Include module
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yaml-0.8.10.1/Data/Yaml/Internal.hs 
new/yaml-0.8.11/Data/Yaml/Internal.hs
--- old/yaml-0.8.10.1/Data/Yaml/Internal.hs     2014-12-03 12:38:27.000000000 
+0100
+++ new/yaml-0.8.11/Data/Yaml/Internal.hs       2015-04-19 08:52:46.000000000 
+0200
@@ -5,6 +5,7 @@
 module Data.Yaml.Internal
     (
       ParseException(..)
+    , prettyPrintParseException
     , parse
     , decodeHelper
     , decodeHelper_
@@ -52,7 +53,46 @@
                     | NonStringKeyAlias Y.AnchorName Value
                     | CyclicIncludes
     deriving (Show, Typeable)
-instance Exception ParseException
+
+instance Exception ParseException where
+#if MIN_VERSION_base(4, 8, 0)
+  displayException = prettyPrintParseException
+#endif
+
+-- | Alternative to 'show' to display a 'ParseException' on the screen.
+--   Instead of displaying the data constructors applied to their arguments,
+--   a more textual output is returned. For example, instead of printing:
+--
+-- > AesonException "The key \"foo\" was not found"
+--
+--   It looks more pleasant to print:
+--
+-- > Aeson exception: The key "foo" was not found
+--
+-- Since 0.8.11
+prettyPrintParseException :: ParseException -> String
+prettyPrintParseException NonScalarKey = "Non scalar key"
+prettyPrintParseException (UnknownAlias n) =
+  "Unknown alias: " ++ n
+prettyPrintParseException (UnexpectedEvent r e) = unlines
+  [ "Unexpected event:"
+  , "  Received: " ++ maybe "None" show r
+  , "  Expected: " ++ maybe "None" show e
+    ]
+prettyPrintParseException (InvalidYaml mye) =
+  case mye of
+    Just ye -> "Invalid yaml: " ++ show ye
+    _ -> "Invalid yaml"
+prettyPrintParseException (AesonException e) =
+  "Aeson exception: " ++ e
+prettyPrintParseException (OtherParseException e) =
+  "Parse exception: " ++ show e
+prettyPrintParseException (NonStringKeyAlias n v) = unlines
+  [ "Non-string key alias:"
+  , "  Anchor name: " ++ n
+  , "  Value: " ++ show v 
+    ]
+prettyPrintParseException CyclicIncludes = "Cyclic includes"
 
 newtype PErrorT m a = PErrorT { runPErrorT :: m (Either ParseException a) }
 instance Monad m => Functor (PErrorT m) where
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yaml-0.8.10.1/Data/Yaml.hs 
new/yaml-0.8.11/Data/Yaml.hs
--- old/yaml-0.8.10.1/Data/Yaml.hs      2014-12-03 12:38:27.000000000 +0100
+++ new/yaml-0.8.11/Data/Yaml.hs        2015-04-19 08:52:46.000000000 +0200
@@ -24,6 +24,7 @@
     , Object
     , Array
     , ParseException(..)
+    , prettyPrintParseException
     , YamlException (..)
     , YamlMark (..)
       -- * Constructors and accessors
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yaml-0.8.10.1/exe/yaml2json.hs 
new/yaml-0.8.11/exe/yaml2json.hs
--- old/yaml-0.8.10.1/exe/yaml2json.hs  2014-12-03 12:38:27.000000000 +0100
+++ new/yaml-0.8.11/exe/yaml2json.hs    2015-04-19 08:52:46.000000000 +0200
@@ -1,5 +1,3 @@
-{-# LANGUAGE ScopedTypeVariables #-}
-
 import Data.Yaml (decodeFileEither, decodeEither')
 import System.Environment (getArgs)
 import System.Exit
@@ -11,18 +9,18 @@
 helpMessage :: IO ()
 helpMessage = putStrLn "yaml2json FILE\n  use - as FILE to indicate stdin" >> 
exitFailure
 
+showJSON :: Show a => Either a Value -> IO b
 showJSON ejson =
     case ejson of
        Left err -> print err >> exitFailure
-       Right (res :: Value) -> putStr (encode res) >> exitSuccess
+       Right res -> putStr (encode (res :: Value)) >> exitSuccess
 
 main :: IO ()
 main = do
     args <- getArgs
     case args of
-       [] -> helpMessage
-       (f:a:_)  -> helpMessage
        -- strict getContents will read in all of stdin at once
-       ("-":[]) -> getContents >>= showJSON . decodeEither'
-       (f:[])   -> decodeFileEither f >>= showJSON
+       (["-"]) -> getContents >>= showJSON . decodeEither'
+       ([f])   -> decodeFileEither f >>= showJSON
+       _ -> helpMessage
        
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yaml-0.8.10.1/yaml.cabal new/yaml-0.8.11/yaml.cabal
--- old/yaml-0.8.10.1/yaml.cabal        2014-12-03 12:38:27.000000000 +0100
+++ new/yaml-0.8.11/yaml.cabal  2015-04-19 08:52:46.000000000 +0200
@@ -1,5 +1,5 @@
 name:            yaml
-version:         0.8.10.1
+version:         0.8.11
 license:         BSD3
 license-file:    LICENSE
 author:          Michael Snoyman <mich...@snoyman.com>, Anton Ageev 
<ant...@gmail.com>,Kirill Simonov 


Reply via email to