diff options
| author | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2026-04-03 22:42:03 +0200 |
|---|---|---|
| committer | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2026-04-03 22:42:03 +0200 |
| commit | 2095a851760b6bb44ba92b70df1efceff1bad267 (patch) | |
| tree | 9bb83e39fdd7769842fbd60e2efa2287a801961d /src | |
| parent | db163c981f796264e17019537a1ab2a5ae3573e1 (diff) | |
Simplify the index list pattern synonyms
Diffstat (limited to 'src')
| -rw-r--r-- | src/Data/Array/Nested/Mixed/Shape.hs | 4 | ||||
| -rw-r--r-- | src/Data/Array/Nested/Ranked/Shape.hs | 2 | ||||
| -rw-r--r-- | src/Data/Array/Nested/Shaped/Shape.hs | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/Data/Array/Nested/Mixed/Shape.hs b/src/Data/Array/Nested/Mixed/Shape.hs index f8b19c2..c2ab93f 100644 --- a/src/Data/Array/Nested/Mixed/Shape.hs +++ b/src/Data/Array/Nested/Mixed/Shape.hs @@ -173,8 +173,8 @@ pattern (:.%) :: forall {sh1} {i}. forall n sh. (n : sh ~ sh1) => i -> IxX sh i -> IxX sh1 i -pattern i :.% shl <- IxX (listxUncons -> Just (UnconsListXRes (IxX -> shl) i)) - where i :.% IxX shl = IxX (i ::% shl) +pattern i :.% sh <- IxX (i ::% (IxX -> sh)) + where i :.% IxX sh = IxX (i ::% sh) infixr 3 :.% {-# COMPLETE ZIX, (:.%) #-} diff --git a/src/Data/Array/Nested/Ranked/Shape.hs b/src/Data/Array/Nested/Ranked/Shape.hs index c5cdf6b..b8b5a28 100644 --- a/src/Data/Array/Nested/Ranked/Shape.hs +++ b/src/Data/Array/Nested/Ranked/Shape.hs @@ -222,7 +222,7 @@ pattern (:.:) :: forall {n1} {i}. forall n. (n + 1 ~ n1) => i -> IxR n i -> IxR n1 i -pattern i :.: sh <- IxR (listrUncons -> Just (UnconsListRRes (IxR -> sh) i)) +pattern i :.: sh <- IxR (i ::: (IxR -> sh)) where i :.: IxR sh = IxR (i ::: sh) infixr 3 :.: diff --git a/src/Data/Array/Nested/Shaped/Shape.hs b/src/Data/Array/Nested/Shaped/Shape.hs index 69465a2..d59f65c 100644 --- a/src/Data/Array/Nested/Shaped/Shape.hs +++ b/src/Data/Array/Nested/Shaped/Shape.hs @@ -197,8 +197,8 @@ pattern (:.$) :: forall {sh1} {i}. forall n sh. (n : sh ~ sh1) => i -> IxS sh i -> IxS sh1 i -pattern i :.$ shl <- IxS (listsUncons -> Just (UnconsListSRes (IxS -> shl) i)) - where i :.$ IxS shl = IxS (i ::$ shl) +pattern i :.$ sh <- IxS (i ::$ (IxS -> sh)) + where i :.$ IxS sh = IxS (i ::$ sh) infixr 3 :.$ {-# COMPLETE ZIS, (:.$) #-} |
