1
1
mirror of https://github.com/github/semantic.git synced 2025-01-02 20:41:38 +03:00

Only show the populated branches.

This commit is contained in:
Rob Rix 2017-08-31 22:32:56 -04:00
parent ea01aa9e2b
commit 238d0fdb4a

View File

@ -10,4 +10,4 @@ data Table i a = Table { tableAddresses :: [i], tableBranches :: Array i (Maybe
instance (Ix i, Show i) => Show1 (Table i) where
liftShowsPrec spA slA d Table{..} = showsBinaryWith showsPrec (const (liftShowList spA slA)) "Table" d tableAddresses (assocs tableBranches >>= \ (sym, a) -> (,) sym <$> toList a)
liftShowsPrec spA slA d Table{..} = showsBinaryWith showsPrec (const (liftShowList spA slA)) "Table" d tableAddresses (tableAddresses >>= \ addr -> (,) addr <$> toList (tableBranches ! addr))