From f5bc67f8530c50f90692824192d7dfb81ba1b334 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Tue, 14 May 2024 10:43:06 +0200 Subject: Better {from,to}List{,1} names --- src/Data/Array/Mixed.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Data/Array/Mixed.hs') diff --git a/src/Data/Array/Mixed.hs b/src/Data/Array/Mixed.hs index 94b7cdf..2b6bfe2 100644 --- a/src/Data/Array/Mixed.hs +++ b/src/Data/Array/Mixed.hs @@ -387,9 +387,9 @@ sumOuter ssh ssh' | Refl <- lemAppNil @sh = sumInner ssh' ssh . transpose2 ssh ssh' -fromList :: forall n sh a. Storable a - => StaticShX (n : sh) -> [XArray sh a] -> XArray (n : sh) a -fromList ssh l +fromList1 :: forall n sh a. Storable a + => StaticShX (n : sh) -> [XArray sh a] -> XArray (n : sh) a +fromList1 ssh l | Dict <- lemKnownINatRankSSX ssh , Dict <- knownNatFromINat (Proxy @(Rank (n : sh))) = case ssh of @@ -398,8 +398,8 @@ fromList ssh l "does not match the type (" ++ show (natVal m) ++ ")" _ -> XArray (S.ravel (ORB.fromList [length l] (coerce @[XArray sh a] @[S.Array (FromINat (Rank sh)) a] l))) -toList :: Storable a => XArray (n : sh) a -> [XArray sh a] -toList (XArray arr) = coerce (ORB.toList (S.unravel arr)) +toList1 :: Storable a => XArray (n : sh) a -> [XArray sh a] +toList1 (XArray arr) = coerce (ORB.toList (S.unravel arr)) -- | Throws if the given shape is not, in fact, empty. empty :: forall sh a. Storable a => IShX sh -> XArray sh a -- cgit v1.2.3-70-g09d2