-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | GLSL abstract syntax tree, parser, and pretty-printer
--   
--   The package language-glsl is a Haskell library for the representation,
--   the parsing, and the pretty-printing of GLSL 1.50 code.
@package language-glsl
@version 0.3.0

module Language.GLSL.Syntax
data TranslationUnit
TranslationUnit :: [ExternalDeclaration] -> TranslationUnit
data ExternalDeclaration
FunctionDeclaration :: FunctionPrototype -> ExternalDeclaration
FunctionDefinition :: FunctionPrototype -> Compound -> ExternalDeclaration
Declaration :: Declaration -> ExternalDeclaration
data Declaration
InitDeclaration :: InvariantOrType -> [InitDeclarator] -> Declaration
Precision :: PrecisionQualifier -> TypeSpecifierNoPrecision -> Declaration
Block :: TypeQualifier -> String -> [Field] -> Maybe (String, Maybe (Maybe Expr)) -> Declaration
TQ :: TypeQualifier -> Declaration
data InitDeclarator
InitDecl :: String -> Maybe (Maybe Expr) -> Maybe Expr -> InitDeclarator
data InvariantOrType
InvariantDeclarator :: InvariantOrType
TypeDeclarator :: FullType -> InvariantOrType
data FunctionPrototype
FuncProt :: FullType -> String -> [ParameterDeclaration] -> FunctionPrototype
data ParameterDeclaration
ParameterDeclaration :: Maybe ParameterTypeQualifier -> Maybe ParameterQualifier -> TypeSpecifier -> Maybe (String, Maybe Expr) -> ParameterDeclaration
data FullType
FullType :: Maybe TypeQualifier -> TypeSpecifier -> FullType
data TypeQualifier
TypeQualSto :: StorageQualifier -> TypeQualifier
TypeQualLay :: LayoutQualifier -> Maybe StorageQualifier -> TypeQualifier
TypeQualInt :: InterpolationQualifier -> Maybe StorageQualifier -> TypeQualifier
TypeQualInv :: InvariantQualifier -> Maybe StorageQualifier -> TypeQualifier
TypeQualInv3 :: InvariantQualifier -> InterpolationQualifier -> StorageQualifier -> TypeQualifier
data TypeSpecifier
TypeSpec :: Maybe PrecisionQualifier -> TypeSpecifierNoPrecision -> TypeSpecifier
data InvariantQualifier
Invariant :: InvariantQualifier
data InterpolationQualifier
Smooth :: InterpolationQualifier
Flat :: InterpolationQualifier
NoPerspective :: InterpolationQualifier
data LayoutQualifier
Layout :: [LayoutQualifierId] -> LayoutQualifier
data LayoutQualifierId
LayoutQualId :: String -> Maybe Expr -> LayoutQualifierId
data Statement
DeclarationStatement :: Declaration -> Statement
Continue :: Statement
Break :: Statement
Return :: Maybe Expr -> Statement
Discard :: Statement
CompoundStatement :: Compound -> Statement
ExpressionStatement :: Maybe Expr -> Statement
SelectionStatement :: Expr -> Statement -> Maybe Statement -> Statement
SwitchStatement :: Expr -> [Statement] -> Statement
CaseLabel :: CaseLabel -> Statement
While :: Condition -> Statement -> Statement
DoWhile :: Statement -> Expr -> Statement
For :: Either (Maybe Expr) Declaration -> Maybe Condition -> Maybe Expr -> Statement -> Statement
data Compound
Compound :: [Statement] -> Compound
data Condition
Condition :: Expr -> Condition
InitializedCondition :: FullType -> String -> Expr -> Condition
data CaseLabel
Case :: Expr -> CaseLabel
Default :: CaseLabel
data StorageQualifier
Const :: StorageQualifier
Attribute :: StorageQualifier
Varying :: StorageQualifier
CentroidVarying :: StorageQualifier
In :: StorageQualifier
Out :: StorageQualifier
CentroidIn :: StorageQualifier
CentroidOut :: StorageQualifier
Uniform :: StorageQualifier
data TypeSpecifierNoPrecision
TypeSpecNoPrecision :: TypeSpecifierNonArray -> Maybe (Maybe Expr) -> TypeSpecifierNoPrecision
data TypeSpecifierNonArray
Void :: TypeSpecifierNonArray
Float :: TypeSpecifierNonArray
Int :: TypeSpecifierNonArray
UInt :: TypeSpecifierNonArray
Bool :: TypeSpecifierNonArray
Vec2 :: TypeSpecifierNonArray
Vec3 :: TypeSpecifierNonArray
Vec4 :: TypeSpecifierNonArray
BVec2 :: TypeSpecifierNonArray
BVec3 :: TypeSpecifierNonArray
BVec4 :: TypeSpecifierNonArray
IVec2 :: TypeSpecifierNonArray
IVec3 :: TypeSpecifierNonArray
IVec4 :: TypeSpecifierNonArray
UVec2 :: TypeSpecifierNonArray
UVec3 :: TypeSpecifierNonArray
UVec4 :: TypeSpecifierNonArray
Mat2 :: TypeSpecifierNonArray
Mat3 :: TypeSpecifierNonArray
Mat4 :: TypeSpecifierNonArray
Mat2x2 :: TypeSpecifierNonArray
Mat2x3 :: TypeSpecifierNonArray
Mat2x4 :: TypeSpecifierNonArray
Mat3x2 :: TypeSpecifierNonArray
Mat3x3 :: TypeSpecifierNonArray
Mat3x4 :: TypeSpecifierNonArray
Mat4x2 :: TypeSpecifierNonArray
Mat4x3 :: TypeSpecifierNonArray
Mat4x4 :: TypeSpecifierNonArray
Sampler1D :: TypeSpecifierNonArray
Sampler2D :: TypeSpecifierNonArray
Sampler3D :: TypeSpecifierNonArray
SamplerCube :: TypeSpecifierNonArray
Sampler1DShadow :: TypeSpecifierNonArray
Sampler2DShadow :: TypeSpecifierNonArray
SamplerCubeShadow :: TypeSpecifierNonArray
Sampler1DArray :: TypeSpecifierNonArray
Sampler2DArray :: TypeSpecifierNonArray
Sampler1DArrayShadow :: TypeSpecifierNonArray
Sampler2DArrayShadow :: TypeSpecifierNonArray
ISampler1D :: TypeSpecifierNonArray
ISampler2D :: TypeSpecifierNonArray
ISampler3D :: TypeSpecifierNonArray
ISamplerCube :: TypeSpecifierNonArray
ISampler1DArray :: TypeSpecifierNonArray
ISampler2DArray :: TypeSpecifierNonArray
USampler1D :: TypeSpecifierNonArray
USampler2D :: TypeSpecifierNonArray
USampler3D :: TypeSpecifierNonArray
USamplerCube :: TypeSpecifierNonArray
USampler1DArray :: TypeSpecifierNonArray
USampler2DArray :: TypeSpecifierNonArray
Sampler2DRect :: TypeSpecifierNonArray
Sampler2DRectShadow :: TypeSpecifierNonArray
ISampler2DRect :: TypeSpecifierNonArray
USampler2DRect :: TypeSpecifierNonArray
SamplerBuffer :: TypeSpecifierNonArray
ISamplerBuffer :: TypeSpecifierNonArray
USamplerBuffer :: TypeSpecifierNonArray
Sampler2DMS :: TypeSpecifierNonArray
ISampler2DMS :: TypeSpecifierNonArray
USampler2DMS :: TypeSpecifierNonArray
Sampler2DMSArray :: TypeSpecifierNonArray
ISampler2DMSArray :: TypeSpecifierNonArray
USampler2DMSArray :: TypeSpecifierNonArray
StructSpecifier :: Maybe String -> [Field] -> TypeSpecifierNonArray
TypeName :: String -> TypeSpecifierNonArray
data PrecisionQualifier
HighP :: PrecisionQualifier
MediumP :: PrecisionQualifier
LowP :: PrecisionQualifier
data Field
Field :: Maybe TypeQualifier -> TypeSpecifier -> [StructDeclarator] -> Field
data StructDeclarator
StructDeclarator :: String -> Maybe (Maybe Expr) -> StructDeclarator
data Expr
Variable :: String -> Expr
IntConstant :: IntConstantKind -> Integer -> Expr
FloatConstant :: Float -> Expr
BoolConstant :: Bool -> Expr
Bracket :: Expr -> Expr -> Expr
FieldSelection :: Expr -> String -> Expr
MethodCall :: Expr -> FunctionIdentifier -> Parameters -> Expr
FunctionCall :: FunctionIdentifier -> Parameters -> Expr
PostInc :: Expr -> Expr
PostDec :: Expr -> Expr
PreInc :: Expr -> Expr
PreDec :: Expr -> Expr
UnaryPlus :: Expr -> Expr
UnaryNegate :: Expr -> Expr
UnaryNot :: Expr -> Expr
UnaryOneComplement :: Expr -> Expr
Mul :: Expr -> Expr -> Expr
Div :: Expr -> Expr -> Expr
Mod :: Expr -> Expr -> Expr
Add :: Expr -> Expr -> Expr
Sub :: Expr -> Expr -> Expr
LeftShift :: Expr -> Expr -> Expr
RightShift :: Expr -> Expr -> Expr
Lt :: Expr -> Expr -> Expr
Gt :: Expr -> Expr -> Expr
Lte :: Expr -> Expr -> Expr
Gte :: Expr -> Expr -> Expr
Equ :: Expr -> Expr -> Expr
Neq :: Expr -> Expr -> Expr
BitAnd :: Expr -> Expr -> Expr
BitXor :: Expr -> Expr -> Expr
BitOr :: Expr -> Expr -> Expr
And :: Expr -> Expr -> Expr
Or :: Expr -> Expr -> Expr
Selection :: Expr -> Expr -> Expr -> Expr
Equal :: Expr -> Expr -> Expr
MulAssign :: Expr -> Expr -> Expr
DivAssign :: Expr -> Expr -> Expr
ModAssign :: Expr -> Expr -> Expr
AddAssign :: Expr -> Expr -> Expr
SubAssign :: Expr -> Expr -> Expr
LeftAssign :: Expr -> Expr -> Expr
RightAssign :: Expr -> Expr -> Expr
AndAssign :: Expr -> Expr -> Expr
XorAssign :: Expr -> Expr -> Expr
OrAssign :: Expr -> Expr -> Expr
Sequence :: Expr -> Expr -> Expr
data IntConstantKind
Hexadecimal :: IntConstantKind
Octal :: IntConstantKind
Decimal :: IntConstantKind
data Parameters
ParamVoid :: Parameters
Params :: [Expr] -> Parameters
data ParameterQualifier
InParameter :: ParameterQualifier
OutParameter :: ParameterQualifier
InOutParameter :: ParameterQualifier
data ParameterTypeQualifier
ConstParameter :: ParameterTypeQualifier
data FunctionIdentifier
FuncIdTypeSpec :: TypeSpecifier -> FunctionIdentifier
FuncId :: String -> FunctionIdentifier
instance GHC.Classes.Eq Language.GLSL.Syntax.CaseLabel
instance GHC.Classes.Eq Language.GLSL.Syntax.Compound
instance GHC.Classes.Eq Language.GLSL.Syntax.Condition
instance GHC.Classes.Eq Language.GLSL.Syntax.Declaration
instance GHC.Classes.Eq Language.GLSL.Syntax.Expr
instance GHC.Classes.Eq Language.GLSL.Syntax.ExternalDeclaration
instance GHC.Classes.Eq Language.GLSL.Syntax.Field
instance GHC.Classes.Eq Language.GLSL.Syntax.FullType
instance GHC.Classes.Eq Language.GLSL.Syntax.FunctionIdentifier
instance GHC.Classes.Eq Language.GLSL.Syntax.FunctionPrototype
instance GHC.Classes.Eq Language.GLSL.Syntax.InitDeclarator
instance GHC.Classes.Eq Language.GLSL.Syntax.IntConstantKind
instance GHC.Classes.Eq Language.GLSL.Syntax.InterpolationQualifier
instance GHC.Classes.Eq Language.GLSL.Syntax.InvariantOrType
instance GHC.Classes.Eq Language.GLSL.Syntax.InvariantQualifier
instance GHC.Classes.Eq Language.GLSL.Syntax.LayoutQualifier
instance GHC.Classes.Eq Language.GLSL.Syntax.LayoutQualifierId
instance GHC.Classes.Eq Language.GLSL.Syntax.ParameterDeclaration
instance GHC.Classes.Eq Language.GLSL.Syntax.ParameterQualifier
instance GHC.Classes.Eq Language.GLSL.Syntax.ParameterTypeQualifier
instance GHC.Classes.Eq Language.GLSL.Syntax.Parameters
instance GHC.Classes.Eq Language.GLSL.Syntax.PrecisionQualifier
instance GHC.Classes.Eq Language.GLSL.Syntax.Statement
instance GHC.Classes.Eq Language.GLSL.Syntax.StorageQualifier
instance GHC.Classes.Eq Language.GLSL.Syntax.StructDeclarator
instance GHC.Classes.Eq Language.GLSL.Syntax.TranslationUnit
instance GHC.Classes.Eq Language.GLSL.Syntax.TypeQualifier
instance GHC.Classes.Eq Language.GLSL.Syntax.TypeSpecifier
instance GHC.Classes.Eq Language.GLSL.Syntax.TypeSpecifierNoPrecision
instance GHC.Classes.Eq Language.GLSL.Syntax.TypeSpecifierNonArray
instance GHC.Internal.Show.Show Language.GLSL.Syntax.CaseLabel
instance GHC.Internal.Show.Show Language.GLSL.Syntax.Compound
instance GHC.Internal.Show.Show Language.GLSL.Syntax.Condition
instance GHC.Internal.Show.Show Language.GLSL.Syntax.Declaration
instance GHC.Internal.Show.Show Language.GLSL.Syntax.Expr
instance GHC.Internal.Show.Show Language.GLSL.Syntax.ExternalDeclaration
instance GHC.Internal.Show.Show Language.GLSL.Syntax.Field
instance GHC.Internal.Show.Show Language.GLSL.Syntax.FullType
instance GHC.Internal.Show.Show Language.GLSL.Syntax.FunctionIdentifier
instance GHC.Internal.Show.Show Language.GLSL.Syntax.FunctionPrototype
instance GHC.Internal.Show.Show Language.GLSL.Syntax.InitDeclarator
instance GHC.Internal.Show.Show Language.GLSL.Syntax.IntConstantKind
instance GHC.Internal.Show.Show Language.GLSL.Syntax.InterpolationQualifier
instance GHC.Internal.Show.Show Language.GLSL.Syntax.InvariantOrType
instance GHC.Internal.Show.Show Language.GLSL.Syntax.InvariantQualifier
instance GHC.Internal.Show.Show Language.GLSL.Syntax.LayoutQualifier
instance GHC.Internal.Show.Show Language.GLSL.Syntax.LayoutQualifierId
instance GHC.Internal.Show.Show Language.GLSL.Syntax.ParameterDeclaration
instance GHC.Internal.Show.Show Language.GLSL.Syntax.ParameterQualifier
instance GHC.Internal.Show.Show Language.GLSL.Syntax.ParameterTypeQualifier
instance GHC.Internal.Show.Show Language.GLSL.Syntax.Parameters
instance GHC.Internal.Show.Show Language.GLSL.Syntax.PrecisionQualifier
instance GHC.Internal.Show.Show Language.GLSL.Syntax.Statement
instance GHC.Internal.Show.Show Language.GLSL.Syntax.StorageQualifier
instance GHC.Internal.Show.Show Language.GLSL.Syntax.StructDeclarator
instance GHC.Internal.Show.Show Language.GLSL.Syntax.TranslationUnit
instance GHC.Internal.Show.Show Language.GLSL.Syntax.TypeQualifier
instance GHC.Internal.Show.Show Language.GLSL.Syntax.TypeSpecifier
instance GHC.Internal.Show.Show Language.GLSL.Syntax.TypeSpecifierNoPrecision
instance GHC.Internal.Show.Show Language.GLSL.Syntax.TypeSpecifierNonArray

