1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00

Define a Show1 instance for BindingF.

This commit is contained in:
Rob Rix 2017-09-10 21:51:57 -04:00
parent 5956cc77ae
commit 831eb67de8

View File

@ -35,6 +35,11 @@ instance (Eq1 f, Eq a) => Eq (BindingF f a) where
(==) = eq1
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
instance Pretty Metavar where
pretty (Metavar v) = pretty v