Skip to content
Snippets Groups Projects

Avoid nonconfluence in hgeometry-combinatorial

Merged sheaf requested to merge hgeometry-deriveds into master
1 file
+ 19
1
Compare changes
  • Side-by-side
  • Inline
diff --git a/src/Data/LSeq.hs b/src/Data/LSeq.hs
index 1912cb2..90eadef 100644
index 1912cb2d..00a7d6f6 100644
--- a/src/Data/LSeq.hs
+++ b/src/Data/LSeq.hs
@@ -1,5 +1,6 @@
@@ -9,3 +9,21 @@ index 1912cb2..90eadef 100644
--------------------------------------------------------------------------------
-- |
-- Module : Data.LSeq
@@ -260,7 +261,7 @@ data ViewL n a where
infixr 5 :<
instance Semigroup (ViewL n a) where
- (x :< xs) <> (y :< ys) = x :< LSeq (toSeq xs <> (y S.<| toSeq ys))
+ ((:<) @_ @m x xs) <> (y :< ys) = (:<) @_ @m x (LSeq (toSeq xs <> (y S.<| toSeq ys)))
deriving instance Show a => Show (ViewL n a)
instance Functor (ViewL n) where
@@ -328,7 +329,7 @@ data ViewR n a where
infixl 5 :>
instance Semigroup (ViewR n a) where
- (xs :> x) <> (ys :> y) = LSeq ((toSeq xs S.|> x) <> toSeq ys) :> y
+ ((:>) @m xs x) <> (ys :> y) = (:>) @m (LSeq ((toSeq xs S.|> x) <> toSeq ys)) y
deriving instance Show a => Show (ViewR n a)
instance Functor (ViewR n) where
Loading