diff options
Diffstat (limited to 'src/Data/Array/Nested/Internal')
-rw-r--r-- | src/Data/Array/Nested/Internal/Shape.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Data/Array/Nested/Internal/Shape.hs b/src/Data/Array/Nested/Internal/Shape.hs index a7797a7..b7bbf4c 100644 --- a/src/Data/Array/Nested/Internal/Shape.hs +++ b/src/Data/Array/Nested/Internal/Shape.hs @@ -273,12 +273,14 @@ shrPermutePrefix = coerce (listrPermutePrefix @i) -- | Untyped: length is checked at runtime. instance KnownNat n => IsList (ListR n i) where type Item (ListR n i) = i - fromList = go (SNat @n) + fromList topl = go (SNat @n) topl where go :: SNat n' -> [i] -> ListR n' i go SZ [] = ZR go (SS n) (i : is) = i ::: go n is - go _ _ = error "IsList(ListR): Mismatched list length" + go _ _ = error $ "IsList(ListR): Mismatched list length (type says " + ++ show (fromSNat (SNat @n)) ++ ", list has length " + ++ show (length topl) ++ ")" toList = Foldable.toList -- | Untyped: length is checked at runtime. |