@@ -18,7 +18,7 @@ import Text.Pandoc.Class (runIOorExplode, setUserDataDir)
1818import Text.Pandoc.Definition (Block (BlockQuote, Div, Para), Inline (Emph, Str),
1919 Attr, Meta, Pandoc, pandocTypesVersion)
2020import Text.Pandoc.Filter (Filter (LuaFilter), applyFilters)
21−import Text.Pandoc.Lua (runPandocLua)
21+import Text.Pandoc.Lua (runLua)
2222import Text.Pandoc.Options (def)
2323import Text.Pandoc.Shared (pandocVersion)
2424
@@ -128,7 +128,7 @@ tests = map (localOption (QuickCheckTests 20))
128128 (doc $ para "ignored")
129129 (doc $ para (str $ "lua" </> "script-name.lua"))
130130
131− , testCase "Pandoc version is set" . runPandocLua' $ do
131+ , testCase "Pandoc version is set" . runLua' $ do
132132 Lua.getglobal' "table.concat"
133133 Lua.getglobal "PANDOC_VERSION"
134134 Lua.push ("." :: String) -- separator
@@ -136,13 +136,13 @@ tests = map (localOption (QuickCheckTests 20))
136136 Lua.liftIO . assertEqual "pandoc version is wrong" pandocVersion
137137 =<< Lua.peek Lua.stackTop
138138
139− , testCase "Pandoc types version is set" . runPandocLua' $ do
139+ , testCase "Pandoc types version is set" . runLua' $ do
140140 let versionNums = versionBranch pandocTypesVersion
141141 Lua.getglobal "PANDOC_API_VERSION"
142142 Lua.liftIO . assertEqual "pandoc-types version is wrong" versionNums
143143 =<< Lua.peek Lua.stackTop
144144
145− , testCase "Allow singleton inline in constructors" . runPandocLua' $ do
145+ , testCase "Allow singleton inline in constructors" . runLua' $ do
146146 Lua.liftIO . assertEqual "Not the exptected Emph" (Emph [Str "test"])
147147 =<< Lua.callFunc "pandoc.Emph" (Str "test")
148148 Lua.liftIO . assertEqual "Unexpected element" (Para [Str "test"])
@@ -156,14 +156,14 @@ tests = map (localOption (QuickCheckTests 20))
156156 Lua.peek Lua.stackTop
157157 )
158158
159− , testCase "Elements with Attr have `attr` accessor" . runPandocLua' $ do
159+ , testCase "Elements with Attr have `attr` accessor" . runLua' $ do
160160 Lua.push (Div ("hi", ["moin"], [])
161161 [Para [Str "ignored"]])
162162 Lua.getfield Lua.stackTop "attr"
163163 Lua.liftIO . assertEqual "no accessor" (("hi", ["moin"], []) :: Attr)
164164 =<< Lua.peek Lua.stackTop
165165
166− , testCase "informative error messages" . runPandocLua' $ do
166+ , testCase "informative error messages" . runLua' $ do
167167 Lua.pushboolean True
168168 err <- Lua.peekEither Lua.stackTop
169169 case (err :: Either String Pandoc) of
@@ -185,7 +185,7 @@ roundtripEqual :: (Eq a, Lua.Peekable a, Lua.Pushable a) => a -> IO Bool
185185roundtripEqual x = (x ==) <$> roundtripped
186186 where
187187 roundtripped :: (Lua.Peekable a, Lua.Pushable a) => IO a
188− roundtripped = runPandocLua' $ do
188+ roundtripped = runLua' $ do
189189 oldSize <- Lua.gettop
190190 Lua.push x
191191 size <- Lua.gettop
@@ -196,10 +196,10 @@ roundtripEqual x = (x ==) <$> roundtripped
196196 Left e -> error (show e)
197197 Right y -> return y
198198
199−runPandocLua' :: Lua.Lua a -> IO a
200−runPandocLua' op = runIOorExplode $ do
199+runLua' :: Lua.Lua a -> IO a
200+runLua' op = runIOorExplode $ do
201201 setUserDataDir (Just "../data")
202− res <- runPandocLua op
202+ res <- runLua op
203203 case res of
204204 Left e -> error (show e)
205205 Right x -> return x