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


-- | An implementation of name mangling/demangling for the Itanium ABI
--   
--   Currently supports everything in the standard but templates and C++11.
--   Support for these will be added. Includes a name mangler, demangler,
--   and pretty printer.
@package itanium-abi
@version 0.1.3

module ABI.Itanium
data DecodedName
Function :: Name -> [CXXType] -> DecodedName
Data :: Name -> DecodedName
VirtualTable :: CXXType -> DecodedName
VTTStructure :: CXXType -> DecodedName
TypeInfo :: CXXType -> DecodedName
TypeInfoName :: CXXType -> DecodedName
GuardVariable :: Name -> DecodedName
OverrideThunk :: CallOffset -> DecodedName -> DecodedName
OverrideThunkCovariant :: CallOffset -> CallOffset -> DecodedName -> DecodedName

-- | Const data that is not a builtin data type (as a <a>special-name</a>).
--   
--   This construct is not specifically identified in the documentation,
--   but for the following input:
--   
--   struct mystr { int val; }; const struct mystr here = { 9 };
--   
--   Also works with:
--   
--   class mycls { public: int val; } const class mycls here = { 8 };
--   
--   When compiled with Clang/LLVM results in Global Variable (apparently
--   always using the length-specified <a>source-name</a> syntax):
--   
--   _ZL4here
--   
--   This is apparently only used for const declarations and only for
--   non-builtin datatypes.
ConstStructData :: UnqualifiedName -> DecodedName
data CVQualifier
Restrict :: CVQualifier
Volatile :: CVQualifier
Const :: CVQualifier
data CXXType
QualifiedType :: [CVQualifier] -> CXXType -> CXXType
PointerToType :: CXXType -> CXXType
ReferenceToType :: CXXType -> CXXType
RValueReferenceToType :: CXXType -> CXXType
ComplexPairType :: CXXType -> CXXType
ImaginaryType :: CXXType -> CXXType
ParameterPack :: CXXType -> CXXType

-- | DeclTypeExpression <a>expression</a> | DeclTypeOther <a>expression</a>
VendorTypeQualifier :: String -> CXXType -> CXXType
VoidType :: CXXType
Wchar_tType :: CXXType
BoolType :: CXXType
CharType :: CXXType
SignedCharType :: CXXType
UnsignedCharType :: CXXType
ShortType :: CXXType
UnsignedShortType :: CXXType
IntType :: CXXType
UnsignedIntType :: CXXType
LongType :: CXXType
UnsignedLongType :: CXXType
LongLongType :: CXXType
UnsignedLongLongType :: CXXType
Int128Type :: CXXType
UnsignedInt128Type :: CXXType
FloatType :: CXXType
DoubleType :: CXXType
LongDoubleType :: CXXType
Float128Type :: CXXType
EllipsisType :: CXXType
Char32Type :: CXXType
Char16Type :: CXXType
AutoType :: CXXType
NullPtrType :: CXXType
VendorBuiltinType :: String -> CXXType
FunctionType :: [CXXType] -> CXXType
ExternCFunctionType :: [CXXType] -> CXXType

-- | int[5], normal array parameters. The dimension is elided for C99 VLAs
ArrayTypeN :: Maybe Int -> CXXType -> CXXType

-- | int[I + 1], expresions due to templates. The dimension is not optional
--   here; if it was it would just be an ArrayTypeN
ArrayTypeE :: Expression -> CXXType

-- | Class type, member type
PtrToMemberType :: CXXType -> CXXType -> CXXType
ClassEnumType :: Name -> CXXType
SubstitutionType :: Substitution -> CXXType
TemplateParamType :: TemplateParam -> CXXType
TemplateTemplateParamType :: TemplateParam -> [TemplateArg] -> CXXType
TemplateTemplateParamSubstitutionType :: Substitution -> [TemplateArg] -> CXXType
data Name
NestedName :: [CVQualifier] -> [Prefix] -> UnqualifiedName -> Name
NestedTemplateName :: [CVQualifier] -> [Prefix] -> [TemplateArg] -> Name
UnscopedName :: UName -> Name
UnscopedTemplateName :: UName -> [TemplateArg] -> Name
UnscopedTemplateSubstitution :: Substitution -> [TemplateArg] -> Name
data Prefix
DataMemberPrefix :: String -> Prefix
UnqualifiedPrefix :: UnqualifiedName -> Prefix
SubstitutionPrefix :: Substitution -> Prefix
TemplateParamPrefix :: TemplateParam -> Prefix
TemplateArgsPrefix :: [TemplateArg] -> Prefix
data UnqualifiedName
OperatorName :: Operator -> UnqualifiedName
CtorDtorName :: CtorDtor -> UnqualifiedName
SourceName :: String -> UnqualifiedName
data CtorDtor
C1 :: CtorDtor
C2 :: CtorDtor
C3 :: CtorDtor
D0 :: CtorDtor
D1 :: CtorDtor
D2 :: CtorDtor
data Operator

