From 2566ff662473b4c4095ffe5d3bdbb0325a70b6a3 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 8 Oct 2020 09:11:25 -0700 Subject: Qualify some uses of fail to avoid ambiguity. --- src/Text/Pandoc/Readers/Metadata.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Readers/Metadata.hs b/src/Text/Pandoc/Readers/Metadata.hs index 76fbd8110..0d49a7fa8 100644 --- a/src/Text/Pandoc/Readers/Metadata.hs +++ b/src/Text/Pandoc/Readers/Metadata.hs @@ -42,13 +42,13 @@ yamlBsToMeta pMetaValue bstr = do Right [] -> return . return $ mempty Right [YAML.Doc (YAML.Scalar _ YAML.SNull)] -> return . return $ mempty - Right _ -> fail "expected YAML object" + Right _ -> Prelude.fail "expected YAML object" Left (yamlpos, err') -> do pos <- getPosition setPosition $ incSourceLine (setSourceColumn pos (YE.posColumn yamlpos)) (YE.posLine yamlpos - 1) - fail err' + Prelude.fail err' fakePos :: YAML.Pos fakePos = YAML.Pos (-1) (-1) 1 0 @@ -87,16 +87,16 @@ yamlBsToRefs pMetaValue idpred bstr = sequence <$> mapM (yamlToMetaValue pMetaValue) (filter g ns) Just _ -> - fail "expecting sequence in 'references' field" + Prelude.fail "expecting sequence in 'references' field" Nothing -> - fail "expecting 'references' field" + Prelude.fail "expecting 'references' field" Right [] -> return . return $ mempty Right [YAML.Doc (YAML.Scalar _ YAML.SNull)] -> return . return $ mempty - Right _ -> fail "expecting YAML object" + Right _ -> Prelude.fail "expecting YAML object" Left (_pos, err') - -> fail err' + -> Prelude.fail err' nodeToKey :: YAML.Node YE.Pos -> Maybe Text -- cgit v1.2.3