-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | C# source code manipulation -- -- A Haskell library containing an abstract syntax, lexer, parser and -- pretty printer for C#, aiming to comform the C# 6.0 draft -- specification. @package language-csharp @version 0.0.1 -- | This module containg the lexing of C# resulting in the list of tokens -- with their position in the original source file. module Language.CSharp.Lexer -- | Lexes the given string and returns the list of tokens with their -- position in the original source file. When the lexing fails an -- exception will be thrown. lexer :: String -> [Positioned Token] data Positioned a Positioned :: AlexPosn -> a -> Positioned a data Token TKWabstract :: Token TKWas :: Token TKWbase :: Token TKWbool :: Token TKWbreak :: Token TKWbyte :: Token TKWcase :: Token TKWcatch :: Token TKWchar :: Token TKWchecked :: Token TKWclass :: Token TKWconst :: Token TKWcontinue :: Token TKWdecimal :: Token TKWdefault :: Token TKWdelegate :: Token TKWdo :: Token TKWdouble :: Token TKWelse :: Token TKWenum :: Token TKWevent :: Token TKWexplicit :: Token TKWextern :: Token TKWfalse :: Token TKWfinally :: Token TKWfixed :: Token TKWfloat :: Token TKWfor :: Token TKWforeach :: Token TKWgoto :: Token TKWif :: Token TKWimplicit :: Token TKWin :: Token TKWint :: Token TKWinterface :: Token TKWinternal :: Token TKWis :: Token TKWlock :: Token TKWlong :: Token TKWnamespace :: Token TKWnew :: Token TKWnull :: Token TKWobject :: Token TKWoperator :: Token TKWout :: Token TKWoverride :: Token TKWparams :: Token TKWprivate :: Token TKWprotected :: Token TKWpublic :: Token TKWreadonly :: Token TKWref :: Token TKWreturn :: Token TKWsbyte :: Token TKWsealed :: Token TKWshort :: Token TKWsizeof :: Token TKWstackalloc :: Token TKWstatic :: Token TKWstring :: Token TKWstruct :: Token TKWswitch :: Token TKWthis :: Token TKWthrow :: Token TKWtrue :: Token TKWtry :: Token TKWtypeof :: Token TKWuint :: Token TKWulong :: Token TKWunchecked :: Token TKWunsafe :: Token TKWushort :: Token TKWusing :: Token TKWvirtual :: Token TKWvoid :: Token TKWvolatile :: Token TKWwhile :: Token TOParens :: Token TCParens :: Token TOSquare :: Token TCSquare :: Token TOCurly :: Token TCCurly :: Token TSemicolon :: Token TDoubleColon :: Token TColon :: Token TComma :: Token TPeriod :: Token TQuestion :: Token TLambda :: Token TOpPlus :: Token TOpMinus :: Token TOpMultiply :: Token TOpDivide :: Token TOpModulo :: Token TOpBitwiseAnd :: Token TOpBitwiseOr :: Token TOpBitwiseXor :: Token TOpLeftShift :: Token TOpRightShift :: Token TOpEqual :: Token TOpNotEqual :: Token TOpGreaterThan :: Token TOpLessThan :: Token TOpGreaterThanEqual :: Token TOpLessThanEqual :: Token TOpAnd :: Token TOpOr :: Token TOpNot :: Token TOpBitwiseNot :: Token TOpPlusPlus :: Token TOpMinusMinus :: Token TOpNullCoalescing :: Token TOpAwait :: Token TOpAssign :: Token TOpAssignPlus :: Token TOpAssignMinus :: Token TOpAssignMultiply :: Token TOpAssignDivide :: Token TOpAssignModulo :: Token TOpAssignBitwiseAnd :: Token TOpAssignBitwiseOr :: Token TOpAssignBitwiseXor :: Token TOpAssignBitwiseLeftShift :: Token TOpAssignBitwiseRightShift :: Token TCharLiteral :: String -> Token TStringLiteral :: String -> Token TVerbatimStringLiteral :: String -> Token TInterpolatedStringLiteral :: String -> Token TFloatLiteral :: Double -> Token TDoubleLiteral :: Double -> Token TDecimalLiteral :: Double -> Token TIntLiteral :: Integer -> Token TUIntLiteral :: Integer -> Token TLongLiteral :: Integer -> Token TULongLiteral :: Integer -> Token TIdentifier :: String -> Token data AlexPosn AlexPn :: !Int -> !Int -> !Int -> AlexPosn instance GHC.Classes.Eq Language.CSharp.Lexer.Token instance GHC.Show.Show Language.CSharp.Lexer.Token instance GHC.Show.Show a => GHC.Show.Show (Language.CSharp.Lexer.Positioned a) instance GHC.Show.Show Language.CSharp.Lexer.AlexPosn instance GHC.Classes.Eq Language.CSharp.Lexer.AlexPosn -- | This module contains the abstract syntax tree of C#. module Language.CSharp.Syntax -- | A compilation unit is the top level definition of a C# program. data CompilationUnit CompilationUnit :: [Using] -> [Declaration] -> CompilationUnit -- | A using declaration appears within a compilation unit to indicate -- which namespace to include. data Using Using :: Name -> Bool -> Using -- | A declaration appears within a compilation unit introducing a -- namespace, or a type declaration. data Declaration -- | A namespace declaration. NamespaceDeclaration :: [GlobalAttributeSection] -> Name -> [Declaration] -> Declaration -- | A type declaration. TypeDeclaration :: TypeDeclaration -> Declaration -- | A type declaration appears withing a compilation unit, a namespace, or -- another type declaration. A type declaration introduces a new type -- which can be either a class, struct, enum, interface or delegate. data TypeDeclaration -- | A class declaration containing its attributes, modifiers, identifier, -- type parameters, the types it inherits from, the type parameter -- constaints and its body. ClassTypeDeclaration :: [AttributeSection] -> [Modifier] -> Identifier -> [TypeParameter] -> [TypeName] -> [TypeParameterConstraintClause] -> ClassBody -> TypeDeclaration -- | A struct declaration containing its attributes, modifiers, identifier, -- type parameters, the types it inherits from, the type parameter -- constraints and its body. StructTypeDeclaration :: [AttributeSection] -> [Modifier] -> Identifier -> [TypeParameter] -> [TypeName] -> [TypeParameterConstraintClause] -> StructBody -> TypeDeclaration -- | An enum declaration containing its attributes, modifiers, identifier, -- the type it inherits from and its body. EnumTypeDeclaration :: [AttributeSection] -> [Modifier] -> Identifier -> (Maybe IntegralType) -> EnumBody -> TypeDeclaration -- | An interface declaration containing its attributes, modifiers, -- identifier, the type parameters, the types it inherits from, the type -- parameter constraints and its body. InterfaceTypeDeclaration :: [AttributeSection] -> [Modifier] -> Identifier -> [VariantTypeParameter] -> [TypeName] -> [TypeParameterConstraintClause] -> InterfaceBody -> TypeDeclaration -- | A delegate declaration containing its attributes, modifiers, return -- type, identifier, type parameters, formal parameters and type -- parameter constraints. DelegateTypeDeclaration :: [AttributeSection] -> [Modifier] -> (Maybe Type) -> Identifier -> [VariantTypeParameter] -> FormalParams -> [TypeParameterConstraintClause] -> TypeDeclaration -- | A class body appears within a class type declaration. newtype ClassBody ClassBody :: [MemberDeclaration] -> ClassBody -- | A struct body appears within a struct type declaration. newtype StructBody StructBody :: [MemberDeclaration] -> StructBody -- | An enum body appears within an enum type declaration. newtype EnumBody EnumBody :: [EnumMemberDeclaration] -> EnumBody -- | An enum member declaration appears within an enum body. data EnumMemberDeclaration -- | An enum member declaration containing the identifier and its value. EnumMemberDeclaration :: Identifier -> (Maybe Expression) -> EnumMemberDeclaration -- | An interface body appears within an interface type declaration. newtype InterfaceBody InterfaceBody :: [InterfaceMemberDeclaration] -> InterfaceBody -- | An interface member declaration appears within an interface body. data InterfaceMemberDeclaration -- | A method declaration containing its attributes, modifiers, return type -- identifier, type parameters, formal parameters and type parameter -- constraints. InterfaceMethodMemberDeclaration :: [AttributeSection] -> [Modifier] -> (Maybe Type) -> Identifier -> [TypeParameter] -> FormalParams -> [TypeParameterConstraintClause] -> InterfaceMemberDeclaration -- | A property declaration containing its attributes, modifiers, type -- identifier and accessor(s). At least one accessor is defined and they -- can appear in any order. InterfacePropertyMemberDeclaration :: [AttributeSection] -> [Modifier] -> Type -> Identifier -> (Maybe InterfaceAccessor) -> (Maybe InterfaceAccessor) -> InterfaceMemberDeclaration -- | An event declaration containing its attributes, modifiers, type and -- identifier. InterfaceEventMemberDeclaration :: [AttributeSection] -> [Modifier] -> Type -> Identifier -> InterfaceMemberDeclaration -- | An indexer declaration containing its attributes, modifiers, type, -- formal parameters and accessor(s). At least one accessor is defined -- and they can appear in any order. InterfaceIndexerMemberDeclaration :: [AttributeSection] -> [Modifier] -> Type -> FormalParams -> (Maybe InterfaceAccessor) -> (Maybe InterfaceAccessor) -> InterfaceMemberDeclaration -- | A member declaration appears within a class- or struct body. data MemberDeclaration -- | A field declaration containing its attributes, modifiers, type and -- declarator(s). FieldMemberDeclaration :: [AttributeSection] -> [Modifier] -> Type -> [VariableDeclarator] -> MemberDeclaration -- | A method declaration containing its attributes, modifiers, return type -- name, type parameters, formal parameters, type parameter constraints -- and body. MethodMemberDeclaration :: [AttributeSection] -> [Modifier] -> (Maybe Type) -> Name -> [TypeParameter] -> FormalParams -> [TypeParameterConstraintClause] -> MethodBody -> MemberDeclaration -- | A property declaration containing its attributes, modifiers, type, -- name and body. PropertyMemberDeclaration :: [AttributeSection] -> [Modifier] -> Type -> Name -> PropertyBody -> MemberDeclaration -- | An event declaration containing its attributes, modifiers, type and -- declarator(s). EventVariableMemberDeclaration :: [AttributeSection] -> [Modifier] -> Type -> [VariableDeclarator] -> MemberDeclaration -- | An event declaration containing its attributes, modifiers, type, name -- and accessors. The accessors can appear in any order. EventAccessorMemberDeclaration :: [AttributeSection] -> [Modifier] -> Type -> Name -> EventAccessor -> EventAccessor -> MemberDeclaration -- | An indexer declaration containing its attributes, modifiers, -- declarator and body. IndexerMemberDeclaration :: [AttributeSection] -> [Modifier] -> IndexerDeclarator -> IndexerBody -> MemberDeclaration -- | An operator declaration containing its attributes, modifiers, -- declarator and body. OperatorMemberDeclaration :: [AttributeSection] -> [Modifier] -> OperatorDeclarator -> OperatorBody -> MemberDeclaration -- | A constructor declaration containing its attributes, identifier, -- formal parameters, the base/this constructor call and body. ConstructorMemberDeclaration :: [AttributeSection] -> [Modifier] -> Identifier -> FormalParams -> (Maybe ConstructorInitializer) -> ConstructorBody -> MemberDeclaration -- | A destructor declaration containing its attributes, modifiers, -- identifier and body. DestructorMemberDeclaration :: [AttributeSection] -> [Modifier] -> Identifier -> DestructorBody -> MemberDeclaration -- | A nested type declaration. TypeMemberDeclaration :: TypeDeclaration -> MemberDeclaration -- | A property accessor appears within an property declaration of an -- interface declaration. data InterfaceAccessor GetInterfaceAccessor :: [AttributeSection] -> InterfaceAccessor SetInterfaceAccessor :: [AttributeSection] -> InterfaceAccessor -- | An event acessor appears within an event declaration. data EventAccessor -- | An add event accessor containing its attributes and statements. AddEventAccessor :: [AttributeSection] -> [Statement] -> EventAccessor -- | A remove event accessor containing its attributes and statements. RemoveEventAccessor :: [AttributeSection] -> [Statement] -> EventAccessor -- | A constructor initializer appears within a constructor declaration. data ConstructorInitializer ConstructorBaseCall :: [Argument] -> ConstructorInitializer ConstructorThisCall :: [Argument] -> ConstructorInitializer -- | An argument appears within any kind of method invocation. data Argument -- | An argument containing its identifier and expression. Argument :: (Maybe Identifier) -> Expression -> Argument -- | A ref argument containing its identifier and expression. RefArgument :: (Maybe Identifier) -> Expression -> Argument -- | An out argument containing its identifier and expression. OutArgument :: (Maybe Identifier) -> Expression -> Argument -- | An operator declarator appears within a operator declaration. data OperatorDeclarator -- | An unary operator declaration containing its return type, operator, -- and formal parameter type and identifier. UnaryOperatorDeclarator :: Type -> OverloadableUnaryOperator -> Type -> Identifier -> OperatorDeclarator -- | A binary operator declaration containing its return type, operator, -- first formal parameter type and identifier, and second formal -- parameter type and identifier. BinaryOperatorDeclarator :: Type -> BinaryOperator -> Type -> Identifier -> Type -> Identifier -> OperatorDeclarator -- | An implicit conversion declarator containing its return type, and -- formal parameter type and identifier. ImplicitConversionOperatorDeclarator :: Type -> Type -> Identifier -> OperatorDeclarator -- | An explicit conversion declarator containing its return type, and -- formal parameter type and identifier. ExplicitConversionOperatorDeclarator :: Type -> Type -> Identifier -> OperatorDeclarator -- | An overloadable unary operator appears within a unary operator -- declarator. data OverloadableUnaryOperator OverloadableUnaryPlus :: OverloadableUnaryOperator OverloadableUnaryMinus :: OverloadableUnaryOperator OverloadableUnaryNot :: OverloadableUnaryOperator OverloadableUnaryBitwiseNot :: OverloadableUnaryOperator OverloadableUnaryPlusPlus :: OverloadableUnaryOperator OverloadableUnaryMinusMinus :: OverloadableUnaryOperator OverloadableUnaryTrue :: OverloadableUnaryOperator OverloadableUnaryFalse :: OverloadableUnaryOperator -- | An operator body appears within a operator declaration. data OperatorBody -- | An operator body containing its statements. OperatorStatementBody :: [Statement] -> OperatorBody -- | An operator body containing its expression. OperatorExpressionBody :: Expression -> OperatorBody -- | An operator body without an implementation. OperatorNoBody :: OperatorBody -- | A constructor body appears within a constructor declaration. newtype ConstructorBody ConstructorStatementBody :: [Statement] -> ConstructorBody -- | A destructor body appears within a destructor declaration. newtype DestructorBody DestructorStatementBody :: [Statement] -> DestructorBody -- | A indexer body appears within an indexer declaration. data IndexerBody -- | An indexer body containing its accessor(s). At least one accessor is -- defined and they can appear in any order. IndexerAccessor :: (Maybe AccessorDeclaration) -> (Maybe AccessorDeclaration) -> IndexerBody -- | An indexer body containing its expression. IndexerLambda :: Expression -> IndexerBody -- | An indexer declarator appears within an indexer declaration. data IndexerDeclarator -- | An indexer declarator containing its return type and formal -- parameters. IndexerDeclaratorThis :: Type -> FormalParams -> IndexerDeclarator -- | An indexer declarator containing its return type, interface type and -- formal parameters. IndexerDeclaratorInterface :: Type -> Type -> FormalParams -> IndexerDeclarator -- | A property body appears within a property declaration. data PropertyBody -- | A property body containing its accessor(s) and variable initializer. -- At least one accessor is defined an they can appear in any order. PropertyBody :: (Maybe AccessorDeclaration) -> (Maybe AccessorDeclaration) -> (Maybe VariableInitializer) -> PropertyBody -- | A propety body containing its expression. PropertyLambda :: Expression -> PropertyBody -- | An accessor declaration appears within a property body. data AccessorDeclaration -- | A get propety declaration containing its attributes, modifiers and -- body. GetAccessorDeclaration :: [AttributeSection] -> [Modifier] -> (Maybe [Statement]) -> AccessorDeclaration -- | A set propety declaration containing its attributes, modifiers and -- body. SetAccessorDeclaration :: [AttributeSection] -> [Modifier] -> (Maybe [Statement]) -> AccessorDeclaration -- | A method body appears within a method declaration. data MethodBody -- | An method body containing its statements. MethodStatementBody :: [Statement] -> MethodBody -- | An method body containing its expression. MethodExpressionBody :: Expression -> MethodBody -- | An method body without an implementation. MethodNoBody :: MethodBody -- | A formal parameters containing the formal parameters and a params -- array. data FormalParams FormalParams :: [FormalParam] -> (Maybe ParamArray) -> FormalParams -- | A formal parameter containing its modifier ty identifier and default -- value. data FormalParam FormalParam :: (Maybe ParameterModifier) -> Type -> Identifier -> (Maybe Expression) -> FormalParam -- | A formal params array containing its array type and identifier. data ParamArray ParamArray :: ArrayType -> Identifier -> ParamArray -- | A formal parameter modifier. data ParameterModifier RefParam :: ParameterModifier OutParam :: ParameterModifier ThisParam :: ParameterModifier -- | A statement. data Statement -- | A labeled statement containing its label and statement. Labeled :: Identifier -> Statement -> Statement -- | A declaration containing its variable declaration. Declaration :: LocalVarDeclaration -> Statement -- | A block statement. Block :: [Statement] -> Statement -- | An empty statement. Empty :: Statement -- | An expression statement. ExpressionStatement :: Expression -> Statement -- | An if then else statement containing its guard, true body and false -- body. IfThenElse :: Expression -> Statement -> (Maybe Statement) -> Statement -- | A switch statement containing its guard and switch blocks. Switch :: Expression -> [SwitchBlock] -> Statement -- | A while statement containing its guard and body. While :: Expression -> Statement -> Statement -- | A do while statement containing its body and guard. Do :: Statement -> Expression -> Statement -- | A for statement containing its initializer, guard, increment -- expression and body. For :: (Maybe ForInitializer) -> (Maybe Expression) -> (Maybe [Expression]) -> Statement -> Statement -- | A foreach statement containing its variable type name and expression, -- and body. ForEach :: LocalVarType -> Identifier -> Expression -> Statement -> Statement -- | A break statement. Break :: Statement -- | A continue statement. Continue :: Statement -- | A goto statement. Goto :: GotoTarget -> Statement -- | A return statement. Return :: (Maybe Expression) -> Statement -- | A throw statement. Throw :: (Maybe Expression) -> Statement -- | A try catch finally statement containing the try body, catches and -- finally body. Try :: [Statement] -> [Catch] -> [Statement] -> Statement -- | A checked statement. CheckedStatement :: [Statement] -> Statement -- | An unchecked statement. UncheckedStatement :: [Statement] -> Statement -- | A lock statement containing its locking object and body. Lock :: Expression -> Statement -> Statement -- | An using statement containing its resource and body. UsingStatement :: ResourceAcquisition -> Statement -> Statement -- | A yield statement containing its return expression. Yield :: (Maybe Expression) -> Statement -- | A local variable declaration appears within a local declaration or for -- initializer. data LocalVarDeclaration -- | A local variable declaration containing its type and declarators. LocalVarDeclaration :: LocalVarType -> [VariableDeclarator] -> LocalVarDeclaration -- | A goto target appears within a goto statement. data GotoTarget GotoLabel :: Identifier -> GotoTarget GotoCase :: Expression -> GotoTarget GotoDefault :: GotoTarget -- | A switch block appears within a switch statement. data SwitchBlock -- | A labeled block containing its label and body. LabeledBlock :: Expression -> [Statement] -> SwitchBlock -- | A default block containing its body. DefaultBlock :: [Statement] -> SwitchBlock -- | A resource acquisition appears within an using statement. data ResourceAcquisition -- | A resource acquisition containing its variable declarators. ResourceAcquisitionVariable :: [VariableDeclarator] -> ResourceAcquisition -- | A resource acquisition containing its expression. ResourceAcquisitionExpression :: Expression -> ResourceAcquisition -- | A variable declarator containing its identifier and initializer. data VariableDeclarator VariableDeclarator :: Identifier -> (Maybe VariableInitializer) -> VariableDeclarator -- | A variable initializer. data VariableInitializer -- | A variable initializer containing its expression. VariableInitializerExpression :: Expression -> VariableInitializer -- | A variable initializer containing its array initializer. VariableInitializerArray :: ArrayInitializer -> VariableInitializer -- | A local variable type. data LocalVarType VarType :: Type -> LocalVarType Var :: LocalVarType -- | An array initializer containing its variable initializers. newtype ArrayInitializer ArrayInitializer :: [VariableInitializer] -> ArrayInitializer -- | A for initializer appears within a for statement. data ForInitializer -- | A for initializer containing its variable declaration. ForInitializerDeclaration :: LocalVarDeclaration -> ForInitializer -- | A for initializer containing its expressions. ForInitializerExpressions :: [Expression] -> ForInitializer -- | A catch block appears within a try statement. data Catch -- | A catch block containing its exception specifier, exception filter and -- body. Catch :: (Maybe ExceptionSpecifier) -> (Maybe Expression) -> [Statement] -> Catch -- | An exception specifier containing its type and identifier. data ExceptionSpecifier ExceptionSpecifier :: Type -> (Maybe Identifier) -> ExceptionSpecifier -- | An expression. data Expression -- | A literal. Literal :: Literal -> Expression -- | A named value containing its identifer and type arguments. SimpleName :: Identifier -> [TypeArgument] -> Expression -- | A parenthesized expression. Parenthesized :: Expression -> Expression -- | An assignment containing its left-hand side, operator and right-hand -- side.. Assign :: Expression -> AssignmentOperator -> Expression -> Expression -- | An member access. MemberAccess :: MemberAccess -> Expression -- | An method invocation containing its method and arguments. Invocation :: Expression -> [Argument] -> Expression -- | An element access containing its array and indices. ElementAccess :: Expression -> [Expression] -> Expression -- | A this access expression. This :: Expression -- | A base access expression. Base :: Expression -- | An object creation containing its type, arguments and initializer. -- e.g. new Object(a, b). ObjectCreationExpression :: Type -> [Argument] -> (Maybe ObjectCreationInitializer) -> Expression -- | An object creation containing its type and initializer. e.g. new -- Object { A = a, B = b }. ObjectCreationTypeInitializer :: Type -> ObjectCreationInitializer -> Expression -- | An array creation containing its type, rank specifiers and initialier. ArrayCreationExpression :: Type -> [Expression] -> [RankSpecifier] -> (Maybe ArrayCreationInitializer) -> Expression -- | An array creation containing its type and intializer. ArrayCreationTypeInitializer :: Type -> ArrayCreationInitializer -> Expression -- | An array creation containing its rank specifier and initializer. ArrayCreationRankInitializer :: RankSpecifier -> ArrayCreationInitializer -> Expression -- | A sizeof expression. Sizeof :: Type -> Expression -- | A typeof expression. Typeof :: TypeOfExpression -> Expression -- | A checked expression. Checked :: Expression -> Expression -- | An unchecked expression. Unchecked :: Expression -> Expression -- | A default expression. Default :: Type -> Expression -- | A binary operator containing its operator, left expression and right -- expression. BinaryOperator :: BinaryOperator -> Expression -> Expression -> Expression -- | A conditional expression containing its guard, first expression and -- second expression, Conditional :: Expression -> Expression -> Expression -> Expression -- | A nameof expression. Nameof :: NameofEntity -> Expression -- | A delegate expression containing its signature and body. Delegate :: (Maybe AnonymousFunctionSignature) -> [Statement] -> Expression -- | A lambda expression containing its signature and body. Lambda :: AnonymousFunctionSignature -> AnonymousFunctionBody -> Expression -- | An unary + expression. UnaryPlus :: Expression -> Expression -- | An unary - expression. UnaryMinus :: Expression -> Expression -- | An unary ! expression. UnaryNot :: Expression -> Expression -- | An unary ~ expression. UnaryBitwiseNot :: Expression -> Expression -- | An unary ++ expression appearing in front of its expression. UnaryPreIncrement :: Expression -> Expression -- | An unary -- expression appearing in front of its expression. UnaryPreDecrement :: Expression -> Expression -- | An unary ++ expression appearing after its expression. UnaryPostIncrement :: Expression -> Expression -- | An unary -- expression appearing after its expression. UnaryPostDecrement :: Expression -> Expression -- | A cast containing its target type and expression. UnaryCast :: Type -> Expression -> Expression -- | An await expression. UnaryAwait :: Expression -> Expression -- | An anonymous function signature appears within a delegate- or lambda -- expression. data AnonymousFunctionSignature -- | An explicit anonymous function signature containing its formal -- parameters. ExplicitAnonymousFunctionSignature :: [AnonymousFunctionParameter] -> AnonymousFunctionSignature -- | An implicit anonymous function signature containing its formal -- parameters. ImplicitAnonymousFunctionSignature :: [Identifier] -> AnonymousFunctionSignature -- | An anonymous function body appears within a lambda expression. data AnonymousFunctionBody -- | A anonymous function body containing its statements. AnonymousFunctionStatementBody :: [Statement] -> AnonymousFunctionBody -- | A anonymous function body containing its expression. AnonymousFunctionExpressionBody :: Expression -> AnonymousFunctionBody -- | An anonymous function parameter containing its modifier, type and -- identifier. data AnonymousFunctionParameter ExplicitAnonymousFunctionParameter :: (Maybe ParameterModifier) -> Type -> Identifier -> AnonymousFunctionParameter -- | A nameof entity appears within a nameof expression. data NameofEntity -- | A nameof containing its identifier. NameofIdentifier :: Identifier -> NameofEntity -- | A nameof this containing its identifier. NameofThis :: Identifier -> NameofEntity -- | A nameof base containing its identifier. NameofBase :: Identifier -> NameofEntity -- | A nameof containing its entity and identifier. NameofEntity :: NameofEntity -> Identifier -> NameofEntity -- | A nameof containing its simple type and identifier. NameofPredefinedType :: SimpleType -> Identifier -> NameofEntity -- | A typeof expression containing its type where Nothing -- represents void. newtype TypeOfExpression TypeofType :: (Maybe Type) -> TypeOfExpression -- | An array creation initializer appears withing an array creation -- expression. data ArrayCreationInitializer -- | An array creation initializer containing its values. ArrayCreationInitializerExpression :: [Expression] -> ArrayCreationInitializer -- | An array creation initializer containing its nested initializers. ArrayCreationInitializerInitializers :: [ArrayCreationInitializer] -> ArrayCreationInitializer -- | An object creation initializer appears within an object creation -- expression. data ObjectCreationInitializer -- | An object initializer containing its member initializers. ObjectInitializer :: [MemberInitializer] -> ObjectCreationInitializer -- | A collection initializer containing its initializers. CollectionInitializer :: ArrayCreationInitializer -> ObjectCreationInitializer -- | A member initializer containing its target and value. data MemberInitializer MemberInitializer :: InitializerTarget -> InitializerValue -> MemberInitializer -- | An initialization target appears within a member initializer. data InitializerTarget -- | An initializer target containing its identifier. InitializerTargetIdentifier :: Identifier -> InitializerTarget -- | An initializer target containing its values. InitializerTargetList :: [Argument] -> InitializerTarget -- | An initialization value appears within a member initializer. data InitializerValue -- | An initializer value containing its value. InitializerValueExpression :: Expression -> InitializerValue -- | An initializer value containing its nested values. InitializerValueInitializer :: ObjectCreationInitializer -> InitializerValue -- | A member access appearing within an member access expression. data MemberAccess -- | A member access containing its expression, identifier and type -- arguments. PrimaryMemberAccess :: Expression -> Identifier -> [TypeArgument] -> MemberAccess -- | A member access containing its simple type, identifier and type -- arguments. PredefinedMemberAccess :: SimpleType -> Identifier -> [TypeArgument] -> MemberAccess -- | A member access containing its namespace, identifier, and identifier. QualifiedMemberAccess :: Identifier -> Identifier -> Identifier -> MemberAccess -- | A literal. data Literal BooleanLit :: Bool -> Literal IntLit :: Integer -> Literal UIntLit :: Integer -> Literal LongLit :: Integer -> Literal ULongLit :: Integer -> Literal FloatLit :: Double -> Literal DoubleLit :: Double -> Literal DecimalLit :: Double -> Literal CharLit :: String -> Literal StringLit :: String -> Literal VerbatimStringLit :: String -> Literal NullLit :: Literal -- | An assignment operator. data AssignmentOperator OpAssign :: AssignmentOperator OpAssignPlus :: AssignmentOperator OpAssignMinus :: AssignmentOperator OpAssignMultiply :: AssignmentOperator OpAssignDivide :: AssignmentOperator OpAssignModulo :: AssignmentOperator OpAssignBitwiseAnd :: AssignmentOperator OpAssignBitwiseOr :: AssignmentOperator OpAssignBitwiseXor :: AssignmentOperator OpAssignBitwiseLeftShift :: AssignmentOperator OpAssignBitwiseRightShift :: AssignmentOperator -- | A binary operator. data BinaryOperator BinaryPlus :: BinaryOperator BinaryMinus :: BinaryOperator BinaryMultiply :: BinaryOperator BinaryDivide :: BinaryOperator BinaryModulo :: BinaryOperator BinaryShiftLeft :: BinaryOperator BinaryShiftRight :: BinaryOperator BinaryEquals :: BinaryOperator BinaryNotEquals :: BinaryOperator BinaryLessThan :: BinaryOperator BinaryLessThanEqual :: BinaryOperator BinaryGreaterThan :: BinaryOperator BinaryGreaterThanEqual :: BinaryOperator BinaryBitwiseAnd :: BinaryOperator BinaryBitwiseXor :: BinaryOperator BinaryBitwiseOr :: BinaryOperator BinaryAnd :: BinaryOperator BinaryOr :: BinaryOperator BinaryIs :: BinaryOperator BinaryAs :: BinaryOperator BinaryNullCoalescing :: BinaryOperator -- | A type parameter containing its identifier. newtype TypeParameter TypeParameter :: Identifier -> TypeParameter -- | A type parameter constraint clause containing its type parameter and -- constraints. data TypeParameterConstraintClause TypeParameterConstraintClause :: TypeParameter -> [TypeParameterConstraint] -> TypeParameterConstraintClause -- | A variant type parameter containing its variance and identifier. data VariantTypeParameter VariantTypeParameter :: (Maybe Variance) -> Identifier -> VariantTypeParameter -- | A variance appears within a variant type parameter. data Variance VarianceIn :: Variance VarianceOut :: Variance -- | A type parameter constraint appears within a type parameter -- constraints clause. data TypeParameterConstraint -- | A type constraint containing its type. TypeConstraint :: Type -> TypeParameterConstraint -- | A class constraint. ClassConstraint :: TypeParameterConstraint -- | A struct constraint. StructConstraint :: TypeParameterConstraint -- | A new() constraint. NewConstraint :: TypeParameterConstraint -- | A type argument containing its type. newtype TypeArgument TypeArgument :: Type -> TypeArgument -- | A type. data Type -- | A named type containing its name. TypeNamed :: TypeName -> Type -- | An array type containing its array type. TypeArray :: ArrayType -> Type -- | A simple type containing its simple type. TypeSimple :: SimpleType -> Type -- | A dynamic type. TypeDynamic :: Type -- | A nullable type containing its type. TypeNullable :: Type -> Type -- | A simple type can be one of the standard types. data SimpleType IntegralType :: IntegralType -> SimpleType FloatingPointType :: FloatingPointType -> SimpleType Char :: SimpleType Bool :: SimpleType Object :: SimpleType String :: SimpleType -- | An intergral type. data IntegralType SByte :: IntegralType Byte :: IntegralType Short :: IntegralType UShort :: IntegralType Int :: IntegralType UInt :: IntegralType Long :: IntegralType ULong :: IntegralType -- | A floating point type. data FloatingPointType Float :: FloatingPointType Double :: FloatingPointType Decimal :: FloatingPointType -- | An array type containing its base type and rank specifiers. data ArrayType ArrayType :: Type -> [RankSpecifier] -> ArrayType -- | A rank specifier containing the number of ranks. newtype RankSpecifier RankSpecifier :: Int -> RankSpecifier -- | A type name. data TypeName -- | A type name containing its name and type arguments. TypeName :: Name -> [TypeArgument] -> TypeName -- | A type alias containing its namespace, identifier and type arguments. TypeAlias :: Identifier -> Identifier -> [TypeArgument] -> TypeName -- | An attribute section containing the attribute target and attributes. data AttributeSection AttributeSection :: (Maybe AttributeTarget) -> [Attribute] -> AttributeSection -- | A global attribute section containing the attribute target and -- attributes. data GlobalAttributeSection GlobalAttributeSection :: (Maybe GlobalAttributeTarget) -> [Attribute] -> GlobalAttributeSection -- | A global attribute target appears within a global attribute section. data GlobalAttributeTarget AttributeTargetAssembly :: GlobalAttributeTarget AttributeTargetModule :: GlobalAttributeTarget -- | An attribute target appears within a attribute section. data AttributeTarget AttributeTargetField :: AttributeTarget AttributeTargetEvent :: AttributeTarget AttributeTargetMethod :: AttributeTarget AttributeTargetParam :: AttributeTarget AttributeTargetProperty :: AttributeTarget AttributeTargetReturn :: AttributeTarget AttributeTargetType :: AttributeTarget -- | An attribute containing its type name and attribute arguments. data Attribute Attribute :: TypeName -> [AttributeArgument] -> Attribute -- | An attribute argument appears within an attribute. data AttributeArgument -- | An expression attribute argument containing its expression. AttributeArgumentExpression :: Expression -> AttributeArgument -- | An named attribute argument containing its name and expression. AttributeArgumentNamed :: Identifier -> Expression -> AttributeArgument -- | A modifier specifying properties of declarations on different levels. data Modifier Public :: Modifier Private :: Modifier Internal :: Modifier Protected :: Modifier Abstract :: Modifier Async :: Modifier Const :: Modifier Event :: Modifier Extern :: Modifier New :: Modifier Override :: Modifier Readonly :: Modifier Sealed :: Modifier Static :: Modifier Unsafe :: Modifier Virtual :: Modifier Volatile :: Modifier Partial :: Modifier -- | An identifier. newtype Identifier Identifier :: String -> Identifier -- | A name is a sequence of identifiers chained with periods. newtype Name Name :: [Identifier] -> Name instance GHC.Show.Show Language.CSharp.Syntax.CompilationUnit instance GHC.Show.Show Language.CSharp.Syntax.Using instance GHC.Show.Show Language.CSharp.Syntax.Declaration instance GHC.Show.Show Language.CSharp.Syntax.ClassBody instance GHC.Show.Show Language.CSharp.Syntax.StructBody instance GHC.Show.Show Language.CSharp.Syntax.TypeDeclaration instance GHC.Show.Show Language.CSharp.Syntax.MemberDeclaration instance GHC.Show.Show Language.CSharp.Syntax.InterfaceBody instance GHC.Show.Show Language.CSharp.Syntax.InterfaceMemberDeclaration instance GHC.Show.Show Language.CSharp.Syntax.OperatorDeclarator instance GHC.Show.Show Language.CSharp.Syntax.IndexerDeclarator instance GHC.Show.Show Language.CSharp.Syntax.FormalParams instance GHC.Show.Show Language.CSharp.Syntax.FormalParam instance GHC.Show.Show Language.CSharp.Syntax.EventAccessor instance GHC.Show.Show Language.CSharp.Syntax.OperatorBody instance GHC.Show.Show Language.CSharp.Syntax.ConstructorBody instance GHC.Show.Show Language.CSharp.Syntax.DestructorBody instance GHC.Show.Show Language.CSharp.Syntax.IndexerBody instance GHC.Show.Show Language.CSharp.Syntax.PropertyBody instance GHC.Show.Show Language.CSharp.Syntax.AccessorDeclaration instance GHC.Show.Show Language.CSharp.Syntax.MethodBody instance GHC.Show.Show Language.CSharp.Syntax.EnumBody instance GHC.Show.Show Language.CSharp.Syntax.EnumMemberDeclaration instance GHC.Show.Show Language.CSharp.Syntax.ConstructorInitializer instance GHC.Show.Show Language.CSharp.Syntax.InterfaceAccessor instance GHC.Show.Show Language.CSharp.Syntax.AttributeSection instance GHC.Show.Show Language.CSharp.Syntax.GlobalAttributeSection instance GHC.Show.Show Language.CSharp.Syntax.Attribute instance GHC.Show.Show Language.CSharp.Syntax.AttributeArgument instance GHC.Show.Show Language.CSharp.Syntax.GotoTarget instance GHC.Show.Show Language.CSharp.Syntax.SwitchBlock instance GHC.Show.Show Language.CSharp.Syntax.ResourceAcquisition instance GHC.Show.Show Language.CSharp.Syntax.ArrayInitializer instance GHC.Show.Show Language.CSharp.Syntax.VariableInitializer instance GHC.Show.Show Language.CSharp.Syntax.VariableDeclarator instance GHC.Show.Show Language.CSharp.Syntax.LocalVarDeclaration instance GHC.Show.Show Language.CSharp.Syntax.ForInitializer instance GHC.Show.Show Language.CSharp.Syntax.Catch instance GHC.Show.Show Language.CSharp.Syntax.AnonymousFunctionBody instance GHC.Show.Show Language.CSharp.Syntax.ArrayCreationInitializer instance GHC.Show.Show Language.CSharp.Syntax.Argument instance GHC.Show.Show Language.CSharp.Syntax.InitializerTarget instance GHC.Show.Show Language.CSharp.Syntax.InitializerValue instance GHC.Show.Show Language.CSharp.Syntax.MemberInitializer instance GHC.Show.Show Language.CSharp.Syntax.ObjectCreationInitializer instance GHC.Show.Show Language.CSharp.Syntax.MemberAccess instance GHC.Show.Show Language.CSharp.Syntax.Expression instance GHC.Show.Show Language.CSharp.Syntax.Statement instance GHC.Show.Show Language.CSharp.Syntax.LocalVarType instance GHC.Show.Show Language.CSharp.Syntax.ExceptionSpecifier instance GHC.Show.Show Language.CSharp.Syntax.AnonymousFunctionSignature instance GHC.Show.Show Language.CSharp.Syntax.AnonymousFunctionParameter instance GHC.Show.Show Language.CSharp.Syntax.TypeOfExpression instance GHC.Show.Show Language.CSharp.Syntax.TypeParameterConstraintClause instance GHC.Show.Show Language.CSharp.Syntax.TypeParameterConstraint instance GHC.Show.Show Language.CSharp.Syntax.ParamArray instance GHC.Show.Show Language.CSharp.Syntax.ArrayType instance GHC.Show.Show Language.CSharp.Syntax.Type instance GHC.Show.Show Language.CSharp.Syntax.TypeArgument instance GHC.Show.Show Language.CSharp.Syntax.TypeName instance GHC.Show.Show Language.CSharp.Syntax.Name instance GHC.Show.Show Language.CSharp.Syntax.NameofEntity instance GHC.Show.Show Language.CSharp.Syntax.TypeParameter instance GHC.Show.Show Language.CSharp.Syntax.VariantTypeParameter instance GHC.Show.Show Language.CSharp.Syntax.Identifier instance GHC.Show.Show Language.CSharp.Syntax.Modifier instance GHC.Show.Show Language.CSharp.Syntax.AttributeTarget instance GHC.Show.Show Language.CSharp.Syntax.GlobalAttributeTarget instance GHC.Show.Show Language.CSharp.Syntax.RankSpecifier instance GHC.Show.Show Language.CSharp.Syntax.SimpleType instance GHC.Show.Show Language.CSharp.Syntax.FloatingPointType instance GHC.Show.Show Language.CSharp.Syntax.IntegralType instance GHC.Show.Show Language.CSharp.Syntax.Variance instance GHC.Show.Show Language.CSharp.Syntax.BinaryOperator instance GHC.Show.Show Language.CSharp.Syntax.AssignmentOperator instance GHC.Show.Show Language.CSharp.Syntax.Literal instance GHC.Show.Show Language.CSharp.Syntax.ParameterModifier instance GHC.Show.Show Language.CSharp.Syntax.OverloadableUnaryOperator -- | This module contains the pretty printing of the abstract syntax tree -- defined in Language.CSharp.Syntax. Pretty printing results in a -- syntactically valid program. module Language.CSharp.Pretty -- | Results in the pretty printed value of a. prettyPrint :: Pretty a => a -> String -- | Pretty printing type class. class Pretty a pretty :: Pretty a => a -> Doc instance Language.CSharp.Pretty.Pretty Text.PrettyPrint.HughesPJ.Doc instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.CompilationUnit instance Language.CSharp.Pretty.Pretty [Language.CSharp.Syntax.Using] instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.Using instance Language.CSharp.Pretty.Pretty [Language.CSharp.Syntax.Declaration] instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.Declaration instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.TypeDeclaration instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.ClassBody instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.StructBody instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.EnumBody instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.EnumMemberDeclaration instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.InterfaceBody instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.InterfaceMemberDeclaration instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.InterfaceAccessor instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.MemberDeclaration instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.EventAccessor instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.OperatorDeclarator instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.OverloadableUnaryOperator instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.OperatorBody instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.IndexerBody instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.IndexerDeclarator instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.PropertyBody instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.AccessorDeclaration instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.ConstructorBody instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.DestructorBody instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.ConstructorInitializer instance Language.CSharp.Pretty.Pretty [Language.CSharp.Syntax.Argument] instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.Argument instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.MethodBody instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.FormalParams instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.FormalParam instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.ParamArray instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.ParameterModifier instance Language.CSharp.Pretty.Pretty [Language.CSharp.Syntax.Statement] instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.Statement instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.ForInitializer instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.LocalVarDeclaration instance Language.CSharp.Pretty.Pretty [Language.CSharp.Syntax.Catch] instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.Catch instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.ExceptionSpecifier instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.GotoTarget instance Language.CSharp.Pretty.Pretty [Language.CSharp.Syntax.SwitchBlock] instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.SwitchBlock instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.ResourceAcquisition instance Language.CSharp.Pretty.Pretty [Language.CSharp.Syntax.VariableDeclarator] instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.VariableDeclarator instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.VariableInitializer instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.ArrayInitializer instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.Expression instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.AnonymousFunctionSignature instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.AnonymousFunctionParameter instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.AnonymousFunctionBody instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.NameofEntity instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.TypeOfExpression instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.ObjectCreationInitializer instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.ArrayCreationInitializer instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.MemberInitializer instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.InitializerTarget instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.InitializerValue instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.Literal instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.MemberAccess instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.AssignmentOperator instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.BinaryOperator instance Language.CSharp.Pretty.Pretty [Language.CSharp.Syntax.TypeParameter] instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.TypeParameter instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.TypeParameterConstraintClause instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.TypeParameterConstraint instance Language.CSharp.Pretty.Pretty [Language.CSharp.Syntax.VariantTypeParameter] instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.VariantTypeParameter instance Language.CSharp.Pretty.Pretty [Language.CSharp.Syntax.TypeArgument] instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.Variance instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.TypeArgument instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.Type instance Language.CSharp.Pretty.Pretty (GHC.Base.Maybe Language.CSharp.Syntax.Type) instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.SimpleType instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.IntegralType instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.FloatingPointType instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.ArrayType instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.RankSpecifier instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.LocalVarType instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.TypeName instance Language.CSharp.Pretty.Pretty [Language.CSharp.Syntax.GlobalAttributeSection] instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.GlobalAttributeSection instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.GlobalAttributeTarget instance Language.CSharp.Pretty.Pretty [Language.CSharp.Syntax.AttributeSection] instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.AttributeSection instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.AttributeTarget instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.Attribute instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.AttributeArgument instance Language.CSharp.Pretty.Pretty [Language.CSharp.Syntax.Modifier] instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.Modifier instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.Identifier instance Language.CSharp.Pretty.Pretty Language.CSharp.Syntax.Name module Language.CSharp.Parser.Utility type P = Parsec [Positioned Token] () pEqualSign :: P () pSemi :: P () pPeriod :: P () pComma :: P () pColon :: P () pLambda :: P () betweenParens :: P a -> P a betweenCurly :: P a -> P a betweenSquare :: P a -> P a betweenDiamond :: P a -> P a pOParens :: P () pCParens :: P () pOCurly :: P () pCCurly :: P () pSOpen :: P () pSClose :: P () pName :: P Name pIdentifierKeyword :: String -> P () pIdentifier :: P Identifier pToken :: Token -> P () eitherOrBoth :: P a -> P b -> P (Maybe a, Maybe b) chainlUnary1 :: P a -> P (a -> a) -> P a chainPostfix :: P a -> P (a -> a) -> P a posFromToken :: SourceName -> Positioned a -> SourcePos getSourceName :: P SourceName module Language.CSharp.Parser.Type pType :: P Type pNonArrayType :: P Type pClassType :: P Type pInterfaceType :: P Type pArrayOrNullableType :: P (Type -> Type) pTypeTerm :: P Type pTypeWithVoid :: P (Maybe Type) pSimpleType :: P SimpleType pIntegralType :: P IntegralType pFloatingPointType :: P FloatingPointType pArrayType :: P ArrayType pRankSpecifier :: P RankSpecifier pTypeName :: P TypeName pTypeParameters :: P [TypeParameter] pTypeParameter :: P TypeParameter pVariantTypeParameters :: P [VariantTypeParameter] pVariantTypeParameter :: P VariantTypeParameter pTypeParameterConstraintClause :: P TypeParameterConstraintClause pTypeParameterConstraints :: P [TypeParameterConstraint] pTypeArguments :: P [TypeArgument] pTypeArgument :: P TypeArgument module Language.CSharp.Parser.Expression pMaybeExpression :: P (Maybe Expression) pExpression :: P Expression pExpressionP1 :: P Expression pAssignmentOperator :: P AssignmentOperator pExpressionP2 :: P Expression pLambdaExpression :: P Expression pDelegateExpression :: P Expression pAnonymousFunctionSignature :: P AnonymousFunctionSignature pExplicitFunctionSignature :: P AnonymousFunctionSignature pAnonymousFunctionParameter :: P AnonymousFunctionParameter pAnonymousFunctionBody :: P AnonymousFunctionBody pExpressionP3 :: P Expression pConditional :: P Expression pExpressionP4 :: P Expression pExpressionP5 :: P Expression pExpressionP6 :: P Expression pExpressionP7 :: P Expression pExpressionP8 :: P Expression pExpressionP9 :: P Expression pExpressionP10 :: P Expression pExpressionP11 :: P Expression pExpressionP12 :: P Expression pExpressionP13 :: P Expression pExpressionP14 :: P Expression pExpressionP15 :: P Expression pExpressionP16 :: P Expression pExpressionP17 :: P Expression pPostfixOperator :: P (Expression -> Expression) pTerm :: P Expression pNameofEntity :: P NameofEntity pTypeOfExpression :: P TypeOfExpression pMemberAccess :: P MemberAccess pNewExpression :: P Expression pObjectCreationInitializer :: P ObjectCreationInitializer pMemberInitializer :: P MemberInitializer pArrayCreationInitializer :: P ArrayCreationInitializer pInitializerTarget :: P InitializerTarget pInitializerValue :: P InitializerValue pLiteralExpression :: P Expression pBooleanLiteral :: P Literal pIntLiteral :: P Literal pRealLiteral :: P Literal pCharLiteral :: P Literal pStringLiteral :: P Literal pParenthesizedExpression :: P Expression pArguments :: P [Argument] pArgument :: P Argument module Language.CSharp.Parser.Statement pStatements :: P [Statement] pStatement :: P Statement pLabeledStatement :: P Statement pDeclarationStatement :: P Statement pLocalVarDeclaration :: P LocalVarDeclaration pLocalVarType :: P LocalVarType pVariableDeclarator :: P VariableDeclarator pVariableInitializer :: P VariableInitializer pArrayInitializer :: P ArrayInitializer pBlockStatement :: P Statement pEmptyStatement :: P Statement pExpressionStatement :: P Statement pIfThenElseStatement :: P Statement pWhileStatement :: P Statement pDoStatement :: P Statement pForStatement :: P Statement pForInitializer :: P ForInitializer pForEachStatement :: P Statement pSwitchStatement :: P Statement pSwitchCaseBlock :: P SwitchBlock pSwitchDefaultBlock :: P SwitchBlock pTry :: P Statement pCatch :: P Catch pGotoStatement :: P Statement pGotoTarget :: P GotoTarget pBreakStatement :: P Statement pContinueStatement :: P Statement pReturnStatement :: P Statement pThrowStatement :: P Statement pLockStatement :: P Statement pUsingStatement :: P Statement pResourceAquisition :: P ResourceAcquisition pCheckedStatement :: P Statement pUncheckedStatement :: P Statement pYieldStatement :: P Statement module Language.CSharp.Parser.Attribute pGlobalAttributeSections :: P [GlobalAttributeSection] pGlobalAttributeSection :: P GlobalAttributeSection pGlobalAttributeTarget :: P GlobalAttributeTarget pAttributeSections :: P [AttributeSection] pAttributeSection :: P AttributeSection pAttributeTarget :: P AttributeTarget pAttribute :: P Attribute pAttributeArguments :: P [AttributeArgument] pAttributeArgumentExpression :: P AttributeArgument pAttributeArgumentNamed :: P AttributeArgument module Language.CSharp.Parser.Declaration pDeclaration :: P Declaration pNamespace :: P Declaration pTypeDeclaration :: P TypeDeclaration pEnum :: P TypeDeclaration pEnumBody :: P EnumBody pEnumMemberDeclaration :: P EnumMemberDeclaration pEnumModifier :: P Modifier pStruct :: P TypeDeclaration pStructBody :: P StructBody pStructModifier :: P Modifier pDelegate :: P TypeDeclaration pDelegateModifier :: P Modifier pInterface :: P TypeDeclaration pInterfaceBody :: P InterfaceBody pInterfaceMemberDeclaration :: P InterfaceMemberDeclaration pInterfaceMethodMemberDeclaration :: P InterfaceMemberDeclaration pInterfacePropertyMemberDeclaration :: P InterfaceMemberDeclaration pInterfaceEventMemberDeclaration :: P InterfaceMemberDeclaration pInterfaceIndexerMemberDeclaration :: P InterfaceMemberDeclaration pGetInterfaceAccessor :: P InterfaceAccessor pSetInterfaceAccessor :: P InterfaceAccessor pInterfaceModifier :: P Modifier pClass :: P TypeDeclaration pClassModifier :: P Modifier pClassBody :: P ClassBody pMemberDeclaration :: P MemberDeclaration pFieldDeclaration :: P MemberDeclaration pFieldModifier :: P Modifier pPropertyDeclaration :: P MemberDeclaration pPropertyLambda :: P PropertyBody pPropertyBody :: P PropertyBody pPropertyGetAccessor :: P AccessorDeclaration pPropertySetAccessor :: P AccessorDeclaration pPropertyAccessorModifiers :: P [Modifier] pPropertyModifier :: P Modifier pConstructorDeclaration :: P MemberDeclaration pConstructorInitializer :: P ConstructorInitializer pConstructorModifier :: P Modifier pDestructorDeclaration :: P MemberDeclaration pOperatorDeclaration :: P MemberDeclaration pOperatorDeclarator :: P OperatorDeclarator pOverloadableUnaryOperator :: P OverloadableUnaryOperator pOverloadableBinaryOperator :: P BinaryOperator pOperatorBody :: P OperatorBody pOperatorModifier :: P Modifier pEventDeclaration :: P MemberDeclaration pAddEventAccessor :: P EventAccessor pRemoveEventAccessor :: P EventAccessor pEventModifier :: P Modifier pIndexerDeclaration :: P MemberDeclaration pIndexerDeclarator :: P IndexerDeclarator pIndexerBody :: P IndexerBody pIndexerModifier :: P Modifier pMethodDeclaration :: P MemberDeclaration pMethodBody :: P MethodBody pMethodModifier :: P Modifier pFormalParams :: P FormalParams pFormalParam :: P FormalParam pParamArray :: P ParamArray pParameterModifier :: P ParameterModifier pOptionPartial :: P [Modifier] -- | This module containg the parsing of C# resulting in the abstract -- syntax tree defined in Language.CSharp.Syntax. This module -- exports all other specific parsing modules. module Language.CSharp.Parser -- | Parses the given list of tokens and returns either a parsing error or -- the abstract syntax tree. parser :: String -> [Positioned Token] -> Either ParseError CompilationUnit pCompilationUnit :: P CompilationUnit pUsing :: P Using