Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- assemble :: BitsStmt -> Word64
- toInt :: B -> Word64
- type BitsStmt = ((B, B), (BitsType, B, BitsExpr))
- encodeStmt :: Maybe ConstExprs -> Stmt a -> [BitsStmt]
- encodeLocalDecl :: Maybe ConstExprs -> LocalDecl -> (BitsType, B, BitsExpr)
- type BitsType = ((B, B), (B, B))
- encodeType :: Type -> BitsType
- encodeVecSize :: Int -> Int -> (B, B)
- encodeEmit :: Maybe ConstExprs -> Emit -> (B, BitsExpr)
- type BitsExpr = ((B, B), BitsFunName, BitsExprAtom, BitsExprAtom)
- encodeExpr :: Maybe ConstExprs -> Expr -> BitsExpr
- encodeArgs :: FunName -> [ExprAtom] -> (BitsExprAtom, BitsExprAtom)
- encodeUnaryOp :: UnaryOp -> (B, B)
- type BitsBinaryOp = (B, B, B, B)
- encodeBinaryOp :: BinaryOp -> BitsBinaryOp
- type BitsFunName = (B, B, B, B, B)
- encodeFunName :: FunName -> BitsFunName
- encodeExprAtomType :: ExprAtom -> (B, B, B)
- type BitsExprAtom = ((B, B, B), ((B, B), (B, B)))
- encodeExprAtom :: ExprAtom -> BitsExprAtom
- encodeSwizzle :: Swizzle -> (B, B)
- parse :: Text -> Either String (GLSL ())
- main :: IO ()
Documentation
encodeStmt :: Maybe ConstExprs -> Stmt a -> [BitsStmt] Source #
encodeLocalDecl :: Maybe ConstExprs -> LocalDecl -> (BitsType, B, BitsExpr) Source #
type BitsType = ((B, B), (B, B)) Source #
2 bits encode the type, then 2 bits encode the vec/mat size.
encodeType :: Type -> BitsType Source #
encodeEmit :: Maybe ConstExprs -> Emit -> (B, BitsExpr) Source #
type BitsExpr = ((B, B), BitsFunName, BitsExprAtom, BitsExprAtom) Source #
encodeExpr :: Maybe ConstExprs -> Expr -> BitsExpr Source #
encodeArgs :: FunName -> [ExprAtom] -> (BitsExprAtom, BitsExprAtom) Source #
Implements special encodings for functions with more than 2 args.
encodeFunName :: FunName -> BitsFunName Source #