aboutsummaryrefslogtreecommitdiff
path: root/test/Main.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-05-20 21:14:03 +0200
committerTom Smeding <tom@tomsmeding.com>2024-05-20 21:14:03 +0200
commit583607f51dac5b1d0a97d97ed6594498b1ecc731 (patch)
treeb24e5c6bcce42a391fb393c777a1ea45779cdfa0 /test/Main.hs
parent03de6cb0a8b9ae114edb3690dc096b17a98b7b4f (diff)
Rename 'test' component to 'example'
Diffstat (limited to 'test/Main.hs')
-rw-r--r--test/Main.hs29
1 files changed, 0 insertions, 29 deletions
diff --git a/test/Main.hs b/test/Main.hs
deleted file mode 100644
index 76c75c2..0000000
--- a/test/Main.hs
+++ /dev/null
@@ -1,29 +0,0 @@
-{-# LANGUAGE DataKinds #-}
-{-# LANGUAGE GADTs #-}
-{-# LANGUAGE TypeApplications #-}
-module Main where
-
-import Data.Array.Nested
-
-
-arr :: Ranked 2 (Shaped [2, 3] (Double, Int))
-arr = rgenerate (3 :$: 4 :$: ZSR) $ \(i :.: j :.: ZIR) ->
- sgenerate (SNat @2 :$$ SNat @3 :$$ ZSS) $ \(k :.$ l :.$ ZIS) ->
- let s = 24*i + 6*j + 3*k + l
- in (fromIntegral s, s)
-
-foo :: (Double, Int)
-foo = arr `rindex` (2 :.: 1 :.: ZIR) `sindex` (1 :.$ 1 :.$ ZIS)
-
-bad :: Ranked 2 (Ranked 1 Double)
-bad = rgenerate (3 :$: 4 :$: ZSR) $ \(i :.: j :.: ZIR) ->
- rgenerate (i :$: ZSR) $ \(k :.: ZIR) ->
- let s = 24*i + 6*j + 3*k
- in fromIntegral s
-
-main :: IO ()
-main = do
- print arr
- print foo
- print (rtranspose [1,0] arr)
- -- print bad