ppInferError :: InferError -> L.Doc
ppInferError e = case e of
    InvalidVar v d               ->
        let detail = "index" L.<+> L.int v L.<+> "at depth" L.<+> L.int d
        in "There is no binder for the given index, namely:" <?> detail
    InvalidApp aie               ->
        ppAppInferError aie
    NoUniversalType tp           ->
        "Can't apply a type to a term without a universal type, namely:" <?> ppTyping tp
    InvalidTyVars vs d ->
        "Type annotation uses invalid type variables, namely:" <?> commaAnd (L.int <$> vs)
ppInferError :: InferError -> L.Doc
ppInferError e = case e of
    InvalidVar v d               ->
        let detail = "index" L.<+> L.int v L.<+> "at depth" L.<+> L.int d
        in "There is no binder for the given index, namely:" <?> detail
    InvalidApp aie               ->
        ppAppInferError aie
    NoUniversalType tp           ->
        "Can't apply a type to a term without a universal type, namely:" <?> ppTyping tp
    InvalidTyVars vs d ->
        "Type annotation uses invalid type variables, namely:" <?> commaAnd (L.int <$> vs)
ppInferError e = case e of
    InvalidVar v d               ->
        let detail = "index" L.<+> L.int v L.<+> "at depth" L.<+> L.int d
        in "There is no binder for the given index, namely:" <?> detail
    InvalidApp aie               ->
        ppAppInferError aie
    NoUniversalType tp           ->
        "Can't apply a type to a term without a universal type, namely:" <?> ppTyping tp
    InvalidTyVars vs d ->
        "Type annotation uses invalid type variables, namely:" <?> commaAnd (L.int <$> vs)