HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulelanguage-c-0.10.2Haskell2010

Language.C.Analysis.TypeUtils

Contents
  1. Constructors
  2. Classifiers
  3. Type comparisons
  4. Other utilities
Synopsis
  • Packagelanguage-c-0.10.2
  • Exports32
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceTypeUtils.hs

Constructors

Classifiers

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

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

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.

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.

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

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