Show Telescope

This commit is contained in:
rhiannon morris 2023-03-13 18:25:07 +01:00
parent c81aabcc14
commit 8e9b0abb34
1 changed files with 5 additions and 0 deletions

View File

@ -221,6 +221,11 @@ export %inline
(forall n. Ord (tm n)) => Ord (Telescope tm from to) where
compare = foldLazy .: zipWithLazy compare
export %inline
(forall n. Show (tm n)) => Show (Telescope tm from to) where
showPrec d = showPrec d . toSnocList
where Show (Exists tm) where showPrec d t = showPrec d t.snd
export %inline
(forall n. PrettyHL (tm n)) => PrettyHL (Telescope tm from to) where
prettyM tel = separate (hl Delim ";") <$> traverse prettyM (toList tel)