2013-05-17 01:00:01 +00:00
|
|
|
module Language.Haskell.GhcMod.Doc where
|
2013-03-12 13:15:23 +00:00
|
|
|
|
|
|
|
import DynFlags (DynFlags)
|
2013-07-02 08:48:44 +00:00
|
|
|
import Language.Haskell.GhcMod.Gap (withStyle, styleUnqualified)
|
2013-03-12 13:15:23 +00:00
|
|
|
import Outputable
|
|
|
|
import Pretty
|
|
|
|
|
|
|
|
styleQualified :: PprStyle
|
|
|
|
styleQualified = mkUserStyle alwaysQualify AllTheWay
|
|
|
|
|
|
|
|
showQualifiedPage :: DynFlags -> SDoc -> String
|
|
|
|
showQualifiedPage dflag = showDocWith PageMode . withStyle dflag styleQualified
|
|
|
|
|
|
|
|
showQualifiedOneLine :: DynFlags -> SDoc -> String
|
|
|
|
showQualifiedOneLine dflag = showDocWith OneLineMode . withStyle dflag styleQualified
|
|
|
|
|
|
|
|
showUnqualifiedOneLine :: DynFlags -> SDoc -> String
|
|
|
|
showUnqualifiedOneLine dflag = showDocWith OneLineMode . withStyle dflag styleUnqualified
|