-- | new
OpNew :: Operator

-- | new[]
OpNewArray :: Operator

-- | delete
OpDelete :: Operator

-- | delete[]
OpDeleteArray :: Operator

-- | + (unary)
OpUPlus :: Operator

-- | <ul>
--   <li>(unary)</li>
--   </ul>
OpUMinus :: Operator

-- | &amp; (unary)
OpAddressOf :: Operator

-- | <ul>
--   <li>(unary)</li>
--   </ul>
OpDeref :: Operator

-- | ~
OpBitNot :: Operator

-- | +
OpPlus :: Operator

-- | <ul>
--   <li></li>
--   </ul>
OpMinus :: Operator

-- | <ul>
--   <li></li>
--   </ul>
OpMul :: Operator

-- | /
OpDiv :: Operator

-- | %
OpMod :: Operator

-- | &amp;
OpBitAnd :: Operator

-- | |
OpBitOr :: Operator

-- | ^
OpBitXor :: Operator

-- | =
OpAssign :: Operator
OpPlusAssign :: Operator
OpMinusAssign :: Operator
OpMulAssign :: Operator
OpDivAssign :: Operator
OpModAssign :: Operator
OpAndAssign :: Operator
OpOrAssign :: Operator
OpXorAssign :: Operator
OpShl :: Operator
OpShr :: Operator
OpShlAssign :: Operator
OpShrAssign :: Operator
OpEquals :: Operator
OpNotEquals :: Operator
OpLt :: Operator
OpGt :: Operator
OpLte :: Operator
OpGte :: Operator
OpNot :: Operator
OpAnd :: Operator
OpOr :: Operator
OpPlusPlus :: Operator
OpMinusMinus :: Operator
OpComma :: Operator
OpArrowStar :: Operator
OpArrow :: Operator
OpCall :: Operator
OpIndex :: Operator
OpQuestion :: Operator
OpSizeofType :: Operator
OpSizeofExpr :: Operator
OpAlignofType :: Operator
OpAlignofExpr :: Operator
OpCast :: CXXType -> Operator
OpVendor :: Int -> String -> Operator
data Expression
Expression :: Expression
data CallOffset
VirtualOffset :: Int -> Int -> CallOffset
NonVirtualOffset :: Int -> CallOffset
data Substitution
Substitution :: Maybe String -> Substitution
SubStdNamespace :: Substitution
SubStdAllocator :: Substitution
SubBasicString :: Substitution
SubBasicStringArgs :: Substitution
SubBasicIstream :: Substitution
SubBasicOstream :: Substitution
SubBasicIostream :: Substitution
data UName
UName :: UnqualifiedName -> UName
UStdName :: UnqualifiedName -> UName

-- | Demangle a name into a structured representation (or an error string)
demangleName :: String -> Either String DecodedName

-- | Re-mangle a name
mangleName :: DecodedName -> Maybe String

-- | Primary interface to get the pretty version of a parsed mangled name
--   in String form.
cxxNameToString :: (Monad m, MonadThrow m) => DecodedName -> m String

-- | Primary interface to get the pretty version of a parsed mangled name
--   in Text form. This is a monadic operation to support throwing an
--   exception in that outer monad when there is a pretty-printing
--   conversion error.
cxxNameToText :: (Monad m, MonadThrow m) => DecodedName -> m Text
rUnqualifiedPrefix :: forall tok e r. Boomerang e tok (UnqualifiedName :- r) (Prefix :- r)
rConst :: forall tok e r. Boomerang e tok r (CVQualifier :- r)
rSourceName :: forall tok e r. Boomerang e tok (String :- r) (UnqualifiedName :- r)
rUName :: forall tok e r. Boomerang e tok (UnqualifiedName :- r) (UName :- r)
rNestedName :: forall tok e r. Boomerang e tok ([CVQualifier] :- ([Prefix] :- (UnqualifiedName :- r))) (Name :- r)
rUnscopedName :: forall tok e r. Boomerang e tok (UName :- r) (Name :- r)
