packages feed

linear-circuit 0.0 → 0.0.0.1

raw patch · 2 files changed

+17/−8 lines, 2 filesdep ~containersdep ~transformersPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: containers, transformers

API changes (from Hackage documentation)

Files

linear-circuit.cabal view
@@ -1,5 +1,5 @@ Name:                linear-circuit-Version:             0.0+Version:             0.0.0.1 Synopsis:            Compute resistance of linear electrical circuits Description:   Compute resistance of linear electrical circuits.@@ -15,7 +15,7 @@ Cabal-Version:       >=1.10  Source-Repository this-  Tag:         0.0+  Tag:         0.0.0.1   Type:        darcs   Location:    http://hub.darcs.net/thielema/linear-circuit @@ -29,7 +29,7 @@   Build-Depends:     comfort-graph >=0.0 && <0.1,     hmatrix >=0.16 && <0.17,-    containers >=0.4 && <0.6,+    containers >=0.4 && <0.7,     utility-ht >=0.0.11 && <0.1,     base >=4.5 && <5   Hs-Source-Dirs:      src@@ -48,7 +48,7 @@     QuickCheck >=2 && <3,     comfort-graph,     non-empty >0.2 && <0.4,-    transformers >=0.4 && <0.5,+    transformers >=0.5 && <0.6,     containers,     utility-ht,     base
test/Tree.hs view
@@ -21,7 +21,8 @@ import qualified Data.NonEmpty as NonEmpty import qualified Data.Foldable as Fold import qualified Data.List.Match as Match-import Data.Functor.Classes (Eq1, Ord1, Show1, eq1, compare1, showsPrec1)+import Data.Functor.Classes+         (Eq1, Ord1, Show1, liftEq, liftCompare, liftShowsPrec) import Data.Monoid (mappend) import Data.Ord.HT (comparing) import Data.Eq.HT (equating)@@ -93,9 +94,17 @@ instance Eq (Edge a) where (==) = equating edgeId instance Ord (Edge a) where compare = comparing edgeId -instance Eq1 Edge where eq1 = (==)-instance Ord1 Edge where compare1 = compare-instance Show1 Edge where showsPrec1 = showsPrec+instance Eq1 Edge where+   liftEq _eq e0 e1 = edgeId e0 == edgeId e1+instance Ord1 Edge where+   liftCompare _cmp e0 e1 = compare (edgeId e0) (edgeId e1)+instance Show1 Edge where+   liftShowsPrec showsPrc _showList prec (Edge n from to) =+      showParen (prec>10) $+         showString "Edge"+            . showChar ' ' . showsPrec 11 n+            . showChar ' ' . showsPrc 11 from+            . showChar ' ' . showsPrc 11 to  instance Fold.Foldable Edge where    foldMap f (Edge _ x y) = mappend (f x) (f y)