diff options
Diffstat (limited to 'src/Data/Array/Nested/Shaped.hs')
-rw-r--r-- | src/Data/Array/Nested/Shaped.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Data/Array/Nested/Shaped.hs b/src/Data/Array/Nested/Shaped.hs index 198a068..2c64bb4 100644 --- a/src/Data/Array/Nested/Shaped.hs +++ b/src/Data/Array/Nested/Shaped.hs @@ -1,4 +1,5 @@ {-# LANGUAGE DataKinds #-} +{-# LANGUAGE GADTs #-} {-# LANGUAGE ImportQualifiedPost #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -199,6 +200,14 @@ srerank :: forall sh1 sh2 sh a b. (PrimElt a, PrimElt b) srerank sh sh2 f (stoPrimitive -> arr) = sfromPrimitive $ srerankP sh sh2 (stoPrimitive . f . sfromPrimitive) arr +-- data RepTrans sh sh' where +-- RTNil :: RepTrans sh '[] +-- RTUse :: SNat i -> RepTrans sh sh' -> RepTrans sh (Index i sh : sh') +-- RTRep :: SNat n -> RepTrans sh sh' -> RepTrans sh (n : sh') + +-- sreptrans :: RepTrans sh sh' -> Shaped sh a -> Shaped sh' a +-- sreptrans + sreplicate :: forall sh sh' a. Elt a => ShS sh -> Shaped sh' a -> Shaped (sh ++ sh') a sreplicate sh (Shaped arr) | Refl <- lemMapJustApp sh (Proxy @sh') |