From 8a41498ffddc7298070d65b9083477f4db860f3b Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Sun, 10 Sep 2017 21:52:30 -0400 Subject: [PATCH] Define a Show instance for BindingF. --- src/Data/Functor/Binding.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Data/Functor/Binding.hs b/src/Data/Functor/Binding.hs index b93c589e7..4e99a9d90 100644 --- a/src/Data/Functor/Binding.hs +++ b/src/Data/Functor/Binding.hs @@ -37,7 +37,10 @@ instance (Eq1 f, Eq a) => Eq (BindingF f a) where instance Show1 f => Show1 (BindingF f) where liftShowsPrec sp sl d (Let vars body) = showsBinaryWith (const (liftShowList sp sl)) (liftShowsPrec sp sl) "Let" d vars body - liftShowsPrec _ _ d (VarF var) = showsUnaryWith showsPrec "Var" d var + liftShowsPrec _ _ d (VarF var) = showsUnaryWith showsPrec "Var" d var + +instance (Show1 f, Show a) => Show (BindingF f a) where + showsPrec = showsPrec1 instance Pretty Metavar where