aboutsummaryrefslogtreecommitdiff
path: root/src/Data/Array/Nested
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/Array/Nested')
-rw-r--r--src/Data/Array/Nested/Internal.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Data/Array/Nested/Internal.hs b/src/Data/Array/Nested/Internal.hs
index d75aeaf..4a03548 100644
--- a/src/Data/Array/Nested/Internal.hs
+++ b/src/Data/Array/Nested/Internal.hs
@@ -1051,7 +1051,7 @@ rtoVector = coerce mtoVector
rfromList1 :: forall n a. (KnownINat n, Elt a) => NonEmpty (Ranked n a) -> Ranked (S n) a
rfromList1 l
| Dict <- lemKnownReplicate (Proxy @n)
- = Ranked (mfromList ((\(Ranked x) -> x) <$> l))
+ = Ranked (mfromList1 (coerce l))
rfromList :: Elt a => NonEmpty a -> Ranked I1 a
rfromList = Ranked . mfromList1 . fmap mscalar
@@ -1258,7 +1258,7 @@ sfromList1 :: forall n sh a. (KnownNat n, KnownShape sh, Elt a)
=> NonEmpty (Shaped sh a) -> Shaped (n : sh) a
sfromList1 l
| Dict <- lemKnownMapJust (Proxy @sh)
- = Shaped (mfromList ((\(Shaped x) -> x) <$> l))
+ = Shaped (mfromList1 (coerce l))
sfromList :: (KnownNat n, Elt a) => NonEmpty a -> Shaped '[n] a
sfromList = Shaped . mfromList1 . fmap mscalar