diff options
| author | Albert Krewinkel <[email protected]> | 2018-01-04 19:05:14 +0100 |
|---|---|---|
| committer | Albert Krewinkel <[email protected]> | 2018-01-04 23:15:28 +0100 |
| commit | 856bc54526fc01b48a2d770406fcb9aaa2fa5da3 (patch) | |
| tree | f14dcd75d3ef7ba6138a47b2b1e4d34320eee20b /src/Text/Pandoc/Lua/Module/Utils.hs | |
| parent | bdb911550c2894925be6893a5d93fca484448dd4 (diff) | |
Use hslua utils where possible
Some helper functions and types have been moved to hslua.
Change: minor
Diffstat (limited to 'src/Text/Pandoc/Lua/Module/Utils.hs')
| -rw-r--r-- | src/Text/Pandoc/Lua/Module/Utils.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Lua/Module/Utils.hs b/src/Text/Pandoc/Lua/Module/Utils.hs index c0d7397ce..e4ed409b3 100644 --- a/src/Text/Pandoc/Lua/Module/Utils.hs +++ b/src/Text/Pandoc/Lua/Module/Utils.hs @@ -33,7 +33,7 @@ import Control.Applicative ((<|>)) import Foreign.Lua (FromLuaStack, Lua, LuaInteger, NumResults) import Text.Pandoc.Definition (Pandoc, Meta, MetaValue, Block, Inline) import Text.Pandoc.Lua.StackInstances () -import Text.Pandoc.Lua.Util (OrNil (OrNil), addFunction) +import Text.Pandoc.Lua.Util (addFunction) import qualified Data.Digest.Pure.SHA as SHA import qualified Data.ByteString.Lazy as BSL @@ -59,8 +59,8 @@ hierarchicalize = return . Shared.hierarchicalize -- limit years to the range 1601-9999 (ISO 8601 accepts greater than -- or equal to 1583, but MS Word only accepts dates starting 1601). -- Returns nil instead of a string if the conversion failed. -normalizeDate :: String -> Lua (OrNil String) -normalizeDate = return . OrNil . Shared.normalizeDate +normalizeDate :: String -> Lua (Lua.Optional String) +normalizeDate = return . Lua.Optional . Shared.normalizeDate -- | Calculate the hash of the given contents. sha1 :: BSL.ByteString |
