From ebdb39b3b4d297ea2356063d48f5e472e8ffa9d3 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Fri, 5 Nov 2021 13:11:02 +0100 Subject: Lua: display Pandoc values using their native Haskell representation --- src/Text/Pandoc/Lua/Marshaling/AST.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Text/Pandoc/Lua') diff --git a/src/Text/Pandoc/Lua/Marshaling/AST.hs b/src/Text/Pandoc/Lua/Marshaling/AST.hs index e73ff43b5..568b610cc 100644 --- a/src/Text/Pandoc/Lua/Marshaling/AST.hs +++ b/src/Text/Pandoc/Lua/Marshaling/AST.hs @@ -85,6 +85,10 @@ typePandoc = deftype "Pandoc" <#> parameter (optional . peekPandoc) "doc1" "pandoc" "" <#> parameter (optional . peekPandoc) "doc2" "pandoc" "" =#> functionResult pushBool "boolean" "true iff the two values are equal" + , operation Tostring $ lambda + ### liftPure show + <#> parameter peekPandoc "Pandoc" "doc" "" + =#> functionResult pushString "string" "native Haskell representation" ] [ property "blocks" "list of blocks" (pushPandocList pushBlock, \(Pandoc _ blks) -> blks) -- cgit v1.2.3