From dc66969bc009714486da40254aa3eff3ea57b035 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Mon, 4 Aug 2025 18:05:05 +0200 Subject: Failed experiment to add replicate/transpose combination --- src/Data/Array/Nested/Permutation.hs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/Data/Array/Nested/Permutation.hs') diff --git a/src/Data/Array/Nested/Permutation.hs b/src/Data/Array/Nested/Permutation.hs index 03d1640..c893dac 100644 --- a/src/Data/Array/Nested/Permutation.hs +++ b/src/Data/Array/Nested/Permutation.hs @@ -281,3 +281,12 @@ lemRankDropLen ZKX (_ `PCons` _) = error "1 <= 0" lemIndexSucc :: Proxy i -> Proxy a -> Proxy l -> Index (i + 1) (a : l) :~: Index i l lemIndexSucc _ _ _ = unsafeCoerceRefl + + +-- * Replication-transpositions + +data RepTrans f sh sh' where + RTNil :: RepTrans f sh '[] + RTUse :: SNat i -> RepTrans f sh sh' -> RepTrans f sh (Index i sh : sh') + RTRep :: f n -> RepTrans f sh sh' -> RepTrans f sh (n : sh') + -- cgit v1.2.3-70-g09d2