ppOverlapPragma :: Maybe (Located OverlapMode) -> SDoc
ppOverlapPragma mb =
  case mb of
    Nothing           -> empty
    Just (L _ (NoOverlap _))    -> ptext (sLit "{-# NO_OVERLAP #-}")
    Just (L _ (Overlappable _)) -> ptext (sLit "{-# OVERLAPPABLE #-}")
    Just (L _ (Overlapping _))  -> ptext (sLit "{-# OVERLAPPING #-}")
    Just (L _ (Overlaps _))     -> ptext (sLit "{-# OVERLAPS #-}")
    Just (L _ (Incoherent _))   -> ptext (sLit "{-# INCOHERENT #-}")
ppOverlapPragma :: Maybe (Located OverlapMode) -> SDoc
ppOverlapPragma mb =
  case mb of
    Nothing           -> empty
    Just (L _ (NoOverlap _))    -> ptext (sLit "{-# NO_OVERLAP #-}")
    Just (L _ (Overlappable _)) -> ptext (sLit "{-# OVERLAPPABLE #-}")
    Just (L _ (Overlapping _))  -> ptext (sLit "{-# OVERLAPPING #-}")
    Just (L _ (Overlaps _))     -> ptext (sLit "{-# OVERLAPS #-}")
    Just (L _ (Incoherent _))   -> ptext (sLit "{-# INCOHERENT #-}")
ppOverlapPragma mb =
  case mb of
    Nothing           -> empty
    Just (L _ (NoOverlap _))    -> ptext (sLit "{-# NO_OVERLAP #-}")
    Just (L _ (Overlappable _)) -> ptext (sLit "{-# OVERLAPPABLE #-}")
    Just (L _ (Overlapping _))  -> ptext (sLit "{-# OVERLAPPING #-}")
    Just (L _ (Overlaps _))     -> ptext (sLit "{-# OVERLAPS #-}")
    Just (L _ (Incoherent _))   -> ptext (sLit "{-# INCOHERENT #-}")