From f0752d67cd188f438280e1f0c692dc1f5f14a190 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Thu, 30 May 2024 22:20:57 +0200 Subject: Refactor Nested (modules, function names) --- test/Tests/C.hs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'test/Tests') 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 === [] ] ] -- cgit v1.2.3-70-g09d2