From 36a89c7a26d73b0583ac765d29dadb1b918007f6 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Tue, 9 Apr 2024 18:35:35 +0200 Subject: Transpose functions in the API --- test/Main.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/Main.hs') diff --git a/test/Main.hs b/test/Main.hs index 156e0a5..8257ff0 100644 --- a/test/Main.hs +++ b/test/Main.hs @@ -9,7 +9,7 @@ import Data.Array.Nested arr :: Ranked N2 (Shaped [N2, N3] (Double, Int)) arr = rgenerate (3 ::: 4 ::: IZR) $ \(i ::: j ::: IZR) -> sgenerate @[N2, N3] (2 ::$ 3 ::$ IZS) $ \(k ::$ l ::$ IZS) -> - let s = i + j + k + l + let s = 24*i + 6*j + 3*k + l in (fromIntegral s, s) foo :: (Double, Int) @@ -19,3 +19,4 @@ main :: IO () main = do print arr print foo + print (rtranspose [1,0] arr) -- cgit v1.2.3-70-g09d2