1
1
mirror of https://github.com/github/semantic.git synced 2024-12-18 20:31:55 +03:00

Define a Show2 instance for TermF.

This commit is contained in:
Rob Rix 2017-09-08 16:59:40 +01:00
parent 3231b16399
commit 0ca7a4bdcf

View File

@ -138,3 +138,6 @@ instance Eq1 f => Eq2 (TermF f) where
instance (Eq1 f, Eq a) => Eq1 (TermF f a) where
liftEq = liftEq2 (==)
instance Show1 f => Show2 (TermF f) where
liftShowsPrec2 spA _ spB slB d (a :<< f) = showParen (d > 5) $ spA 6 a . showString " :<< " . liftShowsPrec spB slB 5 f