I agree with Lennart and Daniel that closure is a specific implementation term and is not something specific in general. Moreover, I donโt hear how the Haskellers talk a lot about closure outside implementation problems; when programmers in other languages โโspeak casually about closures, they usually mean what we call lambdas. (Like in "Does this language have closures?".)
In any case, let me talk about the GHC.
GHC (or, more precisely, STG ) causes the closure of any heap object that is not a constructor application.
(If you think this is a broad definition, compare it to the original STG paper, where even constructors are called closures.)
Your inf is definitely an STG closure; it is a thunk that will be allocated to the heap and returned to the caller.
Roman cheplyaka
source share