@@ -681,13 +681,17 @@ checkThrowBadPyType = do
681681
682682-- | Type class for values representing python dictionaries containing
683683-- global or local variables.
684+ --
685+ -- @since 0.2@
684686class Namespace a where
685687 -- | Returns dictionary object. Caller takes ownership of returned
686688 -- object.
687689 basicNamespaceDict :: a -> Py (Ptr PyObject )
688690
689691
690692-- | Namespace for the top level code execution.
693+ --
694+ -- @since 0.2@
691695data Main = Main
692696
693697instance Namespace Main where
@@ -703,6 +707,8 @@ instance Namespace Main where
703707
704708
705709-- | Temporary namespace which get destroyed after execution
710+ --
711+ -- @since 0.2@
706712data Temp = Temp
707713
708714instance Namespace Temp where
@@ -711,6 +717,8 @@ instance Namespace Temp where
711717
712718-- | Newtype wrapper for bare python object. It's assumed to be a
713719-- dictionary. This is not checked.
720+ --
721+ -- @since 0.2@
714722newtype DictPtr = DictPtr (Ptr PyObject )
715723
716724instance Namespace DictPtr where
@@ -719,6 +727,8 @@ instance Namespace DictPtr where
719727
720728-- | Newtype wrapper for bare python object. It's assumed to be a
721729-- dictionary. This is not checked.
730+ --
731+ -- @since 0.2@
722732newtype Dict = Dict PyObject
723733
724734instance Namespace Dict where
@@ -727,6 +737,8 @@ instance Namespace Dict where
727737 = unsafeWithPyObject d (basicNamespaceDict . DictPtr )
728738
729739-- | Newtype wrapper over module object.
740+ --
741+ -- @since 0.2@
730742newtype ModulePtr = ModulePtr (Ptr PyObject )
731743
732744instance Namespace ModulePtr where
@@ -747,6 +759,8 @@ instance Namespace Module where
747759
748760
749761-- | Evaluate python expression
762+ --
763+ -- @since 0.2@
750764eval :: (Namespace global , Namespace local )
751765 => global -- ^ Data type providing global variables dictionary
752766 -> local -- ^ Data type providing local variables dictionary
@@ -776,6 +790,8 @@ eval globals locals q = runProgram $ do
776790{-# SPECIALIZE eval :: Main -> Temp -> PyQuote -> Py PyObject #-}
777791
778792-- | Evaluate sequence of python statements
793+ --
794+ -- @since 0.2@
779795exec :: (Namespace global , Namespace local )
780796 => global -- ^ Data type providing global variables dictionary
781797 -> local -- ^ Data type providing local variables dictionary
0 commit comments