From 2b278c1688b5ae1de9f2b7c90b86b541740c0f76 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 22 Aug 2017 12:52:09 -0400 Subject: [PATCH] Define a Pretty instance for Term. --- src/Term.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Term.hs b/src/Term.hs index 6a75392a1..6b9117f9f 100644 --- a/src/Term.hs +++ b/src/Term.hs @@ -73,3 +73,6 @@ runCofree (a Cofree.:< f) = a CofreeF.:< f instance Pretty1 f => Pretty1 (Cofree.Cofree f) where liftPretty p pl = go where go (a Cofree.:< f) = p a <+> liftPretty go (liftPrettyList p pl) f + +instance (Pretty1 f, Pretty a) => Pretty (Cofree.Cofree f a) where + pretty = pretty1