diff options
Diffstat (limited to 'packages/base/src/Internal/Static.hs')
-rw-r--r-- | packages/base/src/Internal/Static.hs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/base/src/Internal/Static.hs b/packages/base/src/Internal/Static.hs index f9dfff0..357645e 100644 --- a/packages/base/src/Internal/Static.hs +++ b/packages/base/src/Internal/Static.hs | |||
@@ -321,34 +321,34 @@ isDiagg (Dim (Dim x)) | |||
321 | instance KnownNat n => Show (R n) | 321 | instance KnownNat n => Show (R n) |
322 | where | 322 | where |
323 | show s@(R (Dim v)) | 323 | show s@(R (Dim v)) |
324 | | singleV v = "("++show (v!0)++" :: R "++show d++")" | 324 | | singleV v = "(" ++ show (v!0) ++ " :: R " ++ show d ++ ")" |
325 | | otherwise = "(vector"++ drop 8 (show v)++" :: R "++show d++")" | 325 | | otherwise = "(vector " ++ show v ++ " :: R " ++ show d ++")" |
326 | where | 326 | where |
327 | d = size s | 327 | d = size s |
328 | 328 | ||
329 | instance KnownNat n => Show (C n) | 329 | instance KnownNat n => Show (C n) |
330 | where | 330 | where |
331 | show s@(C (Dim v)) | 331 | show s@(C (Dim v)) |
332 | | singleV v = "("++show (v!0)++" :: C "++show d++")" | 332 | | singleV v = "(" ++ show (v!0) ++ " :: C " ++ show d ++ ")" |
333 | | otherwise = "(vector"++ drop 8 (show v)++" :: C "++show d++")" | 333 | | otherwise = "(vector " ++ show v ++ " :: C " ++ show d ++")" |
334 | where | 334 | where |
335 | d = size s | 335 | d = size s |
336 | 336 | ||
337 | instance (KnownNat m, KnownNat n) => Show (L m n) | 337 | instance (KnownNat m, KnownNat n) => Show (L m n) |
338 | where | 338 | where |
339 | show (isDiag -> Just (z,y,(m',n'))) = printf "(diag %s %s :: L %d %d)" (show z) (drop 9 $ show y) m' n' | 339 | show (isDiag -> Just (z,y,(m',n'))) = printf "(diag %s %s :: L %d %d)" (show z) (show y) m' n' |
340 | show s@(L (Dim (Dim x))) | 340 | show s@(L (Dim (Dim x))) |
341 | | singleM x = printf "(%s :: L %d %d)" (show (x `atIndex` (0,0))) m' n' | 341 | | singleM x = printf "(%s :: L %d %d)" (show (x `atIndex` (0,0))) m' n' |
342 | | otherwise = "(matrix"++ dropWhile (/='\n') (show x)++" :: L "++show m'++" "++show n'++")" | 342 | | otherwise = "(matrix" ++ dropWhile (/='\n') (show x) ++ " :: L " ++ show m' ++ " " ++ show n' ++ ")" |
343 | where | 343 | where |
344 | (m',n') = size s | 344 | (m',n') = size s |
345 | 345 | ||
346 | instance (KnownNat m, KnownNat n) => Show (M m n) | 346 | instance (KnownNat m, KnownNat n) => Show (M m n) |
347 | where | 347 | where |
348 | show (isDiagC -> Just (z,y,(m',n'))) = printf "(diag %s %s :: M %d %d)" (show z) (drop 9 $ show y) m' n' | 348 | show (isDiagC -> Just (z,y,(m',n'))) = printf "(diag %s %s :: M %d %d)" (show z) (show y) m' n' |
349 | show s@(M (Dim (Dim x))) | 349 | show s@(M (Dim (Dim x))) |
350 | | singleM x = printf "(%s :: M %d %d)" (show (x `atIndex` (0,0))) m' n' | 350 | | singleM x = printf "(%s :: M %d %d)" (show (x `atIndex` (0,0))) m' n' |
351 | | otherwise = "(matrix"++ dropWhile (/='\n') (show x)++" :: M "++show m'++" "++show n'++")" | 351 | | otherwise = "(matrix" ++ dropWhile (/='\n') (show x) ++ " :: M " ++ show m' ++ " " ++ show n' ++ ")" |
352 | where | 352 | where |
353 | (m',n') = size s | 353 | (m',n') = size s |
354 | 354 | ||