Skip to content

Commit

Permalink
Fix error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Cies Breijs authored and Cies Breijs committed Jun 27, 2016
1 parent 3fd1cf4 commit 6171b97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Text/Toml/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ nameInsertError ns name = parserFail . T.unpack $ T.concat
-- | Table redefinition error.
tableClashError :: [Text] -> Parsec Text (Set [Text]) a
tableClashError name = parserFail . T.unpack $ T.concat
[ "Cannot redefine table ('", T.intercalate ", " name , "'." ]
[ "Cannot redefine table named: '", T.intercalate "." name, "'." ]

-- | Common redefinition error.
commonInsertError :: Node -> [Text] -> Parsec Text (Set [Text]) a
commonInsertError what name = parserFail . concat $
[ "Cannot insert ", w, " '", n, "' as key already exists." ]
[ "Cannot insert ", w, " as '", n, "' since key already exists." ]
where
n = T.unpack $ T.intercalate "." name
w = case what of (VTable _) -> "tables"
Expand Down

0 comments on commit 6171b97

Please sign in to comment.