ghc-9.15: The GHC API
Safe HaskellNone
LanguageGHC2024

GHC.Types.Arity

Synopsis

Documentation

type Arity = Int Source #

The number of value arguments that can be applied to a value before it does "real work". So: fib 100 has arity 0 x -> fib x has arity 1 See also Note [Definition of arity] in GHC.Core.Opt.Arity

type FullArgCount = Int Source #

FullArgCount is the number of type or value arguments in an application, or the number of type or value binders in a lambda. Note: it includes both type and value arguments!

type JoinArity = Int Source #

The number of arguments that a join point takes. Unlike the arity of a function, this is a purely syntactic property and is fixed when the join point is created (or converted from a value). Both type and value arguments are counted.

type RepArity = Int Source #

Representation Arity

The number of represented arguments that can be applied to a value before it does "real work". So: fib 100 has representation arity 0 x -> fib x has representation arity 1 (# x, y #) -> fib (x + y) has representation arity 2

type VisArity = Int Source #

Syntactic (visibility) arity, i.e. the number of visible arguments. See Note [Visibility and arity]