diff options
Diffstat (limited to 'lib/Data/Packed/Internal/Common.hs')
-rw-r--r-- | lib/Data/Packed/Internal/Common.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Data/Packed/Internal/Common.hs b/lib/Data/Packed/Internal/Common.hs index 49f17b0..edef3c2 100644 --- a/lib/Data/Packed/Internal/Common.hs +++ b/lib/Data/Packed/Internal/Common.hs | |||
@@ -49,7 +49,11 @@ common f = commonval . map f where | |||
49 | compatdim :: [Int] -> Maybe Int | 49 | compatdim :: [Int] -> Maybe Int |
50 | compatdim [] = Nothing | 50 | compatdim [] = Nothing |
51 | compatdim [a] = Just a | 51 | compatdim [a] = Just a |
52 | compatdim (a:b:xs) = if a==b || a==1 || b==1 then compatdim (max a b:xs) else Nothing | 52 | compatdim (a:b:xs) |
53 | | a==b = compatdim (b:xs) | ||
54 | | a==1 = compatdim (b:xs) | ||
55 | | b==1 = compatdim (a:xs) | ||
56 | | otherwise = Nothing | ||
53 | 57 | ||
54 | -- | Formatting tool | 58 | -- | Formatting tool |
55 | table :: String -> [[String]] -> String | 59 | table :: String -> [[String]] -> String |