Package fix/takeover: AC-Vector
Jan Rochel
jan at rochel.info
Thu Feb 15 14:58:24 UTC 2024
Hello,
Here's my attempt to take over an apparently unmaintained package:
https://hackage.haskell.org/package/AC-Vector
It has been suggested to me to do this here:
https://github.com/haskell-infra/hackage-trustees/issues/391
I have prepared a patch rendering the instance declarations in code
compatible with the class structure of base>=4.9. If any authorised person
were to simply apply the enclosed patch, I'd appreciate that too.
That's all,
Jan
-------------- next part --------------
diff --git AC-Vector.cabal AC-Vector.cabal
index ddb9e39..5081d1b 100644
--- AC-Vector.cabal
+++ AC-Vector.cabal
@@ -1,6 +1,6 @@
Cabal-Version: >= 1.6
Name: AC-Vector
-Version: 2.3.2
+Version: 2.4.0
x-revision: 1
Stability: Experimental
Synopsis: Efficient geometric vectors and transformations.
@@ -44,5 +44,5 @@ Library
Data.BoundingBox.B2,
Data.BoundingBox.B3,
Data.BoundingBox.B4
- Build-Depends: base >= 4 && < 5
+ Build-Depends: base >= 4.9 && < 5
HS-Source-Dirs: .
diff --git Data/Vector/Transform/T1.hs Data/Vector/Transform/T1.hs
index bc892a8..9c66b33 100644
--- Data/Vector/Transform/T1.hs
+++ Data/Vector/Transform/T1.hs
@@ -4,6 +4,7 @@
module Data.Vector.Transform.T1 where
+import Data.Semigroup
import Data.Monoid
import Data.Vector.Class
@@ -23,7 +24,9 @@ data Transform1 =
instance Monoid Transform1 where
mempty = Transform1 1 0
- mappend a b =
+
+instance Semigroup Transform1 where
+ a <> b =
Transform1
{
t1_XX = t1_XX a * t1_XX b,
diff --git Data/Vector/Transform/T2.hs Data/Vector/Transform/T2.hs
index 1011935..5fce79a 100644
--- Data/Vector/Transform/T2.hs
+++ Data/Vector/Transform/T2.hs
@@ -4,6 +4,7 @@
module Data.Vector.Transform.T2 where
+import Data.Semigroup
import Data.Monoid
import Data.Vector.Class
@@ -24,7 +25,9 @@ data Transform2 =
instance Monoid Transform2 where
mempty = Transform2 1 0 0 0 1 0
- mappend a b =
+
+instance Semigroup Transform2 where
+ a <> b =
Transform2
{
t2_XX = t2_XX a * t2_XX b + t2_XY a * t2_YX b,
diff --git Data/Vector/Transform/T3.hs Data/Vector/Transform/T3.hs
index 486eadf..2bed2ed 100644
--- Data/Vector/Transform/T3.hs
+++ Data/Vector/Transform/T3.hs
@@ -4,6 +4,7 @@
module Data.Vector.Transform.T3 where
+import Data.Semigroup
import Data.Monoid
import Data.Vector.Class
@@ -25,7 +26,9 @@ data Transform3 =
instance Monoid Transform3 where
mempty = Transform3 1 0 0 0 0 1 0 0 0 0 1 0
- mappend a b =
+
+instance Semigroup Transform3 where
+ a <> b =
Transform3
{
t3_XX = t3_XX a * t3_XX b + t3_XY a * t3_YX b + t3_XZ a * t3_ZX b,
diff --git Data/Vector/Transform/T4.hs Data/Vector/Transform/T4.hs
index ec57a08..c68b4da 100644
--- Data/Vector/Transform/T4.hs
+++ Data/Vector/Transform/T4.hs
@@ -4,6 +4,7 @@
module Data.Vector.Transform.T4 where
+import Data.Semigroup
import Data.Monoid
import Data.Vector.Class
@@ -26,7 +27,9 @@ data Transform4 =
instance Monoid Transform4 where
mempty = Transform4 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0
- mappend a b =
+
+instance Semigroup Transform4 where
+ a <> b =
Transform4
{
t4_XX = t4_XX a * t4_XX b + t4_XY a * t4_YX b + t4_XZ a * t4_ZX b + t4_XW a * t4_WX b,
More information about the Libraries
mailing list