diff options
author | Tom Smeding <tom@tomsmeding.com> | 2024-05-13 22:47:42 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2024-05-13 22:47:42 +0200 |
commit | e4e23a33f77d250af1e9b6614cf249128ba1510a (patch) | |
tree | 34bb40910003749becbaf8005a7b7ca62024fff2 /test/Main.hs | |
parent | 7c9865354442326d55094087ad6a74b6e96341fb (diff) |
Shape/index hygiene
Diffstat (limited to 'test/Main.hs')
-rw-r--r-- | test/Main.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/Main.hs b/test/Main.hs index 0a07531..2363813 100644 --- a/test/Main.hs +++ b/test/Main.hs @@ -7,7 +7,7 @@ import Data.Array.Nested arr :: Ranked I2 (Shaped [2, 3] (Double, Int)) -arr = rgenerate (3 :.: 4 :.: ZIR) $ \(i :.: j :.: ZIR) -> +arr = rgenerate (3 :$: 4 :$: ZSR) $ \(i :.: j :.: ZIR) -> sgenerate @[2, 3] $ \(k :.$ l :.$ ZIS) -> let s = 24*i + 6*j + 3*k + l in (fromIntegral s, s) @@ -16,8 +16,8 @@ foo :: (Double, Int) foo = arr `rindex` (2 :.: 1 :.: ZIR) `sindex` (1 :.$ 1 :.$ ZIS) bad :: Ranked I2 (Ranked I1 Double) -bad = rgenerate (3 :.: 4 :.: ZIR) $ \(i :.: j :.: ZIR) -> - rgenerate (i :.: ZIR) $ \(k :.: ZIR) -> +bad = rgenerate (3 :$: 4 :$: ZSR) $ \(i :.: j :.: ZIR) -> + rgenerate (i :$: ZSR) $ \(k :.: ZIR) -> let s = 24*i + 6*j + 3*k in fromIntegral s |