aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Citeproc/MetaValue.hs
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2020-11-07 19:38:03 +0100
committerGitHub <noreply@github.com>2020-11-07 10:38:03 -0800
commit527346cc7e2bc874092be2f6793001860e10a719 (patch)
tree7c26c03a30f00f63c340d98cebdadd2f6408df21 /src/Text/Pandoc/Citeproc/MetaValue.hs
parent0ed3436588951d457eefb11351f72d3560bdc544 (diff)
downloadpandoc-527346cc7e2bc874092be2f6793001860e10a719.tar.gz
Lint code in PRs and when committing to master (#6790)
* Remove unused LANGUAGE pragmata * Apply HLint suggestions * Configure HLint to ignore some warnings * Lint code when committing to master
Diffstat (limited to 'src/Text/Pandoc/Citeproc/MetaValue.hs')
-rw-r--r--src/Text/Pandoc/Citeproc/MetaValue.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Citeproc/MetaValue.hs b/src/Text/Pandoc/Citeproc/MetaValue.hs
index 17d5da327..f5a49f49e 100644
--- a/src/Text/Pandoc/Citeproc/MetaValue.hs
+++ b/src/Text/Pandoc/Citeproc/MetaValue.hs
@@ -147,7 +147,7 @@ metaValueToDate (MetaMap m) =
mapMaybe metaValueToDateParts xs
Just _ -> []
Nothing ->
- maybe [] (:[]) $ metaValueToDateParts (MetaMap m)
+ maybeToList $ metaValueToDateParts (MetaMap m)
circa = fromMaybe False $
M.lookup "circa" m >>= metaValueToBool
season = M.lookup "season" m >>= metaValueToInt
@@ -251,4 +251,3 @@ normalizeKey k =
"pmid" -> "PMID"
"url" -> "URL"
x -> x
-