    {- |
    Copyright               : © 2021-2026 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 :: forall e. 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 :: forall e. Pusher e MathType
    pushMathType = String -> LuaE e ()
    forall e. String -> LuaE e ()
    pushString (String -> LuaE e ())
    -> (MathType -> String) -> MathType -> LuaE e ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . MathType -> String
    forall a. Show a => a -> String
    show