aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Lua/Packages.hs
AgeCommit message (Collapse)AuthorFilesLines
2021-02-02Lua: add module "pandoc.path"Albert Krewinkel1-0/+2
The module allows to work with file paths in a convenient and platform-independent manner. Closes: #6001 Closes: #6565
2021-01-26Lua: always load built-in Lua scripts from default data-dirAlbert Krewinkel1-26/+7
The Lua modules `pandoc` and `pandoc.List` are now always loaded from the system's default data directory. Loading from a different directory by overriding the default path, e.g. via `--data-dir`, is no longer supported to avoid unexpected behavior and to address security concerns.
2021-01-08Update copyright notices for 2021 (#7012)Albert Krewinkel1-1/+1
2020-05-12Lua: fix regression in package searcherAlbert Krewinkel1-2/+8
This caused `require 'module'` to fail for third party packages. Fixes: #6361
2020-04-17API change: use new type PandocLua for all pandoc Lua operationsAlbert Krewinkel1-41/+23
The new type `PandocLua` is an instance of the `PandocMonad` typeclass and can thus be used in a way similar to `PandocIO`.
2020-03-22Finer grained imports of Text.Pandoc.Class submodules (#6203)Albert Krewinkel1-1/+2
This should speed-up recompilation after changes in `Text.Pandoc.Class`, as the number of modules affected by a change will be smaller in general. It also offers faster insights into the parts of `T.P.Class` used within a module.
2020-03-15Use implicit Prelude (#6187)Albert Krewinkel1-2/+0
* Use implicit Prelude The previous behavior was introduced as a fix for #4464. It seems that this change alone did not fix the issue, and `stack ghci` and `cabal repl` only work with GHC 8.4.1 or newer, as no custom Prelude is loaded for these versions. Given this, it seems cleaner to revert to the implicit Prelude. * PandocMonad: remove outdated check for base version Only base versions 4.9 and later are supported, the check for `MIN_VERSION_base(4,8,0)` is therefore unnecessary. * Always use custom prelude Previously, the custom prelude was used only with older GHC versions, as a workaround for problems with ghci. The ghci problems are resolved by replacing package `base` with `base-noprelude`, allowing for consistent use of the custom prelude across all GHC versions.
2020-03-13Update copyright year (#6186)Albert Krewinkel1-1/+1
* Update copyright year * Copyright: add notes for Lua and Jira modules
2019-05-29Lua: add Version type to simplify comparisonsAlbert Krewinkel1-0/+2
Version specifiers like `PANDOC_VERSION` and `PANDOC_API_VERSION` are turned into `Version` objects. The objects simplify version-appropriate comparisons while maintaining backward-compatibility. A function `pandoc.types.Version` is added as part of the newly introduced module `pandoc.types`, allowing users to create version objects in scripts.
2019-05-04Lua: add `pandoc.system` module (#5468)Albert Krewinkel1-0/+2
The `system` Lua module provides utility functions to interact with the operating- and file system. E.g. print(pandoc.system.get_current_directory()) or pandoc.system.with_temporary_directory('tikz', function (dir) -- write and compile a TikZ file with pdflatex end)
2019-03-01Remove license boilerplate.John MacFarlane1-17/+0
The haddock module header contains essentially the same information, so the boilerplate is redundant and just one more thing to get out of sync.
2019-02-16T.P.Lua: get CommonState from Lua globalAlbert Krewinkel1-14/+8
This allows more control over the common state from within Lua scripts.
2019-02-09T.P.Lua: properly indent module-loading errorAlbert Krewinkel1-1/+1
2019-02-04Add missing copyright notices and remove license boilerplate (#5112)Albert Krewinkel1-2/+2
Quite a few modules were missing copyright notices. This commit adds copyright notices everywhere via haddock module headers. The old license boilerplate comment is redundant with this and has been removed. Update copyright years to 2019. Closes #4592.
2018-09-24Use hslua v1.0.0Albert Krewinkel1-20/+12
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane1-0/+2
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2018-01-19hlint code improvements.John MacFarlane1-1/+0
2018-01-13Lua modules: add function pandoc.utils.run_json_filterAlbert Krewinkel1-1/+2
Runs a JSON filter on a Pandoc document.
2018-01-05Update copyright notices to include 2018Albert Krewinkel1-2/+2
2017-12-21Lua modules: added pandoc.utils moduleAlbert Krewinkel1-0/+2
A new module `pandoc.utils` has been created. It holds utility functions like `sha1`, which was moved from the main `pandoc` module.
2017-12-21Lua modules: make a Haskell module for each Lua moduleAlbert Krewinkel1-2/+2
Definitions for the `pandoc.mediabag` modules are moved to a separate Haskell module. Change: minor
2017-12-21Lua modules: move to dedicated submoduleAlbert Krewinkel1-2/+3
The Haskell module defining the Lua `pandoc` module is moved to Text.Pandoc.Lua.Module.Pandoc. Change: minor
2017-12-10Lua filters: fix package loading for Lua 5.1Albert Krewinkel1-1/+4
The list of package searchers is named `package.loaders` in Lua 5.1 and LuaJIT, and `package.searchers` in Lua 5.2 and later.
2017-12-02Lua filters: refactor lua module handlingAlbert Krewinkel1-0/+109
The integration with Lua's package/module system is improved: A pandoc-specific package searcher is prepended to the searchers in `package.searchers`. The modules `pandoc` and `pandoc.mediabag` can now be loaded via `require`.