-- | Print a lambda expression
prettyLam :: PrettyExp exp => Coloring -> Prec -> Maybe Ty -> exp -> Doc
prettyLam (Coloring (next : supply) existing) prec m_ty body
  = maybeParens (prec >= lamPrec) $
    fillSep [ char 'λ' <> next (char '#') <>
              maybe empty (\ty -> text ":" <> pretty ty) m_ty <> char '.'
            , prettyExp (Coloring supply (next : existing)) topPrec body ]

prettyLam :: PrettyExp exp => Coloring -> Prec -> Maybe Ty -> exp -> Doc
prettyLam (Coloring (next : supply) existing) prec m_ty body
  = maybeParens (prec >= lamPrec) $
    fillSep [ char 'λ' <> next (char '#') <>
              maybe empty (\ty -> text ":" <> pretty ty) m_ty <> char '.'
            , prettyExp (Coloring supply (next : existing)) topPrec body ]
prettyLam (Coloring (next : supply) existing) prec m_ty body
  = maybeParens (prec >= lamPrec) $
    fillSep [ char 'λ' <> next (char '#') <>
              maybe empty (\ty -> text ":" <> pretty ty) m_ty <> char '.'
            , prettyExp (Coloring supply (next : existing)) topPrec body ]