Hello community,
here is the log from the commit of package ghc-partial-handler for
openSUSE:Factory checked in at 2016-11-10 13:20:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-partial-handler (Old)
and /work/SRC/openSUSE:Factory/.ghc-partial-handler.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-partial-handler"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-partial-handler/ghc-partial-handler.changes
2016-10-22 13:15:10.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.ghc-partial-handler.new/ghc-partial-handler.changes
2016-11-10 13:20:14.000000000 +0100
@@ -1,0 +2,5 @@
+Sun Oct 30 16:26:32 UTC 2016 - [email protected]
+
+- Update to version 1.0.2 with cabal2obs.
+
+-------------------------------------------------------------------
Old:
----
partial-handler-1.0.1.tar.gz
New:
----
partial-handler-1.0.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-partial-handler.spec ++++++
--- /var/tmp/diff_new_pack.JtBA1f/_old 2016-11-10 13:20:15.000000000 +0100
+++ /var/tmp/diff_new_pack.JtBA1f/_new 2016-11-10 13:20:15.000000000 +0100
@@ -18,11 +18,11 @@
%global pkg_name partial-handler
Name: ghc-%{pkg_name}
-Version: 1.0.1
+Version: 1.0.2
Release: 0
Summary: A composable exception handler
License: MIT
-Group: System/Libraries
+Group: Development/Languages/Other
Url: https://hackage.haskell.org/package/%{pkg_name}
Source0:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
BuildRequires: ghc-Cabal-devel
@@ -32,7 +32,8 @@
%description
If you have ever had to compose an exception handler for exceptions of multiple
types, you know how frustraiting it can get. This library approaches this issue
-by providing a composable exception handler type, which has a Monoid instance.
+by providing a composable exception handler type, which has instances of the
+standard classes.
Composability means that you can define custom partial handlers and reuse them
by composing other handlers from them.
@@ -76,15 +77,12 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-
%build
%ghc_lib_build
-
%install
%ghc_lib_install
-
%post devel
%ghc_pkg_recache
++++++ partial-handler-1.0.1.tar.gz -> partial-handler-1.0.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/partial-handler-1.0.1/library/PartialHandler.hs
new/partial-handler-1.0.2/library/PartialHandler.hs
--- old/partial-handler-1.0.1/library/PartialHandler.hs 2016-05-31
21:27:57.000000000 +0200
+++ new/partial-handler-1.0.2/library/PartialHandler.hs 2016-10-25
13:43:34.000000000 +0200
@@ -16,11 +16,28 @@
PartialHandler (SomeException -> Maybe (IO a))
+instance Functor PartialHandler where
+ fmap fn (PartialHandler partialHandlerFn) =
+ PartialHandler (fmap (fmap fn) . partialHandlerFn)
+
+instance Applicative PartialHandler where
+ pure x =
+ PartialHandler (const (pure (pure x)))
+ (<*>) (PartialHandler partialHandlerFn1) (PartialHandler partialHandlerFn2) =
+ PartialHandler (liftA2 (liftA2 (liftA2 ($))) partialHandlerFn1
partialHandlerFn2)
+
+instance Alternative PartialHandler where
+ empty =
+ PartialHandler (const Nothing)
+ (<|>) (PartialHandler partialHandlerFn1) (PartialHandler partialHandlerFn2) =
+ PartialHandler (liftA2 (<|>) partialHandlerFn1 partialHandlerFn2)
+
instance Monoid (PartialHandler a) where
mempty =
- PartialHandler $ const Nothing
- mappend (PartialHandler h1) (PartialHandler h2) =
- PartialHandler $ \e -> h1 e <|> h2 e
+ empty
+ mappend =
+ (<|>)
+
-- * Totalizers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/partial-handler-1.0.1/partial-handler.cabal
new/partial-handler-1.0.2/partial-handler.cabal
--- old/partial-handler-1.0.1/partial-handler.cabal 2016-05-31
21:27:57.000000000 +0200
+++ new/partial-handler-1.0.2/partial-handler.cabal 2016-10-25
13:43:34.000000000 +0200
@@ -1,14 +1,14 @@
name:
partial-handler
version:
- 1.0.1
+ 1.0.2
synopsis:
A composable exception handler
description:
If you have ever had to compose an exception handler for exceptions of
multiple types,
you know how frustraiting it can get.
This library approaches this issue by providing a composable exception
handler type,
- which has a Monoid instance.
+ which has instances of the standard classes.
.
Composability means that you can define custom partial handlers and
reuse them by composing other handlers from them.
@@ -81,9 +81,7 @@
PartialHandler
build-depends:
base >= 4.6 && < 5
- ghc-options:
- -funbox-strict-fields
default-extensions:
- LambdaCase
+ Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures,
DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric,
DeriveTraversable, EmptyDataDecls, FlexibleContexts, FlexibleInstances,
FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, LambdaCase,
LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf,
NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards,
ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards,
ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections,
TypeFamilies, TypeOperators, UnboxedTuples
default-language:
Haskell2010