[Haskell-cafe] What's the term for this? Alpha-reordering? [was: Re: FreeSect -- generalised sections syntax extension

AntC anthony_clayden at clear.net.nz
Sun Mar 4 01:55:18 CET 2012


Ras Far <rasfar <at> gmail.com> writes:

> I bit premature perhaps but I wanted to post it on a leap day...
> 
> http://fremissant.net/freesect
> 

Lambda calculus (and therefore Haskell) has a term 'alpha-renaming' for this:

    f x y = x + y
    g z w = z + w

`f` and `g` are equivalent "modulus alpha renaming", because the name of the 
dummy variables in the definition is entirely arbitrary -- they just stand for 
their position.

So in:

    subtract y {- from -} x = x - y

I want to say that `subtract` is equivalent to (-) "modulo ??? reordering".

Since partial application and the need to reorder arguments is so frequent in 
Haskell (and lambda-calculus), Haskell defines a combinator `flip`, so:

    subtract = flip (-)       -- equivalent definition for subtract

So is there an arbitrary greek letter term for reordering?

[Question prompted by a discussion on ghc-users re 'Records in Haskell'. 
There's a proposal using a typeclass with type arguments in a different order 
to the other proposals.]


AntC





More information about the Haskell-Cafe mailing list