diff options
author | Tom Smeding <tom@tomsmeding.com> | 2024-05-14 10:43:06 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2024-05-14 10:43:06 +0200 |
commit | f5bc67f8530c50f90692824192d7dfb81ba1b334 (patch) | |
tree | 1cf6f0ecdbbaa9aaa6be6665df9bf8355af952c9 /src/Data/Array/Mixed.hs | |
parent | 172925e245728efb50d692c2f7460fd3e5f6dca2 (diff) |
Better {from,to}List{,1} names
Diffstat (limited to 'src/Data/Array/Mixed.hs')
-rw-r--r-- | src/Data/Array/Mixed.hs | 10 |
1 files changed, 5 insertions, 5 deletions
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 |