From 5d4a6cd47e72f7c9c7057237fc69fe39007ff001 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 17 Nov 2020 16:10:57 -0800 Subject: [PATCH] ;csv: tweak CsvRules Show for consistency with others --- hledger-lib/Hledger/Read/CsvReader.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hledger-lib/Hledger/Read/CsvReader.hs b/hledger-lib/Hledger/Read/CsvReader.hs index 08461e6e8..d69e3794b 100644 --- a/hledger-lib/Hledger/Read/CsvReader.hs +++ b/hledger-lib/Hledger/Read/CsvReader.hs @@ -263,12 +263,12 @@ instance Eq CsvRules where r1 == r2 = (rdirectives r1, rcsvfieldindexes r1, rassignments r1) == (rdirectives r2, rcsvfieldindexes r2, rassignments r2) --- It is used for debug output only +-- Custom Show instance used for debug output: omit the rblocksassigning field, which isn't showable. instance Show CsvRules where - show r = "CsvRules { rdirectives=" ++ show (rdirectives r) ++ - ", rcsvfieldindexes=" ++ show (rcsvfieldindexes r) ++ - ", rassignments=" ++ show (rassignments r) ++ - ", rconditionalblocks="++ show (rconditionalblocks r) ++ + show r = "CsvRules { rdirectives = " ++ show (rdirectives r) ++ + ", rcsvfieldindexes = " ++ show (rcsvfieldindexes r) ++ + ", rassignments = " ++ show (rassignments r) ++ + ", rconditionalblocks = " ++ show (rconditionalblocks r) ++ " }" type CsvRulesParser a = StateT CsvRulesParsed SimpleTextParser a