module Language.GLSL.Pretty
type Assoc = (Rational -> Rational, Rational -> Rational)
assocLeft :: Assoc
assocRight :: Assoc
assocNone :: Assoc
bump :: Rational -> Rational
prettyBinary :: Pretty a => PrettyLevel -> Rational -> Rational -> Assoc -> String -> a -> a -> Doc
option :: Pretty a => Maybe a -> Doc
indexing :: Pretty a => Maybe (Maybe a) -> Doc
indexing' :: Pretty a => Maybe (String, Maybe a) -> Doc
initialize :: Pretty a => Maybe a -> Doc
ident :: Pretty a => Maybe (String, Maybe (Maybe a)) -> Doc
initialize' :: Pretty a => Maybe (String, Maybe a) -> Doc
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.CaseLabel
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.Compound
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.Condition
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.Declaration
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.Expr
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.ExternalDeclaration
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.Field
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.FullType
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.FunctionIdentifier
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.FunctionPrototype
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.InitDeclarator
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.InterpolationQualifier
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.InvariantOrType
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.InvariantQualifier
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.LayoutQualifier
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.LayoutQualifierId
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.ParameterDeclaration
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.ParameterQualifier
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.ParameterTypeQualifier
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.Parameters
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.PrecisionQualifier
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.Statement
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.StorageQualifier
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.StructDeclarator
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.TranslationUnit
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.TypeQualifier
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.TypeSpecifier
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.TypeSpecifierNoPrecision
instance Text.PrettyPrint.HughesPJClass.Pretty Language.GLSL.Syntax.TypeSpecifierNonArray

