on master help sign in
Merge pull request #1763 from ziman/show-vect

Define `Show` instance for `Vect` via `toList`

commitec17e6adbff9846ac0df51e405e2c2e3ea1257f7 authorEdwin Brady <edwin.brady@gmail.com> dateThu 4 Dec 2014, 19:19 (12 years ago) parentc44a35c64a6ceb
1 file changed+1−5
libs/prelude/Prelude.idr+1−5
libs/prelude/Prelude.idr+1−5
@@ -217,11 +217,7 @@ instance Show a => Show (List a) where
217217 show' acc (x :: xs) = show' (acc ++ show x ++ ", ") xs
218218
219219instance Show a => Show (Vect n a) where
220− show xs = "[" ++ show' xs ++ "]" where
221− show' : Vect n a -> String
222− show' [] = ""
223− show' [x] = show x
224− show' (x :: xs) = show x ++ ", " ++ show' xs
220+ show = show . toList
225221
226222instance Show a => Show (Maybe a) where
227223 show Nothing = "Nothing"