diff options
author | Tom Smeding <tom@tomsmeding.com> | 2024-05-30 22:20:57 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2024-05-30 22:20:57 +0200 |
commit | f0752d67cd188f438280e1f0c692dc1f5f14a190 (patch) | |
tree | 2dd05c13aef3b3c6384bfa091b14633bc86e65a4 /test | |
parent | 19eab026f4f4c6a2d38ceb1fffa6062ba2637a46 (diff) |
Refactor Nested (modules, function names)
Diffstat (limited to 'test')
-rw-r--r-- | test/Gen.hs | 1 | ||||
-rw-r--r-- | test/Tests/C.hs | 20 |
2 files changed, 11 insertions, 10 deletions
diff --git a/test/Gen.hs b/test/Gen.hs index 9652963..3e879b9 100644 --- a/test/Gen.hs +++ b/test/Gen.hs @@ -18,7 +18,6 @@ import Foreign import GHC.TypeLits import qualified GHC.TypeNats as TN -import Data.Array.Mixed import Data.Array.Mixed.Types import Data.Array.Nested 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 === [] ] ] |