diff options
author | Joseph C. Sible <josephcsible@users.noreply.github.com> | 2020-02-07 02:42:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 08:42:46 +0100 |
commit | 60a3158bf9b6f4d16bb5fc6cac61b5c305ad40e3 (patch) | |
tree | 4112e9795a47630c48576393687f703e4de9e8e5 /src/Text/Pandoc/Writers.hs | |
parent | a5a3ac994618d71ecaf2e8bd40251d792edc9c22 (diff) | |
download | pandoc-60a3158bf9b6f4d16bb5fc6cac61b5c305ad40e3.tar.gz |
More in-depth refactoring and cleanup (#6123)
* Avoid duplicating the dash case
* Pull common functions out of case branches
* Make sure list lengths are only calculated once
* Use unless
* Simplify parseURIReference' and avoid an unnecessary call to length
* Use <$> instead of reimplementing it
* Use swap instead of reimplementing it
* Remove eta-expansion that's been unnecessary since 90f5dd8
* Use tailDef instead of reimplementing it
* Use second instead of fmap, per @tarleb
Diffstat (limited to 'src/Text/Pandoc/Writers.hs')
-rw-r--r-- | src/Text/Pandoc/Writers.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers.hs b/src/Text/Pandoc/Writers.hs index 724c22a50..753972855 100644 --- a/src/Text/Pandoc/Writers.hs +++ b/src/Text/Pandoc/Writers.hs @@ -125,7 +125,7 @@ data Writer m = TextWriter (WriterOptions -> Pandoc -> m Text) writers :: PandocMonad m => [ (Text, Writer m) ] writers = [ ("native" , TextWriter writeNative) - ,("json" , TextWriter $ \o d -> writeJSON o d) + ,("json" , TextWriter writeJSON) ,("docx" , ByteStringWriter writeDocx) ,("odt" , ByteStringWriter writeODT) ,("pptx" , ByteStringWriter writePowerpoint) |