module Language.GLSL.Parser
data S
S :: S
type P a = GenParser Char S a
keywords :: [String]
reservedWords :: [String]
comment :: P ()
blank :: P ()
lexeme :: P a -> P a
parse :: [Char] -> Either ParseError TranslationUnit
semicolon :: P ()
comma :: P ()
colon :: P ()
lbrace :: P ()
rbrace :: P ()
lbracket :: P ()
rbracket :: P ()
lparen :: P ()
rparen :: P ()
keyword :: String -> P ()
identifier :: P String
intConstant :: P Expr
floatingConstant :: P Expr
operator :: String -> P String
identifierHead :: P Char
identifierTail :: P Char
hexadecimal :: P Expr
octal :: P Expr
badOctal :: P ()
decimal :: P Expr
floatExponent :: P Expr
floatPoint :: P Expr
pointFloat :: P Expr
exponent :: P String
infixLeft :: String -> (a -> a -> a) -> Operator Char S a
infixLeft' :: String -> (a -> a -> a) -> Operator Char S a
infixLeft'' :: Char -> (a -> a -> a) -> Operator Char S a
infixRight :: String -> (a -> a -> a) -> Operator Char S a
conditionalTable :: [[Operator Char S Expr]]
assignmentTable :: [[Operator Char S Expr]]
expressionTable :: [[Operator Char S Expr]]
primaryExpression :: P Expr
postfixExpression :: P Expr
dotFunctionCallGeneric :: P (Expr -> Expr)
dotFieldSelection :: P (Expr -> Expr)
integerExpression :: P Expr
functionCallGeneric :: P (FunctionIdentifier, Parameters)
functionCallHeader :: P FunctionIdentifier
functionIdentifier :: P FunctionIdentifier
unaryExpression :: P Expr
conditionalExpression :: P Expr
assignmentExpression :: P Expr
expression :: P Expr
constantExpression :: P Expr
declaration :: P Declaration
functionPrototype :: P FunctionPrototype
functionDeclarator :: P (FullType, String, [ParameterDeclaration])
functionHeader :: P (FullType, String)
parameterDeclaration :: P ParameterDeclaration
parameterQualifier :: P ParameterQualifier
fullySpecifiedType :: P FullType
invariantQualifier :: P InvariantQualifier
interpolationQualifier :: P InterpolationQualifier
layoutQualifier :: P LayoutQualifier
layoutQualifierId :: P LayoutQualifierId
parameterTypeQualifier :: P ParameterTypeQualifier
typeQualifier :: P TypeQualifier
storageQualifier :: P StorageQualifier
typeSpecifier :: P TypeSpecifier
typeSpecifierNoPrecision :: P TypeSpecifierNoPrecision
typeSpecifierNonArray :: P TypeSpecifierNonArray
precisionQualifier :: P PrecisionQualifier
structSpecifier :: P TypeSpecifierNonArray
structDeclarationList :: P [Field]
structDeclaration :: P Field
structDeclaratorList :: P [StructDeclarator]
structDeclarator :: P StructDeclarator
initializer :: P Expr
declarationStatement :: P Declaration
statement :: P Statement
simpleStatement :: P Statement
compoundStatement :: P Compound
statementNoNewScope :: P Statement
compoundStatementNoNewScope :: P Compound
statementList :: P [Statement]
expressionStatement :: P (Maybe Expr)
selectionStatement :: P Statement
condition :: P Condition
switchStatement :: P Statement
switchStatementList :: P [Statement]
caseLabel :: P CaseLabel
iterationStatement :: P Statement
forInitStatement :: P (Either (Maybe Expr) Declaration)
jumpStatement :: P Statement
translationUnit :: P TranslationUnit
externalDeclaration :: P ExternalDeclaration
functionDefinition :: P ExternalDeclaration

module Language.GLSL
