ppLocalDef :: Applicative f 
           => (LocalVarDoc -> Prec -> e -> f Doc)
           -> LocalVarDoc -- ^ Context outside let
           -> LocalVarDoc -- ^ Context inside let
           -> LocalDef e
           -> f Doc
ppLocalDef pp lcls lcls' (Def nm _qual tp eqs) =
    ppd <$> (pptc <$> pp lcls PrecLambda tp)
        <*> traverse (ppDefEqnF pp lcls' sym) (reverse eqs)
  where sym = text nm
        pptc tpd = hang 2 $ group (sym <<$>> doublecolon <+> tpd <> semi)
        ppd tpd eqds = vcat (tpd : eqds)
ppLocalDef :: Applicative f 
           => (LocalVarDoc -> Prec -> e -> f Doc)
           -> LocalVarDoc -- ^ Context outside let
           -> LocalVarDoc -- ^ Context inside let
           -> LocalDef e
           -> f Doc
ppLocalDef pp lcls lcls' (Def nm _qual tp eqs) =
    ppd <$> (pptc <$> pp lcls PrecLambda tp)
        <*> traverse (ppDefEqnF pp lcls' sym) (reverse eqs)
  where sym = text nm
        pptc tpd = hang 2 $ group (sym <<$>> doublecolon <+> tpd <> semi)
        ppd tpd eqds = vcat (tpd : eqds)
ppLocalDef pp lcls lcls' (Def nm _qual tp eqs) =
    ppd <$> (pptc <$> pp lcls PrecLambda tp)
        <*> traverse (ppDefEqnF pp lcls' sym) (reverse eqs)
  where sym = text nm
        pptc tpd = hang 2 $ group (sym <<$>> doublecolon <+> tpd <> semi)
        ppd tpd eqds = vcat (tpd : eqds)