use Std.Sigma supplies the projection globals .1/.2/.i lower to (sigma_first, sigma_second, tproj2tproj8). Every ordinary module receives those ambiently — Std.Sigma is a whole-module @prelude — but @prelude opaque type Tuple below puts THIS module in the prelude-bootstrap closure, and a bootstrap module is elaborated with no prelude of its own so it cannot be injected back into one of its own dependencies. The import must therefore be explicit. Std.Sigma imports nothing, so this adds no cycle.

Functions

  • # fn first(t: Tuple(a, b)) -> a

    The first component of a pair.

  • # fn second(t: Tuple(a, b)) -> b

    The second component of a pair.

  • # fn swap(t: Tuple(a, b)) -> Tuple(b, a)

    Swap the two components of a pair.

  • # fn third(t: Tuple(a, b, c)) -> c

    The third component of a 3-tuple.