From d79e70748536833f52628074b067b56c2a9a921e Mon Sep 17 00:00:00 2001 From: Alex Chen Date: Thu, 24 May 2018 21:19:17 -0600 Subject: [PATCH] lib: remove redundant check in `accountnamep` --- hledger-lib/Hledger/Read/Common.hs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/hledger-lib/Hledger/Read/Common.hs b/hledger-lib/Hledger/Read/Common.hs index 23b4ad484..ef5b77bde 100644 --- a/hledger-lib/Hledger/Read/Common.hs +++ b/hledger-lib/Hledger/Read/Common.hs @@ -461,14 +461,7 @@ accountnamep :: TextParser m AccountName accountnamep = do firstPart <- part otherParts <- many $ try $ singleSpace *> part - let account = T.unwords $ firstPart : otherParts - - let roundTripAccount = - accountNameFromComponents $ accountNameComponents account - when (account /= roundTripAccount) $ fail $ - "account name seems ill-formed: " ++ T.unpack account - - pure account + pure $ T.unwords $ firstPart : otherParts where part = takeWhile1P Nothing (not . isSpace) singleSpace = void spacenonewline *> notFollowedBy spacenonewline