xcffib-0.5.1: A cffi-based python binding for X

Safe Haskell | Safe
Language | Haskell98

Data.XCB.Python.PyHelpers

Synopsis

- mkImport :: String -> Statement ()
- mkRelImport :: String -> Statement ()
- mkInt :: Int -> Expr ()
- mkAssign :: PseudoExpr a => a -> Expr () -> Statement ()
- mkCall :: (PseudoExpr a, PseudoArgument b) => a -> [b] -> Expr ()
- noArgs :: [Argument ()]
- mkArg :: String -> Argument ()
- mkEnum :: String -> [(String, Expr ())] -> Statement ()
- mkName :: String -> Expr ()
- mkDot :: PseudoExpr a => a -> String -> Expr ()
- mkAttr :: String -> Expr ()
- mkIncr :: String -> Expr () -> Statement ()
- mkClass :: String -> String -> Suite () -> Statement ()
- mkEmptyClass :: String -> String -> Statement ()
- mkXClass :: String -> String -> Suite () -> Suite () -> Statement ()
- mkStr :: String -> Expr ()
- mkUnpackFrom :: PseudoExpr a => a -> [String] -> String -> Suite ()
- mkDict :: String -> Statement ()
- mkDictUpdate :: String -> Int -> String -> Statement ()
- mkMethod :: String -> [Parameter ()] -> Suite () -> Statement ()
- mkReturn :: Expr () -> Statement ()
- pyTruth :: Bool -> Expr ()
- mkParams :: [String] -> [Parameter ()]
- ident :: String -> Ident ()
- pyNone :: Expr ()
- mkIf :: Expr () -> Suite () -> Statement ()
- repeatStr :: String -> Expr () -> Expr ()

# Documentation

mkImport :: String -> Statement () #

mkRelImport :: String -> Statement () #

mkInt :: Int -> Expr () #

mkAssign :: PseudoExpr a => a -> Expr () -> Statement () #

mkCall :: (PseudoExpr a, PseudoArgument b) => a -> [b] -> Expr () #

noArgs :: [Argument ()] #

mkArg :: String -> Argument () #

mkEnum :: String -> [(String, Expr ())] -> Statement () #

mkName :: String -> Expr () #

Make an Expr out of a string like "foo.bar" describing the name.

mkDot :: PseudoExpr a => a -> String -> Expr () #

mkAttr :: String -> Expr () #

Make an attribute access, i.e. self.string.

mkIncr :: String -> Expr () -> Statement () #

mkClass :: String -> String -> Suite () -> Statement () #

mkEmptyClass :: String -> String -> Statement () #

mkXClass :: String -> String -> Suite () -> Suite () -> Statement () #

mkStr :: String -> Expr () #

mkUnpackFrom :: PseudoExpr a => a -> [String] -> String -> Suite () #

mkDict :: String -> Statement () #

mkDictUpdate :: String -> Int -> String -> Statement () #

mkMethod :: String -> [Parameter ()] -> Suite () -> Statement () #

mkReturn :: Expr () -> Statement () #

pyTruth :: Bool -> Expr () #

mkParams :: [String] -> [Parameter ()] #

ident :: String -> Ident () #

Create and sanatize a python identifier.

pyNone :: Expr () #

mkIf :: Expr () -> Suite () -> Statement () #

repeatStr :: String -> Expr () -> Expr () #