{- |
Copyright               : © 2021 Albert Krewinkel
SPDX-License-Identifier : MIT
Maintainer              : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>

Marshaling/unmarshaling functions of 'MathType' values.
-}
module Text.Pandoc.Lua.Marshal.MathType
  ( peekMathType
  , pushMathType
  ) where

import HsLua
import Text.Pandoc.Definition (MathType)

-- | Retrieves a 'MathType' value from a string.
peekMathType :: Peeker e MathType
peekMathType :: Peeker e MathType
peekMathType = Peeker e MathType
forall a e. Read a => Peeker e a
peekRead

-- | Pushes a 'MathType' value as a string.
pushMathType :: Pusher e MathType
pushMathType :: Pusher e MathType
pushMathType = String -> LuaE e ()
forall e. String -> LuaE e ()
pushString (String -> LuaE e ()) -> (MathType -> String) -> Pusher e MathType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. MathType -> String
forall a. Show a => a -> String
show