diff options
Diffstat (limited to 'src/Data')
-rw-r--r-- | src/Data/Array/Mixed.hs | 2 | ||||
-rw-r--r-- | src/Data/Array/Nested/Internal.hs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Data/Array/Mixed.hs b/src/Data/Array/Mixed.hs index 39d969c..aef8ac6 100644 --- a/src/Data/Array/Mixed.hs +++ b/src/Data/Array/Mixed.hs @@ -120,7 +120,7 @@ foldListX _ ZX = mempty foldListX f (x ::% xs) = f x <> foldListX f xs showListX :: forall sh f. (forall n. f n -> ShowS) -> ListX sh f -> ShowS -showListX f l = go "[" l . showString "]" +showListX f l = showString "[" . go "" l . showString "]" where go :: String -> ListX sh' f -> ShowS go _ ZX = id diff --git a/src/Data/Array/Nested/Internal.hs b/src/Data/Array/Nested/Internal.hs index b9adde9..6581963 100644 --- a/src/Data/Array/Nested/Internal.hs +++ b/src/Data/Array/Nested/Internal.hs @@ -208,7 +208,7 @@ unconsListR (i ::: sh') = Just (UnconsListRRes sh' i) unconsListR ZR = Nothing showListR :: forall sh i. (i -> ShowS) -> ListR sh i -> ShowS -showListR f l = go "[" l . showString "]" +showListR f l = showString "[" . go "" l . showString "]" where go :: String -> ListR sh' i -> ShowS go _ ZR = id @@ -293,7 +293,7 @@ foldListS _ ZS = mempty foldListS f (x ::$ xs) = f x <> foldListS f xs showListS :: forall sh f. (forall n. f n -> ShowS) -> ListS sh f -> ShowS -showListS f l = go "[" l . showString "]" +showListS f l = showString "[" . go "" l . showString "]" where go :: String -> ListS sh' f -> ShowS go _ ZS = id |