HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulelanguage-c-0.9.3Haskell2010

Language.C.Analysis.TypeUtils

  • 32 values
  • Packagelanguage-c-0.9.3
  • Exports32
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceTypeUtils.hs

Constructors

16 declarations
valueuint16_tType :: Type
#

The underlying type for uint16_t. For now, this is just unsigned short.

valueuint32_tType :: Type
#

The underlying type for uint32_t. For now, this is just unsigned int.

valueuint64_tType :: Type
#

The underlying type for uint64_t. For now, this is just unsigned long long.

valuesize_tType :: Type
#

The type returned by sizeof (size_t). For now, this is just int.

valueptrDiffType :: Type
#

The type of pointer differences (ptrdiff_t). For now, this is just int.

valueboolType :: Type
#

The type of comparisons/guards. This is always just int.

valuevalistType :: Type
#

The builtin type of variable-length argument lists.

Classifiers

13 declarations
valueisIntegralType :: Type -> Bool
#

Check whether a type is an integral type. This includes enum types. This function does not attempt to resolve typedef types.

valueisFloatingType :: Type -> Bool
#

Check whether a type is a floating-point numeric type. This function does not attempt to resolve typedef types.

valueisPointerType :: Type -> Bool
#

Check whether a type is an pointer type. This includes array types. This function does not attempt to resolve typedef types.

valueisScalarType :: Type -> Bool
#

Check whether a type is a scalar type. Scalar types include arithmetic types and pointer types.

valueisFunctionType :: Type -> Bool
#

return True if the given type is a function type

Result is undefined in the presence of undefined typeDefs

valuebaseType :: Type -> Type
#

Return the base type of a pointer or array type. It is an error to call this function with a type that is not in one of those two categories.

valuedeepDerefTypeDef :: Type -> Type
#

Attempt to remove all references to typedef types from a given type. Note that this does not dereference the types of structure or union fields, so there are still cases where further dereferencing is needed.

Type comparisons

1 declaration
valuesameType :: Type -> Type -> Bool
#

Two types denote the same type if they are identical, ignoring type definitions, and neither is a variably modified type.

Other utilities

2 declarations