For example in:
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc7102" }:
nixpkgs.pkgs.haskell.packages.${compiler}.callPackage ./foo.nix { }
What does compiler ? "ghc7102"
indicate? I assume a conditional - but can't find this mentioned under https://nixos.org/nix/manual/#sec-constructs
Your example is a function with a set pattern and default values. Everything before :
is the pattern and the expressions after ?
are default values.