diff options
| -rw-r--r-- | src/Data/Array/Nested/Shaped/Shape.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Data/Array/Nested/Shaped/Shape.hs b/src/Data/Array/Nested/Shaped/Shape.hs index 60800ae..0d90e91 100644 --- a/src/Data/Array/Nested/Shaped/Shape.hs +++ b/src/Data/Array/Nested/Shaped/Shape.hs @@ -362,12 +362,12 @@ shsSize (n :$$ sh) = fromSNat' n * shsSize sh -- | This is a partial @const@ that fails when the second argument -- doesn't match the first. shsFromList :: ShS sh -> [Int] -> ShS sh -shsFromList topsh topl = go topsh topl +shsFromList topsh topl = go topsh topl `seq` topsh where - go :: ShS sh' -> [Int] -> ShS sh' - go sh0@ZSS [] = sh0 - go sh0@(sn :$$ sh) (i : is) - | i == fromSNat' sn = go sh is `seq` sh0 + go :: ShS sh' -> [Int] -> () + go ZSS [] = () + go (sn :$$ sh) (i : is) + | i == fromSNat' sn = go sh is | otherwise = error $ "shsFromList: Value does not match typing (type says " ++ show (fromSNat' sn) ++ ", list contains " ++ show i ++ ")" go _ _ = error $ "shsFromList: Mismatched list length (type says " |
