From 0ca7a4bdcf4acd48b889a0baf6dbfc0a6ccc1087 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 8 Sep 2017 16:59:40 +0100 Subject: [PATCH] Define a Show2 instance for TermF. --- src/Term.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Term.hs b/src/Term.hs index 2161578db..ee7ccd14e 100644 --- a/src/Term.hs +++ b/src/Term.hs @@ -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