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

Marshaling/unmarshaling functions of 'Alignment' values.
-}
module Text.Pandoc.Lua.Marshal.Alignment
  ( peekAlignment
  , pushAlignment
  ) where

import HsLua
import Text.Pandoc.Definition (Alignment)

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

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