From fbd7bce2176ff6ccd22c5d185309bde49d267534 Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Tue, 28 Sep 2021 08:52:05 -0400 Subject: [PATCH] Add Show{,F} instances for MacawCrucibleValue (#232) I found these useful while printf debugging. --- symbolic/src/Data/Macaw/Symbolic/PersistentState.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/symbolic/src/Data/Macaw/Symbolic/PersistentState.hs b/symbolic/src/Data/Macaw/Symbolic/PersistentState.hs index a5027995..50a30461 100644 --- a/symbolic/src/Data/Macaw/Symbolic/PersistentState.hs +++ b/symbolic/src/Data/Macaw/Symbolic/PersistentState.hs @@ -251,6 +251,11 @@ instance FoldableFC MacawCrucibleValue where instance TraversableFC MacawCrucibleValue where traverseFC f (MacawCrucibleValue v) = MacawCrucibleValue <$> f v +instance ShowF f => ShowF (MacawCrucibleValue f) + +instance ShowF f => Show (MacawCrucibleValue f tp) where + showsPrec p (MacawCrucibleValue v) = showsPrecF p v + ------------------------------------------------------------------------ -- CrucPersistentState