aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/C.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-05-30 22:20:57 +0200
committerTom Smeding <tom@tomsmeding.com>2024-05-30 22:20:57 +0200
commitf0752d67cd188f438280e1f0c692dc1f5f14a190 (patch)
tree2dd05c13aef3b3c6384bfa091b14633bc86e65a4 /test/Tests/C.hs
parent19eab026f4f4c6a2d38ceb1fffa6062ba2637a46 (diff)
Refactor Nested (modules, function names)
Diffstat (limited to 'test/Tests/C.hs')
-rw-r--r--test/Tests/C.hs20
1 files changed, 11 insertions, 9 deletions
diff --git a/test/Tests/C.hs b/test/Tests/C.hs
index 1041b2a..53955dc 100644
--- a/test/Tests/C.hs
+++ b/test/Tests/C.hs
@@ -1,5 +1,6 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
+{-# LANGUAGE ImportQualifiedPost #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeAbstractions #-}
{-# LANGUAGE TypeApplications #-}
@@ -9,20 +10,21 @@
module Tests.C where
import Control.Monad
-import qualified Data.Array.RankedS as OR
+import Data.Array.RankedS qualified as OR
import Data.Foldable (toList)
import Data.Type.Equality
import Foreign
import GHC.TypeLits
-import qualified Data.Array.Mixed as X
+import Data.Array.Mixed qualified as X
+import Data.Array.Mixed.Lemmas
import Data.Array.Nested
-import qualified Data.Array.Nested.Internal as I
+import Data.Array.Nested.Mixed
import Hedgehog
import Hedgehog.Internal.Property (forAllT)
-import qualified Hedgehog.Gen as Gen
-import qualified Hedgehog.Range as Range
+import Hedgehog.Gen qualified as Gen
+import Hedgehog.Range qualified as Range
import Test.Tasty
import Test.Tasty.Hedgehog
@@ -46,8 +48,8 @@ tests = testGroup "C"
(\w -> fromIntegral w / fromIntegral (maxBound :: Word64))
let rarr = rfromOrthotope inrank arr
-- annotateShow rarr
- Refl <- return $ I.lemRankReplicate outrank
- let Ranked (I.M_Double (I.M_Primitive _ (X.XArray lhs))) = rsumOuter1 rarr
+ Refl <- return $ lemRankReplicate outrank
+ let Ranked (M_Double (M_Primitive _ (X.XArray lhs))) = rsumOuter1 rarr
let rhs = orSumOuter1 outrank arr
-- annotateShow lhs
-- annotateShow rhs
@@ -66,8 +68,8 @@ tests = testGroup "C"
-- traceM ("sh: " ++ show sh ++ " -> " ++ show (product sh))
let arr = OR.fromList @Double @(n + 1) (toList sh) []
let rarr = rfromOrthotope inrank arr
- Refl <- return $ I.lemRankReplicate outrank
- let Ranked (I.M_Double (I.M_Primitive _ (X.XArray lhs))) = rsumOuter1 rarr
+ Refl <- return $ lemRankReplicate outrank
+ let Ranked (M_Double (M_Primitive _ (X.XArray lhs))) = rsumOuter1 rarr
OR.toList lhs === []
]
]