summaryrefslogtreecommitdiff
path: root/test/Main.hs
diff options
context:
space:
mode:
authorTom Smeding <t.j.smeding@uu.nl>2024-04-09 18:35:35 +0200
committerTom Smeding <t.j.smeding@uu.nl>2024-04-09 18:35:35 +0200
commit36a89c7a26d73b0583ac765d29dadb1b918007f6 (patch)
treec497bc390a252a58ac21b14260fb655690cf75b8 /test/Main.hs
parentffa91484573a2c2be3f6ae2190c768e7a77e8b5c (diff)
Transpose functions in the API
Diffstat (limited to 'test/Main.hs')
-rw-r--r--test/Main.hs3
1 files changed, 2 insertions, 1 deletions
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)