-- mk_forall_ty makes a pure for-all type (no context)
mk_forall_ty :: [AddAnn] -> SrcSpan -> HsExplicitFlag -> Maybe SrcSpan
             -> LHsTyVarBndrs name
             -> LHsType name -> ([AddAnn],HsType name)
mk_forall_ty ann _ exp1 extra1 tvs1 (L _ (HsForAllTy exp2 extra qtvs2 ctxt ty))
  = (ann,HsForAllTy (exp1 `plus` exp2) (mergeExtra extra1 extra)
                    (tvs1 `mappend` qtvs2) ctxt ty)
  where
        -- Bias the merging of extra's to the top level, so that a single
        -- wildcard context will prevail
        mergeExtra (Just s) _ = Just s
        mergeExtra _        e = e
mk_forall_ty :: [AddAnn] -> SrcSpan -> HsExplicitFlag -> Maybe SrcSpan
             -> LHsTyVarBndrs name
             -> LHsType name -> ([AddAnn],HsType name)
mk_forall_ty ann _ exp1 extra1 tvs1 (L _ (HsForAllTy exp2 extra qtvs2 ctxt ty))
  = (ann,HsForAllTy (exp1 `plus` exp2) (mergeExtra extra1 extra)
                    (tvs1 `mappend` qtvs2) ctxt ty)
  where
        -- Bias the merging of extra's to the top level, so that a single
        -- wildcard context will prevail
        mergeExtra (Just s) _ = Just s
        mergeExtra _        e = e
mk_forall_ty ann _ exp1 extra1 tvs1 (L _ (HsForAllTy exp2 extra qtvs2 ctxt ty))
  = (ann,HsForAllTy (exp1 `plus` exp2) (mergeExtra extra1 extra)
                    (tvs1 `mappend` qtvs2) ctxt ty)
  where
        -- Bias the merging of extra's to the top level, so that a single
        -- wildcard context will prevail
        mergeExtra (Just s) _ = Just s
        mergeExtra _        e = e